mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
23 lines
700 KiB
JavaScript
23 lines
700 KiB
JavaScript
var ripple=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";e.exports={RippleAPI:n(1).RippleAPI,RippleAPIBroadcast:n(655).RippleAPIBroadcast}},function(e,t,n){(function(t){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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 s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function Y(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:Y(i,t,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)};t._babelPolyfill||n(2);var _=n(300),c=n(301).EventEmitter,u=n(302),f=n(539),h=f.connect,d=f.disconnect,l=f.getServerInfo,p=f.getFee,m=f.isConnected,g=f.getLedgerVersion,v=n(540),y=n(564),b=n(619),w=n(621),S=n(622),x=n(623),E=n(625),A=n(628),T=n(630),M=n(631),P=n(632),I=n(634),O=n(636),R=n(637),k=n(638),N=n(639),C=n(640),F=n(641),L=n(642),B=n(643),j=n(644),q=n(645),D=n(646),z=n(647),U=n(648),V=n(302).errors,$=n(649).generateAddressAPI,H=n(650),X=n(651),K=n(652),G=n(653),J=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"request",value:function(e,n){var r=e.ledger_index;return void 0!==r&&"validated"!==r&&(!_.isNumber(r)||r>this._ledgerVersion)?Promise.reject(new V.LedgerVersionError("ledgerVersion "+r+" is greater than server's most recent validated ledger: "+this._ledgerVersion)):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"request",this).call(this,e,n)}}]),t}(u.Connection),W=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),u.validate.apiOptions(e);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n._feeCushion=e.feeCushion||1.2;var o=e.server;return void 0!==o?(n.connection=new J(o,e),n.connection.on("ledgerClosed",function(e){n.emit("ledger",f.formatLedgerClose(e))}),n.connection.on("error",function(e,t,r){n.emit("error",e,t,r)}),n.connection.on("connected",function(){n.emit("connected")}),n.connection.on("disconnected",function(e){n.emit("disconnected",e)})):n.connection=new J(null,e),n}return o(t,e),t}(c);_.assign(W.prototype,{connect:h,disconnect:d,isConnected:m,getServerInfo:l,getFee:p,getLedgerVersion:g,getTransaction:v,getTransactions:y,getTrustlines:b,getBalances:w,getBalanceSheet:S,getPaths:x,getOrders:E,getOrderbook:A,getSettings:T,getAccountInfo:M,getPaymentChannel:P,getLedger:G,preparePayment:I,prepareTrustline:O,prepareOrder:R,prepareOrderCancellation:k,prepareEscrowCreation:N,prepareEscrowExecution:C,prepareEscrowCancellation:F,preparePaymentChannelCreate:L,preparePaymentChannelFund:B,preparePaymentChannelClaim:j,prepareSettings:q,sign:D,combine:z,submit:U,generateAddress:$,computeLedgerHash:H,signPaymentChannelClaim:X,verifyPaymentChannelClaim:K,errors:V}),W._PRIVATE={validate:u.validate,RangeSet:n(412).RangeSet,ledgerUtils:n(541),schemaValidator:n(434)},e.exports={RippleAPI:W}}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function t(e,t,n){e[t]||Object[r](e,t,{writable:!0,configurable:!0,value:n})}if(n(3),n(295),n(297),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(e){[][e]&&t(Array,e,Function.call.bind([][e]))})}).call(t,function(){return this}())},function(e,t,n){n(4),n(53),n(54),n(55),n(56),n(58),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(68),n(69),n(71),n(73),n(75),n(77),n(80),n(81),n(82),n(86),n(88),n(90),n(94),n(95),n(96),n(97),n(99),n(100),n(101),n(102),n(103),n(104),n(105),n(107),n(108),n(109),n(111),n(112),n(113),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(126),n(127),n(128),n(133),n(134),n(138),n(139),n(140),n(141),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(161),n(162),n(168),n(169),n(171),n(172),n(173),n(177),n(178),n(179),n(180),n(181),n(183),n(184),n(185),n(186),n(189),n(191),n(192),n(193),n(195),n(197),n(199),n(200),n(201),n(203),n(204),n(205),n(206),n(212),n(215),n(216),n(218),n(219),n(222),n(223),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(246),n(247),n(248),n(249),n(250),n(251),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(262),n(263),n(265),n(266),n(267),n(268),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(293),n(294),e.exports=n(10)},function(e,t,n){"use strict";var r=n(5),i=n(6),o=n(7),s=n(9),a=n(19),c=n(23).KEY,u=n(8),f=n(24),h=n(25),d=n(20),l=n(26),p=n(27),m=n(28),g=n(30),v=n(43),y=n(46),b=n(13),w=n(33),S=n(17),x=n(18),E=n(47),A=n(50),T=n(52),M=n(12),P=n(31),I=T.f,O=M.f,R=A.f,k=r.Symbol,N=r.JSON,C=N&&N.stringify,F="prototype",L=l("_hidden"),B=l("toPrimitive"),j={}.propertyIsEnumerable,q=f("symbol-registry"),D=f("symbols"),z=f("op-symbols"),U=Object[F],V="function"==typeof k,$=r.QObject,H=!$||!$[F]||!$[F].findChild,X=o&&u(function(){return 7!=E(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=I(U,t);r&&delete U[t],O(e,t,n),r&&e!==U&&O(U,t,r)}:O,K=function(e){var t=D[e]=E(k[F]);return t._k=e,t},G=V&&"symbol"==typeof k.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof k},J=function(e,t,n){return e===U&&J(z,t,n),b(e),t=S(t,!0),b(n),i(D,t)?(n.enumerable?(i(e,L)&&e[L][t]&&(e[L][t]=!1),n=E(n,{enumerable:x(0,!1)})):(i(e,L)||O(e,L,x(1,{})),e[L][t]=!0),X(e,t,n)):O(e,t,n)},W=function(e,t){b(e);for(var n,r=v(t=w(t)),i=0,o=r.length;o>i;)J(e,n=r[i++],t[n]);return e},Y=function(e,t){return void 0===t?E(e):W(E(e),t)},Z=function(e){var t=j.call(this,e=S(e,!0));return!(this===U&&i(D,e)&&!i(z,e))&&(!(t||!i(this,e)||!i(D,e)||i(this,L)&&this[L][e])||t)},Q=function(e,t){if(e=w(e),t=S(t,!0),e!==U||!i(D,t)||i(z,t)){var n=I(e,t);return!n||!i(D,t)||i(e,L)&&e[L][t]||(n.enumerable=!0),n}},ee=function(e){for(var t,n=R(w(e)),r=[],o=0;n.length>o;)i(D,t=n[o++])||t==L||t==c||r.push(t);return r},te=function(e){for(var t,n=e===U,r=R(n?z:w(e)),o=[],s=0;r.length>s;)!i(D,t=r[s++])||n&&!i(U,t)||o.push(D[t]);return o};V||(k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===U&&t.call(z,n),i(this,L)&&i(this[L],e)&&(this[L][e]=!1),X(this,e,x(1,n))};return o&&H&&X(U,e,{configurable:!0,set:t}),K(e)},a(k[F],"toString",function(){return this._k}),T.f=Q,M.f=J,n(51).f=A.f=ee,n(45).f=Z,n(44).f=te,o&&!n(29)&&a(U,"propertyIsEnumerable",Z,!0),p.f=function(e){return K(l(e))}),s(s.G+s.W+s.F*!V,{Symbol:k});for(var ne="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;ne.length>re;)l(ne[re++]);for(var ne=P(l.store),re=0;ne.length>re;)m(ne[re++]);s(s.S+s.F*!V,"Symbol",{"for":function(e){return i(q,e+="")?q[e]:q[e]=k(e)},keyFor:function(e){if(G(e))return g(q,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){H=!0},useSimple:function(){H=!1}}),s(s.S+s.F*!V,"Object",{create:Y,defineProperty:J,defineProperties:W,getOwnPropertyDescriptor:Q,getOwnPropertyNames:ee,getOwnPropertySymbols:te}),N&&s(s.S+s.F*(!V||u(function(){var e=k();return"[null]"!=C([e])||"{}"!=C({a:e})||"{}"!=C(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!G(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&y(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!G(t))return t}),r[1]=t,C.apply(N,r)}}}),k[F][B]||n(11)(k[F],B,k[F].valueOf),h(k,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){e.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var r=n(5),i=n(10),o=n(11),s=n(19),a=n(21),c="prototype",u=function(e,t,n){var f,h,d,l,p=e&u.F,m=e&u.G,g=e&u.S,v=e&u.P,y=e&u.B,b=m?r:g?r[t]||(r[t]={}):(r[t]||{})[c],w=m?i:i[t]||(i[t]={}),S=w[c]||(w[c]={});m&&(n=t);for(f in n)h=!p&&b&&void 0!==b[f],d=(h?b:n)[f],l=y&&h?a(d,r):v&&"function"==typeof d?a(Function.call,d):d,b&&s(b,f,d,e&u.U),w[f]!=d&&o(w,f,l),v&&S[f]!=d&&(S[f]=d)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(12),i=n(18);e.exports=n(7)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(13),i=n(15),o=n(17),s=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return s(e,t,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(14);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(7)&&!n(8)(function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(14),i=n(5).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(14);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(5),i=n(11),o=n(6),s=n(20)("src"),a="toString",c=Function[a],u=(""+c).split(a);n(10).inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,a){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(o(n,s)||i(n,s,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:a?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,a,function(){return"function"==typeof this&&this[s]||c.call(this)})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(22);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(20)("meta"),i=n(14),o=n(6),s=n(12).f,a=0,c=Object.isExtensible||function(){return!0},u=!n(8)(function(){return c(Object.preventExtensions({}))}),f=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},h=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!c(e))return"F";if(!t)return"E";f(e)}return e[r].i},d=function(e,t){if(!o(e,r)){if(!c(e))return!0;if(!t)return!1;f(e)}return e[r].w},l=function(e){return u&&p.NEED&&c(e)&&!o(e,r)&&f(e),e},p=e.exports={KEY:r,NEED:!1,fastKey:h,getWeak:d,onFreeze:l}},function(e,t,n){var r=n(5),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t,n){var r=n(12).f,i=n(6),o=n(26)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(24)("wks"),i=n(20),o=n(5).Symbol,s="function"==typeof o,a=e.exports=function(e){return r[e]||(r[e]=s&&o[e]||(s?o:i)("Symbol."+e))};a.store=r},function(e,t,n){t.f=n(26)},function(e,t,n){var r=n(5),i=n(10),o=n(29),s=n(27),a=n(12).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},function(e,t){e.exports=!1},function(e,t,n){var r=n(31),i=n(33);e.exports=function(e,t){for(var n,o=i(e),s=r(o),a=s.length,c=0;a>c;)if(o[n=s[c++]]===t)return n}},function(e,t,n){var r=n(32),i=n(42);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(6),i=n(33),o=n(37)(!1),s=n(41)("IE_PROTO");e.exports=function(e,t){var n,a=i(e),c=0,u=[];for(n in a)n!=s&&r(a,n)&&u.push(n);for(;t.length>c;)r(a,n=t[c++])&&(~o(u,n)||u.push(n));return u}},function(e,t,n){var r=n(34),i=n(36);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(35);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(33),i=n(38),o=n(40);e.exports=function(e){return function(t,n,s){var a,c=r(t),u=i(c.length),f=o(s,u);if(e&&n!=n){for(;u>f;)if(a=c[f++],a!=a)return!0}else for(;u>f;f++)if((e||f in c)&&c[f]===n)return e||f||0;return!e&&-1}}},function(e,t,n){var r=n(39),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(39),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(24)("keys"),i=n(20);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(31),i=n(44),o=n(45);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var s,a=n(e),c=o.f,u=0;a.length>u;)c.call(e,s=a[u++])&&t.push(s);return t}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(35);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(13),i=n(48),o=n(42),s=n(41)("IE_PROTO"),a=function(){},c="prototype",u=function(){var e,t=n(16)("iframe"),r=o.length,i=">";for(t.style.display="none",n(49).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object</script"+i),e.close(),u=e.F;r--;)delete u[c][o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[c]=r(e),n=new a,a[c]=null,n[s]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(12),i=n(13),o=n(31);e.exports=n(7)?Object.defineProperties:function(e,t){i(e);for(var n,s=o(t),a=s.length,c=0;a>c;)r.f(e,n=s[c++],t[n]);return e}},function(e,t,n){e.exports=n(5).document&&document.documentElement},function(e,t,n){var r=n(33),i=n(51).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return i(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==o.call(e)?a(e):i(r(e))}},function(e,t,n){var r=n(32),i=n(42).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(45),i=n(18),o=n(33),s=n(17),a=n(6),c=n(15),u=Object.getOwnPropertyDescriptor;t.f=n(7)?u:function(e,t){if(e=o(e),t=s(t,!0),c)try{return u(e,t)}catch(n){}if(a(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(9);r(r.S,"Object",{create:n(47)})},function(e,t,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperty:n(12).f})},function(e,t,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperties:n(48)})},function(e,t,n){var r=n(33),i=n(52).f;n(57)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},function(e,t,n){var r=n(9),i=n(10),o=n(8);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(e,t,n){var r=n(59),i=n(60);n(57)("getPrototypeOf",function(){return function(e){return i(r(e))}})},function(e,t,n){var r=n(36);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(6),i=n(59),o=n(41)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){var r=n(59),i=n(31);n(57)("keys",function(){return function(e){return i(r(e))}})},function(e,t,n){n(57)("getOwnPropertyNames",function(){return n(50).f})},function(e,t,n){var r=n(14),i=n(23).onFreeze;n(57)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(14),i=n(23).onFreeze;n(57)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(14),i=n(23).onFreeze;n(57)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(14);n(57)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(14);n(57)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(14);n(57)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},function(e,t,n){var r=n(9);r(r.S+r.F,"Object",{assign:n(70)})},function(e,t,n){"use strict";var r=n(31),i=n(44),o=n(45),s=n(59),a=n(34),c=Object.assign;e.exports=!c||n(8)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=r})?function(e,t){for(var n=s(e),c=arguments.length,u=1,f=i.f,h=o.f;c>u;)for(var d,l=a(arguments[u++]),p=f?r(l).concat(f(l)):r(l),m=p.length,g=0;m>g;)h.call(l,d=p[g++])&&(n[d]=l[d]);return n}:c},function(e,t,n){var r=n(9);r(r.S,"Object",{is:n(72)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(74).set})},function(e,t,n){var r=n(14),i=n(13),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(21)(Function.call,n(52).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";var r=n(76),i={};i[n(26)("toStringTag")]="z",i+""!="[object z]"&&n(19)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(35),i=n(26)("toStringTag"),o="Arguments"==r(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(9);r(r.P,"Function",{bind:n(78)})},function(e,t,n){"use strict";var r=n(22),i=n(14),o=n(79),s=[].slice,a={},c=function(e,t,n){if(!(t in a)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";a[t]=Function("F,a","return new F("+r.join(",")+")")}return a[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=s.call(arguments,1),a=function(){var r=n.concat(s.call(arguments));return this instanceof a?c(t,r.length,r):o(t,r,e)};return i(t.prototype)&&(a.prototype=t.prototype),a}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(12).f,i=n(18),o=n(6),s=Function.prototype,a=/^\s*function ([^ (]*)/,c="name",u=Object.isExtensible||function(){return!0};c in s||n(7)&&r(s,c,{configurable:!0,get:function(){try{var e=this,t=(""+e).match(a)[1];return o(e,c)||!u(e)||r(e,c,i(5,t)),t}catch(n){return""}}})},function(e,t,n){"use strict";var r=n(14),i=n(60),o=n(26)("hasInstance"),s=Function.prototype;o in s||n(12).f(s,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(9),i=n(83);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(e,t,n){var r=n(5).parseInt,i=n(84).trim,o=n(85),s=/^[\-+]?0[xX]/;e.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(s.test(n)?16:10))}:r},function(e,t,n){var r=n(9),i=n(36),o=n(8),s=n(85),a="["+s+"]",c="
",u=RegExp("^"+a+a+"*"),f=RegExp(a+a+"*$"),h=function(e,t,n){var i={},a=o(function(){return!!s[e]()||c[e]()!=c}),u=i[e]=a?t(d):s[e];n&&(i[n]=u),r(r.P+r.F*a,"String",i)},d=h.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(f,"")),e};e.exports=h},function(e,t){e.exports="\t\n\x0B\f\r \u2028\u2029\ufeff"},function(e,t,n){var r=n(9),i=n(87);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){var r=n(5).parseFloat,i=n(84).trim;e.exports=1/r(n(85)+"-0")!==-(1/0)?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){"use strict";var r=n(5),i=n(6),o=n(35),s=n(89),a=n(17),c=n(8),u=n(51).f,f=n(52).f,h=n(12).f,d=n(84).trim,l="Number",p=r[l],m=p,g=p.prototype,v=o(n(47)(g))==l,y="trim"in String.prototype,b=function(e){var t=a(e,!1);if("string"==typeof t&&t.length>2){t=y?t.trim():d(t,3);var n,r,i,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var s,c=t.slice(2),u=0,f=c.length;u<f;u++)if(s=c.charCodeAt(u),s<48||s>i)return NaN;return parseInt(c,r)}}return+t};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof p&&(v?c(function(){g.valueOf.call(n)}):o(n)!=l)?s(new m(b(t)),n,p):b(t)};for(var w,S=n(7)?u(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;S.length>x;x++)i(m,w=S[x])&&!i(p,w)&&h(p,w,f(m,w));p.prototype=g,g.constructor=p,n(19)(r,l,p)}},function(e,t,n){var r=n(14),i=n(74).set;e.exports=function(e,t,n){var o,s=t.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){"use strict";var r=n(9),i=(n(91),n(39)),o=n(92),s=n(93),a=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",h="0",d=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*u[n],u[n]=r%1e7,r=c(r/1e7)},l=function(e){for(var t=6,n=0;--t>=0;)n+=u[t],u[t]=c(n/e),n=n%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var n=String(u[e]);t=""===t?n:t+s.call(h,7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2===1?m(e,t-1,n*e):m(e*e,t/2,n)},g=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(8)(function(){a.call({})})),"Number",{toFixed:function(e){var t,n,r,a,c=o(this,f),u=i(e),v="",y=h;if(u<0||u>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(v="-",c=-c),c>1e-21)if(t=g(c*m(2,69,1))-69,n=t<0?c*m(2,-t,1):c/m(2,t,1),n*=4503599627370496,t=52-t,t>0){for(d(0,n),r=u;r>=7;)d(1e7,0),r-=7;for(d(m(10,r,1),0),r=t-1;r>=23;)l(1<<23),r-=23;l(1<<r),d(1,1),l(2),y=p()}else d(0,n),d(1<<-t,0),y=p()+s.call(h,u);return u>0?(a=y.length,y=v+(a<=u?"0."+s.call(h,u-a)+y:y.slice(0,a-u)+"."+y.slice(a-u))):y=v+y,y}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(35);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(39),i=n(36);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(9),i=n(8),o=n(92),s=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==s.call(1,void 0)})||!i(function(){s.call({})})),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?s.call(t):s.call(t,e)}})},function(e,t,n){var r=n(9);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(9),i=n(5).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(9);r(r.S,"Number",{isInteger:n(98)})},function(e,t,n){var r=n(14),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var r=n(9);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(9),i=n(98),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){var r=n(9);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(9);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(9),i=n(87);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(9),i=n(83);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(9),i=n(106),o=Math.sqrt,s=Math.acosh;r(r.S+r.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))&&s(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(9),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(9),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(9),i=n(110);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(9);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(9),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(9),i=n(114);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(9),i=n(110),o=Math.pow,s=o(2,-52),a=o(2,-23),c=o(2,127)*(2-a),u=o(2,-126),f=function(e){return e+1/s-1/s};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),o=i(e);return r<u?o*f(r/u/a)*u*a:(t=(1+a/s)*r,n=t-(t-r),n>c||n!=n?o*(1/0):o*n)}})},function(e,t,n){var r=n(9),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,s=0,a=arguments.length,c=0;s<a;)n=i(arguments[s++]),c<n?(r=c/n,o=o*r*r+1,c=n):n>0?(r=n/c,o+=r*r):o+=n;return c===1/0?1/0:c*Math.sqrt(o)}})},function(e,t,n){var r=n(9),i=Math.imul;r(r.S+r.F*n(8)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,s=n&i;return 0|o*s+((n&r>>>16)*s+o*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var r=n(9);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,n){var r=n(9);r(r.S,"Math",{log1p:n(106)})},function(e,t,n){var r=n(9);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(9);r(r.S,"Math",{sign:n(110)})},function(e,t,n){var r=n(9),i=n(114),o=Math.exp;r(r.S+r.F*n(8)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(9),i=n(114),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var r=n(9);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(9),i=n(40),o=String.fromCharCode,s=String.fromCodePoint;r(r.S+r.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,s=0;r>s;){if(t=+arguments[s++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(9),i=n(33),o=n(38);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,s=[],a=0;n>a;)s.push(String(t[a++])),a<r&&s.push(String(arguments[a]));return s.join("")}})},function(e,t,n){"use strict";n(84)("trim",function(e){return function(){return e(this,3)}})},function(e,t,n){"use strict";var r=n(129)(!0);n(130)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(39),i=n(36);e.exports=function(e){return function(t,n){var o,s,a=String(i(t)),c=r(n),u=a.length;return c<0||c>=u?e?"":void 0:(o=a.charCodeAt(c),o<55296||o>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?e?a.charAt(c):o:e?a.slice(c,c+2):(o-55296<<10)+(s-56320)+65536)}}},function(e,t,n){"use strict";var r=n(29),i=n(9),o=n(19),s=n(11),a=n(6),c=n(131),u=n(132),f=n(25),h=n(60),d=n(26)("iterator"),l=!([].keys&&"next"in[].keys()),p="@@iterator",m="keys",g="values",v=function(){return this};e.exports=function(e,t,n,y,b,w,S){u(n,t,y);var x,E,A,T=function(e){if(!l&&e in O)return O[e];switch(e){case m:return function(){return new n(this,e)};case g:return function(){return new n(this,e)}}return function(){return new n(this,e)}},M=t+" Iterator",P=b==g,I=!1,O=e.prototype,R=O[d]||O[p]||b&&O[b],k=R||T(b),N=b?P?T("entries"):k:void 0,C="Array"==t?O.entries||R:R;if(C&&(A=h(C.call(new e)),A!==Object.prototype&&(f(A,M,!0),r||a(A,d)||s(A,d,v))),P&&R&&R.name!==g&&(I=!0,k=function(){return R.call(this)}),r&&!S||!l&&!I&&O[d]||s(O,d,k),c[t]=k,c[M]=v,b)if(x={values:P?k:T(g),keys:w?k:T(m),entries:N},S)for(E in x)E in O||o(O,E,x[E]);else i(i.P+i.F*(l||I),t,x);return x}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(47),i=n(18),o=n(25),s={};n(11)(s,n(26)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(s,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(9),i=n(129)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";
|
||
var r=n(9),i=n(38),o=n(135),s="endsWith",a=""[s];r(r.P+r.F*n(137)(s),"String",{endsWith:function(e){var t=o(this,e,s),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),c=void 0===n?r:Math.min(i(n),r),u=String(e);return a?a.call(t,u,c):t.slice(c-u.length,c)===u}})},function(e,t,n){var r=n(136),i=n(36);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(14),i=n(35),o=n(26)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(26)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(i){}}return!0}},function(e,t,n){"use strict";var r=n(9),i=n(135),o="includes";r(r.P+r.F*n(137)(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(9);r(r.P,"String",{repeat:n(93)})},function(e,t,n){"use strict";var r=n(9),i=n(38),o=n(135),s="startsWith",a=""[s];r(r.P+r.F*n(137)(s),"String",{startsWith:function(e){var t=o(this,e,s),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return a?a.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(142)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){var r=n(9),i=n(8),o=n(36),s=/"/g,a=function(e,t,n,r){var i=String(o(e)),a="<"+t;return""!==n&&(a+=" "+n+'="'+String(r).replace(s,""")+'"'),a+">"+i+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(a),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){"use strict";n(142)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(142)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(142)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(142)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(142)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(142)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(142)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(142)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(142)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(142)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(142)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(142)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(9);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(17);r(r.P+r.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var r=n(9),i=n(8),o=Date.prototype.getTime,s=function(e){return e>9?e:"0"+e};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+s(e.getUTCMonth()+1)+"-"+s(e.getUTCDate())+"T"+s(e.getUTCHours())+":"+s(e.getUTCMinutes())+":"+s(e.getUTCSeconds())+"."+(n>99?n:"0"+s(n))+"Z"}})},function(e,t,n){var r=Date.prototype,i="Invalid Date",o="toString",s=r[o],a=r.getTime;new Date(NaN)+""!=i&&n(19)(r,o,function(){var e=a.call(this);return e===e?s.call(this):i})},function(e,t,n){var r=n(26)("toPrimitive"),i=Date.prototype;r in i||n(11)(i,r,n(160))},function(e,t,n){"use strict";var r=n(13),i=n(17),o="number";e.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=o)}},function(e,t,n){var r=n(9);r(r.S,"Array",{isArray:n(46)})},function(e,t,n){"use strict";var r=n(21),i=n(9),o=n(59),s=n(163),a=n(164),c=n(38),u=n(165),f=n(166);i(i.S+i.F*!n(167)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,h,d=o(e),l="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,y=f(d);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),void 0==y||l==Array&&a(y))for(t=c(d.length),n=new l(t);t>v;v++)u(n,v,g?m(d[v],v):d[v]);else for(h=y.call(d),n=new l;!(i=h.next()).done;v++)u(n,v,g?s(h,m,[i.value,v],!0):i.value);return n.length=v,n}})},function(e,t,n){var r=n(13);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(o){var s=e["return"];throw void 0!==s&&r(s.call(e)),o}}},function(e,t,n){var r=n(131),i=n(26)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){"use strict";var r=n(12),i=n(18);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(76),i=n(26)("iterator"),o=n(131);e.exports=n(10).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(26)("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},e(o)}catch(a){}return n}},function(e,t,n){"use strict";var r=n(9),i=n(165);r(r.S+r.F*n(8)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(9),i=n(33),o=[].join;r(r.P+r.F*(n(34)!=Object||!n(170)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},function(e,t,n){var r=n(8);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";var r=n(9),i=n(49),o=n(35),s=n(40),a=n(38),c=[].slice;r(r.P+r.F*n(8)(function(){i&&c.call(i)}),"Array",{slice:function(e,t){var n=a(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return c.call(this,e,t);for(var i=s(e,n),u=s(t,n),f=a(u-i),h=Array(f),d=0;d<f;d++)h[d]="String"==r?this.charAt(i+d):this[i+d];return h}})},function(e,t,n){"use strict";var r=n(9),i=n(22),o=n(59),s=n(8),a=[].sort,c=[1,2,3];r(r.P+r.F*(s(function(){c.sort(void 0)})||!s(function(){c.sort(null)})||!n(170)(a)),"Array",{sort:function(e){return void 0===e?a.call(o(this)):a.call(o(this),i(e))}})},function(e,t,n){"use strict";var r=n(9),i=n(174)(0),o=n(170)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var r=n(21),i=n(34),o=n(59),s=n(38),a=n(175);e.exports=function(e,t){var n=1==e,c=2==e,u=3==e,f=4==e,h=6==e,d=5==e||h,l=t||a;return function(t,a,p){for(var m,g,v=o(t),y=i(v),b=r(a,p,3),w=s(y.length),S=0,x=n?l(t,w):c?l(t,0):void 0;w>S;S++)if((d||S in y)&&(m=y[S],g=b(m,S,v),e))if(n)x[S]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return S;case 2:x.push(m)}else if(f)return!1;return h?-1:u||f?f:x}}},function(e,t,n){var r=n(176);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(14),i=n(46),o=n(26)("species");e.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&(t=t[o],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(9),i=n(174)(1);r(r.P+r.F*!n(170)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(174)(2);r(r.P+r.F*!n(170)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(174)(3);r(r.P+r.F*!n(170)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(174)(4);r(r.P+r.F*!n(170)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(182);r(r.P+r.F*!n(170)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){var r=n(22),i=n(59),o=n(34),s=n(38);e.exports=function(e,t,n,a,c){r(t);var u=i(e),f=o(u),h=s(u.length),d=c?h-1:0,l=c?-1:1;if(n<2)for(;;){if(d in f){a=f[d],d+=l;break}if(d+=l,c?d<0:h<=d)throw TypeError("Reduce of empty array with no initial value")}for(;c?d>=0:h>d;d+=l)d in f&&(a=t(a,f[d],d,u));return a}},function(e,t,n){"use strict";var r=n(9),i=n(182);r(r.P+r.F*!n(170)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(9),i=n(37)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(s||!n(170)(o)),"Array",{indexOf:function(e){return s?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(9),i=n(33),o=n(39),s=n(38),a=[].lastIndexOf,c=!!a&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(170)(a)),"Array",{lastIndexOf:function(e){if(c)return a.apply(this,arguments)||0;var t=i(this),n=s(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(9);r(r.P,"Array",{copyWithin:n(187)}),n(188)("copyWithin")},function(e,t,n){"use strict";var r=n(59),i=n(40),o=n(38);e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n.length),a=i(e,s),c=i(t,s),u=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===u?s:i(u,s))-c,s-a),h=1;for(c<a&&a<c+f&&(h=-1,c+=f-1,a+=f-1);f-- >0;)c in n?n[a]=n[c]:delete n[a],a+=h,c+=h;return n}},function(e,t,n){var r=n(26)("unscopables"),i=Array.prototype;void 0==i[r]&&n(11)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(9);r(r.P,"Array",{fill:n(190)}),n(188)("fill")},function(e,t,n){"use strict";var r=n(59),i=n(40),o=n(38);e.exports=function(e){for(var t=r(this),n=o(t.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),c=s>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>a;)t[a++]=e;return t}},function(e,t,n){"use strict";var r=n(9),i=n(174)(5),o="find",s=!0;o in[]&&Array(1)[o](function(){s=!1}),r(r.P+r.F*s,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(188)(o)},function(e,t,n){"use strict";var r=n(9),i=n(174)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),r(r.P+r.F*s,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(188)(o)},function(e,t,n){n(194)("Array")},function(e,t,n){"use strict";var r=n(5),i=n(12),o=n(7),s=n(26)("species");e.exports=function(e){var t=r[e];o&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(188),i=n(196),o=n(131),s=n(33);e.exports=n(130)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(5),i=n(89),o=n(12).f,s=n(51).f,a=n(136),c=n(198),u=r.RegExp,f=u,h=u.prototype,d=/a/g,l=/a/g,p=new u(d)!==d;if(n(7)&&(!p||n(8)(function(){return l[n(26)("match")]=!1,u(d)!=d||u(l)==l||"/a/i"!=u(d,"i")}))){u=function(e,t){var n=this instanceof u,r=a(e),o=void 0===t;return!n&&r&&e.constructor===u&&o?e:i(p?new f(r&&!o?e.source:e,t):f((r=e instanceof u)?e.source:e,r&&o?c.call(e):t),n?this:h,u)};for(var m=(function(e){e in u||o(u,e,{configurable:!0,get:function(){return f[e]},set:function(t){f[e]=t}})}),g=s(f),v=0;g.length>v;)m(g[v++]);h.constructor=u,u.prototype=h,n(19)(r,"RegExp",u)}n(194)("RegExp")},function(e,t,n){"use strict";var r=n(13);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(200);var r=n(13),i=n(198),o=n(7),s="toString",a=/./[s],c=function(e){n(19)(RegExp.prototype,s,e,!0)};n(8)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?c(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):a.name!=s&&c(function(){return a.call(this)})},function(e,t,n){n(7)&&"g"!=/./g.flags&&n(12).f(RegExp.prototype,"flags",{configurable:!0,get:n(198)})},function(e,t,n){n(202)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){"use strict";var r=n(11),i=n(19),o=n(8),s=n(36),a=n(26);e.exports=function(e,t,n){var c=a(e),u=n(s,c,""[e]),f=u[0],h=u[1];o(function(){var t={};return t[c]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,f),r(RegExp.prototype,c,2==t?function(e,t){return h.call(e,this,t)}:function(e){return h.call(e,this)}))}},function(e,t,n){n(202)("replace",2,function(e,t,n){return[function(r,i){"use strict";var o=e(this),s=void 0==r?void 0:r[t];return void 0!==s?s.call(r,o,i):n.call(String(o),r,i)},n]})},function(e,t,n){n(202)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(202)("split",2,function(e,t,r){"use strict";var i=n(136),o=r,s=[].push,a="split",c="length",u="lastIndex";if("c"=="abbc"[a](/(b)*/)[1]||4!="test"[a](/(?:)/,-1)[c]||2!="ab"[a](/(?:ab)*/)[c]||4!="."[a](/(.?)(.?)/)[c]||"."[a](/()()/)[c]>1||""[a](/.?/)[c]){var f=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return o.call(n,e,t);var r,a,h,d,l,p=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,v=void 0===t?4294967295:t>>>0,y=new RegExp(e.source,m+"g");for(f||(r=new RegExp("^"+y.source+"$(?!\\s)",m));(a=y.exec(n))&&(h=a.index+a[0][c],!(h>g&&(p.push(n.slice(g,a.index)),!f&&a[c]>1&&a[0].replace(r,function(){for(l=1;l<arguments[c]-2;l++)void 0===arguments[l]&&(a[l]=void 0)}),a[c]>1&&a.index<n[c]&&s.apply(p,a.slice(1)),d=a[0][c],g=h,p[c]>=v)));)y[u]===a.index&&y[u]++;return g===n[c]?!d&&y.test("")||p.push(""):p.push(n.slice(g)),p[c]>v?p.slice(0,v):p}}else"0"[a](void 0,0)[c]&&(r=function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)});return[function(n,i){var o=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)},r]})},function(e,t,n){"use strict";var r,i,o,s=n(29),a=n(5),c=n(21),u=n(76),f=n(9),h=n(14),d=(n(13),n(22)),l=n(91),p=n(207),m=(n(74).set,n(208)),g=n(209).set,v=n(210)(),y="Promise",b=a.TypeError,w=a.process,S=a[y],w=a.process,x="process"==u(w),E=function(){},A=!!function(){try{var e=S.resolve(1),t=(e.constructor={})[n(26)("species")]=function(e){e(E,E)};return(x||"function"==typeof PromiseRejectionEvent)&&e.then(E)instanceof t}catch(r){}}(),T=function(e,t){return e===t||e===S&&t===o},M=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},P=function(e){return T(S,e)?new I(e):new i(e)},I=i=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw b("Bad Promise constructor");t=e,n=r}),this.resolve=d(t),this.reject=d(n)},O=function(e){try{e()}catch(t){return{error:t}}},R=function(e,t){if(!e._n){e._n=!0;var n=e._c;v(function(){for(var r=e._v,i=1==e._s,o=0,s=function(t){var n,o,s=i?t.ok:t.fail,a=t.resolve,c=t.reject,u=t.domain;try{s?(i||(2==e._h&&C(e),e._h=1),s===!0?n=r:(u&&u.enter(),n=s(r),u&&u.exit()),n===t.promise?c(b("Promise-chain cycle")):(o=M(n))?o.call(n,a,c):a(n)):c(r)}catch(f){c(f)}};n.length>o;)s(n[o++]);e._c=[],e._n=!1,t&&!e._h&&k(e)})}},k=function(e){g.call(a,function(){var t,n,r,i=e._v;if(N(e)&&(t=O(function(){x?w.emit("unhandledRejection",i,e):(n=a.onunhandledrejection)?n({promise:e,reason:i}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=x||N(e)?2:1),e._a=void 0,t)throw t.error})},N=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!N(t.promise))return!1;return!0},C=function(e){g.call(a,function(){var t;x?w.emit("rejectionHandled",e):(t=a.onrejectionhandled)&&t({promise:e,reason:e._v})})},F=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),R(t,!0))},L=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw b("Promise can't be resolved itself");(t=M(e))?v(function(){var r={_w:n,_d:!1};try{t.call(e,c(L,r,1),c(F,r,1))}catch(i){F.call(r,i)}}):(n._v=e,n._s=1,R(n,!1))}catch(r){F.call({_w:n,_d:!1},r)}}};A||(S=function(e){l(this,S,y,"_h"),d(e),r.call(this);try{e(c(L,this,1),c(F,this,1))}catch(t){F.call(this,t)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(211)(S.prototype,{then:function(e,t){var n=P(m(this,S));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=x?w.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},"catch":function(e){return this.then(void 0,e)}}),I=function(){var e=new r;this.promise=e,this.resolve=c(L,e,1),this.reject=c(F,e,1)}),f(f.G+f.W+f.F*!A,{Promise:S}),n(25)(S,y),n(194)(y),o=n(10)[y],f(f.S+f.F*!A,y,{reject:function(e){var t=P(this),n=t.reject;return n(e),t.promise}}),f(f.S+f.F*(s||!A),y,{resolve:function(e){if(e instanceof S&&T(e.constructor,this))return e;var t=P(this),n=t.resolve;return n(e),t.promise}}),f(f.S+f.F*!(A&&n(167)(function(e){S.all(e)["catch"](E)})),y,{all:function(e){var t=this,n=P(t),r=n.resolve,i=n.reject,o=O(function(){var n=[],o=0,s=1;p(e,!1,function(e){var a=o++,c=!1;n.push(void 0),s++,t.resolve(e).then(function(e){c||(c=!0,n[a]=e,--s||r(n))},i)}),--s||r(n)});return o&&i(o.error),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,i=O(function(){p(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(e,t,n){var r=n(21),i=n(163),o=n(164),s=n(13),a=n(38),c=n(166),u={},f={},t=e.exports=function(e,t,n,h,d){var l,p,m,g,v=d?function(){return e}:c(e),y=r(n,h,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(o(v)){for(l=a(e.length);l>b;b++)if(g=t?y(s(p=e[b])[0],p[1]):y(e[b]),g===u||g===f)return g}else for(m=v.call(e);!(p=m.next()).done;)if(g=i(m,y,p.value,t),g===u||g===f)return g};t.BREAK=u,t.RETURN=f},function(e,t,n){var r=n(13),i=n(22),o=n(26)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||void 0==(n=r(s)[o])?t:i(n)}},function(e,t,n){var r,i,o,s=n(21),a=n(79),c=n(49),u=n(16),f=n(5),h=f.process,d=f.setImmediate,l=f.clearImmediate,p=f.MessageChannel,m=0,g={},v="onreadystatechange",y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){y.call(e.data)};d&&l||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++m]=function(){a("function"==typeof e?e:Function(e),t)},r(m),m},l=function(e){delete g[e]},"process"==n(35)(h)?r=function(e){h.nextTick(s(y,e,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=b,r=s(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",b,!1)):r=v in u("script")?function(e){c.appendChild(u("script"))[v]=function(){c.removeChild(this),y.call(e)}}:function(e){setTimeout(s(y,e,1),0)}),e.exports={set:d,clear:l}},function(e,t,n){var r=n(5),i=n(209).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,c="process"==n(35)(s);e.exports=function(){var e,t,n,u=function(){var r,i;for(c&&(r=s.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(o){throw e?n():t=void 0,o}}t=void 0,r&&r.enter()};if(c)n=function(){s.nextTick(u)};else if(o){var f=!0,h=document.createTextNode("");new o(u).observe(h,{characterData:!0}),n=function(){h.data=f=!f}}else if(a&&a.resolve){var d=a.resolve();n=function(){d.then(u)}}else n=function(){i.call(r,u)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){var r=n(19);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(213);e.exports=n(214)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(12).f,i=n(47),o=(n(11),n(211)),s=n(21),a=n(91),c=n(36),u=n(207),f=n(130),h=n(196),d=n(194),l=n(7),p=n(23).fastKey,m=l?"_s":"size",g=function(e,t){var n,r=p(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,f){var h=e(function(e,r){a(e,h,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=r&&u(r,n,e[f],e)});return o(h.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[m]=0},"delete":function(e){var t=this,n=g(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[m]--}return!!n},forEach:function(e){a(this,h,"forEach");for(var t,n=s(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!g(this,e)}}),l&&r(h.prototype,"size",{get:function(){return c(this[m])}}),h},def:function(e,t,n){var r,i,o=g(e,t);return o?o.v=n:(e._l=o={i:i=p(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:g,setStrong:function(e,t,n){f(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?h(0,n.k):"values"==t?h(0,n.v):h(0,[n.k,n.v]):(e._t=void 0,h(1))},n?"entries":"values",!n,!0),d(t)}}},function(e,t,n){"use strict";var r=n(5),i=n(9),o=n(19),s=n(211),a=n(23),c=n(207),u=n(91),f=n(14),h=n(8),d=n(167),l=n(25),p=n(89);e.exports=function(e,t,n,m,g,v){var y=r[e],b=y,w=g?"set":"add",S=b&&b.prototype,x={},E=function(e){var t=S[e];o(S,e,"delete"==e?function(e){return!(v&&!f(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!f(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!f(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(v||S.forEach&&!h(function(){(new b).entries().next()}))){var A=new b,T=A[w](v?{}:-0,1)!=A,M=h(function(){A.has(1)}),P=d(function(e){new b(e)}),I=!v&&h(function(){for(var e=new b,t=5;t--;)e[w](t,t);return!e.has(-0)});P||(b=t(function(t,n){u(t,b,e);var r=p(new y,t,b);return void 0!=n&&c(n,g,r[w],r),r}),b.prototype=S,S.constructor=b),(M||I)&&(E("delete"),E("has"),g&&E("get")),(I||T)&&E(w),v&&S.clear&&delete S.clear}else b=m.getConstructor(t,e,g,w),s(b.prototype,n),a.NEED=!0;return l(b,e),x[e]=b,i(i.G+i.W+i.F*(b!=y),x),v||m.setStrong(b,e,g),b}},function(e,t,n){"use strict";var r=n(213);e.exports=n(214)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(174)(0),o=n(19),s=n(23),a=n(70),c=n(217),u=n(14),f=(n(6),s.getWeak),h=Object.isExtensible,d=c.ufstore,l={},p=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(u(e)){var t=f(e);return t===!0?d(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(this,e,t)}},g=e.exports=n(214)("WeakMap",p,m,c,!0,!0);7!=(new g).set((Object.freeze||Object)(l),7).get(l)&&(r=c.getConstructor(p),a(r.prototype,m),s.NEED=!0,i(["delete","has","get","set"],function(e){var t=g.prototype,n=t[e];o(t,e,function(t,i){if(u(t)&&!h(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)})}))},function(e,t,n){"use strict";var r=n(211),i=n(23).getWeak,o=n(13),s=n(14),a=n(91),c=n(207),u=n(174),f=n(6),h=u(5),d=u(6),l=0,p=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},g=function(e,t){return h(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},"delete":function(e){var t=d(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var u=e(function(e,r){a(e,u,t,"_i"),e._i=l++,e._l=void 0,void 0!=r&&c(r,n,e[o],e)});return r(u.prototype,{"delete":function(e){if(!s(e))return!1;var t=i(e);return t===!0?p(this)["delete"](e):t&&f(t,this._i)&&delete t[this._i]},has:function(e){if(!s(e))return!1;var t=i(e);return t===!0?p(this).has(e):t&&f(t,this._i)}}),u},def:function(e,t,n){var r=i(o(t),!0);return r===!0?p(e).set(t,n):r[e._i]=n,e},ufstore:p}},function(e,t,n){"use strict";var r=n(217);n(214)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(9),i=n(220),o=n(221),s=n(13),a=n(40),c=n(38),u=n(14),f=(n(26)("typed_array"),n(5).ArrayBuffer),h=n(208),d=o.ArrayBuffer,l=o.DataView,p=i.ABV&&f.isView,m=d.prototype.slice,g=i.VIEW,v="ArrayBuffer";r(r.G+r.W+r.F*(f!==d),{ArrayBuffer:d}),r(r.S+r.F*!i.CONSTR,v,{isView:function(e){return p&&p(e)||u(e)&&g in e}}),r(r.P+r.U+r.F*n(8)(function(){return!new d(2).slice(1,void 0).byteLength}),v,{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(s(this),e);for(var n=s(this).byteLength,r=a(e,n),i=a(void 0===t?n:t,n),o=new(h(this,d))(c(i-r)),u=new l(this),f=new l(o),p=0;r<i;)f.setUint8(p++,u.getUint8(r++));return o}}),n(194)(v)},function(e,t,n){for(var r,i=n(5),o=n(11),s=n(20),a=s("typed_array"),c=s("view"),u=!(!i.ArrayBuffer||!i.DataView),f=u,h=0,d=9,l="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<d;)(r=i[l[h++]])?(o(r.prototype,a,!0),o(r.prototype,c,!0)):f=!1;e.exports={ABV:u,CONSTR:f,TYPED:a,VIEW:c}},function(e,t,n){"use strict";var r=n(5),i=n(7),o=n(29),s=n(220),a=n(11),c=n(211),u=n(8),f=n(91),h=n(39),d=n(38),l=n(51).f,p=n(12).f,m=n(190),g=n(25),v="ArrayBuffer",y="DataView",b="prototype",w="Wrong length!",S="Wrong index!",x=r[v],E=r[y],A=r.Math,T=(r.parseInt,r.RangeError),M=r.Infinity,P=x,I=A.abs,O=A.pow,R=(A.min,A.floor),k=A.log,N=A.LN2,C="buffer",F="byteLength",L="byteOffset",B=i?"_b":C,j=i?"_l":F,q=i?"_o":L,D=function(e,t,n){var r,i,o,s=Array(n),a=8*n-t-1,c=(1<<a)-1,u=c>>1,f=23===t?O(2,-24)-O(2,-77):0,h=0,d=e<0||0===e&&1/e<0?1:0;for(e=I(e),e!=e||e===M?(i=e!=e?1:0,r=c):(r=R(k(e)/N),e*(o=O(2,-r))<1&&(r--,o*=2),e+=r+u>=1?f/o:f*O(2,1-u),e*o>=2&&(r++,o/=2),r+u>=c?(i=0,r=c):r+u>=1?(i=(e*o-1)*O(2,t),r+=u):(i=e*O(2,u-1)*O(2,t),r=0));t>=8;s[h++]=255&i,i/=256,t-=8);for(r=r<<t|i,a+=t;a>0;s[h++]=255&r,r/=256,a-=8);return s[--h]|=128*d,s},z=function(e,t,n){var r,i=8*n-t-1,o=(1<<i)-1,s=o>>1,a=i-7,c=n-1,u=e[c--],f=127&u;for(u>>=7;a>0;f=256*f+e[c],c--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=t;a>0;r=256*r+e[c],c--,a-=8);if(0===f)f=1-s;else{if(f===o)return r?NaN:u?-M:M;r+=O(2,t),f-=s}return(u?-1:1)*r*O(2,f-t)},U=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},V=function(e){return[255&e]},$=function(e){return[255&e,e>>8&255]},H=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},X=function(e){return D(e,52,8)},K=function(e){return D(e,23,4)},G=function(e,t,n){p(e[b],t,{get:function(){return this[n]}})},J=function(e,t,n,r){var i=+n,o=h(i);if(i!=o||o<0||o+t>e[j])throw T(S);var s=e[B]._b,a=o+e[q],c=s.slice(a,a+t);return r?c:c.reverse()},W=function(e,t,n,r,i,o){var s=+n,a=h(s);if(s!=a||a<0||a+t>e[j])throw T(S);for(var c=e[B]._b,u=a+e[q],f=r(+i),d=0;d<t;d++)c[u+d]=f[o?d:t-d-1]},Y=function(e,t){f(e,x,v);var n=+t,r=d(n);if(n!=r)throw T(w);return r};if(s.ABV){if(!u(function(){new x})||!u(function(){new x(.5)})){x=function(e){return new P(Y(this,e))};for(var Z,Q=x[b]=P[b],ee=l(P),te=0;ee.length>te;)(Z=ee[te++])in x||a(x,Z,P[Z]);o||(Q.constructor=x)}var ne=new E(new x(2)),re=E[b].setInt8;ne.setInt8(0,2147483648),ne.setInt8(1,2147483649),!ne.getInt8(0)&&ne.getInt8(1)||c(E[b],{setInt8:function(e,t){re.call(this,e,t<<24>>24)},setUint8:function(e,t){re.call(this,e,t<<24>>24)}},!0)}else x=function(e){var t=Y(this,e);this._b=m.call(Array(t),0),this[j]=t},E=function(e,t,n){f(this,E,y),f(e,x,y);var r=e[j],i=h(t);if(i<0||i>r)throw T("Wrong offset!");if(n=void 0===n?r-i:d(n),i+n>r)throw T(w);this[B]=e,this[q]=i,this[j]=n},i&&(G(x,F,"_l"),G(E,C,"_b"),G(E,F,"_l"),G(E,L,"_o")),c(E[b],{getInt8:function(e){return J(this,1,e)[0]<<24>>24},getUint8:function(e){return J(this,1,e)[0]},getInt16:function(e){var t=J(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=J(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return U(J(this,4,e,arguments[1]))},getUint32:function(e){return U(J(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return z(J(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return z(J(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){W(this,1,e,V,t)},setUint8:function(e,t){W(this,1,e,V,t)},setInt16:function(e,t){W(this,2,e,$,t,arguments[2])},setUint16:function(e,t){W(this,2,e,$,t,arguments[2])},setInt32:function(e,t){W(this,4,e,H,t,arguments[2])},setUint32:function(e,t){W(this,4,e,H,t,arguments[2])},setFloat32:function(e,t){W(this,4,e,K,t,arguments[2])},setFloat64:function(e,t){W(this,8,e,X,t,arguments[2])}});g(x,v),g(E,y),a(E[b],s.VIEW,!0),t[v]=x,t[y]=E},function(e,t,n){var r=n(9);r(r.G+r.W+r.F*!n(220).ABV,{DataView:n(221).DataView})},function(e,t,n){n(224)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){"use strict";if(n(7)){var r=n(29),i=n(5),o=n(8),s=n(9),a=n(220),c=n(221),u=n(21),f=n(91),h=n(18),d=n(11),l=n(211),p=(n(98),n(39)),m=n(38),g=n(40),v=n(17),y=n(6),b=n(72),w=n(76),S=n(14),x=n(59),E=n(164),A=n(47),T=n(60),M=n(51).f,P=(n(225),n(166)),I=n(20),O=n(26),R=n(174),k=n(37),N=n(208),C=n(195),F=n(131),L=n(167),B=n(194),j=n(190),q=n(187),D=n(12),z=n(52),U=D.f,V=z.f,$=i.RangeError,H=i.TypeError,X=i.Uint8Array,K="ArrayBuffer",G="Shared"+K,J="BYTES_PER_ELEMENT",W="prototype",Y=Array[W],Z=c.ArrayBuffer,Q=c.DataView,ee=R(0),te=R(2),ne=R(3),re=R(4),ie=R(5),oe=R(6),se=k(!0),ae=k(!1),ce=C.values,ue=C.keys,fe=C.entries,he=Y.lastIndexOf,de=Y.reduce,le=Y.reduceRight,pe=Y.join,me=Y.sort,ge=Y.slice,ve=Y.toString,ye=Y.toLocaleString,be=O("iterator"),we=O("toStringTag"),_e=I("typed_constructor"),Se=I("def_constructor"),xe=a.CONSTR,Ee=a.TYPED,Ae=a.VIEW,Te="Wrong length!",Me=R(1,function(e,t){return Ne(N(e,e[Se]),t)}),Pe=o(function(){return 1===new X(new Uint16Array([1]).buffer)[0]}),Ie=!!X&&!!X[W].set&&o(function(){new X(1).set({})}),Oe=function(e,t){if(void 0===e)throw H(Te);var n=+e,r=m(e);if(t&&!b(n,r))throw $(Te);return r},Re=function(e,t){var n=p(e);if(n<0||n%t)throw $("Wrong offset!");return n},ke=function(e){if(S(e)&&Ee in e)return e;throw H(e+" is not a typed array!")},Ne=function(e,t){if(!(S(e)&&_e in e))throw H("It is not a typed array constructor!");return new e(t)},Ce=function(e,t){return Fe(N(e,e[Se]),t)},Fe=function(e,t){for(var n=0,r=t.length,i=Ne(e,r);r>n;)i[n]=t[n++];return i},Le=function(e,t,n){U(e,t,{get:function(){return this._d[n]}})},Be=function(e){var t,n,r,i,o,s,a=x(e),c=arguments.length,f=c>1?arguments[1]:void 0,h=void 0!==f,d=P(a);if(void 0!=d&&!E(d)){for(s=d.call(a),r=[],t=0;!(o=s.next()).done;t++)r.push(o.value);a=r}for(h&&c>2&&(f=u(f,arguments[2],2)),t=0,n=m(a.length),i=Ne(this,n);n>t;t++)i[t]=h?f(a[t],t):a[t];
|
||
return i},je=function(){for(var e=0,t=arguments.length,n=Ne(this,t);t>e;)n[e]=arguments[e++];return n},qe=!!X&&o(function(){ye.call(new X(1))}),De=function(){return ye.apply(qe?ge.call(ke(this)):ke(this),arguments)},ze={copyWithin:function(e,t){return q.call(ke(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return re(ke(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return j.apply(ke(this),arguments)},filter:function(e){return Ce(this,te(ke(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ie(ke(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return oe(ke(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){ee(ke(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(ke(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return se(ke(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return pe.apply(ke(this),arguments)},lastIndexOf:function(e){return he.apply(ke(this),arguments)},map:function(e){return Me(ke(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return de.apply(ke(this),arguments)},reduceRight:function(e){return le.apply(ke(this),arguments)},reverse:function(){for(var e,t=this,n=ke(t).length,r=Math.floor(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t},some:function(e){return ne(ke(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return me.call(ke(this),e)},subarray:function(e,t){var n=ke(this),r=n.length,i=g(e,r);return new(N(n,n[Se]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:g(t,r))-i))}},Ue=function(e,t){return Ce(this,ge.call(ke(this),e,t))},Ve=function(e){ke(this);var t=Re(arguments[1],1),n=this.length,r=x(e),i=m(r.length),o=0;if(i+t>n)throw $(Te);for(;o<i;)this[t+o]=r[o++]},$e={entries:function(){return fe.call(ke(this))},keys:function(){return ue.call(ke(this))},values:function(){return ce.call(ke(this))}},He=function(e,t){return S(e)&&e[Ee]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Xe=function(e,t){return He(e,t=v(t,!0))?h(2,e[t]):V(e,t)},Ke=function(e,t,n){return!(He(e,t=v(t,!0))&&S(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?U(e,t,n):(e[t]=n.value,e)};xe||(z.f=Xe,D.f=Ke),s(s.S+s.F*!xe,"Object",{getOwnPropertyDescriptor:Xe,defineProperty:Ke}),o(function(){ve.call({})})&&(ve=ye=function(){return pe.call(this)});var Ge=l({},ze);l(Ge,$e),d(Ge,be,$e.values),l(Ge,{slice:Ue,set:Ve,constructor:function(){},toString:ve,toLocaleString:De}),Le(Ge,"buffer","b"),Le(Ge,"byteOffset","o"),Le(Ge,"byteLength","l"),Le(Ge,"length","e"),U(Ge,we,{get:function(){return this[Ee]}}),e.exports=function(e,t,n,c){c=!!c;var u=e+(c?"Clamped":"")+"Array",h="Uint8Array"!=u,l="get"+e,p="set"+e,g=i[u],v=g||{},y=g&&T(g),b=!g||!a.ABV,x={},E=g&&g[W],P=function(e,n){var r=e._d;return r.v[l](n*t+r.o,Pe)},I=function(e,n,r){var i=e._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[p](n*t+i.o,r,Pe)},O=function(e,t){U(e,t,{get:function(){return P(this,t)},set:function(e){return I(this,t,e)},enumerable:!0})};b?(g=n(function(e,n,r,i){f(e,g,u,"_d");var o,s,a,c,h=0,l=0;if(S(n)){if(!(n instanceof Z||(c=w(n))==K||c==G))return Ee in n?Fe(g,n):Be.call(g,n);o=n,l=Re(r,t);var p=n.byteLength;if(void 0===i){if(p%t)throw $(Te);if(s=p-l,s<0)throw $(Te)}else if(s=m(i)*t,s+l>p)throw $(Te);a=s/t}else a=Oe(n,!0),s=a*t,o=new Z(s);for(d(e,"_d",{b:o,o:l,l:s,e:a,v:new Q(o)});h<a;)O(e,h++)}),E=g[W]=A(Ge),d(E,"constructor",g)):L(function(e){new g(null),new g(e)},!0)||(g=n(function(e,n,r,i){f(e,g,u);var o;return S(n)?n instanceof Z||(o=w(n))==K||o==G?void 0!==i?new v(n,Re(r,t),i):void 0!==r?new v(n,Re(r,t)):new v(n):Ee in n?Fe(g,n):Be.call(g,n):new v(Oe(n,h))}),ee(y!==Function.prototype?M(v).concat(M(y)):M(v),function(e){e in g||d(g,e,v[e])}),g[W]=E,r||(E.constructor=g));var R=E[be],k=!!R&&("values"==R.name||void 0==R.name),N=$e.values;d(g,_e,!0),d(E,Ee,u),d(E,Ae,!0),d(E,Se,g),(c?new g(1)[we]==u:we in E)||U(E,we,{get:function(){return u}}),x[u]=g,s(s.G+s.W+s.F*(g!=v),x),s(s.S,u,{BYTES_PER_ELEMENT:t,from:Be,of:je}),J in E||d(E,J,t),s(s.P,u,ze),B(u),s(s.P+s.F*Ie,u,{set:Ve}),s(s.P+s.F*!k,u,$e),s(s.P+s.F*(E.toString!=ve),u,{toString:ve}),s(s.P+s.F*o(function(){new g(1).slice()}),u,{slice:Ue}),s(s.P+s.F*(o(function(){return[1,2].toLocaleString()!=new g([1,2]).toLocaleString()})||!o(function(){E.toLocaleString.call([1,2])})),u,{toLocaleString:De}),F[u]=k?R:N,r||k||d(E,be,N)}}else e.exports=function(){}},function(e,t,n){var r=n(76),i=n(26)("iterator"),o=n(131);e.exports=n(10).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){n(224)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}},!0)},function(e,t,n){n(224)("Int16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Uint16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Int32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Uint32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Float32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(224)("Float64",8,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){var r=n(9),i=n(22),o=n(13),s=Function.apply;r(r.S,"Reflect",{apply:function(e,t,n){return s.call(i(e),t,o(n))}})},function(e,t,n){var r=n(9),i=n(47),o=n(22),s=n(13),a=n(14),c=n(78);r(r.S+r.F*n(8)(function(){function e(){}return!(Reflect.construct(function(){},[],e)instanceof e)}),"Reflect",{construct:function(e,t){o(e),s(t);var n=arguments.length<3?e:o(arguments[2]);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(c.apply(e,r))}var u=n.prototype,f=i(a(u)?u:Object.prototype),h=Function.apply.call(e,f,t);return a(h)?h:f}})},function(e,t,n){var r=n(12),i=n(9),o=n(13),s=n(17);i(i.S+i.F*n(8)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,n){o(e),t=s(t,!0),o(n);try{return r.f(e,t,n),!0}catch(i){return!1}}})},function(e,t,n){var r=n(9),i=n(52).f,o=n(13);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(9),i=n(13),o=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(132)(o,"Object",function(){var e,t=this,n=t._k;do if(t._i>=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},function(e,t,n){function r(e,t){var n,a,f=arguments.length<3?e:arguments[2];return u(e)===f?e[t]:(n=i.f(e,t))?s(n,"value")?n.value:void 0!==n.get?n.get.call(f):void 0:c(a=o(e))?r(a,t,f):void 0}var i=n(52),o=n(60),s=n(6),a=n(9),c=n(14),u=n(13);a(a.S,"Reflect",{get:r})},function(e,t,n){var r=n(52),i=n(9),o=n(13);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},function(e,t,n){var r=n(9),i=n(60),o=n(13);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var r=n(9);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(9),i=n(13),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},function(e,t,n){var r=n(9);r(r.S,"Reflect",{ownKeys:n(245)})},function(e,t,n){var r=n(51),i=n(44),o=n(13),s=n(5).Reflect;e.exports=s&&s.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(9),i=n(13),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(t){return!1}}})},function(e,t,n){function r(e,t,n){var c,d,l=arguments.length<4?e:arguments[3],p=o.f(f(e),t);if(!p){if(h(d=s(e)))return r(d,t,n,l);p=u(0)}return a(p,"value")?!(p.writable===!1||!h(l))&&(c=o.f(l,t)||u(0),c.value=n,i.f(l,t,c),!0):void 0!==p.set&&(p.set.call(l,n),!0)}var i=n(12),o=n(52),s=n(60),a=n(6),c=n(9),u=n(18),f=n(13),h=n(14);c(c.S,"Reflect",{set:r})},function(e,t,n){var r=n(9),i=n(74);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var r=n(9),i=n(37)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(188)("includes")},function(e,t,n){"use strict";var r=n(9),i=n(129)(!0);r(r.P,"String",{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(9),i=n(252);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var r=n(38),i=n(93),o=n(36);e.exports=function(e,t,n,s){var a=String(o(e)),c=a.length,u=void 0===n?" ":String(n),f=r(t);if(f<=c||""==u)return a;var h=f-c,d=i.call(u,Math.ceil(h/u.length));return d.length>h&&(d=d.slice(0,h)),s?d+a:a+d}},function(e,t,n){"use strict";var r=n(9),i=n(252);r(r.P,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(84)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(84)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){"use strict";var r=n(9),i=n(36),o=n(38),s=n(136),a=n(198),c=RegExp.prototype,u=function(e,t){this._r=e,this._s=t};n(132)(u,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(i(this),!s(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in c?String(e.flags):a.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(e.lastIndex),new u(r,t)}})},function(e,t,n){n(28)("asyncIterator")},function(e,t,n){n(28)("observable")},function(e,t,n){var r=n(9),i=n(245),o=n(33),s=n(52),a=n(165);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=o(e),r=s.f,c=i(n),u={},f=0;c.length>f;)a(u,t=c[f++],r(n,t));return u}})},function(e,t,n){var r=n(9),i=n(261)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){var r=n(31),i=n(33),o=n(45).f;e.exports=function(e){return function(t){for(var n,s=i(t),a=r(s),c=a.length,u=0,f=[];c>u;)o.call(s,n=a[u++])&&f.push(e?[n,s[n]]:s[n]);return f}}},function(e,t,n){var r=n(9),i=n(261)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(22),s=n(12);n(7)&&r(r.P+n(264),"Object",{__defineGetter__:function(e,t){s.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){e.exports=n(29)||!n(8)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(5)[e]})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(22),s=n(12);n(7)&&r(r.P+n(264),"Object",{__defineSetter__:function(e,t){s.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(17),s=n(60),a=n(52).f;n(7)&&r(r.P+n(264),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=a(n,r))return t.get;while(n=s(n))}})},function(e,t,n){"use strict";var r=n(9),i=n(59),o=n(17),s=n(60),a=n(52).f;n(7)&&r(r.P+n(264),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=a(n,r))return t.set;while(n=s(n))}})},function(e,t,n){var r=n(9);r(r.P+r.R,"Map",{toJSON:n(269)("Map")})},function(e,t,n){var r=n(76),i=n(270);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(207);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){var r=n(9);r(r.P+r.R,"Set",{toJSON:n(269)("Set")})},function(e,t,n){var r=n(9);r(r.S,"System",{global:n(5)})},function(e,t,n){var r=n(9),i=n(35);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,t,n){var r=n(9);r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,o=t>>>0,s=n>>>0;return o+(r>>>0)+((i&s|(i|s)&~(i+s>>>0))>>>31)|0}})},function(e,t,n){var r=n(9);r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,o=t>>>0,s=n>>>0;return o-(r>>>0)-((~i&s|~(i^s)&i-s>>>0)>>>31)|0}})},function(e,t,n){var r=n(9);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,s=i&n,a=r>>16,c=i>>16,u=(a*s>>>0)+(o*s>>>16);return a*c+(u>>16)+((o*c>>>0)+(u&n)>>16)}})},function(e,t,n){var r=n(9);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,s=i&n,a=r>>>16,c=i>>>16,u=(a*s>>>0)+(o*s>>>16);return a*c+(u>>>16)+((o*c>>>0)+(u&n)>>>16)}})},function(e,t,n){var r=n(279),i=n(13),o=r.key,s=r.set;r.exp({defineMetadata:function(e,t,n,r){s(e,t,i(n),o(r))}})},function(e,t,n){var r=n(212),i=n(9),o=n(24)("metadata"),s=o.store||(o.store=new(n(216))),a=function(e,t,n){var i=s.get(e);if(!i){if(!n)return;s.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o},c=function(e,t,n){var r=a(t,n,!1);return void 0!==r&&r.has(e)},u=function(e,t,n){var r=a(t,n,!1);return void 0===r?void 0:r.get(e)},f=function(e,t,n,r){a(n,r,!0).set(e,t)},h=function(e,t){var n=a(e,t,!1),r=[];return n&&n.forEach(function(_,e){r.push(e)}),r},d=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},l=function(e){i(i.S,"Reflect",e)};e.exports={store:s,map:a,has:c,get:u,set:f,keys:h,key:d,exp:l}},function(e,t,n){var r=n(279),i=n(13),o=r.key,s=r.map,a=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:o(arguments[2]),r=s(i(t),n,!1);if(void 0===r||!r["delete"](e))return!1;if(r.size)return!0;var c=a.get(t);return c["delete"](n),!!c.size||a["delete"](t)}})},function(e,t,n){var r=n(279),i=n(13),o=n(60),s=r.has,a=r.get,c=r.key,u=function(e,t,n){var r=s(e,t,n);if(r)return a(e,t,n);var i=o(t);return null!==i?u(e,i,n):void 0};r.exp({getMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:c(arguments[2]))}})},function(e,t,n){var r=n(215),i=n(270),o=n(279),s=n(13),a=n(60),c=o.keys,u=o.key,f=function(e,t){var n=c(e,t),o=a(e);if(null===o)return n;var s=f(o,t);return s.length?n.length?i(new r(n.concat(s))):s:n};o.exp({getMetadataKeys:function(e){return f(s(e),arguments.length<2?void 0:u(arguments[1]))}})},function(e,t,n){var r=n(279),i=n(13),o=r.get,s=r.key;r.exp({getOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(279),i=n(13),o=r.keys,s=r.key;r.exp({getOwnMetadataKeys:function(e){return o(i(e),arguments.length<2?void 0:s(arguments[1]))}})},function(e,t,n){var r=n(279),i=n(13),o=n(60),s=r.has,a=r.key,c=function(e,t,n){var r=s(e,t,n);if(r)return!0;var i=o(t);return null!==i&&c(e,i,n)};r.exp({hasMetadata:function(e,t){return c(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(279),i=n(13),o=r.has,s=r.key;r.exp({hasOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(279),i=n(13),o=n(22),s=r.key,a=r.set;r.exp({metadata:function(e,t){return function(n,r){a(e,t,(void 0!==r?i:o)(n),s(r))}}})},function(e,t,n){var r=n(9),i=n(210)(),o=n(5).process,s="process"==n(35)(o);r(r.G,{asap:function(e){var t=s&&o.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(9),i=n(5),o=n(10),s=n(210)(),a=n(26)("observable"),c=n(22),u=n(13),f=n(91),h=n(211),d=n(11),l=n(207),p=l.RETURN,m=function(e){return null==e?void 0:c(e)},g=function(e){var t=e._c;t&&(e._c=void 0,t())},v=function(e){return void 0===e._o},y=function(e){v(e)||(e._o=void 0,g(e))},b=function(e,t){u(e),this._c=void 0,this._o=e,e=new w(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:c(n),this._c=n)}catch(i){return void e.error(i)}v(this)&&g(this)};b.prototype=h({},{unsubscribe:function(){y(this)}});var w=function(e){this._s=e};w.prototype=h({},{next:function(e){var t=this._s;if(!v(t)){var n=t._o;try{var r=m(n.next);if(r)return r.call(n,e)}catch(i){try{y(t)}finally{throw i}}}},error:function(e){var t=this._s;if(v(t))throw e;var n=t._o;t._o=void 0;try{var r=m(n.error);if(!r)throw e;e=r.call(n,e)}catch(i){try{g(t)}finally{throw i}}return g(t),e},complete:function(e){var t=this._s;if(!v(t)){var n=t._o;t._o=void 0;try{var r=m(n.complete);e=r?r.call(n,e):void 0}catch(i){try{g(t)}finally{throw i}}return g(t),e}}});var S=function(e){f(this,S,"Observable","_f")._f=c(e)};h(S.prototype,{subscribe:function(e){return new b(e,this._f)},forEach:function(e){var t=this;return new(o.Promise||i.Promise)(function(n,r){c(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(n){r(n),i.unsubscribe()}},error:r,complete:n})})}}),h(S,{from:function(e){var t="function"==typeof this?this:S,n=m(u(e)[a]);if(n){var r=u(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return s(function(){if(!n){try{if(l(e,!1,function(e){if(t.next(e),n)return p})===p)return}catch(r){if(n)throw r;return void t.error(r)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);e<t;)n[e]=arguments[e++];return new("function"==typeof this?this:S)(function(e){var t=!1;return s(function(){if(!t){for(var r=0;r<n.length;++r)if(e.next(n[r]),t)return;e.complete()}}),function(){t=!0}})}}),d(S.prototype,a,function(){return this}),r(r.G,{Observable:S}),n(194)("Observable")},function(e,t,n){var r=n(5),i=n(9),o=n(79),s=n(291),a=r.navigator,c=!!a&&/MSIE .\./.test(a.userAgent),u=function(e){return c?function(t,n){return e(o(s,[].slice.call(arguments,2),"function"==typeof t?t:Function(t)),n)}:e};i(i.G+i.B+i.F*c,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(e,t,n){"use strict";var r=n(292),i=n(79),o=n(22);e.exports=function(){for(var e=o(this),t=arguments.length,n=Array(t),s=0,_=r._,a=!1;t>s;)(n[s]=arguments[s++])===_&&(a=!0);return function(){var r,o=this,s=arguments.length,c=0,u=0;if(!a&&!s)return i(e,n,o);if(r=n.slice(),a)for(;t>c;c++)r[c]===_&&(r[c]=arguments[u++]);for(;s>u;)r.push(arguments[u++]);return i(e,r,o)}}},function(e,t,n){e.exports=n(5)},function(e,t,n){var r=n(9),i=n(209);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(195),i=n(19),o=n(5),s=n(11),a=n(131),c=n(26),u=c("iterator"),f=c("toStringTag"),h=a.Array,d=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var p,m=d[l],g=o[m],v=g&&g.prototype;if(v){v[u]||s(v,u,h),v[f]||s(v,f,m),a[m]=h;for(p in r)v[p]||i(v,p,r[p],!0)}}},function(e,t,n){(function(t,n){!function(t){"use strict";function r(e,t,n,r){var i=Object.create((t||o).prototype),s=new p(r||[]);return i._invoke=h(e,n,s),i}function i(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function o(){}function s(){}function a(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){this.arg=e}function f(e){function t(n,r,o,s){var a=i(e[n],e,r);if("throw"!==a.type){var c=a.arg,f=c.value;return f instanceof u?Promise.resolve(f.arg).then(function(e){t("next",e,o,s)},function(e){t("throw",e,o,s)}):Promise.resolve(f).then(function(e){c.value=e,o(c)},s)}s(a.arg)}function r(e,n){function r(){return new Promise(function(r,i){t(e,n,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof n&&n.domain&&(t=n.domain.bind(t));var o;this._invoke=r}function h(e,t,n){var r=A;return function(o,s){if(r===M)throw new Error("Generator is already running");if(r===P){if("throw"===o)throw s;return g()}for(;;){var a=n.delegate;if(a){if("return"===o||"throw"===o&&a.iterator[o]===v){n.delegate=null;var c=a.iterator["return"];if(c){var u=i(c,a.iterator,s);if("throw"===u.type){o="throw",s=u.arg;continue}}if("return"===o)continue}var u=i(a.iterator[o],a.iterator,s);if("throw"===u.type){n.delegate=null,o="throw",s=u.arg;continue}o="next",s=v;var f=u.arg;if(!f.done)return r=T,f;n[a.resultName]=f.value,n.next=a.nextLoc,n.delegate=null}if("next"===o)n.sent=n._sent=s;else if("throw"===o){if(r===A)throw r=P,s;n.dispatchException(s)&&(o="next",s=v)}else"return"===o&&n.abrupt("return",s);r=M;var u=i(e,t,n);if("normal"===u.type){r=n.done?P:T;var f={value:u.arg,done:n.done};if(u.arg!==I)return f;n.delegate&&"next"===o&&(s=v)}else"throw"===u.type&&(r=P,o="throw",s=u.arg)}}}function d(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function l(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function p(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(d,this),this.reset(!0)}function m(e){if(e){var t=e[w];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function i(){for(;++n<e.length;)if(y.call(e,n))return i.value=e[n],i.done=!1,i;return i.value=v,i.done=!0,i};return r.next=r}}return{next:g}}function g(){return{value:v,done:!0}}var v,y=Object.prototype.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},w=b.iterator||"@@iterator",S=b.toStringTag||"@@toStringTag",x="object"==typeof e,E=t.regeneratorRuntime;if(E)return void(x&&(e.exports=E));E=t.regeneratorRuntime=x?e.exports:{},E.wrap=r;var A="suspendedStart",T="suspendedYield",M="executing",P="completed",I={},O=a.prototype=o.prototype;s.prototype=O.constructor=a,a.constructor=s,a[S]=s.displayName="GeneratorFunction",E.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===s||"GeneratorFunction"===(t.displayName||t.name))},E.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,S in e||(e[S]="GeneratorFunction")),e.prototype=Object.create(O),e},E.awrap=function(e){return new u(e)},c(f.prototype),E.async=function(e,t,n,i){var o=new f(r(e,t,n,i));return E.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},c(O),O[w]=function(){return this},O[S]="Generator",O.toString=function(){return"[object Generator]"},E.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},E.values=m,p.prototype={constructor:p,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.tryEntries.forEach(l),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return o.type="throw",o.arg=e,n.next=t,!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=y.call(i,"catchLoc"),a=y.call(i,"finallyLoc");if(s&&a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?this.next=i.finallyLoc:this.complete(o),I},complete:function(e,t){if("throw"===e.type)throw e.arg;"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t)},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),l(n),I}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;l(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:m(e),resultName:t,nextLoc:n},I}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}(),n(296))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function o(e){if(h===clearTimeout)return clearTimeout(e);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function s(){m&&l&&(m=!1,l.length?p=l.concat(p):g=-1,p.length&&a())}function a(){if(!m){var e=i(s);m=!0;for(var t=p.length;t;){for(l=p,p=[];++g<t;)l&&l[g].run();g=-1,t=p.length}l=null,m=!1,o(e)}}function c(e,t){this.fun=e,this.array=t}function u(){}var f,h,d=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{h="function"==typeof clearTimeout?clearTimeout:r}catch(e){h=r}}();var l,p=[],m=!1,g=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new c(e,t)),1!==p.length||m||i(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=u,d.addListener=u,d.once=u,d.off=u,d.removeListener=u,d.removeAllListeners=u,d.emit=u,d.prependListener=u,d.prependOnceListener=u,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t,n){n(298),e.exports=n(10).RegExp.escape},function(e,t,n){var r=n(9),i=n(299)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return i(e)}})},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t){e.exports=_},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var f=new Error('Uncaught, unspecified "error" event. ('+t+")");throw f.context=t,f}if(n=this._events[e],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,c=0;c<i;c++)u[c].apply(this,a);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(i=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],s=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";var r=n(303);e.exports={Connection:n(404),constants:n(431),errors:n(413),validate:n(433),txFlags:n(432).txFlags,serverInfo:n(538),dropsToXrp:r.dropsToXrp,xrpToDrops:r.xrpToDrops,toRippledAmount:r.toRippledAmount,generateAddress:r.generateAddress,generateAddressAPI:r.generateAddressAPI,removeUndefined:r.removeUndefined,convertKeysFromSnakeCaseToCamelCase:r.convertKeysFromSnakeCaseToCamelCase,iso8601ToRippleTime:r.iso8601ToRippleTime,rippleTimeToISO8601:r.rippleTimeToISO8601,isValidSecret:r.isValidSecret}},function(e,t,n){"use strict";function r(e){try{return g(e),!0}catch(t){return!1}}function i(e){return new p(e).dividedBy(1e6).toString()}function o(e){return new p(e).times(1e6).floor().toString()}function s(e){return"XRP"===e.currency?o(e.value):{currency:e.currency,issuer:e.counterparty?e.counterparty:e.issuer?e.issuer:void 0,value:e.value}}function a(e){if("object"===("undefined"==typeof e?"undefined":l(e))){var t=void 0;return _.reduce(e,function(e,n,r){t=r;var i=/([a-zA-Z]_[a-zA-Z])/g;return i.test(r)&&(t=r.replace(i,function(e){return e[0]+e[2].toUpperCase()})),e[t]=a(n),e},{})}return e}function c(e){return _.omit(e,_.isUndefined)}function u(e){return 1e3*(e+946684800)}function f(e){return Math.round(e/1e3)-946684800}function h(e){return new Date(u(e)).toISOString()}function d(e){return f(Date.parse(e))}var l="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},_=n(300),p=n(304),m=n(305),g=m.deriveKeypair;e.exports={dropsToXrp:i,xrpToDrops:o,toRippledAmount:s,convertKeysFromSnakeCaseToCamelCase:a,removeUndefined:c,rippleTimeToISO8601:h,iso8601ToRippleTime:d,isValidSecret:r}},function(e,t,n){var r;!function(i){"use strict";function o(e){function t(e,r){var i,o,s,a,c,u,f=this;if(!(f instanceof t))return H&&N(26,"constructor call without new",e),new t(e,r);if(null!=r&&X(r,2,64,L,"base")){if(r=0|r,u=e+"",10==r)return f=new t(e instanceof t?e:u),C(f,q+f.e+1,D);if((a="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(i="["+E.slice(0,r)+"]+")+"(?:\\."+i+")?$",r<37?"i":"").test(u))return g(f,u,a,r);
|
||
a?(f.s=1/e<0?(u=u.slice(1),-1):1,H&&u.replace(/^0\.0*|\./,"").length>15&&N(L,x,e),a=!1):f.s=45===u.charCodeAt(0)?(u=u.slice(1),-1):1,u=n(u,10,r,f.s)}else{if(e instanceof t)return f.s=e.s,f.e=e.e,f.c=(e=e.c)?e.slice():e,void(L=0);if((a="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,s=e;s>=10;s/=10,o++);return f.e=o,f.c=[e],void(L=0)}u=e+""}else{if(!v.test(u=e+""))return g(f,u,a);f.s=45===u.charCodeAt(0)?(u=u.slice(1),-1):1}}for((o=u.indexOf("."))>-1&&(u=u.replace(".","")),(s=u.search(/e/i))>0?(o<0&&(o=s),o+=+u.slice(s+1),u=u.substring(0,s)):o<0&&(o=u.length),s=0;48===u.charCodeAt(s);s++);for(c=u.length;48===u.charCodeAt(--c););if(u=u.slice(s,c+1))if(c=u.length,a&&H&&c>15&&(e>M||e!==b(e))&&N(L,x,f.s*e),o=o-s-1,o>$)f.c=f.e=null;else if(o<V)f.c=[f.e=0];else{if(f.e=o,f.c=[],s=(o+1)%T,o<0&&(s+=T),s<c){for(s&&f.c.push(+u.slice(0,s)),c-=T;s<c;)f.c.push(+u.slice(s,s+=T));u=u.slice(s),s=T-u.length}else s-=c;for(;s--;u+="0");f.c.push(+u)}else f.c=[f.e=0];L=0}function n(e,n,r,i){var o,s,c,u,f,d,p,m=e.indexOf("."),g=q,v=D;for(r<37&&(e=e.toLowerCase()),m>=0&&(c=J,J=0,e=e.replace(".",""),p=new t(r),f=p.pow(e.length-m),J=c,p.c=h(l(a(f.c),f.e),10,n),p.e=p.c.length),d=h(e,r,n),s=c=d.length;0==d[--c];d.pop());if(!d[0])return"0";if(m<0?--s:(f.c=d,f.e=s,f.s=i,f=F(f,p,g,v,n),d=f.c,u=f.r,s=f.e),o=s+g+1,m=d[o],c=n/2,u=u||o<0||null!=d[o+1],u=v<4?(null!=m||u)&&(0==v||v==(f.s<0?3:2)):m>c||m==c&&(4==v||u||6==v&&1&d[o-1]||v==(f.s<0?8:7)),o<1||!d[0])e=u?l("1",-g):"0";else{if(d.length=o,u)for(--n;++d[--o]>n;)d[o]=0,o||(++s,d.unshift(1));for(c=d.length;!d[--c];);for(m=0,e="";m<=c;e+=E.charAt(d[m++]));e=l(e,s)}return e}function r(e,n,r,i){var o,s,c,u,f;if(r=null!=r&&X(r,0,8,i,S)?0|r:D,!e.c)return e.toString();if(o=e.c[0],c=e.e,null==n)f=a(e.c),f=19==i||24==i&&c<=z?d(f,c):l(f,c);else if(e=C(new t(e),n,r),s=e.e,f=a(e.c),u=f.length,19==i||24==i&&(n<=s||s<=z)){for(;u<n;f+="0",u++);f=d(f,s)}else if(n-=c,f=l(f,s),s+1>u){if(--n>0)for(f+=".";n--;f+="0");}else if(n+=s-u,n>0)for(s+1==u&&(f+=".");n--;f+="0");return e.s<0&&o?"-"+f:f}function i(e,n){var r,i,o=0;for(f(e[0])&&(e=e[0]),r=new t(e[0]);++o<e.length;){if(i=new t(e[o]),!i.s){r=i;break}n.call(r,i)&&(r=i)}return r}function R(e,t,n,r,i){return(e<t||e>n||e!=p(e))&&N(r,(i||"decimal places")+(e<t||e>n?" out of range":" not an integer"),e),!0}function k(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*T-1)>$?e.c=e.e=null:n<V?e.c=[e.e=0]:(e.e=n,e.c=t),e}function N(e,t,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+n);throw r.name="BigNumber Error",L=0,r}function C(e,t,n,r){var i,o,s,a,c,u,f,h=e.c,d=P;if(h){e:{for(i=1,a=h[0];a>=10;a/=10,i++);if(o=t-i,o<0)o+=T,s=t,c=h[u=0],f=c/d[i-s-1]%10|0;else if(u=y((o+1)/T),u>=h.length){if(!r)break e;for(;h.length<=u;h.push(0));c=f=0,i=1,o%=T,s=o-T+1}else{for(c=a=h[u],i=1;a>=10;a/=10,i++);o%=T,s=o-T+i,f=s<0?0:c/d[i-s-1]%10|0}if(r=r||t<0||null!=h[u+1]||(s<0?c:c%d[i-s-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(o>0?s>0?c/d[i-s]:0:h[u-1])%10&1||n==(e.s<0?8:7)),t<1||!h[0])return h.length=0,r?(t-=e.e+1,h[0]=d[(T-t%T)%T],e.e=-t||0):h[0]=e.e=0,e;if(0==o?(h.length=u,a=1,u--):(h.length=u+1,a=d[T-o],h[u]=s>0?b(c/d[i-s]%d[s])*a:0),r)for(;;){if(0==u){for(o=1,s=h[0];s>=10;s/=10,o++);for(s=h[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,h[0]==A&&(h[0]=1));break}if(h[u]+=a,h[u]!=A)break;h[u--]=0,a=1}for(o=h.length;0===h[--o];h.pop());}e.e>$?e.c=e.e=null:e.e<V&&(e.c=[e.e=0])}return e}var F,L=0,B=t.prototype,j=new t(1),q=20,D=4,z=-7,U=21,V=-1e7,$=1e7,H=!0,X=R,K=!1,G=1,J=100,W={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return t.another=o,t.ROUND_UP=0,t.ROUND_DOWN=1,t.ROUND_CEIL=2,t.ROUND_FLOOR=3,t.ROUND_HALF_UP=4,t.ROUND_HALF_DOWN=5,t.ROUND_HALF_EVEN=6,t.ROUND_HALF_CEIL=7,t.ROUND_HALF_FLOOR=8,t.EUCLID=9,t.config=function(){var e,t,n=0,r={},i=arguments,o=i[0],s=o&&"object"==typeof o?function(){if(o.hasOwnProperty(t))return null!=(e=o[t])}:function(){if(i.length>n)return null!=(e=i[n++])};return s(t="DECIMAL_PLACES")&&X(e,0,O,2,t)&&(q=0|e),r[t]=q,s(t="ROUNDING_MODE")&&X(e,0,8,2,t)&&(D=0|e),r[t]=D,s(t="EXPONENTIAL_AT")&&(f(e)?X(e[0],-O,0,2,t)&&X(e[1],0,O,2,t)&&(z=0|e[0],U=0|e[1]):X(e,-O,O,2,t)&&(z=-(U=0|(e<0?-e:e)))),r[t]=[z,U],s(t="RANGE")&&(f(e)?X(e[0],-O,-1,2,t)&&X(e[1],1,O,2,t)&&(V=0|e[0],$=0|e[1]):X(e,-O,O,2,t)&&(0|e?V=-($=0|(e<0?-e:e)):H&&N(2,t+" cannot be zero",e))),r[t]=[V,$],s(t="ERRORS")&&(e===!!e||1===e||0===e?(L=0,X=(H=!!e)?R:u):H&&N(2,t+w,e)),r[t]=H,s(t="CRYPTO")&&(e===!!e||1===e||0===e?(K=!(!e||!m),e&&!K&&H&&N(2,"crypto unavailable",m)):H&&N(2,t+w,e)),r[t]=K,s(t="MODULO_MODE")&&X(e,0,9,2,t)&&(G=0|e),r[t]=G,s(t="POW_PRECISION")&&X(e,0,O,2,t)&&(J=0|e),r[t]=J,s(t="FORMAT")&&("object"==typeof e?W=e:H&&N(2,t+" not an object",e)),r[t]=W,r},t.max=function(){return i(arguments,B.lt)},t.min=function(){return i(arguments,B.gt)},t.random=function(){var e=9007199254740992,n=Math.random()*e&2097151?function(){return b(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var r,i,o,s,a,c=0,u=[],f=new t(j);if(e=null!=e&&X(e,0,O,14)?0|e:q,s=y(e/T),K)if(m&&m.getRandomValues){for(r=m.getRandomValues(new Uint32Array(s*=2));c<s;)a=131072*r[c]+(r[c+1]>>>11),a>=9e15?(i=m.getRandomValues(new Uint32Array(2)),r[c]=i[0],r[c+1]=i[1]):(u.push(a%1e14),c+=2);c=s/2}else if(m&&m.randomBytes){for(r=m.randomBytes(s*=7);c<s;)a=281474976710656*(31&r[c])+1099511627776*r[c+1]+4294967296*r[c+2]+16777216*r[c+3]+(r[c+4]<<16)+(r[c+5]<<8)+r[c+6],a>=9e15?m.randomBytes(7).copy(r,c):(u.push(a%1e14),c+=7);c=s/7}else H&&N(14,"crypto unavailable",m);if(!c)for(;c<s;)a=n(),a<9e15&&(u[c++]=a%1e14);for(s=u[--c],e%=T,s&&e&&(a=P[T-e],u[c]=b(s/a)*a);0===u[c];u.pop(),c--);if(c<0)u=[o=0];else{for(o=-1;0===u[0];u.shift(),o-=T);for(c=1,a=u[0];a>=10;a/=10,c++);c<T&&(o-=T-c)}return f.e=o,f.c=u,f}}(),F=function(){function e(e,t,n){var r,i,o,s,a=0,c=e.length,u=t%I,f=t/I|0;for(e=e.slice();c--;)o=e[c]%I,s=e[c]/I|0,r=f*o+s*u,i=u*o+r%I*I+a,a=(i/n|0)+(r/I|0)+f*s,e[c]=i%n;return a&&e.unshift(a),e}function n(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.shift());}return function(i,o,a,c,u){var f,h,d,l,p,m,g,v,y,w,S,x,E,M,P,I,O,R=i.s==o.s?1:-1,k=i.c,N=o.c;if(!(k&&k[0]&&N&&N[0]))return new t(i.s&&o.s&&(k?!N||k[0]!=N[0]:N)?k&&0==k[0]||!N?0*R:R/0:NaN);for(v=new t(R),y=v.c=[],h=i.e-o.e,R=a+h+1,u||(u=A,h=s(i.e/T)-s(o.e/T),R=R/T|0),d=0;N[d]==(k[d]||0);d++);if(N[d]>(k[d]||0)&&h--,R<0)y.push(1),l=!0;else{for(M=k.length,I=N.length,d=0,R+=2,p=b(u/(N[0]+1)),p>1&&(N=e(N,p,u),k=e(k,p,u),I=N.length,M=k.length),E=I,w=k.slice(0,I),S=w.length;S<I;w[S++]=0);O=N.slice(),O.unshift(0),P=N[0],N[1]>=u/2&&P++;do{if(p=0,f=n(N,w,I,S),f<0){if(x=w[0],I!=S&&(x=x*u+(w[1]||0)),p=b(x/P),p>1)for(p>=u&&(p=u-1),m=e(N,p,u),g=m.length,S=w.length;1==n(m,w,g,S);)p--,r(m,I<g?O:N,g,u),g=m.length,f=1;else 0==p&&(f=p=1),m=N.slice(),g=m.length;if(g<S&&m.unshift(0),r(w,m,S,u),S=w.length,f==-1)for(;n(N,w,I,S)<1;)p++,r(w,I<S?O:N,S,u),S=w.length}else 0===f&&(p++,w=[0]);y[d++]=p,w[0]?w[S++]=k[E]||0:(w=[k[E]],S=1)}while((E++<M||null!=w[0])&&R--);l=null!=w[0],y[0]||y.shift()}if(u==A){for(d=1,R=y[0];R>=10;R/=10,d++);C(v,a+(v.e=d+h*T-1)+1,c,l)}else v.e=h,v.r=+l;return v}}(),g=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(s,a,c,u){var f,h=c?a:a.replace(o,"");if(i.test(h))s.s=isNaN(h)?null:h<0?-1:1;else{if(!c&&(h=h.replace(e,function(e,t,n){return f="x"==(n=n.toLowerCase())?16:"b"==n?2:8,u&&u!=f?e:t}),u&&(f=u,h=h.replace(n,"$1").replace(r,"0.$1")),a!=h))return new t(h,f);H&&N(L,"not a"+(u?" base "+u:"")+" number",a),s.s=null}s.c=s.e=null,L=0}}(),B.absoluteValue=B.abs=function(){var e=new t(this);return e.s<0&&(e.s=1),e},B.ceil=function(){return C(new t(this),this.e+1,2)},B.comparedTo=B.cmp=function(e,n){return L=1,c(this,new t(e,n))},B.decimalPlaces=B.dp=function(){var e,t,n=this.c;if(!n)return null;if(e=((t=n.length-1)-s(this.e/T))*T,t=n[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},B.dividedBy=B.div=function(e,n){return L=3,F(this,new t(e,n),q,D)},B.dividedToIntegerBy=B.divToInt=function(e,n){return L=4,F(this,new t(e,n),0,1)},B.equals=B.eq=function(e,n){return L=5,0===c(this,new t(e,n))},B.floor=function(){return C(new t(this),this.e+1,3)},B.greaterThan=B.gt=function(e,n){return L=6,c(this,new t(e,n))>0},B.greaterThanOrEqualTo=B.gte=function(e,n){return L=7,1===(n=c(this,new t(e,n)))||0===n},B.isFinite=function(){return!!this.c},B.isInteger=B.isInt=function(){return!!this.c&&s(this.e/T)>this.c.length-2},B.isNaN=function(){return!this.s},B.isNegative=B.isNeg=function(){return this.s<0},B.isZero=function(){return!!this.c&&0==this.c[0]},B.lessThan=B.lt=function(e,n){return L=8,c(this,new t(e,n))<0},B.lessThanOrEqualTo=B.lte=function(e,n){return L=9,(n=c(this,new t(e,n)))===-1||0===n},B.minus=B.sub=function(e,n){var r,i,o,a,c=this,u=c.s;if(L=10,e=new t(e,n),n=e.s,!u||!n)return new t(NaN);if(u!=n)return e.s=-n,c.plus(e);var f=c.e/T,h=e.e/T,d=c.c,l=e.c;if(!f||!h){if(!d||!l)return d?(e.s=-n,e):new t(l?c:NaN);if(!d[0]||!l[0])return l[0]?(e.s=-n,e):new t(d[0]?c:3==D?-0:0)}if(f=s(f),h=s(h),d=d.slice(),u=f-h){for((a=u<0)?(u=-u,o=d):(h=f,o=l),o.reverse(),n=u;n--;o.push(0));o.reverse()}else for(i=(a=(u=d.length)<(n=l.length))?u:n,u=n=0;n<i;n++)if(d[n]!=l[n]){a=d[n]<l[n];break}if(a&&(o=d,d=l,l=o,e.s=-e.s),n=(i=l.length)-(r=d.length),n>0)for(;n--;d[r++]=0);for(n=A-1;i>u;){if(d[--i]<l[i]){for(r=i;r&&!d[--r];d[r]=n);--d[r],d[i]+=A}d[i]-=l[i]}for(;0==d[0];d.shift(),--h);return d[0]?k(e,d,h):(e.s=3==D?-1:1,e.c=[e.e=0],e)},B.modulo=B.mod=function(e,n){var r,i,o=this;return L=11,e=new t(e,n),!o.c||!e.s||e.c&&!e.c[0]?new t(NaN):!e.c||o.c&&!o.c[0]?new t(o):(9==G?(i=e.s,e.s=1,r=F(o,e,0,3),e.s=i,r.s*=i):r=F(o,e,0,G),o.minus(r.times(e)))},B.negated=B.neg=function(){var e=new t(this);return e.s=-e.s||null,e},B.plus=B.add=function(e,n){var r,i=this,o=i.s;if(L=12,e=new t(e,n),n=e.s,!o||!n)return new t(NaN);if(o!=n)return e.s=-n,i.minus(e);var a=i.e/T,c=e.e/T,u=i.c,f=e.c;if(!a||!c){if(!u||!f)return new t(o/0);if(!u[0]||!f[0])return f[0]?e:new t(u[0]?i:0*o)}if(a=s(a),c=s(c),u=u.slice(),o=a-c){for(o>0?(c=a,r=f):(o=-o,r=u),r.reverse();o--;r.push(0));r.reverse()}for(o=u.length,n=f.length,o-n<0&&(r=f,f=u,u=r,n=o),o=0;n;)o=(u[--n]=u[n]+f[n]+o)/A|0,u[n]%=A;return o&&(u.unshift(o),++c),k(e,u,c)},B.precision=B.sd=function(e){var t,n,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(H&&N(13,"argument"+w,e),e!=!!e&&(e=null)),!i)return null;if(n=i.length-1,t=n*T+1,n=i[n]){for(;n%10==0;n/=10,t--);for(n=i[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},B.round=function(e,n){var r=new t(this);return(null==e||X(e,0,O,15))&&C(r,~~e+this.e+1,null!=n&&X(n,0,8,15,S)?0|n:D),r},B.shift=function(e){var n=this;return X(e,-M,M,16,"argument")?n.times("1e"+p(e)):new t(n.c&&n.c[0]&&(e<-M||e>M)?n.s*(e<0?0:1/0):n)},B.squareRoot=B.sqrt=function(){var e,n,r,i,o,c=this,u=c.c,f=c.s,h=c.e,d=q+4,l=new t("0.5");if(1!==f||!u||!u[0])return new t(!f||f<0&&(!u||u[0])?NaN:u?c:1/0);if(f=Math.sqrt(+c),0==f||f==1/0?(n=a(u),(n.length+h)%2==0&&(n+="0"),f=Math.sqrt(n),h=s((h+1)/2)-(h<0||h%2),f==1/0?n="1e"+h:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+h),r=new t(n)):r=new t(f+""),r.c[0])for(h=r.e,f=h+d,f<3&&(f=0);;)if(o=r,r=l.times(o.plus(F(c,o,d,1))),a(o.c).slice(0,f)===(n=a(r.c)).slice(0,f)){if(r.e<h&&--f,n=n.slice(f-3,f+1),"9999"!=n&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(C(r,r.e+q+2,1),e=!r.times(r).eq(c));break}if(!i&&(C(o,o.e+q+2,0),o.times(o).eq(c))){r=o;break}d+=4,f+=4,i=1}return C(r,r.e+q+1,D,e)},B.times=B.mul=function(e,n){var r,i,o,a,c,u,f,h,d,l,p,m,g,v,y,b=this,w=b.c,S=(L=17,e=new t(e,n)).c;if(!(w&&S&&w[0]&&S[0]))return!b.s||!e.s||w&&!w[0]&&!S||S&&!S[0]&&!w?e.c=e.e=e.s=null:(e.s*=b.s,w&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(i=s(b.e/T)+s(e.e/T),e.s*=b.s,f=w.length,l=S.length,f<l&&(g=w,w=S,S=g,o=f,f=l,l=o),o=f+l,g=[];o--;g.push(0));for(v=A,y=I,o=l;--o>=0;){for(r=0,p=S[o]%y,m=S[o]/y|0,c=f,a=o+c;a>o;)h=w[--c]%y,d=w[c]/y|0,u=m*h+d*p,h=p*h+u%y*y+g[a]+r,r=(h/v|0)+(u/y|0)+m*d,g[a--]=h%v;g[a]=r}return r?++i:g.shift(),k(e,g,i)},B.toDigits=function(e,n){var r=new t(this);return e=null!=e&&X(e,1,O,18,"precision")?0|e:null,n=null!=n&&X(n,0,8,18,S)?0|n:D,e?C(r,e,n):r},B.toExponential=function(e,t){return r(this,null!=e&&X(e,0,O,19)?~~e+1:null,t,19)},B.toFixed=function(e,t){return r(this,null!=e&&X(e,0,O,20)?~~e+this.e+1:null,t,20)},B.toFormat=function(e,t){var n=r(this,null!=e&&X(e,0,O,21)?~~e+this.e+1:null,t,21);if(this.c){var i,o=n.split("."),s=+W.groupSize,a=+W.secondaryGroupSize,c=W.groupSeparator,u=o[0],f=o[1],h=this.s<0,d=h?u.slice(1):u,l=d.length;if(a&&(i=s,s=a,a=i,l-=i),s>0&&l>0){for(i=l%s||s,u=d.substr(0,i);i<l;i+=s)u+=c+d.substr(i,s);a>0&&(u+=c+d.slice(i)),h&&(u="-"+u)}n=f?u+W.decimalSeparator+((a=+W.fractionGroupSize)?f.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+W.fractionGroupSeparator):f):u}return n},B.toFraction=function(e){var n,r,i,o,s,c,u,f,h,d=H,l=this,p=l.c,m=new t(j),g=r=new t(j),v=u=new t(j);if(null!=e&&(H=!1,c=new t(e),H=d,(d=c.isInt())&&!c.lt(j)||(H&&N(22,"max denominator "+(d?"out of range":"not an integer"),e),e=!d&&c.c&&C(c,c.e+1,1).gte(j)?c:null)),!p)return l.toString();for(h=a(p),o=m.e=h.length-l.e-1,m.c[0]=P[(s=o%T)<0?T+s:s],e=!e||c.cmp(m)>0?o>0?m:g:c,s=$,$=1/0,c=new t(h),u.c[0]=0;f=F(c,m,0,1),i=r.plus(f.times(v)),1!=i.cmp(e);)r=v,v=i,g=u.plus(f.times(i=g)),u=i,m=c.minus(f.times(i=m)),c=i;return i=F(e.minus(r),v,0,1),u=u.plus(i.times(g)),r=r.plus(i.times(v)),u.s=g.s=l.s,o*=2,n=F(g,v,o,D).minus(l).abs().cmp(F(u,r,o,D).minus(l).abs())<1?[g.toString(),v.toString()]:[u.toString(),r.toString()],$=s,n},B.toNumber=function(){return+this},B.toPower=B.pow=function(e,n){var r,i,o,s=b(e<0?-e:+e),a=this;if(null!=n&&(L=23,n=new t(n)),!X(e,-M,M,23,"exponent")&&(!isFinite(e)||s>M&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+a,e),new t(n?r%n:r);for(n?e>1&&a.gt(j)&&a.isInt()&&n.gt(j)&&n.isInt()?a=a.mod(n):(o=n,n=null):J&&(r=y(J/T+2)),i=new t(j);;){if(s%2){if(i=i.times(a),!i.c)break;r?i.c.length>r&&(i.c.length=r):n&&(i=i.mod(n))}if(s=b(s/2),!s)break;a=a.times(a),r?a.c&&a.c.length>r&&(a.c.length=r):n&&(a=a.mod(n))}return n?i:(e<0&&(i=j.div(i)),o?i.mod(o):r?C(i,J,D):i)},B.toPrecision=function(e,t){return r(this,null!=e&&X(e,1,O,24,"precision")?0|e:null,t,24)},B.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(t=a(r.c),t=null!=e&&X(e,2,64,25,"base")?n(l(t,o),0|e,10,i):o<=z||o>=U?d(t,o):l(t,o),i<0&&r.c[0]&&(t="-"+t)),t},B.truncated=B.trunc=function(){return C(new t(this),this.e+1,1)},B.valueOf=B.toJSON=function(){var e,t=this,n=t.e;return null===n?t.toString():(e=a(t.c),e=n<=z||n>=U?d(e,n):l(e,n),t.s<0?"-"+e:e)},null!=e&&t.config(e),t}function s(e){var t=0|e;return e>0||e===t?t:t-1}function a(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=T-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function c(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,c=e.e,u=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=c==u,!i||!o)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function u(e,t,n){return(e=p(e))>=t&&e<=n}function f(e){return"[object Array]"==Object.prototype.toString.call(e)}function h(e,t,n){for(var r,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;o[i]*=t);for(o[r=0]+=E.indexOf(e.charAt(s++));r<o.length;r++)o[r]>n-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function d(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function l(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(n=e.length,++t>n){for(r="0",t-=n;--t;r+="0");e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function p(e){return e=parseFloat(e),e<0?y(e):b(e)}var m,g,v=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,y=Math.ceil,b=Math.floor,w=" not a boolean or binary digit",S="rounding mode",x="number type has more than 15 significant digits",E="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",A=1e14,T=14,M=9007199254740991,P=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],I=1e7,O=1e9;"undefined"!=typeof crypto&&(m=crypto),r=function(){return o()}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)},function(e,t,n){"use strict";function r(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];l(!e.entropy||e.entropy.length>=16,"entropy too short");var t=e.entropy?e.entropy.slice(0,16):p(16),n="ed25519"===e.algorithm?"ed25519":"secp256k1";return b.encodeSeed(t,n)}function i(e){return m.sha512().update(e).digest().slice(0,32)}function o(e){var t={"ecdsa-secp256k1":T,ed25519:M};return t[e]}function s(e,t){var n=b.decodeSeed(e),r="ed25519"===n.type?"ed25519":"ecdsa-secp256k1";return o(r).deriveKeypair(n.bytes,t)}function a(e){var t=E(e);return 33===t.length&&237===t[0]?"ed25519":"ecdsa-secp256k1"}function c(e,t){var n=a(t);return o(n).sign(E(e),t)}function u(e,t,n){var r=a(n);return o(r).verify(E(e),t,n)}function f(e){return b.encodeAccountID(x.computePublicKeyHash(e))}function h(e){return f(E(e))}function d(e){var t=b.decodeNodePublic(e),n=S(t);return f(n)}var l=n(306),p=n(310),m=n(365),g=n(371),v=g.eddsa("ed25519"),y=g.ec("secp256k1"),b=n(390),w=n(395).derivePrivateKey,S=n(395).accountPublicFromPublicGenerator,x=n(403),E=x.hexToBytes,A=x.bytesToHex,T={deriveKeypair:function(e,t){var n="00",r=n+w(e,t).toString(16,64).toUpperCase(),i=A(y.keyFromPrivate(r.slice(2)).getPublic().encodeCompressed());return{privateKey:r,publicKey:i}},sign:function(e,t){return A(y.sign(i(e),E(t),{canonical:!0}).toDER())},verify:function(e,t,n){return y.verify(i(e),t,E(n))}},M={deriveKeypair:function(e){var t="ED",n=i(e),r=t+A(n),o=t+A(v.keyFromSecret(n).pubBytes());return{privateKey:r,publicKey:o}},sign:function(e,t){return l(Array.isArray(e),"message must be array of octets"),A(v.sign(e,E(t).slice(1)).toBytes())},verify:function(e,t,n){return v.verify(e,E(t),E(n).slice(1))}};e.exports={generateSeed:r,deriveKeypair:s,sign:c,verify:u,deriveAddress:h,deriveNodeAddress:d}},function(e,t,n){(function(t){"use strict";function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function i(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}function o(e){return Object.prototype.toString.call(e)}function s(e){return!i(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function a(e){if(w.isFunction(e)){if(E)return e.name;var t=e.toString(),n=t.match(T);return n&&n[1]}}function c(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function u(e){if(E||!w.isFunction(e))return w.inspect(e);var t=a(e),n=t?": "+t:"";return"[Function"+n+"]"}function f(e){return c(u(e.actual),128)+" "+e.operator+" "+c(u(e.expected),128)}function h(e,t,n,r,i){throw new A.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function d(e,t){e||h(e,!0,t,"==",A.ok)}function l(e,t,n,a){if(e===t)return!0;if(i(e)&&i(t))return 0===r(e,t);if(w.isDate(e)&&w.isDate(t))return e.getTime()===t.getTime();if(w.isRegExp(e)&&w.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(s(e)&&s(t)&&o(e)===o(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===r(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;a=a||{actual:[],expected:[]};var c=a.actual.indexOf(e);return c!==-1&&c===a.expected.indexOf(t)||(a.actual.push(e),a.expected.push(t),m(e,t,n,a))}return n?e===t:e==t}function p(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function m(e,t,n,r){if(null===e||void 0===e||null===t||void 0===t)return!1;if(w.isPrimitive(e)||w.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=p(e),o=p(t);if(i&&!o||!i&&o)return!1;if(i)return e=x.call(e),t=x.call(t),l(e,t,n);var s,a,c=M(e),u=M(t);if(c.length!==u.length)return!1;for(c.sort(),u.sort(),a=c.length-1;a>=0;a--)if(c[a]!==u[a])return!1;for(a=c.length-1;a>=0;a--)if(s=c[a],!l(e[s],t[s],n,r))return!1;return!0}function g(e,t,n){l(e,t,!0)&&h(e,t,n,"notDeepStrictEqual",g)}function v(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(n){}return!Error.isPrototypeOf(t)&&t.call({},e)===!0}function y(e){var t;try{e()}catch(n){t=n}return t}function b(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=y(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&h(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!e&&w.isError(i),a=!e&&i&&!n;if((s&&o&&v(i,n)||a)&&h(i,n,"Got unwanted exception"+r),e&&i&&n&&!v(i,n)||!e&&i)throw i}var w=n(307),S=Object.prototype.hasOwnProperty,x=Array.prototype.slice,E=function(){return"foo"===function(){}.name}(),A=e.exports=d,T=/\s*function\s+([^\(\s]*)\s*/;A.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=f(this),this.generatedMessage=!0);var t=e.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=a(t),o=r.indexOf("\n"+i);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}},w.inherits(A.AssertionError,Error),A.fail=h,A.ok=d,A.equal=function(e,t,n){e!=t&&h(e,t,n,"==",A.equal)},A.notEqual=function(e,t,n){e==t&&h(e,t,n,"!=",A.notEqual)},A.deepEqual=function(e,t,n){l(e,t,!1)||h(e,t,n,"deepEqual",A.deepEqual)},A.deepStrictEqual=function(e,t,n){l(e,t,!0)||h(e,t,n,"deepStrictEqual",A.deepStrictEqual)},A.notDeepEqual=function(e,t,n){l(e,t,!1)&&h(e,t,n,"notDeepEqual",A.notDeepEqual)},A.notDeepStrictEqual=g,A.strictEqual=function(e,t,n){e!==t&&h(e,t,n,"===",A.strictEqual)},A.notStrictEqual=function(e,t,n){e===t&&h(e,t,n,"!==",A.notStrictEqual)},A["throws"]=function(e,t,n){b(!0,e,t,n)},A.doesNotThrow=function(e,t,n){b(!1,e,t,n)},A.ifError=function(e){if(e)throw e};var M=Object.keys||function(e){var t=[];for(var n in e)S.call(e,n)&&t.push(n);return t}}).call(t,function(){return this}())},function(e,t,n){(function(e,r){function i(e,n){var r={seen:[],stylize:s};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),S(r.showHidden)&&(r.showHidden=!1),S(r.depth)&&(r.depth=2),S(r.colors)&&(r.colors=!1),S(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),c(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function s(e,t){return e}function a(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function c(e,n,r){if(e.customInspect&&n&&M(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return b(i)||(i=c(e,i,r)),i}var o=u(e,n);if(o)return o;var s=Object.keys(n),m=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),T(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(n);if(0===s.length){if(M(n)){var g=n.name?": "+n.name:"";return e.stylize("[Function"+g+"]","special")}if(x(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(A(n))return e.stylize(Date.prototype.toString.call(n),"date");if(T(n))return f(n)}var v="",y=!1,w=["{","}"];if(p(n)&&(y=!0,w=["[","]"]),M(n)){var S=n.name?": "+n.name:"";v=" [Function"+S+"]"}if(x(n)&&(v=" "+RegExp.prototype.toString.call(n)),A(n)&&(v=" "+Date.prototype.toUTCString.call(n)),T(n)&&(v=" "+f(n)),0===s.length&&(!y||0==n.length))return w[0]+v+w[1];if(r<0)return x(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var E;return E=y?h(e,n,r,m,s):s.map(function(t){return d(e,n,r,m,t,y)}),e.seen.pop(),l(E,v,w)}function u(e,t){if(S(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)k(t,String(s))?o.push(d(e,t,n,r,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(d(e,t,n,r,i,!0))}),o}function d(e,t,n,r,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),k(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=g(n)?c(e,u.value,null):c(e,u.value,n-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),S(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function l(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return null==e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function S(e){return void 0===e}function x(e){return E(e)&&"[object RegExp]"===I(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===I(e)}function T(e){return E(e)&&("[object Error]"===I(e)||e instanceof Error)}function M(e){return"function"==typeof e}function P(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function I(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}function R(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),L[e.getMonth()],t].join(" ")}function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var N=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,o=r.length,s=String(e).replace(N,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(_){return"[Circular]"}default:return e}}),a=r[n];n<o;a=r[++n])s+=g(a)||!E(a)?" "+a:" "+i(a);return s},t.deprecate=function(n,i){function o(){if(!s){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation?console.trace(i):console.error(i),s=!0}return n.apply(this,arguments)}if(S(e.process))return function(){return t.deprecate(n,i).apply(this,arguments)};if(r.noDeprecation===!0)return n;var s=!1;return o};var C,F={};t.debuglog=function(e){if(S(C)&&(C=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!F[e])if(new RegExp("\\b"+e+"\\b","i").test(C)){var n=r.pid;F[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else F[e]=function(){};return F[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=m,t.isNull=g,t.isNullOrUndefined=v,t.isNumber=y,t.isString=b,t.isSymbol=w,t.isUndefined=S,t.isRegExp=x,t.isObject=E,t.isDate=A,t.isError=T,t.isFunction=M,t.isPrimitive=P,t.isBuffer=n(308);var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",R(),t.format.apply(t,arguments))},t.inherits=n(309),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(t,function(){return this}(),n(296))},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 n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){function r(e){this.rand=e}var i;if(e.exports=function(e){return i||(i=new r(null)),i.generate(e)},e.exports.Rand=r,r.prototype.generate=function(e){return this._rand(e)},"object"==typeof window)window.crypto&&window.crypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return window.crypto.getRandomValues(t),t}:window.msCrypto&&window.msCrypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return window.msCrypto.getRandomValues(t),t}:r.prototype._rand=function(){throw new Error("Not implemented yet")};else try{var o=n(311);r.prototype._rand=function(e){return o.randomBytes(e)}}catch(s){r.prototype._rand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t}}},function(e,t,n){(function(r){function i(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(e,t){for(var n in e)t(e[n],n)}var s=n(316);t.createHash=n(318),t.createHmac=n(327),t.randomBytes=function(e,t){if(!t||!t.call)return new r(s(e));try{t.call(this,void 0,new r(s(e)))}catch(n){t(n)}},t.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var a=n(328)(t);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync,n(330)(t,e.exports),o(["createCredentials","createSign","createVerify","createDiffieHellman"],function(e){t[e]=function(){i("sorry,",e,"is not implemented yet")}})}).call(t,n(312).Buffer)},function(e,t,n){(function(e){"use strict";function r(){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(t){return!1}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=s.prototype):(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return a(this,e,t,n)}function a(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');
|
||
return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?l(e,t,n,r):"string"==typeof t?h(e,t,n):p(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,r){return c(t),t<=0?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}function f(e,t){if(c(t),e=o(e,t<0?0:0|m(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|v(t,n);e=o(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function d(e,t){var n=t.length<0?0:0|m(t.length);e=o(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function l(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),s.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=s.prototype):e=d(e,t),e}function p(e,t){if(s.isBuffer(t)){var n=0|m(t.length);return e=o(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||Y(t.length)?o(e,0):d(e,t);if("Buffer"===t.type&&ee(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function m(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),s.alloc(+e)}function v(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(r)return X(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:S(e,t,n,r,i);if("number"==typeof t)return t=255&t,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):S(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function S(e,t,n,r,i){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,c=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}var u;if(i){var f=-1;for(u=n;u<a;u++)if(o(e,u)===o(t,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===c)return f*s}else f!==-1&&(u-=u-f),f=-1}else for(n+c>a&&(n=a-c),u=n;u>=0;u--){for(var h=!0,d=0;d<c;d++)if(o(e,u+d)!==o(t,d)){h=!1;break}if(h)return u}return-1}function x(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function E(e,t,n,r){return W(X(t,e.length-n),e,n,r)}function A(e,t,n,r){return W(K(t),e,n,r)}function T(e,t,n,r){return A(e,t,n,r)}function M(e,t,n,r){return W(J(t),e,n,r)}function P(e,t,n,r){return W(G(t,e.length-n),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?Z.fromByteArray(e):Z.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o=e[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=n){var c,u,f,h;switch(a){case 1:o<128&&(s=o);break;case 2:c=e[i+1],128===(192&c)&&(h=(31&o)<<6|63&c,h>127&&(s=h));break;case 3:c=e[i+1],u=e[i+2],128===(192&c)&&128===(192&u)&&(h=(15&o)<<12|(63&c)<<6|63&u,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:c=e[i+1],u=e[i+2],f=e[i+3],128===(192&c)&&128===(192&u)&&128===(192&f)&&(h=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&f,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return R(r)}function R(e){var t=e.length;if(t<=te)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=te));return n}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function C(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=H(e[o]);return i}function F(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function j(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function q(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,i){return i||D(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||D(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,r,52,8),n+8}function V(e){if(e=$(e).replace(ne,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function $(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function X(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function K(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function G(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function J(e){return Z.toByteArray(V(e))}function W(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var Z=n(313),Q=n(314),ee=n(315);t.Buffer=s,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return a(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return u(null,e,t,n)},s.allocUnsafe=function(e){return f(null,e)},s.allocUnsafeSlow=function(e){return f(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},s.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}},s.concat=function(e,t){if(!ee(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},s.byteLength=v,s.prototype._isBuffer=!0,s.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)b(this,t,t+1);return this},s.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)b(this,t,t+3),b(this,t+1,t+2);return this},s.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)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?O(this,0,e):y.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,a=n-t,c=Math.min(o,a),u=this.slice(r,i),f=e.slice(t,n),h=0;h<c;++h)if(u[h]!==f[h]){o=u[h],a=f[h];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},s.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":return A(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return M(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var te=4096;s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var r;if(s.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=s.prototype;else{var i=t-e;r=new s(i,(void 0));for(var o=0;o<i;++o)r[o]=this[o+e]}return r},s.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},s.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||L(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),Q.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),Q.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),Q.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),Q.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;B(this,e,t,n,i,0)}var o=1,s=0;for(this[t]=255&e;++s<n&&(o*=256);)this[t+s]=e/o&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;B(this,e,t,n,i,0)}var o=n-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):q(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):q(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):q(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):q(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e=255&e);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=s.isBuffer(e)?e:X(new s(e,r).toString()),c=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%c]}return this};var ne=/[^+\/0-9A-Za-z-_]/g}).call(t,function(){return this}())},function(e,t){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,o,s,a,c=e.length;s=n(e),a=new f(3*c/4-s),i=s>0?c-4:c;var h=0;for(t=0,r=0;t<i;t+=4,r+=3)o=u[e.charCodeAt(t)]<<18|u[e.charCodeAt(t+1)]<<12|u[e.charCodeAt(t+2)]<<6|u[e.charCodeAt(t+3)],a[h++]=o>>16&255,a[h++]=o>>8&255,a[h++]=255&o;return 2===s?(o=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,a[h++]=255&o):1===s&&(o=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,a[h++]=o>>8&255,a[h++]=255&o),a}function o(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(o(r));return i.join("")}function a(e){for(var t,n=e.length,r=n%3,i="",o=[],a=16383,u=0,f=n-r;u<f;u+=a)o.push(s(e,u,u+a>f?f:u+a));return 1===r?(t=e[n-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=a;for(var c=[],u=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,l=h.length;d<l;++d)c[d]=h[d],u[h.charCodeAt(d)]=d;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,u=c>>1,f=-7,h=n?i-1:0,d=n?-1:1,l=e[t+h];for(h+=d,o=l&(1<<-f)-1,l>>=-f,f+=a;f>0;o=256*o+e[t+h],h+=d,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+e[t+h],h+=d,f-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(l?-1:1)*(1/0);s+=Math.pow(2,r),o-=u}return(l?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,c,u=8*o-i-1,f=(1<<u)-1,h=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),t+=s+h>=1?d/c:d*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(t*c-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+l]=255&a,l+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+l]=255&s,l+=p,s/=256,u-=8);e[n+l-p]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t,r){!function(){var i=("undefined"==typeof window?t:window)||{};_crypto=i.crypto||i.msCrypto||n(317),e.exports=function(e){if(_crypto.getRandomValues){var t=new r(e);return _crypto.getRandomValues(t),t}if(_crypto.randomBytes)return _crypto.randomBytes(e);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(t,function(){return this}(),n(312).Buffer)},function(e,t){},function(e,t,n){(function(t){function r(e){return function(){var n=[],r={update:function(e,r){return t.isBuffer(e)||(e=new t(e,r)),n.push(e),this},digest:function(r){var i=t.concat(n),o=e(i);return n=null,r?o.toString(r):o}};return r}}var i=n(319),o=r(n(324)),s=r(n(326));e.exports=function(e){return"md5"===e?new o:"rmd160"===e?new s:i(e)}}).call(t,n(312).Buffer)},function(e,t,n){var t=e.exports=function(e){var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n},r=n(312).Buffer,i=n(320)(r);t.sha1=n(321)(r,i),t.sha256=n(322)(r,i),t.sha512=n(323)(r,i)},function(e,t){e.exports=function(e){function t(t,n){this._block=new e(t),this._finalSize=n,this._blockSize=t,this._len=0,this._s=0}return t.prototype.init=function(){this._s=0,this._len=0},t.prototype.update=function(t,n){"string"==typeof t&&(n=n||"utf8",t=new e(t,n));for(var r=this._len+=t.length,i=this._s=this._s||0,o=0,s=this._block;i<r;){for(var a=Math.min(t.length,o+this._blockSize-i%this._blockSize),c=a-o,u=0;u<c;u++)s[i%this._blockSize+u]=t[u+o];i+=c,o+=c,i%this._blockSize===0&&this._update(s)}return this._s=i,this},t.prototype.digest=function(e){var t=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),t%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var n=this._update(this._block)||this._hash();return e?n.toString(e):n},t.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t}},function(e,t,n){var r=n(307).inherits;e.exports=function(e,t){function n(){return p.length?p.pop().init():this instanceof n?(this._w=l,t.call(this,64,56),this._h=null,void this.init()):new n}function i(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function o(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function s(e,t){return e+t|0}function a(e,t){return e<<t|e>>>32-t}var c=0,u=4,f=8,h=12,d=16,l=new("undefined"==typeof Int32Array?Array:Int32Array)(80),p=[];return r(n,t),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,t.prototype.init.call(this),this},n.prototype._POOL=p,n.prototype._update=function(e){var t,n,r,c,u,f,h,d,l,p;t=f=this._a,n=h=this._b,r=d=this._c,c=l=this._d,u=p=this._e;for(var m=this._w,g=0;g<80;g++){var v=m[g]=g<16?e.readInt32BE(4*g):a(m[g-3]^m[g-8]^m[g-14]^m[g-16],1),y=s(s(a(t,5),i(g,n,r,c)),s(s(u,v),o(g)));u=c,c=r,r=a(n,30),n=t,t=y}this._a=s(t,f),this._b=s(n,h),this._c=s(r,d),this._d=s(c,l),this._e=s(u,p)},n.prototype._hash=function(){p.length<100&&p.push(this);var t=new e(20);return t.writeInt32BE(0|this._a,c),t.writeInt32BE(0|this._b,u),t.writeInt32BE(0|this._c,f),t.writeInt32BE(0|this._d,h),t.writeInt32BE(0|this._e,d),t},n}},function(e,t,n){var r=n(307).inherits;e.exports=function(e,t){function n(){this.init(),this._w=l,t.call(this,64,56)}function i(e,t){return e>>>t|e<<32-t}function o(e,t){return e>>>t}function s(e,t,n){return e&t^~e&n}function a(e,t,n){return e&t^e&n^t&n}function c(e){return i(e,2)^i(e,13)^i(e,22)}function u(e){return i(e,6)^i(e,11)^i(e,25)}function f(e){return i(e,7)^i(e,18)^o(e,3)}function h(e){return i(e,17)^i(e,19)^o(e,10)}var d=[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],l=new Array(64);return r(n,t),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},n.prototype._update=function(e){var t,n,r,i,o,l,p,m,g,v,y=this._w;t=0|this._a,n=0|this._b,r=0|this._c,i=0|this._d,o=0|this._e,l=0|this._f,p=0|this._g,m=0|this._h;for(var b=0;b<64;b++){var w=y[b]=b<16?e.readInt32BE(4*b):h(y[b-2])+y[b-7]+f(y[b-15])+y[b-16];g=m+u(o)+s(o,l,p)+d[b]+w,v=c(t)+a(t,n,r),m=p,p=l,l=o,o=i+g,i=r,r=n,n=t,t=g+v}this._a=t+this._a|0,this._b=n+this._b|0,this._c=r+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0,this._f=l+this._f|0,this._g=p+this._g|0,this._h=m+this._h|0},n.prototype._hash=function(){var t=new e(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},n}},function(e,t,n){var r=n(307).inherits;e.exports=function(e,t){function n(){this.init(),this._w=c,t.call(this,128,112)}function i(e,t,n){return e>>>n|t<<32-n}function o(e,t,n){return e&t^~e&n}function s(e,t,n){return e&t^e&n^t&n}var 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],c=new Array(160);return r(n,t),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},n.prototype._update=function(e){var t,n,r,c,u,f,h,d,l,p,m,g,v,y,b,w,S=this._w;t=0|this._a,n=0|this._b,r=0|this._c,c=0|this._d,u=0|this._e,f=0|this._f,h=0|this._g,d=0|this._h,l=0|this._al,p=0|this._bl,m=0|this._cl,g=0|this._dl,v=0|this._el,y=0|this._fl,b=0|this._gl,w=0|this._hl;for(var x=0;x<80;x++){var E,A,T=2*x;if(x<16)E=S[T]=e.readInt32BE(4*T),A=S[T+1]=e.readInt32BE(4*T+4);else{var M=S[T-30],P=S[T-30+1],I=i(M,P,1)^i(M,P,8)^M>>>7,O=i(P,M,1)^i(P,M,8)^i(P,M,7);M=S[T-4],P=S[T-4+1];var R=i(M,P,19)^i(P,M,29)^M>>>6,k=i(P,M,19)^i(M,P,29)^i(P,M,6),N=S[T-14],C=S[T-14+1],F=S[T-32],L=S[T-32+1];A=O+C,E=I+N+(A>>>0<O>>>0?1:0),A+=k,E=E+R+(A>>>0<k>>>0?1:0),A+=L,E=E+F+(A>>>0<L>>>0?1:0),S[T]=E,S[T+1]=A}var B=s(t,n,r),j=s(l,p,m),q=i(t,l,28)^i(l,t,2)^i(l,t,7),D=i(l,t,28)^i(t,l,2)^i(t,l,7),z=i(u,v,14)^i(u,v,18)^i(v,u,9),U=i(v,u,14)^i(v,u,18)^i(u,v,9),V=a[T],$=a[T+1],H=o(u,f,h),X=o(v,y,b),K=w+U,G=d+z+(K>>>0<w>>>0?1:0);K+=X,G=G+H+(K>>>0<X>>>0?1:0),K+=$,G=G+V+(K>>>0<$>>>0?1:0),K+=A,G=G+E+(K>>>0<A>>>0?1:0);var J=D+j,W=q+B+(J>>>0<D>>>0?1:0);d=h,w=b,h=f,b=y,f=u,y=v,v=g+K|0,u=c+G+(v>>>0<g>>>0?1:0)|0,c=r,g=m,r=n,m=p,n=t,p=l,l=K+J|0,t=G+W+(l>>>0<K>>>0?1:0)|0}this._al=this._al+l|0,this._bl=this._bl+p|0,this._cl=this._cl+m|0,this._dl=this._dl+g|0,this._el=this._el+v|0,this._fl=this._fl+y|0,this._gl=this._gl+b|0,this._hl=this._hl+w|0,this._a=this._a+t+(this._al>>>0<l>>>0?1:0)|0,this._b=this._b+n+(this._bl>>>0<p>>>0?1:0)|0,this._c=this._c+r+(this._cl>>>0<m>>>0?1:0)|0,this._d=this._d+c+(this._dl>>>0<g>>>0?1:0)|0,this._e=this._e+u+(this._el>>>0<v>>>0?1:0)|0,this._f=this._f+f+(this._fl>>>0<y>>>0?1:0)|0,this._g=this._g+h+(this._gl>>>0<b>>>0?1:0)|0,this._h=this._h+d+(this._hl>>>0<w>>>0?1:0)|0},n.prototype._hash=function(){function t(e,t,r){n.writeInt32BE(e,r),n.writeInt32BE(t,r+4)}var n=new e(64);return t(this._a,this._al,0),t(this._b,this._bl,8),t(this._c,this._cl,16),t(this._d,this._dl,24),t(this._e,this._el,32),t(this._f,this._fl,40),t(this._g,this._gl,48),t(this._h,this._hl,56),n},n}},function(e,t,n){function r(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,i=-1732584194,f=271733878,h=0;h<e.length;h+=16){var d=n,l=r,p=i,m=f;n=o(n,r,i,f,e[h+0],7,-680876936),f=o(f,n,r,i,e[h+1],12,-389564586),i=o(i,f,n,r,e[h+2],17,606105819),r=o(r,i,f,n,e[h+3],22,-1044525330),n=o(n,r,i,f,e[h+4],7,-176418897),f=o(f,n,r,i,e[h+5],12,1200080426),i=o(i,f,n,r,e[h+6],17,-1473231341),r=o(r,i,f,n,e[h+7],22,-45705983),n=o(n,r,i,f,e[h+8],7,1770035416),f=o(f,n,r,i,e[h+9],12,-1958414417),i=o(i,f,n,r,e[h+10],17,-42063),r=o(r,i,f,n,e[h+11],22,-1990404162),n=o(n,r,i,f,e[h+12],7,1804603682),f=o(f,n,r,i,e[h+13],12,-40341101),i=o(i,f,n,r,e[h+14],17,-1502002290),r=o(r,i,f,n,e[h+15],22,1236535329),n=s(n,r,i,f,e[h+1],5,-165796510),
|
||
f=s(f,n,r,i,e[h+6],9,-1069501632),i=s(i,f,n,r,e[h+11],14,643717713),r=s(r,i,f,n,e[h+0],20,-373897302),n=s(n,r,i,f,e[h+5],5,-701558691),f=s(f,n,r,i,e[h+10],9,38016083),i=s(i,f,n,r,e[h+15],14,-660478335),r=s(r,i,f,n,e[h+4],20,-405537848),n=s(n,r,i,f,e[h+9],5,568446438),f=s(f,n,r,i,e[h+14],9,-1019803690),i=s(i,f,n,r,e[h+3],14,-187363961),r=s(r,i,f,n,e[h+8],20,1163531501),n=s(n,r,i,f,e[h+13],5,-1444681467),f=s(f,n,r,i,e[h+2],9,-51403784),i=s(i,f,n,r,e[h+7],14,1735328473),r=s(r,i,f,n,e[h+12],20,-1926607734),n=a(n,r,i,f,e[h+5],4,-378558),f=a(f,n,r,i,e[h+8],11,-2022574463),i=a(i,f,n,r,e[h+11],16,1839030562),r=a(r,i,f,n,e[h+14],23,-35309556),n=a(n,r,i,f,e[h+1],4,-1530992060),f=a(f,n,r,i,e[h+4],11,1272893353),i=a(i,f,n,r,e[h+7],16,-155497632),r=a(r,i,f,n,e[h+10],23,-1094730640),n=a(n,r,i,f,e[h+13],4,681279174),f=a(f,n,r,i,e[h+0],11,-358537222),i=a(i,f,n,r,e[h+3],16,-722521979),r=a(r,i,f,n,e[h+6],23,76029189),n=a(n,r,i,f,e[h+9],4,-640364487),f=a(f,n,r,i,e[h+12],11,-421815835),i=a(i,f,n,r,e[h+15],16,530742520),r=a(r,i,f,n,e[h+2],23,-995338651),n=c(n,r,i,f,e[h+0],6,-198630844),f=c(f,n,r,i,e[h+7],10,1126891415),i=c(i,f,n,r,e[h+14],15,-1416354905),r=c(r,i,f,n,e[h+5],21,-57434055),n=c(n,r,i,f,e[h+12],6,1700485571),f=c(f,n,r,i,e[h+3],10,-1894986606),i=c(i,f,n,r,e[h+10],15,-1051523),r=c(r,i,f,n,e[h+1],21,-2054922799),n=c(n,r,i,f,e[h+8],6,1873313359),f=c(f,n,r,i,e[h+15],10,-30611744),i=c(i,f,n,r,e[h+6],15,-1560198380),r=c(r,i,f,n,e[h+13],21,1309151649),n=c(n,r,i,f,e[h+4],6,-145523070),f=c(f,n,r,i,e[h+11],10,-1120210379),i=c(i,f,n,r,e[h+2],15,718787259),r=c(r,i,f,n,e[h+9],21,-343485551),n=u(n,d),r=u(r,l),i=u(i,p),f=u(f,m)}return Array(n,r,i,f)}function i(e,t,n,r,i,o){return u(f(u(u(t,e),u(r,o)),i),n)}function o(e,t,n,r,o,s,a){return i(t&n|~t&r,e,t,o,s,a)}function s(e,t,n,r,o,s,a){return i(t&r|n&~r,e,t,o,s,a)}function a(e,t,n,r,o,s,a){return i(t^n^r,e,t,o,s,a)}function c(e,t,n,r,o,s,a){return i(n^(t|~r),e,t,o,s,a)}function u(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n}function f(e,t){return e<<t|e>>>32-t}var h=n(325);e.exports=function(e){return h.hash(e,r,16)}},function(e,t,n){(function(t){function n(e,n){if(e.length%o!==0){var r=e.length+(o-e.length%o);e=t.concat([e,s],r)}for(var i=[],a=n?e.readInt32BE:e.readInt32LE,c=0;c<e.length;c+=o)i.push(a.call(e,c));return i}function r(e,n,r){for(var i=new t(n),o=r?i.writeInt32BE:i.writeInt32LE,s=0;s<e.length;s++)o.call(i,e[s],4*s,!0);return i}function i(e,i,o,s){t.isBuffer(e)||(e=new t(e));var c=i(n(e,s),e.length*a);return r(c,o,s)}var o=4,s=new t(o);s.fill(0);var a=8;e.exports={hash:i}}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function n(e,t,n){return e^t^n}function r(e,t,n){return e&t|~e&n}function i(e,t,n){return(e|~t)^n}function o(e,t,n){return e&n|t&~n}function s(e,t,n){return e^(t|~n)}function a(e,t){return e<<t|e>>>32-t}function c(e){var n=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof e&&(e=new t(e,"utf8"));var r=m(e),i=8*e.length,o=8*e.length;r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);for(var s=0;s<r.length;s+=16)v(n,r,s);for(var s=0;s<5;s++){var a=n[s];n[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var c=g(n);return new t(c)}e.exports=c;var u=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],h=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0],m=function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},g=function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},v=function(e,t,c){for(var m=0;m<16;m++){var g=c+m,v=t[g];t[g]=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8)}var y,b,w,S,x,E,A,T,M,P;E=y=e[0],A=b=e[1],T=w=e[2],M=S=e[3],P=x=e[4];for(var I,m=0;m<80;m+=1)I=y+t[c+u[m]]|0,I+=m<16?n(b,w,S)+l[0]:m<32?r(b,w,S)+l[1]:m<48?i(b,w,S)+l[2]:m<64?o(b,w,S)+l[3]:s(b,w,S)+l[4],I=0|I,I=a(I,h[m]),I=I+x|0,y=x,x=S,S=a(w,10),w=b,b=I,I=E+t[c+f[m]]|0,I+=m<16?s(A,T,M)+p[0]:m<32?o(A,T,M)+p[1]:m<48?i(A,T,M)+p[2]:m<64?r(A,T,M)+p[3]:n(A,T,M)+p[4],I=0|I,I=a(I,d[m]),I=I+P|0,E=P,P=M,M=a(T,10),T=A,A=I;I=e[1]+w+M|0,e[1]=e[2]+S+P|0,e[2]=e[3]+x+E|0,e[3]=e[4]+y+A|0,e[4]=e[0]+b+T|0,e[0]=I}}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);this._opad=c,this._alg=e;var s="sha512"===e?128:64;n=this._key=t.isBuffer(n)?n:new t(n),n.length>s?n=i(e).update(n).digest():n.length<s&&(n=t.concat([n,o],s));for(var a=this._ipad=new t(s),c=this._opad=new t(s),u=0;u<s;u++)a[u]=54^n[u],c[u]=92^n[u];this._hash=i(e).update(a)}var i=n(318),o=new t(128);o.fill(0),e.exports=r,r.prototype.update=function(e,t){return this._hash.update(e,t),this},r.prototype.digest=function(e){var t=this._hash.digest();return i(this._alg).update(this._opad).update(t).digest(e)}}).call(t,n(312).Buffer)},function(e,t,n){var r=n(329);e.exports=function(e,t){t=t||{};var n=r(e);return t.pbkdf2=n.pbkdf2,t.pbkdf2Sync=n.pbkdf2Sync,t}},function(e,t,n){(function(t){e.exports=function(e){function n(e,t,n,i,o,s){if("function"==typeof o&&(s=o,o=void 0),"function"!=typeof s)throw new Error("No callback provided to pbkdf2");setTimeout(function(){var a;try{a=r(e,t,n,i,o)}catch(c){return s(c)}s(void 0,a)})}function r(n,r,i,o,s){if("number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(o<0)throw new TypeError("Bad key length");s=s||"sha1",t.isBuffer(n)||(n=new t(n)),t.isBuffer(r)||(r=new t(r));var a,c,u,f=1,h=new t(o),d=new t(r.length+4);r.copy(d,0,0,r.length);for(var l=1;l<=f;l++){d.writeUInt32BE(l,r.length);var p=e.createHmac(s,n).update(d).digest();if(!a&&(a=p.length,u=new t(a),f=Math.ceil(o/a),c=o-(f-1)*a,o>(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");p.copy(u,0,0,a);for(var m=1;m<i;m++){p=e.createHmac(s,n).update(p).digest();for(var g=0;g<a;g++)u[g]^=p[g]}var v=(l-1)*a,y=l==f?c:a;u.copy(h,v,0,y)}return h}return{pbkdf2:n,pbkdf2Sync:r}}}).call(t,n(312).Buffer)},function(e,t,n){e.exports=function(e,t){function r(){return Object.keys(s)}t=t||{};var i=n(331)(e);t.createCipher=i.createCipher,t.createCipheriv=i.createCipheriv;var o=n(364)(e);t.createDecipher=o.createDecipher,t.createDecipheriv=o.createDecipheriv;var s=n(355);t.listCiphers=r}},function(e,t,n){(function(t){function r(e,n,a){return this instanceof r?(s.call(this),this._cache=new i,this._cipher=new o.AES(n),this._prev=new t(a.length),a.copy(this._prev),void(this._mode=e)):new r(e,n,a)}function i(){return this instanceof i?void(this.cache=new t("")):new i}var o=n(332),s=n(333),a=n(309),c=n(355),u=n(356),f=n(357);a(r,s),r.prototype._transform=function(e,_,t){this._cache.add(e);for(var n,r;n=this._cache.get();)r=this._mode.encrypt(this,n),this.push(r);t()},r.prototype._flush=function(e){var t=this._cache.flush();this.push(this._mode.encrypt(this,t)),this._cipher.scrub(),e()},i.prototype.add=function(e){this.cache=t.concat([this.cache,e])},i.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},i.prototype.flush=function(){for(var e=16-this.cache.length,n=new t(e),r=-1;++r<e;)n.writeUInt8(e,r);var i=t.concat([this.cache,n]);return i};var h={ECB:n(358),CBC:n(359),CFB:n(361),OFB:n(362),CTR:n(363)};e.exports=function(e){function n(e,n,i){var o=c[e];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new t(i)),"string"==typeof n&&(n=new t(n)),n.length!==o.key/8)throw new TypeError("invalid key length "+n.length);if(i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new f(h[o.mode],n,i):new r(h[o.mode],n,i)}function i(t,r){var i=c[t];if(!i)throw new TypeError("invalid suite type");var o=u(e,r,i.key,i.iv);return n(t,o.key,o.iv)}return{createCipher:i,createCipheriv:n}}}).call(t,n(312).Buffer)},function(e,t,n){(function(e){function n(e){var t,n;return t=e>a||e<0?(n=Math.abs(e)%a,e<0?a-n:n):e}function r(e){var t,n,r;for(t=n=0,r=e.length;0<=r?n<r:n>r;t=0<=r?++n:--n)e[t]=0;return!1}function i(){var e;this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=function(){var t,n;for(n=[],e=t=0;t<4;e=++t)n.push([]);return n}(),this.INV_SUB_MIX=function(){var t,n;for(n=[],e=t=0;t<4;e=++t)n.push([]);return n}(),this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function o(e){for(var t=e.length/4,n=new Array(t),r=-1;++r<t;)n[r]=e.readUInt32BE(4*r);return n}function s(e){this._key=o(e),this._doReset()}var a=Math.pow(2,32);i.prototype.init=function(){var e,t,n,r,i,o,s,a,c,u;for(e=function(){var e,n;for(n=[],t=e=0;e<256;t=++e)t<128?n.push(t<<1):n.push(t<<1^283);return n}(),i=0,c=0,t=u=0;u<256;t=++u)n=c^c<<1^c<<2^c<<3^c<<4,n=n>>>8^255&n^99,this.SBOX[i]=n,this.INV_SBOX[n]=i,o=e[i],s=e[o],a=e[s],r=257*e[n]^16843008*n,this.SUB_MIX[0][i]=r<<24|r>>>8,this.SUB_MIX[1][i]=r<<16|r>>>16,this.SUB_MIX[2][i]=r<<8|r>>>24,this.SUB_MIX[3][i]=r,r=16843009*a^65537*s^257*o^16843008*i,this.INV_SUB_MIX[0][n]=r<<24|r>>>8,this.INV_SUB_MIX[1][n]=r<<16|r>>>16,this.INV_SUB_MIX[2][n]=r<<8|r>>>24,this.INV_SUB_MIX[3][n]=r,0===i?i=c=1:(i=o^e[e[e[a^o]]],c^=e[e[c]]);return!0};var c=new i;s.blockSize=16,s.prototype.blockSize=s.blockSize,s.keySize=32,s.prototype.keySize=s.keySize,s.ivSize=s.blockSize,s.prototype.ivSize=s.ivSize,s.prototype._doReset=function(){var e,t,n,r,i,o,s,a;for(n=this._key,t=n.length,this._nRounds=t+6,i=4*(this._nRounds+1),this._keySchedule=[],r=s=0;0<=i?s<i:s>i;r=0<=i?++s:--s)this._keySchedule[r]=r<t?n[r]:(o=this._keySchedule[r-1],r%t===0?(o=o<<8|o>>>24,o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o],o^=c.RCON[r/t|0]<<24):t>6&&r%t===4?o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o]:void 0,this._keySchedule[r-t]^o);for(this._invKeySchedule=[],e=a=0;0<=i?a<i:a>i;e=0<=i?++a:--a)r=i-e,o=this._keySchedule[r-(e%4?0:4)],this._invKeySchedule[e]=e<4||r<=4?o:c.INV_SUB_MIX[0][c.SBOX[o>>>24]]^c.INV_SUB_MIX[1][c.SBOX[o>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[o>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&o]];return!0},s.prototype.encryptBlock=function(t){t=o(new e(t));var n=this._doCryptBlock(t,this._keySchedule,c.SUB_MIX,c.SBOX),r=new e(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[1],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[3],12),r},s.prototype.decryptBlock=function(t){t=o(new e(t));var n=[t[3],t[1]];t[1]=n[0],t[3]=n[1];var r=this._doCryptBlock(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX),i=new e(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},s.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},s.prototype._doCryptBlock=function(e,t,r,i){var o,s,a,c,u,f,h,d,l,p,m,g;for(a=e[0]^t[0],c=e[1]^t[1],u=e[2]^t[2],f=e[3]^t[3],o=4,s=m=1,g=this._nRounds;1<=g?m<g:m>g;s=1<=g?++m:--m)h=r[0][a>>>24]^r[1][c>>>16&255]^r[2][u>>>8&255]^r[3][255&f]^t[o++],d=r[0][c>>>24]^r[1][u>>>16&255]^r[2][f>>>8&255]^r[3][255&a]^t[o++],l=r[0][u>>>24]^r[1][f>>>16&255]^r[2][a>>>8&255]^r[3][255&c]^t[o++],p=r[0][f>>>24]^r[1][a>>>16&255]^r[2][c>>>8&255]^r[3][255&u]^t[o++],a=h,c=d,u=l,f=p;return h=(i[a>>>24]<<24|i[c>>>16&255]<<16|i[u>>>8&255]<<8|i[255&f])^t[o++],d=(i[c>>>24]<<24|i[u>>>16&255]<<16|i[f>>>8&255]<<8|i[255&a])^t[o++],l=(i[u>>>24]<<24|i[f>>>16&255]<<16|i[a>>>8&255]<<8|i[255&c])^t[o++],p=(i[f>>>24]<<24|i[a>>>16&255]<<16|i[c>>>8&255]<<8|i[255&u])^t[o++],[n(h),n(d),n(l),n(p)]},t.AES=s}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(){i.call(this)}var i=n(334).Transform,o=n(309);e.exports=r,o(r,i),r.prototype.update=function(e,n,r){this.write(e,n);for(var i,o=new t("");i=this.read();)o=t.concat([o,i]);return r&&(o=o.toString(r)),o},r.prototype["final"]=function(e){this.end();for(var n,r=new t("");n=this.read();)r=t.concat([r,n]);return e&&(r=r.toString(e)),r}}).call(t,n(312).Buffer)},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(301).EventEmitter,o=n(309);o(r,i),r.Readable=n(335),r.Writable=n(351),r.Duplex=n(352),r.Transform=n(353),r.PassThrough=n(354),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function o(){f||(f=!0,e.end())}function s(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(c(),0===i.listenerCount(this,"error"))throw e}function c(){u.removeListener("data",n),e.removeListener("drain",r),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),e.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),e.removeListener("close",c)}var u=this;u.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(u.on("end",o),u.on("close",s));var f=!1;return u.on("error",a),e.on("error",a),u.on("end",c),u.on("close",c),e.on("close",c),e.emit("pipe",u),e}},function(e,t,n){t=e.exports=n(336),t.Stream=t,t.Readable=t,t.Writable=n(344),t.Duplex=n(343),t.Transform=n(349),t.PassThrough=n(350)},function(e,t,n){(function(t){"use strict";function r(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?R(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function i(e,t){I=I||n(343),e=e||{},this.objectMode=!!e.objectMode,t instanceof I&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new q,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(j||(j=n(348).StringDecoder),this.decoder=new j(e.encoding),this.encoding=e.encoding)}function o(e){return I=I||n(343),this instanceof o?(this._readableState=new i(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),void N.call(this)):new o(e)}function s(e,t,n,r,i){var o=f(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,h(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var c=new Error("stream.unshift() after end event");e.emit("error",c)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&d(e))),p(e,t)}else i||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function c(e){return e>=z?e=z:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function u(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=c(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function f(e,t){var n=null;return C.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function h(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,d(e)}}function d(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(B("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?O(l,e):l(e))}function l(e){B("emit readable"),e.emit("readable"),w(e)}function p(e,t){t.readingMore||(t.readingMore=!0,O(m,e,t))}function m(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(B("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;B("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&k(e,"data")&&(t.flowing=!0,w(e))}}function v(e){B("readable nexttick read 0"),e.read(0)}function y(e,t){t.resumeScheduled||(t.resumeScheduled=!0,O(b,e,t))}function b(e,t){t.reading||(B("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),w(e),t.flowing&&!t.reading&&e.read(0)}function w(e){var t=e._readableState;for(B("flow",t.flowing);t.flowing&&null!==e.read(););}function S(e,t){if(0===t.length)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=x(e,t.buffer,t.decoder),n}function x(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?E(e,t):A(e,t),r}function E(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(i+=s===o.length?o:o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function A(e,t){var n=C.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,O(M,t,e))}function M(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}e.exports=o;var I,O=n(337),R=n(315);o.ReadableState=i;var k=(n(301).EventEmitter,function(e,t){return e.listeners(t).length}),N=n(338),C=n(339).Buffer,F=n(340);F.inherits=n(309);var L=n(341),B=void 0;B=L&&L.debuglog?L.debuglog("stream"):function(){};var j,q=n(342);F.inherits(o,N);var D=["error","close","destroy","pause","resume"];o.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding,t!==n.encoding&&(e=C.from(e,t),t="")),s(this,n,e,t,!1)},o.prototype.unshift=function(e){var t=this._readableState;return s(this,t,e,"",!0)},o.prototype.isPaused=function(){return this._readableState.flowing===!1},o.prototype.setEncoding=function(e){return j||(j=n(348).StringDecoder),this._readableState.decoder=new j(e),this._readableState.encoding=e,this};var z=8388608;o.prototype.read=function(e){B("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return B("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):d(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&T(this),null;var r=t.needReadable;B("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,B("length less than watermark",r)),t.ended||t.reading?(r=!1,B("reading or ended",r)):r&&(B("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=u(n,t)));var i;return i=e>0?S(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&T(this)),null!==i&&this.emit("data",i),i},o.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(e,n){function i(e){B("onunpipe"),e===d&&s()}function o(){B("onend"),e.end()}function s(){B("cleanup"),e.removeListener("close",u),e.removeListener("finish",f),e.removeListener("drain",v),e.removeListener("error",c),e.removeListener("unpipe",i),d.removeListener("end",o),d.removeListener("end",h),d.removeListener("data",a),y=!0,!l.awaitDrain||e._writableState&&!e._writableState.needDrain||v()}function a(t){B("ondata"),b=!1;var n=e.write(t);!1!==n||b||((1===l.pipesCount&&l.pipes===e||l.pipesCount>1&&P(l.pipes,e)!==-1)&&!y&&(B("false write response, pause",d._readableState.awaitDrain),d._readableState.awaitDrain++,b=!0),d.pause())}function c(t){B("onerror",t),h(),e.removeListener("error",c),0===k(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",f),h()}function f(){B("onfinish"),e.removeListener("close",u),h()}function h(){B("unpipe"),d.unpipe(e)}var d=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=e;break;case 1:l.pipes=[l.pipes,e];break;default:l.pipes.push(e)}l.pipesCount+=1,B("pipe count=%d opts=%j",l.pipesCount,n);var p=(!n||n.end!==!1)&&e!==t.stdout&&e!==t.stderr,m=p?o:h;l.endEmitted?O(m):d.once("end",m),e.on("unpipe",i);var v=g(d);e.on("drain",v);var y=!1,b=!1;return d.on("data",a),r(e,"error",c),e.once("close",u),e.once("finish",f),e.emit("pipe",d),l.flowing||(B("pipe resume"),d.resume()),e},o.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=P(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},o.prototype.on=function(e,t){var n=N.prototype.on.call(this,e,t);if("data"===e)this._readableState.flowing!==!1&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&d(this,r):O(v,this))}return n},o.prototype.addListener=o.prototype.on,o.prototype.resume=function(){var e=this._readableState;return e.flowing||(B("resume"),e.flowing=!0,y(this,e)),this},o.prototype.pause=function(){return B("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(B("pause"),this._readableState.flowing=!1,this.emit("pause")),this},o.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(B("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(B("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var o=r.push(i);o||(n=!0,e.pause())}});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<D.length;o++)e.on(D[o],r.emit.bind(r,D[o]));return r._read=function(t){B("wrapped _read",t),n&&(n=!1,e.resume())},r},o._fromList=S}).call(t,n(296))},function(e,t,n){(function(t){"use strict";function n(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return t.nextTick(function(){e.apply(null,o)})}}!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports=n:e.exports=t.nextTick}).call(t,n(296))},function(e,t,n){e.exports=n(301).EventEmitter},function(e,t,n){e.exports=n(312)},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function s(e){return"number"==typeof e}function a(e){return"string"==typeof e}function c(e){return"symbol"==typeof e}function u(e){return void 0===e}function f(e){return"[object RegExp]"===g(e)}function h(e){return"object"==typeof e&&null!==e}function d(e){return"[object Date]"===g(e)}function l(e){return"[object Error]"===g(e)||e instanceof Error}function p(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function g(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=i,t.isNullOrUndefined=o,t.isNumber=s,t.isString=a,t.isSymbol=c,t.isUndefined=u,t.isRegExp=f,t.isObject=h,t.isDate=d,t.isError=l,t.isFunction=p,t.isPrimitive=m,t.isBuffer=e.isBuffer}).call(t,n(312).Buffer)},function(e,t){},function(e,t,n){"use strict";function r(){this.head=null,this.tail=null,this.length=0}var i=n(339).Buffer;e.exports=r,r.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},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.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}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},r.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}},function(e,t,n){"use strict";function r(e){return this instanceof r?(u.call(this,e),f.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||a(o,this)}function o(e){e.end()}var s=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var a=n(337),c=n(340);c.inherits=n(309);var u=n(336),f=n(344);c.inherits(r,u);for(var h=s(f.prototype),d=0;d<h.length;d++){var l=h[d];r.prototype[l]||(r.prototype[l]=f.prototype[l])}},function(e,t,n){(function(t,r){"use strict";function i(){}function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e,t){A=A||n(343),e=e||{},this.objectMode=!!e.objectMode,t instanceof A&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var o=e.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){m(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 E(this)}function a(e){return A=A||n(343),k.call(a,this)||this instanceof A?(this._writableState=new s(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),void O.call(this)):new a(e)}function c(e,t){var n=new Error("write after end");e.emit("error",n),T(t,n)}function u(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),T(r,o),i=!1),i}function f(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=R.from(t,n)),t}function h(e,t,n,r,i,s){n||(r=f(t,r,i),R.isBuffer(r)&&(i="buffer"));var a=t.objectMode?1:r.length;t.length+=a;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest=new o(r,i,s),u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else d(e,t,!1,a,r,i,s);return c}function d(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function l(e,t,n,r,i){--t.pendingcb,n?T(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function p(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function m(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(p(n),t)l(e,n,r,t,i);else{var o=b(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||y(e,n),r?M(g,e,n,o,i):g(e,n,o,i)}}function g(e,t,n,r){n||v(e,t),t.pendingcb--,r(),S(e,t)}function v(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function y(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0;n;)i[s]=n,n=n.next,s+=1;d(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new E(t)}else{for(;n;){var a=n.chunk,c=n.encoding,u=n.callback,f=t.objectMode?1:a.length;if(d(e,t,!1,f,a,c,u),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function S(e,t){var n=b(t);return n&&(0===t.pendingcb?(w(e,t),t.finished=!0,e.emit("finish")):w(e,t)),n}function x(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?T(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function E(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}e.exports=a;var A,T=n(337),M=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:T;a.WritableState=s;var P=n(340);P.inherits=n(309);var I={deprecate:n(347)},O=n(338),R=n(339).Buffer;P.inherits(a,O),s.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(s.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(_){}}();var k;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(k=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(e){return!!k.call(this,e)||e&&e._writableState instanceof s}})):k=function(e){return e instanceof this},a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},a.prototype.write=function(e,t,n){var r=this._writableState,o=!1,s=R.isBuffer(e);return"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=i),r.ended?c(this,n):(s||u(this,r,e,n))&&(r.pendingcb++,o=h(this,r,s,e,t,n)),o},a.prototype.cork=function(){var e=this._writableState;e.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||y(this,e))},a.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},a.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||x(this,r,n)}}).call(t,n(296),n(345).setImmediate)},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,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))},n(346),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return m[p]=r,l(p),p++}function i(e){delete m[e]}function o(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(n,r)}}function s(e){if(g)setTimeout(s,0,e);else{var t=m[e];if(t){g=!0;try{o(t)}finally{i(e),g=!1}}}}function a(){l=function(e){t.nextTick(function(){s(e)})}}function c(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}function u(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&s(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),l=function(n){e.postMessage(t+n,"*")}}function f(){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data;s(t)},l=function(t){e.port2.postMessage(t)}}function h(){var e=v.documentElement;l=function(t){var n=v.createElement("script");n.onreadystatechange=function(){s(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}function d(){l=function(e){setTimeout(s,0,e)}}if(!e.setImmediate){var l,p=1,m={},g=!1,v=e.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(e);y=y&&y.setTimeout?y:e,"[object process]"==={}.toString.call(e.process)?a():c()?u():e.MessageChannel?f():v&&"onreadystatechange"in v.createElement("script")?h():d(),y.setImmediate=r,y.clearImmediate=i}}("undefined"==typeof self?"undefined"==typeof e?this:e:self)}).call(t,function(){return this}(),n(296))},function(e,t){(function(t){function n(e,t){function n(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var i=!1;return n}function r(e){try{if(!t.localStorage)return!1}catch(_){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=n}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(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}}function i(e){var t=r(e);if("string"!=typeof t&&(y.isEncoding===b||!b(e)))throw new Error("Unknown encoding: "+e);return t||e}function o(e){this.encoding=i(e);var t;switch(this.encoding){case"utf16le":this.text=d,this.end=l,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=p,this.end=m,t=3;break;default:return this.write=g,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=y.allocUnsafe(t)}function s(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:-1}function a(e,t,n){var r=t.length-1;if(r<n)return 0;var i=s(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n?0:(i=s(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n?0:(i=s(t[r]),i>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"<22>".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"<22>".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"<22>".repeat(n+2)}}function u(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);return void 0!==n?n: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 f(e,t){var n=a(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>".repeat(this.lastTotal-this.lastNeed):t}function d(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?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-n))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}var y=n(339).Buffer,b=y.isEncoding||function(e){switch(e=""+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}};t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=h,o.prototype.text=f,o.prototype.fillLast=function(e){return this.lastNeed<=e.length?(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),void(this.lastNeed-=e.length))}},function(e,t,n){"use strict";function r(e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);a.call(this,e),this._transformState=new r(this);var t=this;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.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,n){s(t,e,n)}):s(t)})}function s(e,t,n){if(t)return e.emit("error",t);null!==n&&void 0!==n&&e.push(n);var r=e._writableState,i=e._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}e.exports=o;var a=n(343),c=n(340);c.inherits=n(309),c.inherits(o,a),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.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}},function(e,t,n){"use strict";function r(e){return this instanceof r?void i.call(this,e):new r(e)}e.exports=r;var i=n(349),o=n(340);o.inherits=n(309),o.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(344)},function(e,t,n){e.exports=n(343)},function(e,t,n){e.exports=n(335).Transform},function(e,t,n){e.exports=n(335).PassThrough},function(e,t){t["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},t["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},t["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},t["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},t["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},t["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},t.aes128=t["aes-128-cbc"],t.aes192=t["aes-192-cbc"],t.aes256=t["aes-256-cbc"],t["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},t["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},t["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},t["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},t["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},t["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},t["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},t["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},t["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"}},function(e,t,n){(function(t){e.exports=function(e,n,r,i){r/=8,i=i||0;for(var o,s,a,c=0,u=0,f=new t(r),h=new t(i),d=0;;){if(o=e.createHash("md5"),d++>0&&o.update(s),o.update(n),s=o.digest(),a=0,r>0)for(;;){if(0===r)break;if(a===s.length)break;f[c++]=s[a],r--,a++}if(i>0&&a!==s.length)for(;;){if(0===i)break;if(a===s.length)break;h[u++]=s[a],i--,a++}if(0===r&&0===i)break}for(a=0;a<s.length;a++)s[a]=0;return{key:f,iv:h}}}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(e,n,s,a){return this instanceof r?(o.call(this),this._cipher=new i.AES(n),this._prev=new t(s.length),this._cache=new t(""),this._secCache=new t(""),this._decrypt=a,s.copy(this._prev),void(this._mode=e)):new r(e,n,s)}var i=n(332),o=n(333),s=n(309);s(r,o),e.exports=r,r.prototype._transform=function(e,_,t){t(null,this._mode.encrypt(this,e,this._decrypt))},r.prototype._flush=function(e){this._cipher.scrub(),e()}}).call(t,n(312).Buffer)},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){var r=n(360);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},function(e,t,n){(function(t){function n(e,n){for(var r=Math.min(e.length,n.length),i=new t(r),o=-1;++o<r;)i.writeUInt8(e[o]^n[o],o);return i}e.exports=n}).call(t,n(312).Buffer)},function(e,t,n){(function(e){function r(t,n,r){var o=n.length,s=i(n,t._cache);return t._cache=t._cache.slice(o),t._prev=e.concat([t._prev,r?n:s]),s}var i=n(360);t.encrypt=function(t,n,i){for(var o,s=new e("");n.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=new e("")),!(t._cache.length<=n.length)){s=e.concat([s,r(t,n,i)]);break}o=t._cache.length,s=e.concat([s,r(t,n.slice(0,o),i)]),n=n.slice(o)}return s}}).call(t,n(312).Buffer)},function(e,t,n){(function(e){function r(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}var i=n(360);t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,r(t)]);var o=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),i(n,o)}}).call(t,n(312).Buffer)},function(e,t,n){(function(e){function r(e){var t=e._cipher.encryptBlock(e._prev);return i(e._prev),t}function i(e){for(var t,n=e.length;n--;){if(t=e.readUInt8(n),255!==t){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}var o=n(360);t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,r(t)]);var i=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),o(n,i)}}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(e,n,o){return this instanceof r?(a.call(this),this._cache=new i,this._last=void 0,this._cipher=new s.AES(n),this._prev=new t(o.length),o.copy(this._prev),void(this._mode=e)):new r(e,n,o)}function i(){return this instanceof i?void(this.cache=new t("")):new i}function o(e){var t=e[15];if(16!==t)return e.slice(0,16-t)}var s=n(332),a=n(333),c=n(309),u=n(355),f=n(357),h=n(356);c(r,a),r.prototype._transform=function(e,_,t){this._cache.add(e);for(var n,r;n=this._cache.get();)r=this._mode.decrypt(this,n),this.push(r);t()},r.prototype._flush=function(e){var t=this._cache.flush();return t?(this.push(o(this._mode.decrypt(this,t))),void e()):e},i.prototype.add=function(e){this.cache=t.concat([this.cache,e])},i.prototype.get=function(){if(this.cache.length>16){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},i.prototype.flush=function(){if(this.cache.length)return this.cache};var d={ECB:n(358),CBC:n(359),CFB:n(361),OFB:n(362),CTR:n(363)};e.exports=function(e){function n(e,n,i){var o=u[e];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new t(i)),"string"==typeof n&&(n=new t(n)),n.length!==o.key/8)throw new TypeError("invalid key length "+n.length);if(i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new f(d[o.mode],n,i,(!0)):new r(d[o.mode],n,i)}function i(t,r){var i=u[t];if(!i)throw new TypeError("invalid suite type");var o=h(e,r,i.key,i.iv);return n(t,o.key,o.iv)}return{createDecipher:i,createDecipheriv:n}}}).call(t,n(312).Buffer)},function(e,t,n){var r=t;r.utils=n(366),r.common=n(367),r.sha=n(368),r.ripemd=n(369),r.hmac=n(370),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){function r(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!==0&&(e="0"+e);for(var r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}}else for(var r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,s=255&i;o?n.push(o,s):n.push(s)}else for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}function i(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t}function o(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24;return t>>>0}function s(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=o(i)),n+=c(i.toString(16))}return n}function a(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}function u(e,t,n,r){var i=n-t;v(i%4===0);for(var o=new Array(i/4),s=0,a=t;s<o.length;s++,a+=4){var c;c="big"===r?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],o[s]=c>>>0}return o}function f(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n}function h(e,t){return e>>>t|e<<32-t}function d(e,t){return e<<t|e>>>32-t}function l(e,t){return e+t>>>0}function p(e,t,n){return e+t+n>>>0}function m(e,t,n,r){return e+t+n+r>>>0}function g(e,t,n,r,i){return e+t+n+r+i>>>0}function v(e,t){if(!e)throw new Error(t||"Assertion failed")}function y(e,t,n,r){var i=e[t],o=e[t+1],s=r+o>>>0,a=(s<r?1:0)+n+i;e[t]=a>>>0,e[t+1]=s}function b(e,t,n,r){var i=t+r>>>0,o=(i<t?1:0)+e+n;return o>>>0}function w(e,t,n,r){var i=t+r;return i>>>0}function S(e,t,n,r,i,o,s,a){var c=0,u=t;u=u+r>>>0,c+=u<t?1:0,u=u+o>>>0,c+=u<o?1:0,u=u+a>>>0,c+=u<a?1:0;var f=e+n+i+s+c;return f>>>0}function x(e,t,n,r,i,o,s,a){var c=t+r+o+a;return c>>>0}function E(e,t,n,r,i,o,s,a,c,u){var f=0,h=t;h=h+r>>>0,f+=h<t?1:0,h=h+o>>>0,f+=h<o?1:0,h=h+a>>>0,f+=h<a?1:0,h=h+u>>>0,f+=h<u?1:0;var d=e+n+i+s+c+f;return d>>>0}function A(e,t,n,r,i,o,s,a,c,u){var f=t+r+o+a+u;return f>>>0}function T(e,t,n){var r=t<<32-n|e>>>n;return r>>>0}function M(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}function P(e,t,n){return e>>>n}function I(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}var O=t,R=n(309);O.toArray=r,O.toHex=i,O.htonl=o,O.toHex32=s,O.zero2=a,O.zero8=c,O.join32=u,O.split32=f,O.rotr32=h,O.rotl32=d,O.sum32=l,O.sum32_3=p,O.sum32_4=m,O.sum32_5=g,O.assert=v,O.inherits=R,t.sum64=y,t.sum64_hi=b,t.sum64_lo=w,t.sum64_4_hi=S,t.sum64_4_lo=x,t.sum64_5_hi=E,t.sum64_5_lo=A,t.rotr64_hi=T,t.rotr64_lo=M,t.shr64_hi=P,t.shr64_lo=I},function(e,t,n){function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var i=n(365),o=i.utils,s=o.assert;t.BlockHash=r,r.prototype.update=function(e,t){if(e=o.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=o.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},r.prototype.digest=function(e){return this.update(this._pad()),s(null===this.pending),this._digest(e)},r.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else{r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0;for(var o=8;o<this.padLength;o++)r[i++]=0}return r}},function(e,t,n){function r(){return this instanceof r?(G.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=J,void(this.W=new Array(64))):new r}function i(){return this instanceof i?(r.call(this),void(this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])):new i}function o(){return this instanceof o?(G.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=W,void(this.W=new Array(160))):new o}function s(){return this instanceof s?(o.call(this),void(this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428])):new s}function a(){return this instanceof a?(G.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],void(this.W=new Array(80))):new a}function c(e,t,n){return e&t^~e&n}function u(e,t,n){return e&t^e&n^t&n}function f(e,t,n){return e^t^n}function h(e){return k(e,2)^k(e,13)^k(e,22)}function d(e){return k(e,6)^k(e,11)^k(e,25)}function l(e){return k(e,7)^k(e,18)^e>>>3}function p(e){return k(e,17)^k(e,19)^e>>>10}function m(e,t,n,r){return 0===e?c(t,n,r):1===e||3===e?f(t,n,r):2===e?u(t,n,r):void 0}function g(e,t,n,r,i,o){var s=e&n^~e&i;return s<0&&(s+=4294967296),s}function v(e,t,n,r,i,o){var s=t&r^~t&o;return s<0&&(s+=4294967296),s}function y(e,t,n,r,i,o){var s=e&n^e&i^n&i;return s<0&&(s+=4294967296),s}function b(e,t,n,r,i,o){var s=t&r^t&o^r&o;return s<0&&(s+=4294967296),s}function w(e,t){var n=B(e,t,28),r=B(t,e,2),i=B(t,e,7),o=n^r^i;return o<0&&(o+=4294967296),o}function S(e,t){var n=j(e,t,28),r=j(t,e,2),i=j(t,e,7),o=n^r^i;return o<0&&(o+=4294967296),o}function x(e,t){var n=B(e,t,14),r=B(e,t,18),i=B(t,e,9),o=n^r^i;return o<0&&(o+=4294967296),o}function E(e,t){var n=j(e,t,14),r=j(e,t,18),i=j(t,e,9),o=n^r^i;return o<0&&(o+=4294967296),o}function A(e,t){var n=B(e,t,1),r=B(e,t,8),i=q(e,t,7),o=n^r^i;return o<0&&(o+=4294967296),o}function T(e,t){var n=j(e,t,1),r=j(e,t,8),i=D(e,t,7),o=n^r^i;return o<0&&(o+=4294967296),o}function M(e,t){var n=B(e,t,19),r=B(t,e,29),i=q(e,t,6),o=n^r^i;return o<0&&(o+=4294967296),o}function P(e,t){var n=j(e,t,19),r=j(t,e,29),i=D(e,t,6),o=n^r^i;return o<0&&(o+=4294967296),o}var I=n(365),O=I.utils,R=O.assert,k=O.rotr32,N=O.rotl32,C=O.sum32,F=O.sum32_4,L=O.sum32_5,B=O.rotr64_hi,j=O.rotr64_lo,q=O.shr64_hi,D=O.shr64_lo,z=O.sum64,U=O.sum64_hi,V=O.sum64_lo,$=O.sum64_4_hi,H=O.sum64_4_lo,X=O.sum64_5_hi,K=O.sum64_5_lo,G=I.common.BlockHash,J=[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],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],Y=[1518500249,1859775393,2400959708,3395469782];O.inherits(r,G),t.sha256=r,r.blockSize=512,r.outSize=256,r.hmacStrength=192,r.padLength=64,r.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=F(p(n[r-2]),n[r-7],l(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],f=this.h[4],m=this.h[5],g=this.h[6],v=this.h[7];R(this.k.length===n.length);for(var r=0;r<n.length;r++){var y=L(v,d(f),c(f,m,g),this.k[r],n[r]),b=C(h(i),u(i,o,s));v=g,g=m,m=f,f=C(a,y),a=s,s=o,o=i,i=C(y,b)}this.h[0]=C(this.h[0],i),this.h[1]=C(this.h[1],o),this.h[2]=C(this.h[2],s),this.h[3]=C(this.h[3],a),this.h[4]=C(this.h[4],f),this.h[5]=C(this.h[5],m),this.h[6]=C(this.h[6],g),this.h[7]=C(this.h[7],v)},r.prototype._digest=function(e){return"hex"===e?O.toHex32(this.h,"big"):O.split32(this.h,"big")},O.inherits(i,r),t.sha224=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return"hex"===e?O.toHex32(this.h.slice(0,7),"big"):O.split32(this.h.slice(0,7),"big")},O.inherits(o,G),t.sha512=o,o.blockSize=1024,o.outSize=512,o.hmacStrength=192,o.padLength=128,o.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=M(n[r-4],n[r-3]),o=P(n[r-4],n[r-3]),s=n[r-14],a=n[r-13],c=A(n[r-30],n[r-29]),u=T(n[r-30],n[r-29]),f=n[r-32],h=n[r-31];n[r]=$(i,o,s,a,c,u,f,h),n[r+1]=H(i,o,s,a,c,u,f,h)}},o.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],o=this.h[2],s=this.h[3],a=this.h[4],c=this.h[5],u=this.h[6],f=this.h[7],h=this.h[8],d=this.h[9],l=this.h[10],p=this.h[11],m=this.h[12],A=this.h[13],T=this.h[14],M=this.h[15];R(this.k.length===n.length);for(var P=0;P<n.length;P+=2){var I=T,O=M,k=x(h,d),N=E(h,d),C=g(h,d,l,p,m,A),F=v(h,d,l,p,m,A),L=this.k[P],B=this.k[P+1],j=n[P],q=n[P+1],D=X(I,O,k,N,C,F,L,B,j,q),$=K(I,O,k,N,C,F,L,B,j,q),I=w(r,i),O=S(r,i),k=y(r,i,o,s,a,c),N=b(r,i,o,s,a,c),H=U(I,O,k,N),G=V(I,O,k,N);T=m,M=A,m=l,A=p,l=h,p=d,h=U(u,f,D,$),d=V(f,f,D,$),u=a,f=c,a=o,c=s,o=r,s=i,r=U(D,$,H,G),i=V(D,$,H,G)}z(this.h,0,r,i),z(this.h,2,o,s),z(this.h,4,a,c),z(this.h,6,u,f),z(this.h,8,h,d),z(this.h,10,l,p),z(this.h,12,m,A),z(this.h,14,T,M)},o.prototype._digest=function(e){return"hex"===e?O.toHex32(this.h,"big"):O.split32(this.h,"big")},O.inherits(s,o),t.sha384=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(e){return"hex"===e?O.toHex32(this.h.slice(0,12),"big"):O.split32(this.h.slice(0,12),"big")},O.inherits(a,G),t.sha1=a,a.blockSize=512,a.outSize=160,a.hmacStrength=80,a.padLength=64,a.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=N(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);for(var i=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],c=this.h[4],r=0;r<n.length;r++){var u=~~(r/20),f=L(N(i,5),m(u,o,s,a),c,n[r],Y[u]);c=a,a=s,s=N(o,30),o=i,i=f}this.h[0]=C(this.h[0],i),this.h[1]=C(this.h[1],o),this.h[2]=C(this.h[2],s),this.h[3]=C(this.h[3],a),this.h[4]=C(this.h[4],c)},a.prototype._digest=function(e){return"hex"===e?O.toHex32(this.h,"big"):O.split32(this.h,"big")}},function(e,t,n){function r(){return this instanceof r?(l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],void(this.endian="little")):new r}function i(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function o(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function s(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var a=n(365),c=a.utils,u=c.rotl32,f=c.sum32,h=c.sum32_3,d=c.sum32_4,l=a.common.BlockHash;c.inherits(r,l),t.ripemd160=r,r.blockSize=512,r.outSize=160,r.hmacStrength=192,r.padLength=64,r.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],a=this.h[2],c=this.h[3],l=this.h[4],y=n,b=r,w=a,S=c,x=l,E=0;E<80;E++){var A=f(u(d(n,i(E,r,a,c),e[p[E]+t],o(E)),g[E]),l);n=l,l=c,c=u(a,10),a=r,r=A,A=f(u(d(y,i(79-E,b,w,S),e[m[E]+t],s(E)),v[E]),x),y=x,x=S,S=u(w,10),w=b,b=A}A=h(this.h[1],a,S),this.h[1]=h(this.h[2],c,x),this.h[2]=h(this.h[3],l,y),this.h[3]=h(this.h[4],n,b),this.h[4]=h(this.h[0],r,w),this.h[0]=A},r.prototype._digest=function(e){return"hex"===e?c.toHex32(this.h,"little"):c.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,n){function r(e,t,n){return this instanceof r?(this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,void this._init(o.toArray(t,n))):new r(e,t,n)}var i=n(365),o=i.utils,s=o.assert;e.exports=r,r.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),s(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(var t=0;t<e.length;t++)e[t]^=54;this.inner=(new this.Hash).update(e);for(var t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},r.prototype.update=function(e,t){return this.inner.update(e,t),this},r.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t,n){"use strict";var r=t;r.version=n(372).version,r.utils=n(373),r.rand=n(310),r.hmacDRBG=n(376),r.curve=n(377),r.curves=n(382),r.ec=n(384),r.eddsa=n(387)},function(e,t){e.exports={_args:[[{raw:"elliptic@https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz",spec:"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz",type:"remote"},"/another/devel/ripple-lib"]],_from:"elliptic@>=5.1.0 <6.0.0",_id:"elliptic@5.2.1",_inCache:!0,_location:"/elliptic",_phantomChildren:{},_requested:{raw:"elliptic@https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz",spec:"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz",type:"remote"},_requiredBy:["/","/ripple-keypairs"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz",_shasum:"fa294b6563c6ddbc9ba3dc8594687ae840858f10",_shrinkwrap:null,_spec:"elliptic@https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz",_where:"/another/devel/ripple-lib",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^3.1.1",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},description:"EC cryptography",devDependencies:{browserify:"^3.44.2",coveralls:"^2.11.3",istanbul:"^0.3.17",jscs:"^1.11.3",jshint:"^2.6.0",mocha:"^2.1.0","uglify-js":"^2.4.13"},homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",optionalDependencies:{},
|
||
readme:"# Elliptic [](http://travis-ci.org/indutny/elliptic) [](https://coveralls.io/github/indutny/elliptic?branch=master)\n\nFast elliptic-curve cryptography in a plain javascript implementation.\n\nNOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve\nfor your cryptography operations.\n\n## Incentive\n\nECC is much slower than regular RSA cryptography, the JS implementations are\neven more slower.\n\n## Benchmarks\n\n```bash\n$ node benchmarks/index.js\nBenchmarking: sign\nelliptic#sign x 262 ops/sec ±0.51% (177 runs sampled)\neccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled)\n------------------------\nFastest is elliptic#sign\n========================\nBenchmarking: verify\nelliptic#verify x 113 ops/sec ±0.50% (166 runs sampled)\neccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled)\n------------------------\nFastest is elliptic#verify\n========================\nBenchmarking: gen\nelliptic#gen x 294 ops/sec ±0.43% (176 runs sampled)\neccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled)\n------------------------\nFastest is elliptic#gen\n========================\nBenchmarking: ecdh\nelliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled)\n------------------------\nFastest is elliptic#ecdh\n========================\n```\n\n## API\n\n### ECDSA\n\n```javascript\nvar EC = require('elliptic').ec;\n\n// Create and initialize EC context\n// (better do it once and reuse it)\nvar ec = new EC('secp256k1');\n\n// Generate keys\nvar key = ec.genKeyPair();\n\n// Sign message (must be an array, or it'll be treated as a hex sequence)\nvar msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];\nvar signature = key.sign(msg);\n\n// Export DER encoded signature in Array\nvar derSign = signature.toDER();\n\n// Verify signature\nconsole.log(key.verify(msg, derSign));\n```\n\n### ECDH\n\n```javascript\n// Generate keys\nvar key1 = ec.genKeyPair();\nvar key2 = ec.genKeyPair();\n\nvar shared1 = key1.derive(key2.getPublic());\nvar shared2 = key2.derive(key1.getPublic());\n\nconsole.log('Both shared secrets are BN instances');\nconsole.log(shared1.toString(16));\nconsole.log(shared2.toString(16));\n```\n\nNOTE: `.derive()` returns a [BN][1] instance.\n\n## Supported curves\n\nElliptic.js support following curve types:\n\n* Short Weierstrass\n* Montgomery\n* Edwards\n* Twisted Edwards\n\nFollowing curve 'presets' are embedded into the library:\n\n* `secp256k1`\n* `p192`\n* `p224`\n* `p256`\n* `curve25519`\n* `ed25519`\n\nNOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead.\n\n### Implementation details\n\nECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of\nthe curve operations are performed on non-affine coordinates (either projective\nor extended), various windowing techniques are used for different cases.\n\nAll operations are performed in reduction context using [bn.js][1], hashing is\nprovided by [hash.js][2]\n\n### Related projects\n\n* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both\n browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for\n node)\n\n#### LICENSE\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2014.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[0]: http://tools.ietf.org/html/rfc6979\n[1]: https://github.com/indutny/bn.js\n[2]: https://github.com/indutny/hash.js\n[3]: https://github.com/bitchan/eccrypto\n[4]: https://github.com/wanderer/secp256k1-node\n",readmeFilename:"README.md",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{coveralls:"cat ./coverage/lcov.info | coveralls",test:"make lint && istanbul test _mocha --reporter=spec test/*-test.js"},version:"5.2.1"}},function(e,t,n){"use strict";function r(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if(t){if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!==0&&(e="0"+e);for(var r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}}else for(var r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,s=255&i;o?n.push(o,s):n.push(s)}return n}function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t}function s(e,t){for(var n=[],r=1<<t+1,i=e.clone();i.cmpn(1)>=0;){var o;if(i.isOdd()){var s=i.andln(r-1);o=s>(r>>1)-1?(r>>1)-s:s,i.isubn(o)}else o=0;n.push(o);for(var a=0!==i.cmpn(0)&&0===i.andln(r-1)?t+1:1,c=1;c<a;c++)n.push(0);i.iushrn(a)}return n}function a(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0;e.cmpn(-r)>0||t.cmpn(-i)>0;){var o=e.andln(3)+r&3,s=t.andln(3)+i&3;3===o&&(o=-1),3===s&&(s=-1);var a;if(0===(1&o))a=0;else{var c=e.andln(7)+r&7;a=3!==c&&5!==c||2!==s?o:-o}n[0].push(a);var u;if(0===(1&s))u=0;else{var c=t.andln(7)+i&7;u=3!==c&&5!==c||2!==o?s:-s}n[1].push(u),2*r===a+1&&(r=1-r),2*i===u+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n}function c(e,t){var n=t.name,r="_"+n;e.prototype[n]=function(){return void 0!==this[r]?this[r]:this[r]=t.call(this)}}function u(e){return"string"==typeof e?h.toArray(e,"hex"):e}function f(e){return new d(e,"hex","le")}var h=t,d=n(374);h.assert=function(e,t){if(!e)throw new Error(t||"Assertion failed")},h.toArray=r,h.zero2=i,h.toHex=o,h.encode=function(e,t){return"hex"===t?o(e):e},h.getNAF=s,h.getJSF=a,h.cachedProperty=c,h.parseBytes=u,h.intFromLE=f},function(e,t,n){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){return null!==e&&"object"==typeof e&&Array.isArray(e.words)?e:(this.sign=!1,this.words=null,this.length=0,this.red=null,"le"!==t&&"be"!==t||(n=t,t=10),void(null!==e&&this._init(e||0,t||10,n||"be")))}function o(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var s=e.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function s(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}function a(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}function c(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function u(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function f(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function h(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function d(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function l(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else this.m=e,this.prime=null}function p(e){l.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26,i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.sign=!0),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initNumber=function(e,t,r){e<0&&(this.sign=!0,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o=0;if("be"===r)for(var i=e.length-1,s=0;i>=0;i-=3){var a=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,o+=24,o>=26&&(o-=26,s++)}else if("le"===r)for(var i=0,s=0;i<e.length;i+=3){var a=e[i]|e[i+1]<<8|e[i+2]<<16;this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,o+=24,o>=26&&(o-=26,s++)}return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;for(var r=0,n=e.length-6,i=0;n>=t;n-=6){var s=o(e,n,n+6);this.words[i]|=s<<r&67108863,this.words[i+1]|=s>>>26-r&4194303,r+=24,r>=26&&(r-=26,i++)}if(n+6!==t){var s=o(e,t,n+6);this.words[i]|=s<<r&67108863,this.words[i+1]|=s>>>26-r&4194303}this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,c=Math.min(o,o-a)+n,u=0,f=n;f<c;f+=r)u=s(e,f,f+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){for(var h=1,u=s(e,f,e.length,t),f=0;f<a;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.sign=this.sign,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.sign=!1),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){e=e||10;var t=0|t||1;if(16===e||"hex"===e){for(var r="",i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,r=0!==o||s!==this.length-1?m[6-c.length]+c+r:c+r,i+=2,i>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return this.sign&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=g[e],f=v[e],r="",h=this.clone();for(h.sign=!1;0!==h.cmpn(0);){var d=h.modn(f).toString(e);h=h.idivn(f),r=0!==h.cmpn(0)?m[u-d.length]+d+r:d+r}for(0===this.cmpn(0)&&(r="0"+r);r.length%t!==0;)r="0"+r;return this.sign&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toArray=function(e,t){this.strip();var r="le"===e,i=new Array(this.byteLength());i[0]=0;var o=this.clone();if(r)for(var s=0;0!==o.cmpn(0);s++){var a=o.andln(255);o.iushrn(8),i[s]=a}else for(var s=0;0!==o.cmpn(0);s++){var a=o.andln(255);o.iushrn(8),i[i.length-s-1]=a}if(t)for(n(i.length<=t,"byte array longer than desired length");i.length<t;)r?i.push(0):i.unshift(0);return i},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},i.prototype.bitLength=function(){var e=0,t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(0===this.cmpn(0))return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.neg=function(){if(0===this.cmpn(0))return this.clone();var e=this.clone();return e.sign=!this.sign,e},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(!this.sign&&!e.sign),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(!this.sign&&!e.sign),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(!this.sign&&!e.sign),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);for(var r=e/26|0,i=e%26;this.length<=r;)this.words[this.length++]=0;return t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){if(this.sign&&!e.sign){this.sign=!1;var t=this.isub(e);return this.sign=!this.sign,this._normSign()}if(!this.sign&&e.sign){e.sign=!1;var t=this.isub(e);return e.sign=!0,t._normSign()}var n,r;this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++){var t=n.words[o]+r.words[o]+i;this.words[o]=67108863&t,i=t>>>26}for(;0!==i&&o<n.length;o++){var t=n.words[o]+i;this.words[o]=67108863&t,i=t>>>26}if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){if(e.sign&&!this.sign){e.sign=!1;var t=this.sub(e);return e.sign=!0,t}if(!e.sign&&this.sign){this.sign=!1;var t=e.sub(this);return this.sign=!0,t}return this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(e.sign){e.sign=!1;var t=this.iadd(e);return e.sign=!0,t._normSign()}if(this.sign)return this.sign=!1,this.iadd(e),this.sign=!0,this._normSign();var n=this.cmp(e);if(0===n)return this.sign=!1,this.length=1,this.words[0]=0,this;var r,i;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++){var t=r.words[s]-i.words[s]+o;o=t>>26,this.words[s]=67108863&t}for(;0!==o&&s<r.length;s++){var t=r.words[s]+o;o=t>>26,this.words[s]=67108863&t}if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.sign=!0),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)},i.prototype._smallMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var n=0,r=0;r<t.length-1;r++){for(var i=n>>>26,o=67108863&n,s=Math.min(r,e.length-1),a=Math.max(0,r-this.length+1);a<=s;a++){var c=r-a,u=0|this.words[c],f=0|e.words[a],h=u*f,d=67108863&h;i=i+(h/67108864|0)|0,d=d+o|0,o=67108863&d,i=i+(d>>>26)|0}t.words[r]=o,n=i}return 0!==n?t.words[r]=n:t.length--,t.strip()},i.prototype._bigMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var n=0,r=0,i=0;i<t.length-1;i++){var o=r;r=0;for(var s=67108863&n,a=Math.min(i,e.length-1),c=Math.max(0,i-this.length+1);c<=a;c++){var u=i-c,f=0|this.words[u],h=0|e.words[c],d=f*h,l=67108863&d;o=o+(d/67108864|0)|0,l=l+s|0,s=67108863&l,o=o+(l>>>26)|0,r+=o>>>26,o&=67108863}t.words[i]=s,n=o,o=r}return 0!==n?t.words[i]=n:t.length--,t.strip()},i.prototype.mulTo=function(e,t){var n;return n=this.length+e.length<63?this._smallMulTo(e,t):this._bigMulTo(e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.imul=function(e){if(0===this.cmpn(0)||0===e.cmpn(0))return this.words[0]=0,this.length=1,this;var t=this.length,n=e.length;this.sign=e.sign!==this.sign,this.length=this.length+e.length,this.words[this.length-1]=0;for(var r=this.length-2;r>=0;r--){for(var i=0,o=0,s=Math.min(r,n-1),a=Math.max(0,r-t+1);a<=s;a++){var c=r-a,u=this.words[c],f=e.words[a],h=u*f,d=67108863&h;i+=h/67108864|0,d+=o,o=67108863&d,i+=d>>>26}this.words[r]=o,this.words[r+1]+=i,i=0}for(var i=0,c=1;c<this.length;c++){var l=this.words[c]+i;this.words[c]=67108863&l,i=l>>>26}return this.strip()},i.prototype.imuln=function(e){n("number"==typeof e);for(var t=0,r=0;r<this.length;r++){var i=this.words[r]*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.mul(this)},i.prototype.pow=function(e){var t=a(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){for(var o=0,s=0;s<this.length;s++){var a=this.words[s]&i,c=this.words[s]-a<<t;this.words[s]=c|o,o=a>>>26-t}o&&(this.words[s]=o,this.length++)}if(0!==r){for(var s=this.length-1;s>=0;s--)this.words[s+r]=this.words[s];for(var s=0;s<r;s++)this.words[s]=0;this.length+=r}return this.strip()},i.prototype.ishln=function(e){return n(!this.sign),this.iushln(e)},i.prototype.iushrn=function(e,t,r){n("number"==typeof e&&e>=0);var i;i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s){this.length-=s;for(var u=0;u<this.length;u++)this.words[u]=this.words[u+s]}else this.words[0]=0,this.length=1;for(var f=0,u=this.length-1;u>=0&&(0!==f||u>=i);u--){var h=this.words[u];this.words[u]=f<<26-o|h>>>o,f=h&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip(),this},i.prototype.ishrn=function(e,t,r){return n(!this.sign),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var o=this.words[r];return!!(o&i)},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(!this.sign,"imaskn works only with positive numbers"),0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),e<0?this.isubn(-e):this.sign?1===this.length&&this.words[0]<e?(this.words[0]=e-this.words[0],this.sign=!1,this):(this.sign=!1,this.isubn(e),this.sign=!0,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),e<0)return this.iaddn(-e);if(this.sign)return this.sign=!1,this.iaddn(e),this.sign=!0,this;this.words[0]-=e;for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.sign=!1,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o=e.length+r;if(this.words.length<o){for(var s=new Array(o),i=0;i<this.length;i++)s[i]=this.words[i];this.words=s}else i=this.length;for(this.length=Math.max(this.length,o);i<this.length;i++)this.words[i]=0;for(var a=0,i=0;i<e.length;i++){var c=this.words[i+r]+a,u=e.words[i]*t;c-=67108863&u,a=(c>>26)-(u/67108864|0),this.words[i+r]=67108863&c}for(;i<this.length-r;i++){var c=this.words[i+r]+a;a=c>>26,this.words[i+r]=67108863&c}if(0===a)return this.strip();n(a===-1),a=0;for(var i=0;i<this.length;i++){var c=-this.words[i]+a;a=c>>26,this.words[i]=67108863&c}return this.sign=!0,this.strip()},i.prototype._wordDiv=function(e,t){var n=this.length-e.length,r=this.clone(),o=e,s=o.words[o.length-1],a=this._countBits(s);n=26-a,0!==n&&(o=o.ushln(n),r.iushln(n),s=o.words[o.length-1]);var c,u=r.length-o.length;if("mod"!==t){c=new i(null),c.length=u+1,c.words=new Array(c.length);for(var f=0;f<c.length;f++)c.words[f]=0}var h=r.clone()._ishlnsubmul(o,1,u);h.sign||(r=h,c&&(c.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*r.words[o.length+d]+r.words[o.length+d-1];for(l=Math.min(l/s|0,67108863),r._ishlnsubmul(o,l,d);r.sign;)l--,r.sign=!1,r._ishlnsubmul(o,1,d),0!==r.cmpn(0)&&(r.sign=!r.sign);c&&(c.words[d]=l)}return c&&c.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:c?c:null,mod:r}},i.prototype.divmod=function(e,t,r){if(n(0!==e.cmpn(0)),this.sign&&!e.sign){var o,s,a=this.neg().divmod(e,t);return"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&s.neg&&(s=s.add(e))),{div:o,mod:s}}if(!this.sign&&e.sign){var o,a=this.divmod(e.neg(),t);return"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}}if(this.sign&&e.sign){var s,a=this.neg().divmod(e.neg(),t);return"div"!==t&&(s=a.mod.neg(),r&&s.neg&&(s=s.isub(e))),{div:a.div,mod:s}}return e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t)},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(0===t.mod.cmpn(0))return t.div;var n=t.div.sign?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:t.div.sign?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+this.words[i])%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=this.words[r]+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(!e.sign),n(0!==e.cmpn(0));var t=this,r=e.clone();t=t.sign?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),h=t.clone();0!==t.cmpn(0);){for(;t.isEven();)t.iushrn(1),o.isEven()&&s.isEven()?(o.iushrn(1),s.iushrn(1)):(o.iadd(f).iushrn(1),s.isub(h).iushrn(1));for(;r.isEven();)r.iushrn(1),a.isEven()&&c.isEven()?(a.iushrn(1),c.iushrn(1)):(a.iadd(f).iushrn(1),c.isub(h).iushrn(1));t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(c)):(r.isub(t),a.isub(o),c.isub(s))}return{a:a,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(!e.sign),n(0!==e.cmpn(0));var t=this,r=e.clone();t=t.sign?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(;t.isEven();)t.iushrn(1),o.isEven()?o.iushrn(1):o.iadd(a).iushrn(1);for(;r.isEven();)r.iushrn(1),s.isEven()?s.iushrn(1):s.iadd(a).iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}var c;return c=0===t.cmpn(1)?o:s,c.cmpn(0)<0&&c.iadd(e),c},i.prototype.gcd=function(e){if(0===this.cmpn(0))return e.clone();if(0===e.cmpn(0))return this.clone();var t=this.clone(),n=e.clone();t.sign=!1,n.sign=!1;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r){for(var o=this.length;o<r+1;o++)this.words[o]=0;return this.words[r]|=i,this.length=r+1,this}for(var s=i,o=r;0!==s&&o<this.length;o++){var a=this.words[o];a+=s,s=a>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},i.prototype.cmpn=function(e){var t=e<0;if(t&&(e=-e),this.sign&&!t)return-1;if(!this.sign&&t)return 1;e&=67108863,this.strip();var n;if(this.length>1)n=1;else{var r=this.words[0];n=r===e?0:r<e?-1:1}return this.sign&&(n=-n),n},i.prototype.cmp=function(e){if(this.sign&&!e.sign)return-1;if(!this.sign&&e.sign)return 1;var t=this.ucmp(e);return this.sign?-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=this.words[n],i=e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.red=function(e){return new l(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(!this.sign,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.ushl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};c.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},c.prototype.ireduce=function(e){var t,n=e;do this.split(n,this.tmp),n=this.imulK(n),n=n.iadd(this.tmp),t=n.bitLength();while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},c.prototype.split=function(e,t){e.iushrn(this.n,0,t)},c.prototype.imulK=function(e){return e.imul(this.k)},r(u,c),u.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];t.words[t.length++]=o&n;for(var i=10;i<e.length;i++){var s=e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}e.words[i-10]=o>>>22,e.length-=9},u.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t,n=0,r=0;r<e.length;r++){var i=e.words[r];t=64*i,n+=977*i,t+=n/67108864|0,n&=67108863,e.words[r]=n,n=t}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(f,c),r(h,c),r(d,c),d.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*e.words[n]+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function b(e){if(y[e])return y[e];var b;if("k256"===e)b=new u;else if("p224"===e)b=new f;else if("p192"===e)b=new h;else{if("p25519"!==e)throw new Error("Unknown prime "+e);b=new d}return y[e]=b,b},l.prototype._verify1=function(e){n(!e.sign,"red works only with positives"),n(e.red,"red works only with red numbers")},l.prototype._verify2=function(e,t){n(!e.sign&&!t.sign,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},l.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},l.prototype.neg=function(e){var t=e.clone();return t.sign=!t.sign,t.iadd(this.m)._forceRed(this)},l.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},l.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},l.prototype.sub=function(e,t){this._verify2(e,t);
|
||
var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},l.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},l.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},l.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},l.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},l.prototype.isqr=function(e){return this.imul(e,e)},l.prototype.sqr=function(e){return this.mul(e,e)},l.prototype.sqrt=function(e){if(0===e.cmpn(0))return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2),o=this.pow(e,r);return o}for(var s=this.m.subn(1),a=0;0!==s.cmpn(0)&&0===s.andln(1);)a++,s.iushrn(1);n(0!==s.cmpn(0));var c=new i(1).toRed(this),u=c.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var d=this.pow(h,s),o=this.pow(e,s.addn(1).iushrn(1)),l=this.pow(e,s),p=a;0!==l.cmp(c);){for(var m=l,g=0;0!==m.cmp(c);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new i(1).iushln(p-g-1));o=o.redMul(v),d=v.redSqr(),l=l.redMul(d),p=g}return o},l.prototype.invm=function(e){var t=e._invmp(this.m);return t.sign?(t.sign=!1,this.imod(t).redNeg()):this.imod(t)},l.prototype.pow=function(e,t){var n=a(t);if(0===n.length)return new i(1);for(var r=e,o=0;o<n.length&&0===n[o];o++,r=this.sqr(r));if(++o<n.length)for(var s=this.sqr(r);o<n.length;o++,s=this.sqr(s))0!==n[o]&&(r=this.mul(r,s));return r},l.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},l.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new p(e)},r(p,l),p.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},p.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},p.prototype.imul=function(e,t){if(0===e.cmpn(0)||0===t.cmpn(0))return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},p.prototype.mul=function(e,t){if(0===e.cmpn(0)||0===t.cmpn(0))return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},p.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}("undefined"==typeof e||e,this)}).call(t,n(375)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=s.toArray(e.entropy,e.entropyEnc),n=s.toArray(e.nonce,e.nonceEnc),i=s.toArray(e.pers,e.persEnc);a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,i)}var i=n(365),o=n(371),s=o.utils,a=s.assert;e.exports=r,r.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this.reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=s.toBuffer(e,t),n=s.toBuffer(n,r),a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this.reseed=1},r.prototype.generate=function(e,t,n,r){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=s.toArray(n,r),this._update(n));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(n),this.reseed++,s.encode(o,t)}},function(e,t,n){"use strict";var r=t;r.base=n(378),r["short"]=n(379),r.mont=n(380),r.edwards=n(381)},function(e,t,n){"use strict";function r(e,t){this.type=e,this.p=new o(t.p,16),this.red=t.prime?o.red(t.prime):o.mont(this.p),this.zero=new o(0).toRed(this.red),this.one=new o(1).toRed(this.red),this.two=new o(2).toRed(this.red),this.n=t.n&&new o(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4)}function i(e,t){this.curve=e,this.type=t,this.precomputed=null}var o=n(374),s=n(371),a=s.utils,c=a.getNAF,u=a.getJSF,f=a.assert;e.exports=r,r.prototype.point=function(){throw new Error("Not implemented")},r.prototype.validate=function(){throw new Error("Not implemented")},r.prototype._fixedNafMul=function(e,t){f(e.precomputed);var n=e._getDoubles(),r=c(t,1),i=(1<<n.step+1)-(n.step%2===0?2:1);i/=3;for(var o=[],s=0;s<r.length;s+=n.step){for(var a=0,t=s+n.step-1;t>=s;t--)a=(a<<1)+r[t];o.push(a)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(var s=0;s<o.length;s++){var a=o[s];a===d?h=h.mixedAdd(n.points[s]):a===-d&&(h=h.mixedAdd(n.points[s].neg()))}u=u.add(h)}return u.toP()},r.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,o=c(t,n),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var t=0;a>=0&&0===o[a];a--)t++;if(a>=0&&t++,s=s.dblp(t),a<0)break;var u=o[a];f(0!==u),s="affine"===e.type?u>0?s.mixedAdd(i[u-1>>1]):s.mixedAdd(i[-u-1>>1].neg()):u>0?s.add(i[u-1>>1]):s.add(i[-u-1>>1].neg())}return"affine"===e.type?s.toP():s},r.prototype._wnafMulAdd=function(e,t,n,r){for(var i=this._wnafT1,o=this._wnafT2,s=this._wnafT3,a=0,f=0;f<r;f++){var h=t[f],d=h._getNAFPoints(e);i[f]=d.wnd,o[f]=d.points}for(var f=r-1;f>=1;f-=2){var l=f-1,p=f;if(1===i[l]&&1===i[p]){var m=[t[l],null,null,t[p]];0===t[l].y.cmp(t[p].y)?(m[1]=t[l].add(t[p]),m[2]=t[l].toJ().mixedAdd(t[p].neg())):0===t[l].y.cmp(t[p].y.redNeg())?(m[1]=t[l].toJ().mixedAdd(t[p]),m[2]=t[l].add(t[p].neg())):(m[1]=t[l].toJ().mixedAdd(t[p]),m[2]=t[l].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=u(n[l],n[p]);a=Math.max(v[0].length,a),s[l]=new Array(a),s[p]=new Array(a);for(var y=0;y<a;y++){var b=0|v[0][y],w=0|v[1][y];s[l][y]=g[3*(b+1)+(w+1)],s[p][y]=0,o[l]=m}}else s[l]=c(n[l],i[l]),s[p]=c(n[p],i[p]),a=Math.max(s[l].length,a),a=Math.max(s[p].length,a)}for(var S=this.jpoint(null,null,null),x=this._wnafT4,f=a;f>=0;f--){for(var E=0;f>=0;){for(var A=!0,y=0;y<r;y++)x[y]=0|s[y][f],0!==x[y]&&(A=!1);if(!A)break;E++,f--}if(f>=0&&E++,S=S.dblp(E),f<0)break;for(var y=0;y<r;y++){var h,T=x[y];0!==T&&(T>0?h=o[y][T-1>>1]:T<0&&(h=o[y][-T-1>>1].neg()),S="affine"===h.type?S.mixedAdd(h):S.add(h))}}for(var f=0;f<r;f++)o[f]=null;return S.toP()},r.BasePoint=i,i.prototype.eq=function(){throw new Error("Not implemented")},i.prototype.validate=function(){return this.curve.validate(this)},r.prototype.decodePoint=function(e,t){e=a.toArray(e,t);var n=this.p.byteLength();if(4===e[0]&&e.length-1===2*n)return this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},i.prototype.encodeCompressed=function(e){return this.encode(e,!0)},i.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},i.prototype.encode=function(e,t){return a.encode(this._encode(t),e)},i.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},i.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},i.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)r=r.dbl();n.push(r)}return{step:e,points:n}},i.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},i.prototype._getBeta=function(){return null},i.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}},function(e,t,n){"use strict";function r(e){f.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function i(e,t,n,r){f.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function o(e,t,n,r){f.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(n,16),this.z=new c(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var s=n(377),a=n(371),c=n(374),u=n(309),f=s.base,h=a.utils.assert;u(r,f),e.exports=r,r.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=r[0].cmp(r[1])<0?r[0]:r[1],t=t.toRed(this.red)}if(e.lambda)n=new c(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?n=i[0]:(n=i[1],h(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}var o;return o=e.basis?e.basis.map(function(e){return{a:new c(e.a,16),b:new c(e.b,16)}}):this._getEndoBasis(n),{beta:t,lambda:n,basis:o}}},r.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),n=new c(2).toRed(t).redInvm(),r=n.redNeg(),i=new c(3).toRed(t).redNeg().redSqrt().redMul(n),o=r.redAdd(i).fromRed(),s=r.redSub(i).fromRed();return[o,s]},r.prototype._getEndoBasis=function(e){for(var t,n,r,i,o,s,a,u,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,l=this.n.clone(),p=new c(1),m=new c(0),g=new c(0),v=new c(1),y=0;0!==d.cmpn(0);){var b=l.div(d);u=l.sub(b.mul(d)),f=g.sub(b.mul(p));var w=v.sub(b.mul(m));if(!r&&u.cmp(h)<0)t=a.neg(),n=p,r=u.neg(),i=f;else if(r&&2===++y)break;a=u,l=d,d=u,g=p,p=f,v=m,m=w}o=u.neg(),s=f;var S=r.sqr().add(i.sqr()),x=o.sqr().add(s.sqr());return x.cmp(S)>=0&&(o=t,s=n),r.sign&&(r=r.neg(),i=i.neg()),o.sign&&(o=o.neg(),s=s.neg()),[{a:r,b:i},{a:o,b:s}]},r.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),s=i.mul(n.a),a=o.mul(r.a),c=i.mul(n.b),u=o.mul(r.b),f=e.sub(s).sub(a),h=c.add(u).neg();return{k1:f,k2:h}},r.prototype.pointFromX=function(e,t){e=new c(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt(),i=r.fromRed().isOdd();return(t&&!i||!t&&i)&&(r=r.redNeg()),this.point(e,r)},r.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},r.prototype._endoWnafMulAdd=function(e,t){for(var n=this._endoWnafT1,r=this._endoWnafT2,i=0;i<e.length;i++){var o=this._endoSplit(t[i]),s=e[i],a=s._getBeta();o.k1.sign&&(o.k1.sign=!o.k1.sign,s=s.neg(!0)),o.k2.sign&&(o.k2.sign=!o.k2.sign,a=a.neg(!0)),n[2*i]=s,n[2*i+1]=a,r[2*i]=o.k1,r[2*i+1]=o.k2}for(var c=this._wnafMulAdd(1,n,r,2*i),u=0;u<2*i;u++)n[u]=null,r[u]=null;return c},u(i,f.BasePoint),r.prototype.point=function(e,t,n){return new i(this,e,t,n)},r.prototype.pointFromJSON=function(e,t){return i.fromJSON(this,e,t)},i.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},i.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},i.fromJSON=function(e,t,n){function r(t){return e.point(t[0],t[1],n)}"string"==typeof t&&(t=JSON.parse(t));var i=e.point(t[0],t[1],n);if(!t[2])return i;var o=t[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(r))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(r))}},i},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},i.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(e){return e=new c(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},i.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},i.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},i.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},u(o,f.BasePoint),r.prototype.jpoint=function(e,t,n){return new o(this,e,t,n)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),a=r.redSub(i),c=o.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),f=u.redMul(a),h=r.redMul(u),d=c.redSqr().redIAdd(f).redISub(h).redISub(h),l=c.redMul(h.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,l,p)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=n.redSub(r),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),f=n.redMul(c),h=a.redSqr().redIAdd(u).redISub(f).redISub(f),d=a.redMul(f.redISub(h)).redISub(i.redMul(u)),l=this.z.redMul(s);return this.curve.jpoint(h,d,l)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}for(var r=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,c=a.redSqr().redSqr(),u=s.redAdd(s),n=0;n<e;n++){var f=o.redSqr(),h=u.redSqr(),d=h.redSqr(),l=f.redAdd(f).redIAdd(f).redIAdd(r.redMul(c)),p=o.redMul(h),m=l.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=l.redMul(g);v=v.redIAdd(v).redISub(d);var y=u.redMul(a);n+1<e&&(c=c.redMul(d)),o=m,a=y,u=v}return this.curve.jpoint(o,u.redMul(i),a)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},o.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r),c=a.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=u.redIAdd(u),u=u.redIAdd(u),e=c,t=a.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),l=this.x.redAdd(h).redSqr().redISub(f).redISub(d);l=l.redIAdd(l);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=d.redIAdd(d);g=g.redIAdd(g),g=g.redIAdd(g),e=m.redISub(l).redISub(l),t=p.redMul(l.redISub(e)).redISub(g),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,t,n)},o.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);e=c;var u=o.redIAdd(o);u=u.redIAdd(u),u=u.redIAdd(u),t=a.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),l=this.x.redSub(f).redMul(this.x.redAdd(f));l=l.redAdd(l).redIAdd(l);var p=d.redIAdd(d);p=p.redIAdd(p);var m=p.redAdd(p);e=l.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(h).redISub(f);var g=h.redSqr();g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g),t=l.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},o.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=t.redSqr(),s=n.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t);c=c.redIAdd(c);var u=c.redMul(s),f=a.redSqr().redISub(u.redAdd(u)),h=u.redISub(f),d=s.redSqr();d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var l=a.redMul(h).redISub(d),p=n.redAdd(n).redMul(r);return this.curve.jpoint(f,l,p)},o.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(r);s=s.redIAdd(s),s=s.redAdd(s).redIAdd(s),s=s.redISub(o);var a=s.redSqr(),c=r.redIAdd(r);c=c.redIAdd(c),c=c.redIAdd(c),c=c.redIAdd(c);var u=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(c),f=t.redMul(u);f=f.redIAdd(f),f=f.redIAdd(f);var h=this.x.redMul(a).redISub(f);h=h.redIAdd(h),h=h.redIAdd(h);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(a)));d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var l=this.z.redAdd(s).redSqr().redISub(n).redISub(a);return this.curve.jpoint(h,d,l)},o.prototype.mul=function(e,t){return e=new c(e,t),this.curve._wnafMul(this,e)},o.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},o.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,n){"use strict";function r(e){c.call(this,"mont",e),this.a=new s(e.a,16).toRed(this.red),this.b=new s(e.b,16).toRed(this.red),this.i4=new s(4).toRed(this.red).redInvm(),this.two=new s(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,t,n){c.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new s(t,16),this.z=new s(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var o=n(377),s=n(374),a=n(309),c=o.base,u=n(371),f=u.utils;a(r,c),e.exports=r,r.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t),i=r.redSqrt();return 0===i.redSqr().cmp(r)},a(i,c.BasePoint),r.prototype.decodePoint=function(e,t){return this.point(f.toArray(e,t),1)},r.prototype.point=function(e,t){return new i(this,e,t)},r.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,t){return new i(e,t[0],t[1]||e.one)},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),n=this.x.redSub(this.z),r=n.redSqr(),i=t.redSub(r),o=t.redMul(r),s=i.redMul(r.redAdd(this.curve.a24.redMul(i)));return this.curve.point(o,s)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z),s=o.redMul(n),a=i.redMul(r),c=t.z.redMul(s.redAdd(a).redSqr()),u=t.x.redMul(s.redISub(a).redSqr());return this.curve.point(c,u)},i.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=this,o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var s=o.length-1;s>=0;s--)0===o[s]?(n=n.diffAdd(r,i),r=r.dbl()):(r=n.diffAdd(r,i),n=n.dbl());return r},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,n){"use strict";function r(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&(0|e.a)===-1,this.extended=this.mOneA,u.call(this,"edwards",e),this.a=new a(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new a(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new a(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),f(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}function i(e,t,n,r,i){u.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new a(t,16),this.y=new a(n,16),this.z=r?new a(r,16):this.curve.one,this.t=i&&new a(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}var o=n(377),s=n(371),a=n(374),c=n(309),u=o.base,f=s.utils.assert;c(r,u),e.exports=r,r.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},r.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},r.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},r.prototype.pointFromX=function(e,t){e=new a(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=r.redMul(i.redInvm()).redSqrt(),s=o.fromRed().isOdd();return(t&&!s||!t&&s)&&(o=o.redNeg()),this.point(e,o)},r.prototype.pointFromY=function(e,t){e=new a(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.one),i=n.redMul(this.d).redAdd(this.one),o=r.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},r.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},c(i,u.BasePoint),r.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},r.prototype.point=function(e,t,n,r){return new i(this,e,t,n,r)},i.fromJSON=function(e,t){return new i(e,t[0],t[1],t[2])},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},i.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=r.redAdd(t),s=o.redSub(n),a=r.redSub(t),c=i.redMul(s),u=o.redMul(a),f=i.redMul(a),h=s.redMul(o);return this.curve.point(c,u,h,f)},i.prototype._projDbl=function(){var e,t,n,r=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var s=this.curve._mulA(i),a=s.redAdd(o);if(this.zOne)e=r.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(s.redSub(o)),n=a.redSqr().redSub(a).redSub(a);else{var c=this.z.redSqr(),u=a.redSub(c).redISub(c);e=r.redSub(i).redISub(o).redMul(u),t=a.redMul(s.redSub(o)),n=a.redMul(u)}}else{var s=i.redAdd(o),c=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=s.redSub(c).redSub(c);e=this.curve._mulC(r.redISub(s)).redMul(u),t=this.curve._mulC(s).redMul(i.redISub(o)),n=s.redMul(u)}return this.curve.point(e,t,n)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},i.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=n.redSub(t),s=i.redSub(r),a=i.redAdd(r),c=n.redAdd(t),u=o.redMul(s),f=a.redMul(c),h=o.redMul(c),d=s.redMul(a);return this.curve.point(u,f,d,h)},i.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),c=i.redSub(a),u=i.redAdd(a),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),h=r.redMul(c).redMul(f);return this.curve.twisted?(t=r.redMul(u).redMul(s.redSub(this.curve._mulA(o))),n=c.redMul(u)):(t=r.redMul(u).redMul(s.redSub(o)),n=this.curve._mulC(c).redMul(u)),this.curve.point(h,t,n)},i.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},i.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2)},i.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},i.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()},i.prototype.getY=function(){return this.normalize(),this.y.fromRed()},i.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},i.prototype.toP=i.prototype.normalize,i.prototype.mixedAdd=i.prototype.add},function(e,t,n){"use strict";function r(e){"short"===e.type?this.curve=new a.curve["short"](e):"edwards"===e.type?this.curve=new a.curve.edwards(e):this.curve=new a.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,c(this.g.validate(),"Invalid curve"),c(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var n=new r(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:n}),n}})}var o=t,s=n(365),a=n(371),c=a.utils.assert;o.PresetCurve=r,i("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:s.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:s.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:s.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:s.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),i("p521",{type:"short",
|
||
prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:s.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=n(383)}catch(f){u=void 0}i("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:s.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,n){"use strict";function r(e){return this instanceof r?("string"==typeof e&&(a(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),void(this.hash=e.hash||e.curve.hash)):new r(e)}var i=n(374),o=n(371),s=o.utils,a=s.assert,c=n(385),u=n(386);e.exports=r,r.prototype.keyPair=function(e){return new c(this,e)},r.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},r.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},r.prototype.genKeyPair=function(e){e||(e={});for(var t=new o.hmacDRBG({hash:this.hash,pers:e.pers,entropy:e.entropy||o.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new i(2));;){var s=new i(t.generate(n));if(!(s.cmp(r)>0))return s.iaddn(1),this.keyFromPrivate(s)}},r.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},r.prototype.sign=function(e,t,n,r){"object"==typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray(),c=a.length;c<s;c++)a.unshift(0);for(var f=e.toArray(),c=f.length;c<s;c++)f.unshift(0);for(var h=new o.hmacDRBG({hash:this.hash,entropy:a,nonce:f}),d=this.n.sub(new i(1));;){var l=new i(h.generate(this.n.byteLength()));if(l=this._truncateToN(l,!0),!(l.cmpn(1)<=0||l.cmp(d)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=l.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(v=v.umod(this.n),0!==v.cmpn(0)){r.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v));var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return new u({r:g,s:v,recoveryParam:y})}}}}}},r.prototype.verify=function(e,t,n,r){e=this._truncateToN(new i(e,16)),n=this.keyFromPublic(n,r),t=new u(t,"hex");var o=t.r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a=s.invm(this.n),c=a.mul(e).umod(this.n),f=a.mul(o).umod(this.n),h=this.g.mulAdd(c,n.getPublic(),f);return!h.isInfinity()&&0===h.getX().umod(this.n).cmp(o)},r.prototype.recoverPubKey=function(e,t,n,r){a((3&n)===n,"The recovery param is more than two bits"),t=new u(t,r);var o=this.n,s=new i(e),c=t.r,f=t.s,h=1&n,d=n>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");c=this.curve.pointFromX(c,h);var l=s.neg().umod(o),p=t.r.invm(o);return c.mul(f).add(this.g.mul(l)).mul(p)},r.prototype.getKeyRecoveryParam=function(e,t,n,r){if(t=new u(t,r),null!==t.recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o=this.recoverPubKey(e,t,i);if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,n){"use strict";function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var i=n(374);e.exports=r,r.fromPublic=function(e,t,n){return t instanceof r?t:new r(e,{pub:t,pubEnc:n})},r.fromPrivate=function(e,t,n){return t instanceof r?t:new r(e,{priv:t,privEnc:n})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"
|
||
}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){return e.x||e.y?void(this.pub=this.ec.curve.point(e.x,e.y)):void(this.pub=this.ec.curve.decodePoint(e,t))},r.prototype.derive=function(e){return e.mul(this.priv).getX()},r.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";function r(e,t){return e instanceof r?e:void(this._importDER(e,t)||(h(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),null!==e.recoveryParam?this.recoveryParam=e.recoveryParam:this.recoveryParam=null))}function i(){this.place=0}function o(e,t){var n=e[t.place++];if(!(128&n))return n;for(var r=15&n,i=0,o=0,s=t.place;o<r;o++,s++)i<<=8,i|=e[s];return t.place=s,i}function s(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function a(e,t){if(t<128)return void e.push(t);var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}var c=n(374),u=n(371),f=u.utils,h=f.assert;e.exports=r,r.prototype._importDER=function(e,t){e=f.toArray(e,t);var n=new i;if(48!==e[n.place++])return!1;var r=o(e,n);if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var s=o(e,n),a=e.slice(n.place,s+n.place);if(n.place+=s,2!==e[n.place++])return!1;var u=o(e,n);if(e.length!==u+n.place)return!1;var h=e.slice(n.place,u+n.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===h[0]&&128&h[1]&&(h=h.slice(1)),this.r=new c(a),this.s=new c(h),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=s(t),n=s(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];a(r,t.length),r=r.concat(t),r.push(2),a(r,n.length);var i=r.concat(n),o=[48];return a(o,i.length),o=o.concat(i),f.encode(o,e)}},function(e,t,n){"use strict";function r(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof r))return new r(e);var e=o.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}var i=n(365),o=n(371),s=o.utils,a=s.assert,c=s.parseBytes,u=n(388),f=n(389);e.exports=r,r.prototype.sign=function(e,t){e=c(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),o=this.encodePoint(i),s=this.hashInt(o,n.pubBytes(),e).mul(n.priv()),a=r.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:a,Rencoded:o})},r.prototype.verify=function(e,t,n){e=c(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),o=this.g.mul(t.S()),s=t.R().add(r.pub().mul(i));return s.eq(o)},r.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return s.intFromLE(e.digest()).umod(this.curve.n)},r.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},r.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},r.prototype.makeSignature=function(e){return e instanceof f?e:new f(this,e)},r.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},r.prototype.decodePoint=function(e){e=s.parseBytes(e);var t=e.length-1,n=e.slice(0,t).concat(e[t]&-129),r=0!==(128&e[t]),i=s.intFromLE(n);return this.curve.pointFromY(i,r)},r.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},r.prototype.decodeInt=function(e){return s.intFromLE(e)},r.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,n){"use strict";function r(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}var i=n(371),o=i.utils,s=o.assert,a=o.parseBytes,c=o.cachedProperty;r.fromPublic=function(e,t){return t instanceof r?t:new r(e,{pub:t})},r.fromSecret=function(e,t){return t instanceof r?t:new r(e,{secret:t})},r.prototype.secret=function(){return this._secret},c(r,function(){return this.eddsa.encodePoint(this.pub())}),c(r,function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),c(r,function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r}),c(r,function(){return this.eddsa.decodeInt(this.privBytes())}),c(r,function(){return this.eddsa.hash().update(this.secret()).digest()}),c(r,function(){return this.hash().slice(this.eddsa.encodingLength)}),r.prototype.sign=function(e){return s(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},r.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},r.prototype.getSecret=function(e){return s(this._secret,"KeyPair is public only"),o.encode(this.secret(),e)},r.prototype.getPublic=function(e){return o.encode(this.pubBytes(),e)},e.exports=r},function(e,t,n){"use strict";function r(e,t){this.eddsa=e,"object"!=typeof t&&(t=u(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}var i=n(374),o=n(371),s=o.utils,a=s.assert,c=s.cachedProperty,u=s.parseBytes;c(r,function(){return this.eddsa.decodeInt(this.Sencoded())}),c(r,function(){return this.eddsa.decodePoint(this.Rencoded())}),c(r,function(){return this.eddsa.encodePoint(this.R())}),c(r,function(){return this.eddsa.encodeInt(this.S())}),r.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},r.prototype.toHex=function(){return s.encode(this.toBytes(),"hex").toUpperCase()},e.exports=r},function(e,t,n){"use strict";var r=n(365),i=n(391),o=28,s=32,a=0,c=33,u=[1,225,75];e.exports=i({sha256:function(e){return r.sha256().update(e).digest()},defaultAlphabet:"ripple",codecMethods:{EdSeed:{expectedLength:16,version:u},Seed:{versionTypes:["ed25519","secp256k1"],versions:[u,c],expectedLength:16},AccountID:{version:a,expectedLength:20},Address:{version:a,expectedLength:20},NodePublic:{version:o,expectedLength:33},NodePrivate:{version:s,expectedLength:32},K256Seed:{version:c,expectedLength:16}}})},function(e,t,n){"use strict";function r(e,t){function n(e,n){function r(r){var i="encode"===r,o=t[r+e]=function(e,o){var s=n;return o&&i&&(s={expectedLength:n.expectedLength,version:n.versions[n.versionTypes.indexOf(o)]}),t[r](e,s)};return o}var i=r("decode");r("encode"),t["isValid"+e]=function(e){try{i(e)}catch(t){return!1}return!0}}for(var r in e)n(r,e[r]);return t}function i(e,t){var n={};for(var r in a)n[r]=new t(a[r]);if(e!==a)for(var i in e)n[i]=new t(e[i]);return n}function o(e){var t=e.alphabets,n=void 0===t?a:t,o=e.codecMethods,c=void 0===o?{}:o,u=e.defaultAlphabet,f=void 0===u?Object.keys(n)[0]:u,h=s(e),d=i(n,h);return r(c,{Codec:h,codecs:d,decode:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.alphabet,r=void 0===n?f:n;return d[r].decode(e,t)},encode:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.alphabet,r=void 0===n?f:n;return d[r].encode(e,t)}})}var s=n(392),a={bitcoin:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",ripple:"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz",tipple:"RPShNAF39wBUDnEGHJKLM4pQrsT7VWXYZ2bcdeCg65jkm8ofqi1tuvaxyz",stellar:"gsphnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCr65jkm8oFqi1tuvAxyz"};e.exports=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){var t=e.sha256,n=function(){function e(t){r(this,e),this.alphabet=t,this.codec=s(t),this.base=t.length}return o(e,[{key:"encode",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.version;return f(n)?this.encodeVersioned(e,n,t.expectedLength):t.checked?this.encodeChecked(e):this.encodeRaw(e)}},{key:"decode",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.version,r=t.versions;return f(r)?this.decodeMultiVersioned(e,r,t.expectedLength,t.versionTypes):f(n)?this.decodeVersioned(e,n,t.expectedLength):t.checked?this.decodeChecked(e):this.decodeRaw(e)}},{key:"encodeRaw",value:function(e){return this.codec.encode(e)}},{key:"decodeRaw",value:function(e){return this.codec.decode(e)}},{key:"encodeChecked",value:function(e){var n=t(t(e)).slice(0,4);return this.encodeRaw(u(e,n))}},{key:"decodeChecked",value:function(e){var t=this.decodeRaw(e);if(t.length<5)throw new Error("invalid_input_size");if(!this.verifyCheckSum(t))throw new Error("checksum_invalid");return t.slice(0,-4)}},{key:"encodeVersioned",value:function(e,t,n){if(n&&e.length!==n)throw new Error("unexpected_payload_length");return this.encodeChecked(u(t,e))}},{key:"decodeVersioned",value:function(e,t,n){return this.decodeMultiVersioned(e,[t],n).bytes}},{key:"decodeMultiVersioned",value:function(e,t,n,r){var i=this.decodeChecked(e),o={version:null,bytes:null};if(t.length>1&&!n)throw new Error("must pass expectedLengthgth > 1 possibleVersions");var s=t[0].length||1,a=n||i.length-s,u=i.slice(0,-a),f=i.slice(-a),h=t.some(function(e,t){var n=Array.isArray(e)?e:[e];if(c(u,n))return o.version=e,o.bytes=f,r&&(o.type=r[t]),!0});if(!h)throw new Error("version_invalid");if(n&&o.bytes.length!==n)throw new Error("unexpected_payload_length");return o}},{key:"verifyCheckSum",value:function(e){var n=t(t(e.slice(0,-4))).slice(0,4),r=e.slice(-4);return c(n,r)}},{key:"findPrefix",value:function(e,t){if(58!==this.base)throw new Error("Only works for base58");var n=t+4,r=Math.log(Math.pow(256,n))/Math.log(this.base),i=Math.ceil(r+.2),o=this.alphabet[Math.floor(this.alphabet.length/2)-1],s=e+new Array(i+1).join(o),a=this.decodeRaw(s),c=a.slice(0,-n);return c}}]),e}();return n}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(393),a=n(394),c=a.seqEqual,u=a.concatArgs,f=a.isSet;e.exports=i},function(e,t){e.exports=function(e){function t(t){if(0===t.length)return"";for(var n=[0],r=0;r<t.length;++r){for(var o=0,s=t[r];o<n.length;++o)s+=n[o]<<8,n[o]=s%i,s=s/i|0;for(;s>0;)n.push(s%i),s=s/i|0}for(var a=0;0===t[a]&&a<t.length-1;++a)n.push(0);for(var c=0,u=n.length-1;c<=u;++c,--u){var f=e[n[c]];n[c]=e[n[u]],n[u]=f}return n.join("")}function n(e){if(0===e.length)return[];for(var t=[0],n=0;n<e.length;n++){var s=r[e[n]];if(void 0===s)throw new Error("Non-base"+i+" character");for(var a=0,c=s;a<t.length;++a)c+=t[a]*i,t[a]=255&c,c>>=8;for(;c>0;)t.push(255&c),c>>=8}for(var u=0;e[u]===o&&u<e.length-1;++u)t.push(0);return t.reverse()}for(var r={},i=e.length,o=e.charAt(0),s=0;s<e.length;s++)r[e.charAt(s)]=s;return{encode:t,decode:n}}},function(e,t){"use strict";function n(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function r(e){return void 0!==e.length}function i(){for(var e=[],t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach(function(t){if(r(t))for(var n=0;n<t.length;n++)e.push(t[n]);else e.push(t)}),e}function o(e){return null!==e&&void 0!==e}e.exports={seqEqual:n,concatArgs:i,isSet:o}},function(e,t,n){"use strict";function r(e,t){for(var n=a.curve.n,r=0;r<=4294967295;r++){var i=(new c).add(e);void 0!==t&&i.addU32(t),i.addU32(r);var o=i.first256BN();if(o.cmpn(0)>0&&o.cmp(n)<0)return o}throw new Error("impossible unicorn ;)")}function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.validator,i=a.curve.n,o=r(e);if(n)return o;var s=a.g.mul(o),c=t.accountIndex||0;return r(s.encodeCompressed(),c).add(o).mod(i)}function o(e){var t=a.curve.decodePoint(e),n=r(e,0),i=a.g.mul(n),o=t.add(i);return o.encodeCompressed()}var s=n(371),a=s.ec("secp256k1"),c=n(396);e.exports={derivePrivateKey:i,accountPublicFromPublicGenerator:o}},function(e,t,n){"use strict";var r=n(397)["default"],i=n(401)["default"],o=n(365),s=n(402);e.exports=function(){function e(){i(this,e),this.hash=o.sha512()}return r(e,[{key:"add",value:function(e){return this.hash.update(e),this}},{key:"addU32",value:function(e){return this.add([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}},{key:"finish",value:function(){return this.hash.digest()}},{key:"first256",value:function(){return this.finish().slice(0,32)}},{key:"first256BN",value:function(){return new s(this.first256())}}]),e}()},function(e,t,n){"use strict";var r=n(398)["default"];t["default"]=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),r(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t.__esModule=!0},function(e,t,n){e.exports={"default":n(399),__esModule:!0}},function(e,t,n){var r=n(400);e.exports=function(e,t,n){return r.setDesc(e,t,n)}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t){"use strict";t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.__esModule=!0},function(e,t,n){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){return null!==e&&"object"==typeof e&&Array.isArray(e.words)?e:(this.sign=!1,this.words=null,this.length=0,this.red=null,"le"!==t&&"be"!==t||(n=t,t=10),void(null!==e&&this._init(e||0,t||10,n||"be")))}function o(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var s=e.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function s(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}function a(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}function c(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function u(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function f(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function h(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function d(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function l(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else this.m=e,this.prime=null}function p(e){l.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26,i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.sign=!0),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initNumber=function(e,t,r){e<0&&(this.sign=!0,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o=0;if("be"===r)for(var i=e.length-1,s=0;i>=0;i-=3){var a=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,o+=24,o>=26&&(o-=26,s++)}else if("le"===r)for(var i=0,s=0;i<e.length;i+=3){var a=e[i]|e[i+1]<<8|e[i+2]<<16;this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,o+=24,o>=26&&(o-=26,s++)}return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;for(var r=0,n=e.length-6,i=0;n>=t;n-=6){var s=o(e,n,n+6);this.words[i]|=s<<r&67108863,this.words[i+1]|=s>>>26-r&4194303,r+=24,r>=26&&(r-=26,i++)}if(n+6!==t){var s=o(e,t,n+6);this.words[i]|=s<<r&67108863,this.words[i+1]|=s>>>26-r&4194303}this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,c=Math.min(o,o-a)+n,u=0,f=n;f<c;f+=r)u=s(e,f,f+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){for(var h=1,u=s(e,f,e.length,t),f=0;f<a;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.sign=this.sign,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.sign=!1),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){e=e||10;var t=0|t||1;if(16===e||"hex"===e){for(var r="",i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,r=0!==o||s!==this.length-1?m[6-c.length]+c+r:c+r,i+=2,i>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return this.sign&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=g[e],f=v[e],r="",h=this.clone();for(h.sign=!1;0!==h.cmpn(0);){var d=h.modn(f).toString(e);h=h.idivn(f),r=0!==h.cmpn(0)?m[u-d.length]+d+r:d+r}for(0===this.cmpn(0)&&(r="0"+r);r.length%t!==0;)r="0"+r;return this.sign&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toArray=function(e,t){this.strip();var r="le"===e,i=new Array(this.byteLength());i[0]=0;var o=this.clone();if(r)for(var s=0;0!==o.cmpn(0);s++){var a=o.andln(255);o.iushrn(8),i[s]=a}else for(var s=0;0!==o.cmpn(0);s++){var a=o.andln(255);o.iushrn(8),i[i.length-s-1]=a}if(t)for(n(i.length<=t,"byte array longer than desired length");i.length<t;)r?i.push(0):i.unshift(0);return i},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},i.prototype.bitLength=function(){var e=0,t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(0===this.cmpn(0))return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.neg=function(){if(0===this.cmpn(0))return this.clone();var e=this.clone();return e.sign=!this.sign,e},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(!this.sign&&!e.sign),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(!this.sign&&!e.sign),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(!this.sign&&!e.sign),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);for(var r=e/26|0,i=e%26;this.length<=r;)this.words[this.length++]=0;return t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){if(this.sign&&!e.sign){this.sign=!1;var t=this.isub(e);return this.sign=!this.sign,this._normSign()}if(!this.sign&&e.sign){e.sign=!1;var t=this.isub(e);return e.sign=!0,t._normSign()}var n,r;this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++){var t=n.words[o]+r.words[o]+i;this.words[o]=67108863&t,i=t>>>26}for(;0!==i&&o<n.length;o++){var t=n.words[o]+i;this.words[o]=67108863&t,i=t>>>26}if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){if(e.sign&&!this.sign){e.sign=!1;var t=this.sub(e);return e.sign=!0,t}if(!e.sign&&this.sign){this.sign=!1;var t=e.sub(this);return this.sign=!0,t}return this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(e.sign){e.sign=!1;var t=this.iadd(e);return e.sign=!0,t._normSign()}if(this.sign)return this.sign=!1,this.iadd(e),this.sign=!0,this._normSign();var n=this.cmp(e);if(0===n)return this.sign=!1,this.length=1,this.words[0]=0,this;var r,i;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++){var t=r.words[s]-i.words[s]+o;o=t>>26,this.words[s]=67108863&t}for(;0!==o&&s<r.length;s++){var t=r.words[s]+o;o=t>>26,this.words[s]=67108863&t}if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.sign=!0),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)},i.prototype._smallMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var n=0,r=0;r<t.length-1;r++){for(var i=n>>>26,o=67108863&n,s=Math.min(r,e.length-1),a=Math.max(0,r-this.length+1);a<=s;a++){var c=r-a,u=0|this.words[c],f=0|e.words[a],h=u*f,d=67108863&h;i=i+(h/67108864|0)|0,d=d+o|0,o=67108863&d,i=i+(d>>>26)|0}t.words[r]=o,n=i}return 0!==n?t.words[r]=n:t.length--,t.strip()},i.prototype._bigMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var n=0,r=0,i=0;i<t.length-1;i++){var o=r;r=0;for(var s=67108863&n,a=Math.min(i,e.length-1),c=Math.max(0,i-this.length+1);c<=a;c++){var u=i-c,f=0|this.words[u],h=0|e.words[c],d=f*h,l=67108863&d;o=o+(d/67108864|0)|0,l=l+s|0,s=67108863&l,o=o+(l>>>26)|0,r+=o>>>26,o&=67108863}t.words[i]=s,n=o,o=r}return 0!==n?t.words[i]=n:t.length--,t.strip()},i.prototype.mulTo=function(e,t){var n;return n=this.length+e.length<63?this._smallMulTo(e,t):this._bigMulTo(e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.imul=function(e){if(0===this.cmpn(0)||0===e.cmpn(0))return this.words[0]=0,this.length=1,this;var t=this.length,n=e.length;this.sign=e.sign!==this.sign,this.length=this.length+e.length,this.words[this.length-1]=0;for(var r=this.length-2;r>=0;r--){for(var i=0,o=0,s=Math.min(r,n-1),a=Math.max(0,r-t+1);a<=s;a++){var c=r-a,u=this.words[c],f=e.words[a],h=u*f,d=67108863&h;i+=h/67108864|0,d+=o,o=67108863&d,i+=d>>>26}this.words[r]=o,this.words[r+1]+=i,i=0}for(var i=0,c=1;c<this.length;c++){var l=this.words[c]+i;this.words[c]=67108863&l,i=l>>>26}return this.strip()},i.prototype.imuln=function(e){n("number"==typeof e);for(var t=0,r=0;r<this.length;r++){var i=this.words[r]*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.mul(this)},i.prototype.pow=function(e){var t=a(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){for(var o=0,s=0;s<this.length;s++){var a=this.words[s]&i,c=this.words[s]-a<<t;this.words[s]=c|o,o=a>>>26-t}o&&(this.words[s]=o,this.length++)}if(0!==r){for(var s=this.length-1;s>=0;s--)this.words[s+r]=this.words[s];for(var s=0;s<r;s++)this.words[s]=0;this.length+=r}return this.strip()},i.prototype.ishln=function(e){return n(!this.sign),this.iushln(e)},i.prototype.iushrn=function(e,t,r){n("number"==typeof e&&e>=0);var i;i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s){this.length-=s;for(var u=0;u<this.length;u++)this.words[u]=this.words[u+s]}else this.words[0]=0,this.length=1;for(var f=0,u=this.length-1;u>=0&&(0!==f||u>=i);u--){var h=this.words[u];this.words[u]=f<<26-o|h>>>o,f=h&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip(),this},i.prototype.ishrn=function(e,t,r){return n(!this.sign),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var o=this.words[r];return!!(o&i)},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(!this.sign,"imaskn works only with positive numbers"),0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),e<0?this.isubn(-e):this.sign?1===this.length&&this.words[0]<e?(this.words[0]=e-this.words[0],this.sign=!1,this):(this.sign=!1,this.isubn(e),this.sign=!0,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),e<0)return this.iaddn(-e);if(this.sign)return this.sign=!1,this.iaddn(e),this.sign=!0,this;this.words[0]-=e;for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.sign=!1,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o=e.length+r;if(this.words.length<o){for(var s=new Array(o),i=0;i<this.length;i++)s[i]=this.words[i];this.words=s}else i=this.length;for(this.length=Math.max(this.length,o);i<this.length;i++)this.words[i]=0;for(var a=0,i=0;i<e.length;i++){var c=this.words[i+r]+a,u=e.words[i]*t;c-=67108863&u,a=(c>>26)-(u/67108864|0),this.words[i+r]=67108863&c}for(;i<this.length-r;i++){var c=this.words[i+r]+a;a=c>>26,this.words[i+r]=67108863&c}if(0===a)return this.strip();n(a===-1),a=0;for(var i=0;i<this.length;i++){var c=-this.words[i]+a;a=c>>26,this.words[i]=67108863&c}return this.sign=!0,this.strip()},i.prototype._wordDiv=function(e,t){var n=this.length-e.length,r=this.clone(),o=e,s=o.words[o.length-1],a=this._countBits(s);n=26-a,0!==n&&(o=o.ushln(n),r.iushln(n),s=o.words[o.length-1]);var c,u=r.length-o.length;if("mod"!==t){c=new i(null),c.length=u+1,c.words=new Array(c.length);for(var f=0;f<c.length;f++)c.words[f]=0}var h=r.clone()._ishlnsubmul(o,1,u);h.sign||(r=h,c&&(c.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*r.words[o.length+d]+r.words[o.length+d-1];for(l=Math.min(l/s|0,67108863),r._ishlnsubmul(o,l,d);r.sign;)l--,r.sign=!1,r._ishlnsubmul(o,1,d),0!==r.cmpn(0)&&(r.sign=!r.sign);c&&(c.words[d]=l)}return c&&c.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:c?c:null,mod:r}},i.prototype.divmod=function(e,t,r){if(n(0!==e.cmpn(0)),this.sign&&!e.sign){var o,s,a=this.neg().divmod(e,t);return"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&s.neg&&(s=s.add(e))),{div:o,mod:s}}if(!this.sign&&e.sign){var o,a=this.divmod(e.neg(),t);return"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}}if(this.sign&&e.sign){var s,a=this.neg().divmod(e.neg(),t);return"div"!==t&&(s=a.mod.neg(),r&&s.neg&&(s=s.isub(e))),{div:a.div,mod:s}}return e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t)},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(0===t.mod.cmpn(0))return t.div;var n=t.div.sign?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);
|
||
return o<0||1===i&&0===o?t.div:t.div.sign?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+this.words[i])%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=this.words[r]+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(!e.sign),n(0!==e.cmpn(0));var t=this,r=e.clone();t=t.sign?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),h=t.clone();0!==t.cmpn(0);){for(;t.isEven();)t.iushrn(1),o.isEven()&&s.isEven()?(o.iushrn(1),s.iushrn(1)):(o.iadd(f).iushrn(1),s.isub(h).iushrn(1));for(;r.isEven();)r.iushrn(1),a.isEven()&&c.isEven()?(a.iushrn(1),c.iushrn(1)):(a.iadd(f).iushrn(1),c.isub(h).iushrn(1));t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(c)):(r.isub(t),a.isub(o),c.isub(s))}return{a:a,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(!e.sign),n(0!==e.cmpn(0));var t=this,r=e.clone();t=t.sign?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(;t.isEven();)t.iushrn(1),o.isEven()?o.iushrn(1):o.iadd(a).iushrn(1);for(;r.isEven();)r.iushrn(1),s.isEven()?s.iushrn(1):s.iadd(a).iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}var c;return c=0===t.cmpn(1)?o:s,c.cmpn(0)<0&&c.iadd(e),c},i.prototype.gcd=function(e){if(0===this.cmpn(0))return e.clone();if(0===e.cmpn(0))return this.clone();var t=this.clone(),n=e.clone();t.sign=!1,n.sign=!1;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r){for(var o=this.length;o<r+1;o++)this.words[o]=0;return this.words[r]|=i,this.length=r+1,this}for(var s=i,o=r;0!==s&&o<this.length;o++){var a=this.words[o];a+=s,s=a>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},i.prototype.cmpn=function(e){var t=e<0;if(t&&(e=-e),this.sign&&!t)return-1;if(!this.sign&&t)return 1;e&=67108863,this.strip();var n;if(this.length>1)n=1;else{var r=this.words[0];n=r===e?0:r<e?-1:1}return this.sign&&(n=-n),n},i.prototype.cmp=function(e){if(this.sign&&!e.sign)return-1;if(!this.sign&&e.sign)return 1;var t=this.ucmp(e);return this.sign?-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=this.words[n],i=e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.red=function(e){return new l(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(!this.sign,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.ushl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};c.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},c.prototype.ireduce=function(e){var t,n=e;do this.split(n,this.tmp),n=this.imulK(n),n=n.iadd(this.tmp),t=n.bitLength();while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},c.prototype.split=function(e,t){e.iushrn(this.n,0,t)},c.prototype.imulK=function(e){return e.imul(this.k)},r(u,c),u.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];t.words[t.length++]=o&n;for(var i=10;i<e.length;i++){var s=e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}e.words[i-10]=o>>>22,e.length-=9},u.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t,n=0,r=0;r<e.length;r++){var i=e.words[r];t=64*i,n+=977*i,t+=n/67108864|0,n&=67108863,e.words[r]=n,n=t}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(f,c),r(h,c),r(d,c),d.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*e.words[n]+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function b(e){if(y[e])return y[e];var b;if("k256"===e)b=new u;else if("p224"===e)b=new f;else if("p192"===e)b=new h;else{if("p25519"!==e)throw new Error("Unknown prime "+e);b=new d}return y[e]=b,b},l.prototype._verify1=function(e){n(!e.sign,"red works only with positives"),n(e.red,"red works only with red numbers")},l.prototype._verify2=function(e,t){n(!e.sign&&!t.sign,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},l.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},l.prototype.neg=function(e){var t=e.clone();return t.sign=!t.sign,t.iadd(this.m)._forceRed(this)},l.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},l.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},l.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},l.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},l.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},l.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},l.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},l.prototype.isqr=function(e){return this.imul(e,e)},l.prototype.sqr=function(e){return this.mul(e,e)},l.prototype.sqrt=function(e){if(0===e.cmpn(0))return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2),o=this.pow(e,r);return o}for(var s=this.m.subn(1),a=0;0!==s.cmpn(0)&&0===s.andln(1);)a++,s.iushrn(1);n(0!==s.cmpn(0));var c=new i(1).toRed(this),u=c.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var d=this.pow(h,s),o=this.pow(e,s.addn(1).iushrn(1)),l=this.pow(e,s),p=a;0!==l.cmp(c);){for(var m=l,g=0;0!==m.cmp(c);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new i(1).iushln(p-g-1));o=o.redMul(v),d=v.redSqr(),l=l.redMul(d),p=g}return o},l.prototype.invm=function(e){var t=e._invmp(this.m);return t.sign?(t.sign=!1,this.imod(t).redNeg()):this.imod(t)},l.prototype.pow=function(e,t){var n=a(t);if(0===n.length)return new i(1);for(var r=e,o=0;o<n.length&&0===n[o];o++,r=this.sqr(r));if(++o<n.length)for(var s=this.sqr(r);o<n.length;o++,s=this.sqr(s))0!==n[o]&&(r=this.mul(r,s));return r},l.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},l.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new p(e)},r(p,l),p.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},p.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},p.prototype.imul=function(e,t){if(0===e.cmpn(0)||0===t.cmpn(0))return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},p.prototype.mul=function(e,t){if(0===e.cmpn(0)||0===t.cmpn(0))return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},p.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}("undefined"==typeof e||e,this)}).call(t,n(375)(e))},function(e,t,n){"use strict";function r(e){return e.map(function(e){var t=e.toString(16).toUpperCase();return t.length>1?t:"0"+t}).join("")}function i(e){return a(e.length%2===0),new u(e,16).toArray(null,e.length/2)}function o(e){var t=c.sha256().update(e).digest(),n=c.ripemd160().update(t).digest();return n}function s(e){return c.sha512().update(e).digest().slice(0,16)}var a=n(306),c=n(365),u=n(402);e.exports={bytesToHex:r,hexToBytes:i,computePublicKeyHash:o,seedFromPhrase:s}},function(e,t,n){(function(t,r){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return"ledgerClosed"===e||"transaction"===e||"path_find"===e}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=n(300),f=n(301),h=f.EventEmitter,d=n(405),l=n(406).parse,p=n(412).RangeSet,m=n(413),RippledError=m.RippledError,DisconnectedError=m.DisconnectedError,NotConnectedError=m.NotConnectedError,TimeoutError=m.TimeoutError,ResponseFormatError=m.ResponseFormatError,ConnectionError=m.ConnectionError,g=m.RippledNotInitializedError,v=function(e){function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,f);var n=s(this,(f.__proto__||Object.getPrototypeOf(f)).call(this));return n.setMaxListeners(1/0),n._url=e,n._trace=t.trace,n._trace&&(n._console=console),n._proxyURL=t.proxy,n._proxyAuthorization=t.proxyAuthorization,n._authorization=t.authorization,n._trustedCertificates=t.trustedCertificates,n._key=t.key,n._passphrase=t.passphrase,n._certificate=t.certificate,n._timeout=t.timeout||2e4,n._isReady=!1,n._ws=null,n._ledgerVersion=null,n._availableLedgerVersions=new p,n._nextRequestID=1,n._retry=0,n._retryTimer=null,n._onOpenErrorBound=null,n._onUnexpectedCloseBound=null,n._fee_base=null,n._fee_ref=null,n}return a(f,e),u(f,[{key:"_updateLedgerVersions",value:function(e){this._ledgerVersion=Number(e.ledger_index),e.validated_ledgers?(this._availableLedgerVersions.reset(),this._availableLedgerVersions.parseAndAddRanges(e.validated_ledgers)):this._availableLedgerVersions.addValue(this._ledgerVersion)}},{key:"_updateFees",value:function(e){this._fee_base=Number(e.fee_base),this._fee_ref=Number(e.fee_ref)}},{key:"_parseMessage",value:function(e){var t=JSON.parse(e);if("response"===t.type){if(!(Number.isInteger(t.id)&&t.id>=0))throw new ResponseFormatError("valid id not found in response");return[t.id.toString(),t]}if(c(t.type))return"ledgerClosed"===t.type&&(this._updateLedgerVersions(t),this._updateFees(t)),[t.type,t];if(void 0===t.type&&t.error)return["error",t.error,t.error_message,t];throw new ResponseFormatError("unrecognized message type: "+t.type)}},{key:"_onMessage",value:function(e){var t=void 0;this._trace&&this._console.log(e);try{t=this._parseMessage(e)}catch(n){return void this.emit("error","badMessage",n.message,e)}this.emit.apply(this,i(t))}},{key:"isConnected",value:function(){return this._state===d.OPEN&&this._isReady}},{key:"_onUnexpectedClose",value:function(e,t,n,r){this._onOpenErrorBound&&(this._ws.removeListener("error",this._onOpenErrorBound),this._onOpenErrorBound=null),this._ws.removeAllListeners("open"),this._ws=null,this._isReady=!1,e?this.connect().then(t,n):(this.emit("disconnected",r||1006),this._retryConnect())}},{key:"_calculateTimeout",value:function(e){return e<40?50:e<100?1e3:e<160?1e4:3e4}},{key:"_retryConnect",value:function(){var e=this;this._retry+=1;var t=this._calculateTimeout(this._retry);this._retryTimer=setTimeout(function(){e.emit("reconnecting",e._retry),e.connect()["catch"](e._retryConnect.bind(e))},t)}},{key:"_clearReconnectTimer",value:function(){clearTimeout(this._retryTimer),this._retryTimer=null}},{key:"_onOpen",value:function(){var e=this;if(!this._ws)return Promise.reject(new DisconnectedError);this._onOpenErrorBound&&(this._ws.removeListener("error",this._onOpenErrorBound),this._onOpenErrorBound=null);var n={command:"subscribe",streams:["ledger"]};return this.request(n).then(function(n){return _.isEmpty(n)||!n.ledger_index?e._disconnect(!1).then(function(){throw new g("Rippled not initialized")}):(e._updateLedgerVersions(n),e._updateFees(n),e._rebindOnUnxpectedClose(),e._retry=0,e._ws.on("error",function(n){t.browser&&n&&"error"===n.type||e.emit("error","websocket",n.message,n)}),e._isReady=!0,void e.emit("connected"))})}},{key:"_rebindOnUnxpectedClose",value:function(){this._onUnexpectedCloseBound&&this._ws.removeListener("close",this._onUnexpectedCloseBound),this._onUnexpectedCloseBound=this._onUnexpectedClose.bind(this,!1,null,null),this._ws.once("close",this._onUnexpectedCloseBound)}},{key:"_unbindOnUnxpectedClose",value:function(){this._onUnexpectedCloseBound&&this._ws.removeListener("close",this._onUnexpectedCloseBound),this._onUnexpectedCloseBound=null}},{key:"_onOpenError",value:function(e,t){this._onOpenErrorBound=null,this._unbindOnUnxpectedClose(),e(new NotConnectedError(t&&t.message))}},{key:"_createWebSocket",value:function(){var e={};if(void 0!==this._proxyURL){var t=l(this._url),i=l(this._proxyURL),o=_.omit({secureEndpoint:"wss:"===t.protocol,secureProxy:"https:"===i.protocol,auth:this._proxyAuthorization,ca:this._trustedCertificates,key:this._key,passphrase:this._passphrase,cert:this._certificate},_.isUndefined),s=_.assign({},i,o),a=void 0;try{a=n(415)}catch(c){throw new Error('"proxy" option is not supported in the browser')}e.agent=new a(s)}if(void 0!==this._authorization){var u=new r(this._authorization).toString("base64");e.headers={Authorization:"Basic "+u}}var f=_.omit({ca:this._trustedCertificates,key:this._key,passphrase:this._passphrase,cert:this._certificate},_.isUndefined),h=_.assign({},e,f),p=new d(this._url,null,h);return"function"==typeof p.setMaxListeners&&p.setMaxListeners(1/0),p}},{key:"connect",value:function(){var e=this;return this._clearReconnectTimer(),new Promise(function(t,n){e._url||n(new ConnectionError("Cannot connect because no server was specified")),e._state===d.OPEN?t():e._state===d.CONNECTING?e._ws.once("open",t):(e._ws=e._createWebSocket(),e._onOpenErrorBound=e._onOpenError.bind(e,n),e._ws.once("error",e._onOpenErrorBound),e._ws.on("message",e._onMessage.bind(e)),e._onUnexpectedCloseBound=e._onUnexpectedClose.bind(e,!0,t,n),e._ws.once("close",e._onUnexpectedCloseBound),e._ws.once("open",function(){return e._onOpen().then(t,n)}))})}},{key:"disconnect",value:function(){return this._disconnect(!0)}},{key:"_disconnect",value:function(e){var t=this;return e&&(this._clearReconnectTimer(),this._retry=0),new Promise(function(n){t._state===d.CLOSED?n():t._state===d.CLOSING?t._ws.once("close",n):(t._onUnexpectedCloseBound&&(t._ws.removeListener("close",t._onUnexpectedCloseBound),t._onUnexpectedCloseBound=null),t._ws.once("close",function(r){t._ws=null,t._isReady=!1,e&&t.emit("disconnected",r||1e3),n()}),t._ws.close())})}},{key:"reconnect",value:function(){var e=this;return this.disconnect().then(function(){return e.connect()})}},{key:"_whenReady",value:function(e){var t=this;return new Promise(function(n,r){t._shouldBeConnected?t._state===d.OPEN&&t._isReady?e.then(n,r):t.once("connected",function(){return e.then(n,r)}):r(new NotConnectedError)})}},{key:"getLedgerVersion",value:function(){return this._whenReady(Promise.resolve(this._ledgerVersion))}},{key:"hasLedgerVersions",value:function(e,t){return this._whenReady(Promise.resolve(this._availableLedgerVersions.containsRange(e,t||this._ledgerVersion)))}},{key:"hasLedgerVersion",value:function(e){return this.hasLedgerVersions(e,e)}},{key:"getFeeBase",value:function(){return this._whenReady(Promise.resolve(Number(this._fee_base)))}},{key:"getFeeRef",value:function(){return this._whenReady(Promise.resolve(Number(this._fee_ref)))}},{key:"_send",value:function(e){var t=this;return this._trace&&this._console.log(e),new Promise(function(n,r){t._ws.send(e,void 0,function(e,t){e?r(new DisconnectedError(e.message)):n(t)})})}},{key:"request",value:function(e,t){var n=this;return new Promise(function(r,i){function o(){clearTimeout(u),f.removeAllListeners(d),i(new DisconnectedError)}function s(){clearTimeout(u),f.removeAllListeners(d),null!==f._ws&&f._ws.removeListener("close",o)}function a(e){s(),r(e)}function c(e){s(),i(e)}n._shouldBeConnected||i(new NotConnectedError);var u=null,f=n,h=n._nextRequestID;n._nextRequestID+=1;var d=h.toString();n.once(d,function(e){"error"===e.status?c(new RippledError(e.error)):"success"===e.status?a(e.result):c(new ResponseFormatError("unrecognized status: "+e.status))}),n._ws.once("close",o);var l=JSON.stringify(Object.assign({},e,{id:h}));n._whenReady(n._send(l)).then(function(){var e=t||n._timeout;u=setTimeout(function(){return c(new TimeoutError)},e)})["catch"](c)})}},{key:"_state",get:function(){return this._ws?this._ws.readyState:d.CLOSED}},{key:"_shouldBeConnected",get:function(){return null!==this._ws}}]),f}(h);e.exports=v}).call(t,n(296),n(312).Buffer)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(301),u=c.EventEmitter,f=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return s(n),s(o),a.setMaxListeners(1/0),a._ws=new WebSocket(e),a._ws.onclose=function(){a.emit("close")},a._ws.onopen=function(){a.emit("open")},a._ws.onerror=function(e){a.emit("error",e)},a._ws.onmessage=function(e){a.emit("message",e.data)},a}return o(t,e),a(t,[{key:"close",value:function(){1===this.readyState&&this._ws.close()}},{key:"send",value:function(e){this._ws.send(e)}},{key:"readyState",get:function(){return this._ws.readyState}}]),t}(u);f.CONNECTING=0,f.OPEN=1,f.CLOSING=2,f.CLOSED=3,e.exports=f},function(e,t,n){"use strict";function r(){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}function i(e,t,n){if(e&&u.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return u.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}var c=n(407),u=n(408);t.parse=i,t.resolve=s,t.resolveObject=a,t.format=o,t.Url=r;var f=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(l),m=["'"].concat(p),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],y=255,b=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,S={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=n(409);r.prototype.parse=function(e,t,n){if(!u.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r<e.indexOf("#")?"?":"#",o=e.split(i),s=/\\/g;o[0]=o[0].replace(s,"/"),e=o.join(i);var a=e;if(a=a.trim(),!n&&1===e.split("#").length){var h=d.exec(a);if(h)return this.path=a,this.href=a,this.pathname=h[1],h[2]?(this.search=h[2],t?this.query=A.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var l=f.exec(a);if(l){l=l[0];var p=l.toLowerCase();this.protocol=p,a=a.substr(l.length)}if(n||l||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===a.substr(0,2);!T||l&&x[l]||(a=a.substr(2),this.slashes=!0)}if(!x[l]&&(T||l&&!E[l])){for(var M=-1,P=0;P<v.length;P++){var I=a.indexOf(v[P]);I!==-1&&(M===-1||I<M)&&(M=I)}var O,R;R=M===-1?a.lastIndexOf("@"):a.lastIndexOf("@",M),R!==-1&&(O=a.slice(0,R),a=a.slice(R+1),this.auth=decodeURIComponent(O)),M=-1;for(var P=0;P<g.length;P++){var I=a.indexOf(g[P]);I!==-1&&(M===-1||I<M)&&(M=I)}M===-1&&(M=a.length),this.host=a.slice(0,M),a=a.slice(M),this.parseHost(),this.hostname=this.hostname||"";var k="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!k)for(var N=this.hostname.split(/\./),P=0,C=N.length;P<C;P++){var F=N[P];if(F&&!F.match(b)){for(var L="",B=0,j=F.length;B<j;B++)L+=F.charCodeAt(B)>127?"x":F[B];if(!L.match(b)){var q=N.slice(0,P),D=N.slice(P+1),z=F.match(w);z&&(q.push(z[1]),D.unshift(z[2])),D.length&&(a="/"+D.join(".")+a),this.hostname=q.join(".");break}}}this.hostname.length>y?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=c.toASCII(this.hostname));var U=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+U,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!S[p])for(var P=0,C=m.length;P<C;P++){var $=m[P];if(a.indexOf($)!==-1){var H=encodeURIComponent($);H===$&&(H=escape($)),a=a.split($).join(H)}}var X=a.indexOf("#");X!==-1&&(this.hash=a.substr(X),a=a.slice(0,X));var K=a.indexOf("?");if(K!==-1?(this.search=a.substr(K),this.query=a.substr(K+1),t&&(this.query=A.parse(this.query)),a=a.slice(0,K)):t&&(this.search="",this.query={}),a&&(this.pathname=a),E[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",G=this.search||"";this.path=U+G}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&u.isObject(this.query)&&Object.keys(this.query).length&&(o=A.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||E[t])&&i!==!1?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+i+n+s+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(u.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),o=0;o<i.length;o++){var s=i[o];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),c=0;c<a.length;c++){var f=a[c];"protocol"!==f&&(n[f]=e[f])}return E[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!E[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var l=h[d];n[l]=e[l]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||x[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",g=n.search||"";n.path=m+g}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=y||v||n.host&&e.pathname,w=b,S=n.pathname&&n.pathname.split("/")||[],p=e.pathname&&e.pathname.split("/")||[],A=n.protocol&&!E[n.protocol];if(A&&(n.hostname="",n.port=null,n.host&&(""===S[0]?S[0]=n.host:S.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),b=b&&(""===p[0]||""===S[0])),y)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,S=p;else if(p.length)S||(S=[]),S.pop(),S=S.concat(p),n.search=e.search,n.query=e.query;else if(!u.isNullOrUndefined(e.search)){if(A){n.hostname=n.host=S.shift();var T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");T&&(n.auth=T.shift(),n.host=n.hostname=T.shift())}return n.search=e.search,n.query=e.query,u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var M=S.slice(-1)[0],P=(n.host||e.host||S.length>1)&&("."===M||".."===M)||""===M,I=0,O=S.length;O>=0;O--)M=S[O],"."===M?S.splice(O,1):".."===M?(S.splice(O,1),I++):I&&(S.splice(O,1),I--);if(!b&&!w)for(;I--;I)S.unshift("..");!b||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),P&&"/"!==S.join("/").substr(-1)&&S.push("");var R=""===S[0]||S[0]&&"/"===S[0].charAt(0);if(A){n.hostname=n.host=R?"":S.length?S.shift():"";var T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");T&&(n.auth=T.shift(),n.host=n.hostname=T.shift())}return b=b||n.host&&S.length,b&&!R&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=h.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r;(function(e,i){!function(o){function s(e){throw RangeError(N[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function c(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(k,".");var i=e.split("."),o=a(i,t).join(".");return r+o}function u(e){for(var t,n,r=[],i=0,o=e.length;i<o;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function f(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=L(e>>>10&1023|55296),e=56320|1023&e),t+=L(e)}).join("")}function h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:S}function d(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function l(e,t,n){var r=0;for(e=n?F(e/T):e>>1,e+=F(e/t);e>C*E>>1;r+=S)e=F(e/C);return F(r+(C+1)*e/(e+A))}function p(e){var t,n,r,i,o,a,c,u,d,p,m=[],g=e.length,v=0,y=P,b=M;for(n=e.lastIndexOf(I),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&s("not-basic"),m.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<g;){for(o=v,a=1,c=S;i>=g&&s("invalid-input"),u=h(e.charCodeAt(i++)),(u>=S||u>F((w-v)/a))&&s("overflow"),v+=u*a,d=c<=b?x:c>=b+E?E:c-b,!(u<d);c+=S)p=S-d,a>F(w/p)&&s("overflow"),a*=p;t=m.length+1,b=l(v-o,t,0==o),F(v/t)>w-y&&s("overflow"),y+=F(v/t),v%=t,m.splice(v++,0,y)}return f(m)}function m(e){var t,n,r,i,o,a,c,f,h,p,m,g,v,y,b,A=[];for(e=u(e),g=e.length,t=P,n=0,o=M,a=0;a<g;++a)m=e[a],m<128&&A.push(L(m));for(r=i=A.length,i&&A.push(I);r<g;){for(c=w,a=0;a<g;++a)m=e[a],m>=t&&m<c&&(c=m);for(v=r+1,c-t>F((w-n)/v)&&s("overflow"),n+=(c-t)*v,t=c,a=0;a<g;++a)if(m=e[a],m<t&&++n>w&&s("overflow"),m==t){for(f=n,h=S;p=h<=o?x:h>=o+E?E:h-o,!(f<p);h+=S)b=f-p,y=S-p,A.push(L(d(p+b%y,0))),f=F(b/y);A.push(L(d(f,0))),o=l(n,v,r==i),n=0,++r}++n,++t}return A.join("")}function g(e){return c(e,function(e){return O.test(e)?p(e.slice(4).toLowerCase()):e})}function v(e){return c(e,function(e){return R.test(e)?"xn--"+m(e):e})}var y=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof i&&i);y.global!==y&&y.window!==y&&y.self!==y||(o=y);var b,w=2147483647,S=36,x=1,E=26,A=38,T=700,M=72,P=128,I="-",O=/^xn--/,R=/[^\x20-\x7E]/,k=/[\x2E\u3002\uFF0E\uFF61]/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=S-x,F=Math.floor,L=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:u,encode:f},decode:p,encode:m,toASCII:v,toUnicode:g},r=function(){return b}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(375)(e),function(){return this}())},function(e,t){"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,n){"use strict";t.decode=t.parse=n(410),t.encode=t.stringify=n(411)},function(e,t){"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 o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);
|
||
var c=e.length;a>0&&c>a&&(c=a);for(var u=0;u<c;++u){var f,h,d,l,p=e[u].replace(s,"%20"),m=p.indexOf(r);m>=0?(f=p.substr(0,m),h=p.substr(m+1)):(f=p,h=""),d=decodeURIComponent(f),l=decodeURIComponent(h),n(o,d)?Array.isArray(o[d])?o[d].push(l):o[d]=[o[d],l]:o[d]=l}return o}},function(e,t){"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,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){var t=[[-(1/0),-(1/0)]];return _.forEach(_.sortBy(e,function(e){return e[0]}),function(e){var n=t.pop();e[0]<=n[1]+1?t.push([n[0],Math.max(e[1],n[1])]):(t.push(n),t.push(e))}),t.slice(1)}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=n(300),s=n(306),a=Symbol(),c=function(){function e(){r(this,e),this.reset()}return o(e,[{key:"reset",value:function(){this[a]=[]}},{key:"serialize",value:function(){return this[a].map(function(e){return e[0].toString()+"-"+e[1].toString()}).join(",")}},{key:"addRange",value:function(e,t){s(e<=t,"invalid range"),this[a]=i(this[a].concat([[e,t]]))}},{key:"addValue",value:function(e){this.addRange(e,e)}},{key:"parseAndAddRanges",value:function(e){var t=this,n=e.split(",");_.forEach(n,function(e){var n=e.split("-").map(Number);t.addRange(n[0],1===n.length?n[0]:n[1])})}},{key:"containsRange",value:function(e,t){return _.some(this[a],function(n){return n[0]<=e&&n[1]>=t})}},{key:"containsValue",value:function(e){return this.containsRange(e,e)}}]),e}();e.exports.RangeSet=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),u.setPrototypeOf(t,e),t}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(307),u=n(414),RippleError=function(e){function RippleError(e,t){r(this,RippleError);var n=i(this,(RippleError.__proto__||Object.getPrototypeOf(RippleError)).call(this,e));return n.name=u.getConstructorName(n),n.message=e,n.data=t,Error.captureStackTrace&&Error.captureStackTrace(n,n.constructor.name),n}return o(RippleError,e),a(RippleError,[{key:"toString",value:function(){var e="["+this.name+"("+this.message;return this.data&&(e+=", "+c.inspect(this.data)),e+=")]"}},{key:"inspect",value:function(){return this.toString()}}]),RippleError}(s(Error)),RippledError=function(e){function RippledError(){return r(this,RippledError),i(this,(RippledError.__proto__||Object.getPrototypeOf(RippledError)).apply(this,arguments))}return o(RippledError,e),RippledError}(RippleError),UnexpectedError=function(e){function UnexpectedError(){return r(this,UnexpectedError),i(this,(UnexpectedError.__proto__||Object.getPrototypeOf(UnexpectedError)).apply(this,arguments))}return o(UnexpectedError,e),UnexpectedError}(RippleError),LedgerVersionError=function(e){function LedgerVersionError(){return r(this,LedgerVersionError),i(this,(LedgerVersionError.__proto__||Object.getPrototypeOf(LedgerVersionError)).apply(this,arguments))}return o(LedgerVersionError,e),LedgerVersionError}(RippleError),ConnectionError=function(e){function ConnectionError(){return r(this,ConnectionError),i(this,(ConnectionError.__proto__||Object.getPrototypeOf(ConnectionError)).apply(this,arguments))}return o(ConnectionError,e),ConnectionError}(RippleError),NotConnectedError=function(e){function NotConnectedError(){return r(this,NotConnectedError),i(this,(NotConnectedError.__proto__||Object.getPrototypeOf(NotConnectedError)).apply(this,arguments))}return o(NotConnectedError,e),NotConnectedError}(ConnectionError),DisconnectedError=function(e){function DisconnectedError(){return r(this,DisconnectedError),i(this,(DisconnectedError.__proto__||Object.getPrototypeOf(DisconnectedError)).apply(this,arguments))}return o(DisconnectedError,e),DisconnectedError}(ConnectionError),f=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),t}(ConnectionError),TimeoutError=function(e){function TimeoutError(){return r(this,TimeoutError),i(this,(TimeoutError.__proto__||Object.getPrototypeOf(TimeoutError)).apply(this,arguments))}return o(TimeoutError,e),TimeoutError}(ConnectionError),ResponseFormatError=function(e){function ResponseFormatError(){return r(this,ResponseFormatError),i(this,(ResponseFormatError.__proto__||Object.getPrototypeOf(ResponseFormatError)).apply(this,arguments))}return o(ResponseFormatError,e),ResponseFormatError}(ConnectionError),ValidationError=function(e){function ValidationError(){return r(this,ValidationError),i(this,(ValidationError.__proto__||Object.getPrototypeOf(ValidationError)).apply(this,arguments))}return o(ValidationError,e),ValidationError}(RippleError),NotFoundError=function(e){function NotFoundError(e){return r(this,NotFoundError),i(this,(NotFoundError.__proto__||Object.getPrototypeOf(NotFoundError)).call(this,e||"Not found"))}return o(NotFoundError,e),NotFoundError}(RippleError),MissingLedgerHistoryError=function(e){function MissingLedgerHistoryError(e){return r(this,MissingLedgerHistoryError),i(this,(MissingLedgerHistoryError.__proto__||Object.getPrototypeOf(MissingLedgerHistoryError)).call(this,e||"Server is missing ledger history in the specified range"))}return o(MissingLedgerHistoryError,e),MissingLedgerHistoryError}(RippleError),PendingLedgerVersionError=function(e){function PendingLedgerVersionError(e){return r(this,PendingLedgerVersionError),i(this,(PendingLedgerVersionError.__proto__||Object.getPrototypeOf(PendingLedgerVersionError)).call(this,e||"maxLedgerVersion is greater than server's most recent validated ledger"))}return o(PendingLedgerVersionError,e),PendingLedgerVersionError}(RippleError);e.exports={RippleError:RippleError,UnexpectedError:UnexpectedError,ConnectionError:ConnectionError,RippledError:RippledError,NotConnectedError:NotConnectedError,DisconnectedError:DisconnectedError,RippledNotInitializedError:f,TimeoutError:TimeoutError,ResponseFormatError:ResponseFormatError,ValidationError:ValidationError,NotFoundError:NotFoundError,PendingLedgerVersionError:PendingLedgerVersionError,MissingLedgerHistoryError:MissingLedgerHistoryError,LedgerVersionError:LedgerVersionError}},function(e,t,n){(function(t){"use strict";function n(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t}function r(e){return t.browser?e.constructor.toString().match(/^function\s+([^(]*)/)[1]:e.constructor.name}e.exports={getConstructorName:r,setPrototypeOf:n}}).call(t,n(296))},function(e,t,n){(function(t){function r(e){if(!(this instanceof r))return new r(e);if("string"==typeof e&&(e=a.parse(e)),!e)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");h("creating new HttpsProxyAgent instance: %o",e),u.call(this,i);var t=c({},e);this.secureProxy=!!t.protocol&&/^https:?$/i.test(t.protocol),t.host=t.hostname||t.host,t.port=+t.port||(this.secureProxy?443:80),t.host&&t.path&&(delete t.path,delete t.pathname),this.proxy=t}function i(e,n,r){function i(){var e=p.read();e?d(e):p.once("readable",i)}function a(){p.removeListener("data",d),p.removeListener("end",u),p.removeListener("error",f),p.removeListener("close",c),p.removeListener("readable",i)}function c(e){h("onclose had error %o",e)}function u(){h("onend")}function f(e){a(),r(e)}function d(o){g.push(o),v+=o.length;var c=t.concat(g,v),u=c.toString("ascii");if(!~u.indexOf("\r\n\r\n"))return h("have not received end of HTTP headers yet..."),void(p.read?i():p.once("data",d));var f=u.substring(0,u.indexOf("\r\n")),m=+f.split(" ")[1];if(h("got proxy server response: %o",f),200==m){var y=p;g=c=null,n.secureEndpoint&&(h("upgrading proxy-connected socket to TLS connection: %o",n.host),n.socket=p,n.servername=n.host,n.host=null,n.hostname=null,n.port=null,y=s.connect(n)),a(),r(null,y)}else a(),g=c,e.once("socket",l),r(null,p)}function l(e){if("function"==typeof e.ondata)e.ondata(g,0,g.length);else{if(!(e.listeners("data").length>0))throw new Error("should not happen...");e.emit("data",g)}g=null}var p,m=this.proxy;p=this.secureProxy?s.connect(m):o.connect(m);var g=[],v=0;p.on("error",f),p.on("close",c),p.on("end",u),p.read?i():p.once("data",d);var y=n.host+":"+n.port,b="CONNECT "+y+" HTTP/1.1\r\n",w=m.auth;w&&(b+="Proxy-Authorization: Basic "+new t(w).toString("base64")+"\r\n"),b+="Host: "+y+"\r\nConnection: close\r\n\r\n",p.write(b)}var o=n(!function(){var e=new Error('Cannot find module "net"');throw e.code="MODULE_NOT_FOUND",e}()),s=n(!function(){var e=new Error('Cannot find module "tls"');throw e.code="MODULE_NOT_FOUND",e}()),a=n(406),c=n(416),u=n(417),f=n(307).inherits,h=n(428)("https-proxy-agent");e.exports=r,f(r,u)}).call(t,n(312).Buffer)},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},o=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!i)return!1;var o;for(o in e);return"undefined"==typeof o||n.call(e,o)};e.exports=function s(){var e,t,n,r,a,c,u=arguments[0],f=1,h=arguments.length,d=!1;for("boolean"==typeof u?(d=u,u=arguments[1]||{},f=2):("object"!=typeof u&&"function"!=typeof u||null==u)&&(u={});f<h;++f)if(e=arguments[f],null!=e)for(t in e)n=u[t],r=e[t],u!==r&&(d&&r&&(o(r)||(a=i(r)))?(a?(a=!1,c=n&&i(n)?n:[]):c=n&&o(n)?n:{},u[t]=s(d,c,r)):"undefined"!=typeof r&&(u[t]=r));return u}},function(e,t,n){(function(t){function r(e){if(!(this instanceof r))return new r(e);if("function"!=typeof e)throw new Error('Must pass a "callback function"');s.call(this),this.callback=e}n(418);var i=n(416),o=n(307).inherits,s=n(301).EventEmitter;e.exports=r,o(r,s),r.prototype.addRequest=function(e,n,r,o){var s;"object"==typeof n?s=i({},e._options,n):(s=i({},e._options,{host:n,port:r}),null!=o&&(s.localAddress=o)),s.host&&s.path&&delete s.path,null==s.port&&(s.port=s.secureEndpoint?443:80),delete s.agent,delete s.hostname,delete s._defaultAgent,delete s.defaultPort,delete s.createConnection,e._last=!0,e.shouldKeepAlive=!1,e._options=null;var a=!0;this.callback(e,s,function(n,r){function i(){e.emit("error",n),e._hadError=!0}n?a?t.nextTick(i):i():e.onSocket(r)}),a=!1}}).call(t,n(296))},function(e,t,n){(function(e){var t=n(406),r=n(419),i=n(426),o=n(427),s=n(307).inherits;o.lt(e.version,"0.11.8")&&(r.ClientRequest=function(e){function t(t,n){this._options=t,e.call(this,t,n)}return s(t,e),t}(r.ClientRequest),r.request=function(e){return function(e,n){if("string"==typeof e&&(e=t.parse(e)),e.protocol&&"http:"!==e.protocol)throw new Error("Protocol:"+e.protocol+" not supported.");return new r.ClientRequest(e,n)}}(r.request)),i.request=function(e){return function(n,r){return"string"==typeof n&&(n=t.parse(n)),null==n.port&&(n.port=443),n.secureEndpoint=!0,e.call(i,n,r)}}(i.request)}).call(t,n(296))},function(e,t,n){(function(e){var r=n(420),i=n(424),o=n(425),s=n(406),a=t;a.request=function(t,n){t="string"==typeof t?s.parse(t):i(t);var o=e.location.protocol.search(/^https?:$/)===-1?"http:":"",a=t.protocol||o,c=t.hostname||t.host,u=t.port,f=t.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),t.url=(c?a+"//"+c:"")+(u?":"+u:"")+f,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var h=new r(t);return n&&h.on("response",n),h},a.get=function(e,t){var n=a.request(e,t);return n.end(),n},a.Agent=function(){},a.Agent.defaultMaxSockets=4,a.STATUS_CODES=o,a.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(t,function(){return this}())},function(e,t,n){(function(t,r,i){function o(e,t){return a.fetch&&t?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":a.vbArray&&e?"text:vbarray":"text"}function s(e){try{var t=e.status;return null!==t&&0!==t}catch(n){return!1}}var a=n(421),c=n(309),u=n(422),f=n(335),h=n(423),d=u.IncomingMessage,l=u.readyStates,p=e.exports=function(e){var n=this;f.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 r,i=!0;if("disable-fetch"===e.mode||"timeout"in e)i=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!a.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=o(r,i),n.on("finish",function(){n._onFinish()})};c(p,f.Writable),p.prototype.setHeader=function(e,t){var n=this,r=e.toLowerCase();m.indexOf(r)===-1&&(n._headers[r]={name:e,value:t})},p.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},p.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]},p.prototype._onFinish=function(){var e=this;if(!e._destroyed){var n=e._opts,o=e._headers,s=null;"GET"!==n.method&&"HEAD"!==n.method&&(s=a.blobConstructor?new r.Blob(e._body.map(function(e){return h(e)}),{type:(o["content-type"]||{}).value||""}):t.concat(e._body).toString());var c=[];if(Object.keys(o).forEach(function(e){var t=o[e].name,n=o[e].value;Array.isArray(n)?n.forEach(function(e){c.push([t,e])}):c.push([t,n])}),"fetch"===e._mode)r.fetch(e._opts.url,{method:e._opts.method,headers:c,body:s||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin"}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)});else{var u=e._xhr=new r.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(f){return void i.nextTick(function(){e.emit("error",f)})}"responseType"in u&&(u.responseType=e._mode.split(":")[0]),"withCredentials"in u&&(u.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"timeout"in n&&(u.timeout=n.timeout,u.ontimeout=function(){e.emit("timeout")}),c.forEach(function(e){u.setRequestHeader(e[0],e[1])}),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case l.LOADING:case l.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{u.send(s)}catch(f){return void i.nextTick(function(){e.emit("error",f)})}}}},p.prototype._onXHRProgress=function(){var e=this;s(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},p.prototype._connect=function(){var e=this;e._destroyed||(e._response=new d(e._xhr,e._fetchResponse,e._mode),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},p.prototype._write=function(e,t,n){var r=this;r._body.push(e),n()},p.prototype.abort=p.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},p.prototype.end=function(e,t,n){var r=this;"function"==typeof e&&(n=e,e=void 0),f.Writable.prototype.end.call(r,e,t,n)},p.prototype.flushHeaders=function(){},p.prototype.setTimeout=function(){},p.prototype.setNoDelay=function(){},p.prototype.setSocketKeepAlive=function(){};var m=["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","user-agent","via"]}).call(t,n(312).Buffer,function(){return this}(),n(296))},function(e,t){(function(e){function n(){if(void 0!==s)return s;if(e.XMLHttpRequest){s=new e.XMLHttpRequest;try{s.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(t){s=null}}else s=null;return s}function r(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(r){}return!1}function i(e){return"function"==typeof e}t.fetch=i(e.fetch)&&i(e.ReadableStream),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(o){}var s,a="undefined"!=typeof e.ArrayBuffer,c=a&&i(e.ArrayBuffer.prototype.slice);t.arraybuffer=t.fetch||a&&r("arraybuffer"),t.msstream=!t.fetch&&c&&r("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&a&&r("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!n()&&i(n().overrideMimeType),t.vbArray=i(e.VBArray),s=null}).call(t,function(){return this}())},function(e,t,n){(function(e,r,i){var o=n(421),s=n(309),a=n(335),c=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=t.IncomingMessage=function(t,n,i){function s(){u.read().then(function(e){if(!c._destroyed){if(e.done)return void c.push(null);c.push(new r(e.value)),s()}})["catch"](function(e){c.emit("error",e)})}var c=this;if(a.Readable.call(c),c._mode=i,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){e.nextTick(function(){c.emit("close")})}),"fetch"===i){c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=n.statusText,n.headers.forEach(function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)});var u=n.body.getReader();s()}else{c._xhr=t,c._pos=0,c.url=t.responseURL,c.statusCode=t.status,c.statusMessage=t.statusText;var f=t.getAllResponseHeaders().split(/\r?\n/);if(f.forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===c.headers[n]&&(c.headers[n]=[]),c.headers[n].push(t[2])):void 0!==c.headers[n]?c.headers[n]+=", "+t[2]:c.headers[n]=t[2],c.rawHeaders.push(t[1],t[2])}}),c._charset="x-user-defined",!o.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var d=h.match(/;\s*charset=([^;])(;|$)/);d&&(c._charset=d[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};s(u,a.Readable),u.prototype._read=function(){},u.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text:vbarray":if(t.readyState!==c.DONE)break;try{n=new i.VBArray(t.responseBody).toArray()}catch(o){}if(null!==n){e.push(new r(n));break}case"text":try{n=t.responseText}catch(o){e._mode="text:vbarray";break}if(n.length>e._pos){var s=n.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new r(s.length),u=0;u<s.length;u++)a[u]=255&s.charCodeAt(u);e.push(a)}else e.push(s,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==c.DONE||!t.response)break;n=t.response,e.push(new r(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==c.LOADING||!n)break;e.push(new r(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==c.LOADING)break;var f=new i.MSStreamReader;f.onprogress=function(){f.result.byteLength>e._pos&&(e.push(new r(new Uint8Array(f.result.slice(e._pos)))),e._pos=f.result.byteLength)},f.onload=function(){e.push(null)},f.readAsArrayBuffer(n)}e._xhr.readyState===c.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(t,n(296),n(312).Buffer,function(){return this}())},function(e,t,n){var r=n(312).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(r.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,i=0;i<n;i++)t[i]=e[i];return t.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){function n(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e}e.exports=n;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,n){var r=n(419),i=e.exports;for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);i.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",r.request.call(this,e,t)}},function(e,t,n){(function(n){function r(e,t){if(e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>G)return null;var n=t?W[le]:W[fe];if(!n.test(e))return null;try{return new s(e,t)}catch(r){return null}}function i(e,t){var n=r(e,t);return n?n.version:null}function o(e,t){var n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}function s(e,t){if(e instanceof s){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>G)throw new TypeError("version is longer than "+G+" characters");if(!(this instanceof s))return new s(e,t);K("SemVer",e,t),this.loose=t;var n=e.trim().match(t?W[le]:W[fe]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>J||this.major<0)throw new TypeError("Invalid major version");if(this.minor>J||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>J||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<J)return t}return e}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}function a(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new s(e,n).inc(t,r).version}catch(i){return null}}function c(e,t){if(S(e,t))return null;var n=r(e),i=r(t);if(n.prerelease.length||i.prerelease.length){for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==i[o])return"pre"+o;return"prerelease"}for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==i[o])return o}function u(e,t){var n=qe.test(e),r=qe.test(t);return n&&r&&(e=+e,t=+t),n&&!r?-1:r&&!n?1:e<t?-1:e>t?1:0}function f(e,t){return u(t,e)}function h(e,t){return new s(e,t).major}function d(e,t){return new s(e,t).minor}function l(e,t){return new s(e,t).patch}function p(e,t,n){return new s(e,n).compare(t)}function m(e,t){return p(e,t,!0)}function g(e,t,n){return p(t,e,n)}function v(e,n){return e.sort(function(e,r){return t.compare(e,r,n)})}function y(e,n){return e.sort(function(e,r){return t.rcompare(e,r,n)})}function b(e,t,n){return p(e,t,n)>0}function w(e,t,n){return p(e,t,n)<0}function S(e,t,n){return 0===p(e,t,n)}function x(e,t,n){return 0!==p(e,t,n)}function E(e,t,n){return p(e,t,n)>=0}function A(e,t,n){return p(e,t,n)<=0}function T(e,t,n,r){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),i=e===n;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),i=e!==n;break;case"":case"=":case"==":i=S(e,n,r);break;case"!=":i=x(e,n,r);break;case">":i=b(e,n,r);break;case">=":i=E(e,n,r);break;case"<":i=w(e,n,r);break;case"<=":i=A(e,n,r);break;default:throw new TypeError("Invalid operator: "+t)}return i}function M(e,t){if(e instanceof M){if(e.loose===t)return e;e=e.value}return this instanceof M?(K("comparator",e,t),this.loose=t,this.parse(e),this.semver===De?this.value="":this.value=this.operator+this.semver.version,void K("comp",this)):new M(e,t)}function P(e,t){if(e instanceof P&&e.loose===t)return e;if(!(this instanceof P))return new P(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function I(e,t){return new P(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function O(e,t){return K("comp",e),e=C(e,t),K("caret",e),e=k(e,t),K("tildes",e),e=L(e,t),K("xrange",e),e=j(e,t),K("stars",e),e}function R(e){return!e||"x"===e.toLowerCase()||"*"===e}function k(e,t){return e.trim().split(/\s+/).map(function(e){return N(e,t)}).join(" ")}function N(e,t){var n=t?W[Ae]:W[Ee];return e.replace(n,function(_,t,n,r,i){K("tilde",e,_,t,n,r,i);var o;return R(t)?o="":R(n)?o=">="+t+".0.0 <"+(+t+1)+".0.0":R(r)?o=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0":i?(K("replaceTilde pr",i),"-"!==i.charAt(0)&&(i="-"+i),o=">="+t+"."+n+"."+r+i+" <"+t+"."+(+n+1)+".0"):o=">="+t+"."+n+"."+r+" <"+t+"."+(+n+1)+".0",K("tilde return",o),o})}function C(e,t){return e.trim().split(/\s+/).map(function(e){return F(e,t)}).join(" ")}function F(e,t){K("caret",e,t);var n=t?W[Oe]:W[Ie];return e.replace(n,function(_,t,n,r,i){K("caret",e,_,t,n,r,i);var o;return R(t)?o="":R(n)?o=">="+t+".0.0 <"+(+t+1)+".0.0":R(r)?o="0"===t?">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0":">="+t+"."+n+".0 <"+(+t+1)+".0.0":i?(K("replaceCaret pr",i),"-"!==i.charAt(0)&&(i="-"+i),o="0"===t?"0"===n?">="+t+"."+n+"."+r+i+" <"+t+"."+n+"."+(+r+1):">="+t+"."+n+"."+r+i+" <"+t+"."+(+n+1)+".0":">="+t+"."+n+"."+r+i+" <"+(+t+1)+".0.0"):(K("no pr"),o="0"===t?"0"===n?">="+t+"."+n+"."+r+" <"+t+"."+n+"."+(+r+1):">="+t+"."+n+"."+r+" <"+t+"."+(+n+1)+".0":">="+t+"."+n+"."+r+" <"+(+t+1)+".0.0"),K("caret return",o),o})}function L(e,t){return K("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return B(e,t)}).join(" ")}function B(e,t){e=e.trim();var n=t?W[we]:W[be];return e.replace(n,function(t,n,r,i,o,s){K("xRange",e,t,n,r,i,o,s);var a=R(r),c=a||R(i),u=c||R(o),f=u;return"="===n&&f&&(n=""),a?t=">"===n||"<"===n?"<0.0.0":"*":n&&f?(c&&(i=0),u&&(o=0),">"===n?(n=">=",c?(r=+r+1,i=0,o=0):u&&(i=+i+1,o=0)):"<="===n&&(n="<",c?r=+r+1:i=+i+1),t=n+r+"."+i+"."+o):c?t=">="+r+".0.0 <"+(+r+1)+".0.0":u&&(t=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0"),K("xRange return",t),t})}function j(e,t){return K("replaceStars",e,t),e.trim().replace(W[Be],"")}function q(e,t,n,r,i,o,s,a,c,u,f,h,d){return t=R(n)?"":R(r)?">="+n+".0.0":R(i)?">="+n+"."+r+".0":">="+t,a=R(c)?"":R(u)?"<"+(+c+1)+".0.0":R(f)?"<"+c+"."+(+u+1)+".0":h?"<="+c+"."+u+"."+f+"-"+h:"<="+a,(t+" "+a).trim()}function D(e,t){for(var n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length){for(var n=0;n<e.length;n++)if(K(e[n].semver),e[n].semver!==De&&e[n].semver.prerelease.length>0){var r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}function z(e,t,n){try{t=new P(t,n)}catch(r){return!1}return t.test(e)}function U(e,t,n){return e.filter(function(e){return z(e,t,n)}).sort(function(e,t){return g(e,t,n)})[0]||null}function V(e,t){try{return new P(e,t).range||"*"}catch(n){return null}}function $(e,t,n){return X(e,t,"<",n)}function H(e,t,n){return X(e,t,">",n)}function X(e,t,n,r){e=new s(e,r),t=new P(t,r);var i,o,a,c,u;switch(n){case">":i=b,o=A,a=w,c=">",u=">=";break;case"<":i=w,o=E,a=b,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(z(e,t,r))return!1;for(var f=0;f<t.set.length;++f){var h=t.set[f],d=null,l=null;if(h.forEach(function(e){e.semver===De&&(e=new M(">=0.0.0")),d=d||e,l=l||e,i(e.semver,d.semver,r)?d=e:a(e.semver,l.semver,r)&&(l=e)}),d.operator===c||d.operator===u)return!1;if((!l.operator||l.operator===c)&&o(e,l.semver))return!1;if(l.operator===u&&a(e,l.semver))return!1}return!0}t=e.exports=s;var K;K="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var G=256,J=Number.MAX_SAFE_INTEGER||9007199254740991,W=t.re=[],Y=t.src=[],Z=0,Q=Z++;Y[Q]="0|[1-9]\\d*";var ee=Z++;Y[ee]="[0-9]+";var te=Z++;Y[te]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var ne=Z++;Y[ne]="("+Y[Q]+")\\.("+Y[Q]+")\\.("+Y[Q]+")";var re=Z++;Y[re]="("+Y[ee]+")\\.("+Y[ee]+")\\.("+Y[ee]+")";var ie=Z++;Y[ie]="(?:"+Y[Q]+"|"+Y[te]+")";var oe=Z++;Y[oe]="(?:"+Y[ee]+"|"+Y[te]+")";var se=Z++;Y[se]="(?:-("+Y[ie]+"(?:\\."+Y[ie]+")*))";var ae=Z++;Y[ae]="(?:-?("+Y[oe]+"(?:\\."+Y[oe]+")*))";var ce=Z++;Y[ce]="[0-9A-Za-z-]+";var ue=Z++;Y[ue]="(?:\\+("+Y[ce]+"(?:\\."+Y[ce]+")*))";var fe=Z++,he="v?"+Y[ne]+Y[se]+"?"+Y[ue]+"?";Y[fe]="^"+he+"$";var de="[v=\\s]*"+Y[re]+Y[ae]+"?"+Y[ue]+"?",le=Z++;Y[le]="^"+de+"$";var pe=Z++;Y[pe]="((?:<|>)?=?)";var me=Z++;Y[me]=Y[ee]+"|x|X|\\*";var ge=Z++;Y[ge]=Y[Q]+"|x|X|\\*";var ve=Z++;Y[ve]="[v=\\s]*("+Y[ge]+")(?:\\.("+Y[ge]+")(?:\\.("+Y[ge]+")(?:"+Y[se]+")?"+Y[ue]+"?)?)?";var ye=Z++;Y[ye]="[v=\\s]*("+Y[me]+")(?:\\.("+Y[me]+")(?:\\.("+Y[me]+")(?:"+Y[ae]+")?"+Y[ue]+"?)?)?";var be=Z++;Y[be]="^"+Y[pe]+"\\s*"+Y[ve]+"$";var we=Z++;Y[we]="^"+Y[pe]+"\\s*"+Y[ye]+"$";var _e=Z++;Y[_e]="(?:~>?)";var Se=Z++;Y[Se]="(\\s*)"+Y[_e]+"\\s+",W[Se]=new RegExp(Y[Se],"g");var xe="$1~",Ee=Z++;Y[Ee]="^"+Y[_e]+Y[ve]+"$";var Ae=Z++;Y[Ae]="^"+Y[_e]+Y[ye]+"$";var Te=Z++;Y[Te]="(?:\\^)";var Me=Z++;Y[Me]="(\\s*)"+Y[Te]+"\\s+",W[Me]=new RegExp(Y[Me],"g");var Pe="$1^",Ie=Z++;Y[Ie]="^"+Y[Te]+Y[ve]+"$";var Oe=Z++;Y[Oe]="^"+Y[Te]+Y[ye]+"$";var Re=Z++;Y[Re]="^"+Y[pe]+"\\s*("+de+")$|^$";var ke=Z++;Y[ke]="^"+Y[pe]+"\\s*("+he+")$|^$";var Ne=Z++;Y[Ne]="(\\s*)"+Y[pe]+"\\s*("+de+"|"+Y[ve]+")",W[Ne]=new RegExp(Y[Ne],"g");var Ce="$1$2$3",Fe=Z++;Y[Fe]="^\\s*("+Y[ve]+")\\s+-\\s+("+Y[ve]+")\\s*$";var Le=Z++;Y[Le]="^\\s*("+Y[ye]+")\\s+-\\s+("+Y[ye]+")\\s*$";var Be=Z++;Y[Be]="(<|>)?=?\\s*\\*";for(var je=0;je<Z;je++)K(je,Y[je]),W[je]||(W[je]=new RegExp(Y[je]));t.parse=r,t.valid=i,t.clean=o,t.SemVer=s,s.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},s.prototype.inspect=function(){return'<SemVer "'+this+'">'},s.prototype.toString=function(){return this.version},s.prototype.compare=function(e){return K("SemVer.compare",this.version,this.loose,e),
|
||
e instanceof s||(e=new s(e,this.loose)),this.compareMain(e)||this.comparePre(e)},s.prototype.compareMain=function(e){return e instanceof s||(e=new s(e,this.loose)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)},s.prototype.comparePre=function(e){if(e instanceof s||(e=new s(e,this.loose)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],r=e.prerelease[t];if(K("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return u(n,r)}while(++t)},s.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=a,t.diff=c,t.compareIdentifiers=u;var qe=/^[0-9]+$/;t.rcompareIdentifiers=f,t.major=h,t.minor=d,t.patch=l,t.compare=p,t.compareLoose=m,t.rcompare=g,t.sort=v,t.rsort=y,t.gt=b,t.lt=w,t.eq=S,t.neq=x,t.gte=E,t.lte=A,t.cmp=T,t.Comparator=M;var De={};M.prototype.parse=function(e){var t=this.loose?W[Re]:W[ke],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new s(n[2],this.loose):this.semver=De},M.prototype.inspect=function(){return'<SemVer Comparator "'+this+'">'},M.prototype.toString=function(){return this.value},M.prototype.test=function(e){return K("Comparator.test",e,this.loose),this.semver===De||("string"==typeof e&&(e=new s(e,this.loose)),T(e,this.operator,this.semver,this.loose))},t.Range=P,P.prototype.inspect=function(){return'<SemVer Range "'+this.range+'">'},P.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},P.prototype.toString=function(){return this.range},P.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),K("range",e,t);var n=t?W[Le]:W[Fe];e=e.replace(n,q),K("hyphen replace",e),e=e.replace(W[Ne],Ce),K("comparator trim",e,W[Ne]),e=e.replace(W[Se],xe),e=e.replace(W[Me],Pe),e=e.split(/\s+/).join(" ");var r=t?W[Re]:W[ke],i=e.split(" ").map(function(e){return O(e,t)}).join(" ").split(/\s+/);return this.loose&&(i=i.filter(function(e){return!!e.match(r)})),i=i.map(function(e){return new M(e,t)})},t.toComparators=I,P.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new s(e,this.loose));for(var t=0;t<this.set.length;t++)if(D(this.set[t],e))return!0;return!1},t.satisfies=z,t.maxSatisfying=U,t.validRange=V,t.ltr=$,t.gtr=H,t.outside=X}).call(t,n(296))},function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r),e}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function a(){var e;try{e=t.storage.debug}catch(n){}return e}function c(){try{return window.localStorage}catch(e){}}t=e.exports=n(429),t.log=o,t.formatArgs=i,t.save=s,t.load=a,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(a())},function(e,t,n){function r(){return t.colors[f++%t.colors.length]}function i(e){function n(){}function i(){var e=i,n=+new Date,o=n-(u||n);e.diff=o,e.prev=u,e.curr=n,u=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var s=Array.prototype.slice.call(arguments);s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;a++;var i=t.formatters[r];if("function"==typeof i){var o=s[a];n=i.call(e,o),s.splice(a,1),a--}return n}),"function"==typeof t.formatArgs&&(s=t.formatArgs.apply(e,s));var c=i.log||t.log||console.log.bind(console);c.apply(e,s)}n.enabled=!1,i.enabled=!0;var o=t.enabled(e)?i:n;return o.namespace=e,o}function o(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&(e=n[i].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function s(){t.enable("")}function a(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i,t.coerce=c,t.disable=s,t.enable=o,t.enabled=a,t.humanize=n(430),t.names=[],t.skips=[],t.formatters={};var u,f=0},function(e,t){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=u?Math.round(e/u)+"d":e>=c?Math.round(e/c)+"h":e>=a?Math.round(e/a)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function i(e){return o(e,u,"day")||o(e,c,"hour")||o(e,a,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var s=1e3,a=60*s,c=60*a,u=24*c,f=365.25*u;e.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?i(e):r(e)}},function(e,t,n){"use strict";var r=n(432).txFlagIndices.AccountSet,i={PasswordSpent:65536,RequireDestTag:131072,RequireAuth:262144,DisallowXRP:524288,DisableMaster:1048576,NoFreeze:2097152,GlobalFreeze:4194304,DefaultRipple:8388608},o={passwordSpent:i.PasswordSpent,requireDestinationTag:i.RequireDestTag,requireAuthorization:i.RequireAuth,disallowIncomingXRP:i.DisallowXRP,disableMasterKey:i.DisableMaster,noFreeze:i.NoFreeze,globalFreeze:i.GlobalFreeze,defaultRipple:i.DefaultRipple},s={requireDestinationTag:r.asfRequireDest,requireAuthorization:r.asfRequireAuth,disallowIncomingXRP:r.asfDisallowXRP,disableMasterKey:r.asfDisableMaster,enableTransactionIDTracking:r.asfAccountTxnID,noFreeze:r.asfNoFreeze,globalFreeze:r.asfGlobalFreeze,defaultRipple:r.asfDefaultRipple},a={EmailHash:{name:"emailHash",encoding:"hex",length:32,defaults:"0"},MessageKey:{name:"messageKey"},Domain:{name:"domain",encoding:"hex"},TransferRate:{name:"transferRate",defaults:0,shift:9}};e.exports={AccountFields:a,AccountFlagIndices:s,AccountFlags:o}},function(e,t){"use strict";var n={Universal:{FullyCanonicalSig:2147483648},AccountSet:{RequireDestTag:65536,OptionalDestTag:131072,RequireAuth:262144,OptionalAuth:524288,DisallowXRP:1048576,AllowXRP:2097152},TrustSet:{SetAuth:65536,NoRipple:131072,SetNoRipple:131072,ClearNoRipple:262144,SetFreeze:1048576,ClearFreeze:2097152},OfferCreate:{Passive:65536,ImmediateOrCancel:131072,FillOrKill:262144,Sell:524288},Payment:{NoRippleDirect:65536,PartialPayment:131072,LimitQuality:262144},PaymentChannelClaim:{Renew:65536,Close:131072}},r={AccountSet:{asfRequireDest:1,asfRequireAuth:2,asfDisallowXRP:3,asfDisableMaster:4,asfAccountTxnID:5,asfNoFreeze:6,asfGlobalFreeze:7,asfDefaultRipple:8}};e.exports={txFlags:n,txFlagIndices:r}},function(e,t,n){"use strict";function r(e){return new ValidationError(e)}function i(e){if(!_.isUndefined(e)&&!_.isUndefined(e.minLedgerVersion)&&!_.isUndefined(e.maxLedgerVersion)&&Number(e.minLedgerVersion)>Number(e.maxLedgerVersion))throw r("minLedgerVersion must not be greater than maxLedgerVersion")}function o(e,t){s(e,t),i(t.options)}var _=n(300),ValidationError=n(413).ValidationError,s=n(434).schemaValidate;e.exports={getPaths:_.partial(s,"getPathsParameters"),getTransactions:_.partial(o,"getTransactionsParameters"),getSettings:_.partial(o,"getSettingsParameters"),getAccountInfo:_.partial(o,"getAccountInfoParameters"),getTrustlines:_.partial(o,"getTrustlinesParameters"),getBalances:_.partial(o,"getBalancesParameters"),getBalanceSheet:_.partial(o,"getBalanceSheetParameters"),getOrders:_.partial(o,"getOrdersParameters"),getOrderbook:_.partial(o,"getOrderbookParameters"),getTransaction:_.partial(o,"getTransactionParameters"),getPaymentChannel:_.partial(o,"getPaymentChannelParameters"),getLedger:_.partial(o,"getLedgerParameters"),preparePayment:_.partial(s,"preparePaymentParameters"),prepareOrder:_.partial(s,"prepareOrderParameters"),prepareOrderCancellation:_.partial(s,"prepareOrderCancellationParameters"),prepareTrustline:_.partial(s,"prepareTrustlineParameters"),prepareSettings:_.partial(s,"prepareSettingsParameters"),prepareEscrowCreation:_.partial(s,"prepareEscrowCreationParameters"),prepareEscrowCancellation:_.partial(s,"prepareEscrowCancellationParameters"),prepareEscrowExecution:_.partial(s,"prepareEscrowExecutionParameters"),preparePaymentChannelCreate:_.partial(s,"preparePaymentChannelCreateParameters"),preparePaymentChannelFund:_.partial(s,"preparePaymentChannelFundParameters"),preparePaymentChannelClaim:_.partial(s,"preparePaymentChannelClaimParameters"),sign:_.partial(s,"signParameters"),combine:_.partial(s,"combineParameters"),submit:_.partial(s,"submitParameters"),computeLedgerHash:_.partial(s,"computeLedgerHashParameters"),generateAddress:_.partial(s,"generateAddressParameters"),signPaymentChannelClaim:_.partial(s,"signPaymentChannelClaimParameters"),verifyPaymentChannelClaim:_.partial(s,"verifyPaymentChannelClaimParameters"),apiOptions:_.partial(s,"api-options"),instructions:_.partial(s,"instructions")}},function(e,t,n){"use strict";function r(){var e=[n(439),n(440),n(441),n(442),n(443),n(444),n(445),n(446),n(447),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(483),n(484),n(485),n(486),n(487),n(488),n(489),n(490),n(491),n(492),n(493),n(494),n(495),n(496),n(497),n(498),n(499),n(500),n(501),n(502),n(503),n(504),n(505),n(506),n(507),n(508),n(509),n(510),n(511),n(512),n(513),n(514),n(515),n(516),n(517),n(518),n(519),n(520),n(521),n(522),n(523),n(524),n(525),n(526),n(527),n(528),n(529),n(530),n(531),n(532),n(533),n(534),n(535),n(536),n(537)],t=_.map(e,function(e){return e.title}),r=_.keys(_.pick(_.countBy(t),function(e){return e>1}));o(0===r.length,"Duplicate schemas for: "+r);var i=new s;return i.customFormats.address=function(e){return void 0===e||c(e)},i.customFormats.secret=function(e){return void 0===e||f(e)},_.forEach(e,function(e){return i.addSchema(e,"/"+e.title)}),i}function i(e,t){var n=h.getSchema("/"+e);if(void 0===n)throw new ValidationError("no schema for "+e);var r=h.validate(t,n);if(!r.valid)throw new ValidationError(r.errors.join())}var _=n(300),o=n(306),s=n(435).Validator,ValidationError=n(413).ValidationError,a=n(390),c=a.isValidAddress,u=n(303),f=u.isValidSecret,h=r();e.exports={schemaValidate:i,isValidSecret:f}},function(e,t,n){"use strict";var r=e.exports.Validator=n(436);e.exports.ValidatorResult=n(438).ValidatorResult,e.exports.ValidationError=n(438).ValidationError,e.exports.SchemaError=n(438).SchemaError,e.exports.validate=function(e,t,n){var i=new r;return i.validate(e,t,n)}},function(e,t,n){"use strict";function r(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t&&t}var i=n(406),o=n(437),s=n(438),a=s.ValidatorResult,c=s.SchemaError,u=s.SchemaContext,f=function d(){this.customFormats=Object.create(d.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(h),this.attributes=Object.create(o.validators)};f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(e,t){if(!e)return null;var n=t||e.id;return this.addSubSchema(n,e),n&&(this.schemas[n]=e),this.schemas[n]},f.prototype.addSubSchema=function(e,t){if(t&&"object"==typeof t){if(t.$ref){var n=i.resolve(e,t.$ref);return void(void 0===this.schemas[n]&&(this.schemas[n]=null,this.unresolvedRefs.push(n)))}var r=t.id&&i.resolve(e,t.id),o=r||e;if(r){if(this.schemas[r]){if(!s.deepCompareStrict(this.schemas[r],t))throw new Error("Schema <"+t+"> already exists with different definition");return this.schemas[r]}this.schemas[r]=t;var a=r.replace(/^([^#]*)#$/,"$1");this.schemas[a]=t}return this.addSubSchemaArray(o,t.items instanceof Array?t.items:[t.items]),this.addSubSchemaArray(o,t["extends"]instanceof Array?t["extends"]:[t["extends"]]),this.addSubSchema(o,t.additionalItems),this.addSubSchemaObject(o,t.properties),this.addSubSchema(o,t.additionalProperties),this.addSubSchemaObject(o,t.definitions),this.addSubSchemaObject(o,t.patternProperties),this.addSubSchemaObject(o,t.dependencies),this.addSubSchemaArray(o,t.disallow),this.addSubSchemaArray(o,t.allOf),this.addSubSchemaArray(o,t.anyOf),this.addSubSchemaArray(o,t.oneOf),this.addSubSchema(o,t.not),this.schemas[r]}},f.prototype.addSubSchemaArray=function(e,t){if(t instanceof Array)for(var n=0;n<t.length;n++)this.addSubSchema(e,t[n])},f.prototype.addSubSchemaObject=function(e,t){if(t&&"object"==typeof t)for(var n in t)this.addSubSchema(e,t[n])},f.prototype.setSchemas=function(e){this.schemas=e},f.prototype.getSchema=function(e){return this.schemas[e]},f.prototype.validate=function(e,t,n,r){n||(n={});var o=n.propertyName||"instance",s=i.resolve(n.base||"/",t.id||"");if(r||(r=new u(t,n,o,s,Object.create(this.schemas)),r.schemas[s]||(r.schemas[s]=t)),t){var a=this.validateSchema(e,t,n,r);if(!a)throw new Error("Result undefined");return a}throw new c("no schema specified",t)},f.prototype.validateSchema=function(e,t,n,i){var f=new a(e,t,n,i);if(!t)throw new Error("schema is undefined");if(t["extends"])if(t["extends"]instanceof Array){var h={schema:t,ctx:i};t["extends"].forEach(this.schemaTraverser.bind(this,h)),t=h.schema,h.schema=null,h.ctx=null,h=null}else t=s.deepMerge(t,this.superResolve(t["extends"],i));var d;if(d=r(t)){var l=this.resolve(t,d,i),p=new u(l.subschema,n,i.propertyPath,l.switchSchema,i.schemas);return this.validateSchema(e,l.subschema,n,p)}var m=n&&n.skipAttributes||[];for(var g in t)if(!o.ignoreProperties[g]&&m.indexOf(g)<0){var v=null,y=this.attributes[g];if(y)v=y.call(this,e,t,n,i);else if(n.allowUnknownAttributes===!1)throw new c("Unsupported attribute: "+g,t);v&&f.importErrors(v)}if("function"==typeof n.rewrite){var b=n.rewrite.call(this,e,t,n,i);f.instance=b}return f},f.prototype.schemaTraverser=function(e,t){e.schema=s.deepMerge(e.schema,this.superResolve(t,e.ctx))},f.prototype.superResolve=function(e,t){var n;return(n=r(e))?this.resolve(e,n,t).subschema:e},f.prototype.resolve=function(e,t,n){if(t=n.resolve(t),n.schemas[t])return{subschema:n.schemas[t],switchSchema:t};var r=i.parse(t),o=r&&r.hash,a=o&&o.length&&t.substr(0,t.length-o.length);if(!a||!n.schemas[a])throw new c("no such schema <"+t+">",e);var u=s.objectGetPath(n.schemas[a],o.substr(1));if(void 0===u)throw new c("no such schema "+o+" located in <"+a+">",e);return{subschema:u,switchSchema:t}},f.prototype.testType=function(e,t,n,r,i){if("function"==typeof this.types[i])return this.types[i].call(this,e);if(i&&"object"==typeof i){var o=this.validateSchema(e,i,n,r);return void 0===o||!(o&&o.errors.length)}return!0};var h=f.prototype.types={};h.string=function(e){return"string"==typeof e},h.number=function(e){return"number"==typeof e&&isFinite(e)},h.integer=function(e){return"number"==typeof e&&e%1===0},h["boolean"]=function(e){return"boolean"==typeof e},h.array=function(e){return e instanceof Array},h["null"]=function(e){return null===e},h.date=function(e){return e instanceof Date},h.any=function(e){return!0},h.object=function(e){return e&&"object"==typeof e&&!(e instanceof Array)&&!(e instanceof Date)},e.exports=f},function(e,t,n){"use strict";function r(e,t,n,r,i){var o=this.validateSchema(e,i,t,n);return!o.valid&&r instanceof Function&&r(o),o.valid}function i(e,t,n,r,i,o){if(!t.properties||void 0===t.properties[i])if(t.additionalProperties===!1)o.addError({name:"additionalProperties",argument:i,message:"additionalProperty "+JSON.stringify(i)+" exists in instance when not allowed"});else{var s=t.additionalProperties||{},a=this.validateSchema(e[i],s,n,r.makeChild(s,i));a.instance!==o.instance[i]&&(o.instance[i]=a.instance),o.importErrors(a)}}function o(e,t,n){var r,i=n.length;for(r=t+1,i;r<i;r++)if(s.deepCompareStrict(e,n[r]))return!1;return!0}var s=n(438),a=s.ValidatorResult,c=s.SchemaError,u={};u.ignoreProperties={id:!0,"default":!0,description:!0,title:!0,exclusiveMinimum:!0,exclusiveMaximum:!0,additionalItems:!0,$schema:!0,$ref:!0,"extends":!0};var f=u.validators={};f.type=function(e,t,n,r){if(void 0===e)return null;var i=new a(e,t,n,r),o=Array.isArray(t.type)?t.type:[t.type];if(!o.some(this.testType.bind(this,e,t,n,r))){var s=o.map(function(e){return e.id&&"<"+e.id+">"||e+""});i.addError({name:"type",argument:s,message:"is not of a type(s) "+s})}return i},f.anyOf=function(e,t,n,i){if(void 0===e)return null;var o=new a(e,t,n,i),s=new a(e,t,n,i);if(!Array.isArray(t.anyOf))throw new c("anyOf must be an array");if(!t.anyOf.some(r.bind(this,e,n,i,function(e){s.importErrors(e)}))){var u=t.anyOf.map(function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});n.nestedErrors&&o.importErrors(s),o.addError({name:"anyOf",argument:u,message:"is not any of "+u.join(",")})}return o},f.allOf=function(e,t,n,r){if(void 0===e)return null;if(!Array.isArray(t.allOf))throw new c("allOf must be an array");var i=new a(e,t,n,r),o=this;return t.allOf.forEach(function(t,s){var a=o.validateSchema(e,t,n,r);if(!a.valid){var c=t.id&&"<"+t.id+">"||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+s+"]";i.addError({name:"allOf",argument:{id:c,length:a.errors.length,valid:a},message:"does not match allOf schema "+c+" with "+a.errors.length+" error[s]:"}),i.importErrors(a)}}),i},f.oneOf=function(e,t,n,i){if(void 0===e)return null;if(!Array.isArray(t.oneOf))throw new c("oneOf must be an array");var o=new a(e,t,n,i),s=new a(e,t,n,i),u=t.oneOf.filter(r.bind(this,e,n,i,function(e){s.importErrors(e)})).length,f=t.oneOf.map(function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});return 1!==u&&(n.nestedErrors&&o.importErrors(s),o.addError({name:"oneOf",argument:f,message:"is not exactly one from "+f.join(",")})),o},f.properties=function(e,t,n,r){if(void 0!==e&&e instanceof Object){var i=new a(e,t,n,r),o=t.properties||{};for(var s in o){var c=(e||void 0)&&e[s],u=this.validateSchema(c,o[s],n,r.makeChild(o[s],s));u.instance!==i.instance[s]&&(i.instance[s]=u.instance),i.importErrors(u)}return i}},f.patternProperties=function(e,t,n,r){if(void 0!==e&&this.types.object(e)){var o=new a(e,t,n,r),s=t.patternProperties||{};for(var c in e){var u=!0;for(var f in s){var h=new RegExp(f);if(h.test(c)){u=!1;var d=this.validateSchema(e[c],s[f],n,r.makeChild(s[f],c));d.instance!==o.instance[c]&&(o.instance[c]=d.instance),o.importErrors(d)}}u&&i.call(this,e,t,n,r,c,o)}return o}},f.additionalProperties=function(e,t,n,r){if(void 0!==e&&this.types.object(e)){if(t.patternProperties)return null;var o=new a(e,t,n,r);for(var s in e)i.call(this,e,t,n,r,s,o);return o}},f.minProperties=function(e,t,n,r){if(!e||"object"!=typeof e)return null;var i=new a(e,t,n,r),o=Object.keys(e);return o.length>=t.minProperties||i.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),i},f.maxProperties=function(e,t,n,r){if(!e||"object"!=typeof e)return null;var i=new a(e,t,n,r),o=Object.keys(e);return o.length<=t.maxProperties||i.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),i},f.items=function(e,t,n,r){if(!Array.isArray(e))return null;var i=this,o=new a(e,t,n,r);return void 0!==e&&t.items?(e.every(function(e,s){var a=Array.isArray(t.items)?t.items[s]||t.additionalItems:t.items;if(void 0===a)return!0;if(a===!1)return o.addError({name:"items",message:"additionalItems not permitted"}),!1;var c=i.validateSchema(e,a,n,r.makeChild(a,s));return c.instance!==o.instance[s]&&(o.instance[s]=c.instance),o.importErrors(c),!0}),o):o},f.minimum=function(e,t,n,r){if("number"!=typeof e)return null;var i=new a(e,t,n,r),o=!0;return o=t.exclusiveMinimum&&t.exclusiveMinimum===!0?e>t.minimum:e>=t.minimum,o||i.addError({name:"minimum",argument:t.minimum,message:"must have a minimum value of "+t.minimum}),i},f.maximum=function(e,t,n,r){if("number"!=typeof e)return null;var i,o=new a(e,t,n,r);return i=t.exclusiveMaximum&&t.exclusiveMaximum===!0?e<t.maximum:e<=t.maximum,i||o.addError({name:"maximum",argument:t.maximum,message:"must have a maximum value of "+t.maximum}),o},f.divisibleBy=function(e,t,n,r){if("number"!=typeof e)return null;if(0==t.divisibleBy)throw new c("divisibleBy cannot be zero");var i=new a(e,t,n,r);return e/t.divisibleBy%1&&i.addError({name:"divisibleBy",argument:t.divisibleBy,message:"is not divisible by (multiple of) "+JSON.stringify(t.divisibleBy)}),i},f.multipleOf=function(e,t,n,r){if("number"!=typeof e)return null;if(0==t.multipleOf)throw new c("multipleOf cannot be zero");var i=new a(e,t,n,r);return e/t.multipleOf%1&&i.addError({name:"multipleOf",argument:t.multipleOf,message:"is not a multiple of (divisible by) "+JSON.stringify(t.multipleOf)}),i},f.required=function(e,t,n,r){var i=new a(e,t,n,r);return void 0===e&&t.required===!0?i.addError({name:"required",message:"is required"}):e&&"object"==typeof e&&Array.isArray(t.required)&&t.required.forEach(function(t){void 0===e[t]&&i.addError({name:"required",argument:t,message:"requires property "+JSON.stringify(t)})}),i},f.pattern=function(e,t,n,r){if("string"!=typeof e)return null;var i=new a(e,t,n,r);return e.match(t.pattern)||i.addError({name:"pattern",argument:t.pattern,message:"does not match pattern "+JSON.stringify(t.pattern)}),i},f.format=function(e,t,n,r){var i=new a(e,t,n,r);return i.disableFormat||s.isFormat(e,t.format,this)||i.addError({name:"format",argument:t.format,message:"does not conform to the "+JSON.stringify(t.format)+" format"}),i},f.minLength=function(e,t,n,r){if("string"!=typeof e)return null;var i=new a(e,t,n,r);return e.length>=t.minLength||i.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),i},f.maxLength=function(e,t,n,r){if("string"!=typeof e)return null;var i=new a(e,t,n,r);return e.length<=t.maxLength||i.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),i},f.minItems=function(e,t,n,r){if(!Array.isArray(e))return null;var i=new a(e,t,n,r);return e.length>=t.minItems||i.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),i},f.maxItems=function(e,t,n,r){if(!Array.isArray(e))return null;var i=new a(e,t,n,r);return e.length<=t.maxItems||i.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),i},f.uniqueItems=function(e,t,n,r){function i(e,t,n){for(var r=t+1;r<n.length;r++)if(s.deepCompareStrict(e,n[r]))return!1;return!0}var o=new a(e,t,n,r);return Array.isArray(e)?(e.every(i)||o.addError({name:"uniqueItems",message:"contains duplicate item"}),o):o},f.uniqueItems=function(e,t,n,r){if(!Array.isArray(e))return null;var i=new a(e,t,n,r);return e.every(o)||i.addError({name:"uniqueItems",message:"contains duplicate item"}),i},f.dependencies=function(e,t,n,r){if(!e||"object"!=typeof e)return null;var i=new a(e,t,n,r);for(var o in t.dependencies)if(void 0!==e[o]){var s=t.dependencies[o],c=r.makeChild(s,o);if("string"==typeof s&&(s=[s]),Array.isArray(s))s.forEach(function(t){void 0===e[t]&&i.addError({name:"dependencies",argument:c.propertyPath,message:"property "+t+" not found, required by "+c.propertyPath})});else{var u=this.validateSchema(e,s,n,c);i.instance!==u.instance&&(i.instance=u.instance),u&&u.errors.length&&(i.addError({name:"dependencies",argument:c.propertyPath,message:"does not meet dependency required by "+c.propertyPath}),i.importErrors(u))}}return i},f["enum"]=function(e,t,n,r){if(!Array.isArray(t["enum"]))throw new c("enum expects an array",t);if(void 0===e)return null;var i=new a(e,t,n,r);return t["enum"].some(s.deepCompareStrict.bind(null,e))||i.addError({name:"enum",argument:t["enum"],message:"is not one of enum values: "+t["enum"].join(",")}),i},f.not=f.disallow=function(e,t,n,r){var i=this;if(void 0===e)return null;var o=new a(e,t,n,r),s=t.not||t.disallow;return s?(Array.isArray(s)||(s=[s]),s.forEach(function(s){if(i.testType(e,t,n,r,s)){var a=s&&s.id&&"<"+s.id+">"||s;o.addError({name:"not",argument:a,message:"is of prohibited type "+a})}}),o):null},e.exports=u},function(e,t,n){"use strict";function r(e,t){return t+": "+e.toString()+"\n"}function i(e,t,n,r){"object"==typeof n?t[r]=a(e[r],n):e.indexOf(n)===-1&&t.push(n)}function o(e,t,n){t[n]=e[n]}function s(e,t,n,r){"object"==typeof t[r]&&t[r]&&e[r]?n[r]=a(e[r],t[r]):n[r]=t[r]}function a(e,t){var n=Array.isArray(t),r=n&&[]||{};return n?(e=e||[],r=r.concat(e),t.forEach(i.bind(null,e,r))):(e&&"object"==typeof e&&Object.keys(e).forEach(o.bind(null,e,r)),Object.keys(t).forEach(s.bind(null,e,t,r))),r}function c(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}var u=n(406),ValidationError=t.ValidationError=function(e,t,n,r,i,o){r&&(this.property=r),e&&(this.message=e),n&&(n.id?this.schema=n.id:this.schema=n),t&&(this.instance=t),this.name=i,this.argument=o,this.stack=this.toString()};ValidationError.prototype.toString=function(){return this.property+" "+this.message};var f=t.ValidatorResult=function(e,t,n,r){this.instance=e,this.schema=t,this.propertyPath=r.propertyPath,this.errors=[],this.throwError=n&&n.throwError,this.disableFormat=n&&n.disableFormat===!0};f.prototype.addError=function(e){var t;if("string"==typeof e)t=new ValidationError(e,this.instance,this.schema,this.propertyPath);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new ValidationError(e.message,this.instance,this.schema,this.propertyPath,e.name,e.argument)}if(this.throwError)throw t;return this.errors.push(t),t},f.prototype.importErrors=function(e){"string"==typeof e||e&&e.validatorType?this.addError(e):e&&e.errors&&Array.prototype.push.apply(this.errors,e.errors)},f.prototype.toString=function(e){return this.errors.map(r).join("")},Object.defineProperty(f.prototype,"valid",{get:function(){return!this.errors.length}});var h=t.SchemaError=function m(e,t){this.message=e,this.schema=t,Error.call(this,e),Error.captureStackTrace(this,m)};h.prototype=Object.create(Error.prototype,{constructor:{value:h,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var d=t.SchemaContext=function(e,t,n,r,i){this.schema=e,this.options=t,this.propertyPath=n,this.base=r,this.schemas=i};d.prototype.resolve=function(e){return u.resolve(this.base,e)},d.prototype.makeChild=function(e,t){var n=void 0===t?this.propertyPath:this.propertyPath+p(t),r=u.resolve(this.base,e.id||""),i=new d(e,this.options,n,r,Object.create(this.schemas));return e.id&&!i.schemas[r]&&(i.schemas[r]=e),i};var l=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\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*$/,uri:/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(n){t=!1}return t},style:/\s*(.+?):\s*([^;]+);?/g,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],t.isFormat=function(e,t,n){if("string"==typeof e&&void 0!==l[t]){if(l[t]instanceof RegExp)return l[t].test(e);
|
||
if("function"==typeof l[t])return l[t](e)}else if(n&&n.customFormats&&"function"==typeof n.customFormats[t])return n.customFormats[t](e);return!0};var p=t.makeSuffix=function(e){return e=e.toString(),e.match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};t.deepCompareStrict=function g(e,t){if(typeof e!=typeof t)return!1;if(e instanceof Array)return t instanceof Array&&(e.length===t.length&&e.every(function(n,r){return g(e[r],t[r])}));if("object"==typeof e){if(!e||!t)return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(n){return g(e[n],t[n])})}return e===t},e.exports.deepMerge=a,t.objectGetPath=function(e,t){for(var n,r=t.split("/").slice(1);"string"==typeof(n=r.shift());){var i=decodeURIComponent(n.replace(/~0/,"~").replace(/~1/g,"/"));if(!(i in e))return;e=e[i]}return e},t.encodePath=function(e){return e.map(c).join("")}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"tx",link:"https://ripple.com/build/transactions/",description:"An object in rippled txJSON format",type:"object",properties:{Account:{$ref:"address"}},required:["Account"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"transactionType",link:"transaction-types",description:"The type of the transaction.",type:"string","enum":["payment","order","orderCancellation","trustline","settings","escrowCreation","escrowCancellation","escrowExecution","paymentChannelCreate","paymentChannelFund","paymentChannelClaim"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"hash128",description:"The hexadecimal representation of a 128-bit hash",type:"string",pattern:"^[A-F0-9]{32}$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"hash256",description:"The hexadecimal representation of a 256-bit hash",type:"string",pattern:"^[A-F0-9]{64}$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"sequence",link:"account-sequence-number",description:"An account transaction sequence number",type:"integer",minimum:1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"signature",description:"The hexadecimal representation of a signature.",type:"string",pattern:"^[A-F0-9]+$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"issue",description:"A currency-counterparty pair, or just currency if it's XRP",allOf:[{$ref:"amountbase"},{not:{required:["value"]}}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"ledgerVersion",description:"A ledger version number",type:"integer",minimum:1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"maxAdjustment",type:"object",properties:{address:{$ref:"address",description:"The address to send from."},maxAmount:{$ref:"laxAmount",description:"The maximum amount to send. (This field is exclusive with source.amount)"},tag:{$ref:"tag"}},required:["address","maxAmount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"memo",description:"Memo objects represent arbitrary data that can be included in a transaction",type:"object",properties:{type:{pattern:"^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]*$",description:"Conventionally, a unique relation (according to [RFC 5988](http://tools.ietf.org/html/rfc5988#section-4)) that defines the format of this memo. Only characters allowed in URLs are permitted."},format:{pattern:"^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]*$",description:"Conventionally containing information on how the memo is encoded, for example as a [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml). Only characters allowed in URLs are permitted."},data:{type:"string",description:"Arbitrary string, conventionally containing the content of the memo."}},additionalProperties:!1,anyOf:[{required:["data"]},{required:["type"]}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"memos",link:"transaction-memos",description:"Array of memos to attach to the transaction.",type:"array",items:{$ref:"memo"}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"publicKey",description:"The hexadecimal representation of a secp256k1 or Ed25519 public key.",type:"string",pattern:"^[A-F0-9]+$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"uint32",description:"A 32-bit unsigned integer",type:"integer",minimum:0,maximum:4294967295}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"value",link:"value",description:"A string representation of a non-negative floating point number",type:"string",pattern:"^[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"sourceAdjustment",type:"object",oneOf:[{$ref:"sourceExactAdjustment"},{$ref:"maxAdjustment"}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"destinationAdjustment",type:"object",oneOf:[{$ref:"destinationExactAdjustment"},{$ref:"minAdjustment"}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"tag",description:"An arbitrary unsigned 32-bit integer that identifies a reason for payment or a non-Ripple account.",type:"integer",$ref:"uint32"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"laxAmount",description:"Amount where counterparty is optional",link:"amount",type:"object",properties:{currency:{$ref:"currency"},counterparty:{$ref:"address"},value:{$ref:"value"}},required:["currency","value"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"laxLaxAmount",description:"Amount where counterparty and value are optional",link:"amount",type:"object",properties:{currency:{$ref:"currency"},counterparty:{$ref:"address"},value:{$ref:"value"}},required:["currency"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"minAdjustment",type:"object",properties:{address:{$ref:"address",description:"The address to send to."},minAmount:{$ref:"laxAmount",description:"The minimum amount to be delivered. (This field is exclusive with destination.amount)"},tag:{$ref:"tag"}},required:["address","minAmount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"sourceExactAdjustment",type:"object",properties:{address:{$ref:"address",description:"The address to send from."},amount:{$ref:"laxAmount",description:"An exact amount to send. If the counterparty is not specified, amounts with any counterparty may be used. (This field is exclusive with source.maxAmount)"},tag:{$ref:"tag"}},required:["address","amount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"destinationExactAdjustment",type:"object",properties:{address:{$ref:"address",description:"The address to receive at."},amount:{$ref:"laxAmount",description:"An exact amount to deliver to the recipient. If the counterparty is not specified, amounts with any counterparty may be used. (This field is exclusive with destination.minAmount)."},tag:{$ref:"tag"}},required:["address","amount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"id",link:"transaction-id",description:"A hash of a transaction used to identify the transaction, represented in hexadecimal.",type:"string",pattern:"^[A-F0-9]{64}$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"address",description:"A Ripple account address",type:"string",format:"address",link:"ripple-address",pattern:"^r[1-9A-HJ-NP-Za-km-z]{25,34}$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"adjustment",type:"object",properties:{address:{$ref:"address"},amount:{$ref:"amount"},tag:{$ref:"tag"}},required:["address","amount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"quality",description:"Ratio for incoming/outgoing transit fees.",type:"number",minimum:1e-9,maximum:4.294967295}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"amount",link:"amount",description:"An Amount on the Ripple Protocol",allOf:[{$ref:"amountbase"},{required:["value"]}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"amountbase",description:"Base class for amount and issue",type:"object",properties:{value:{description:"The quantity of the currency, denoted as a string to retain floating point precision",$ref:"value"},currency:{description:"The three-character code or hexadecimal string used to denote currencies",$ref:"currency"},counterparty:{description:'The Ripple address of the account that owes or is owed the funds (omitted if `currency` is "XRP")',$ref:"address"}},additionalProperties:!1,required:["currency"],oneOf:[{properties:{currency:{not:{"enum":["XRP"]}}},required:["counterparty"]},{properties:{currency:{"enum":["XRP"]}},not:{required:["counterparty"]}}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"balance",description:"Balance amount",link:"amount",type:"object",properties:{value:{description:"The balance on the trustline",$ref:"signedValue"},currency:{description:"The three-character code or hexadecimal string used to denote currencies",$ref:"currency"},counterparty:{description:"The Ripple address of the account that owes or is owed the funds.",$ref:"address"}},additionalProperties:!1,required:["currency","value"],oneOf:[{properties:{currency:{not:{"enum":["XRP"]}}},required:["counterparty"]},{properties:{currency:{"enum":["XRP"]}},not:{required:["counterparty"]}}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"blob",description:"An uppercase hexadecimal string representation of a transaction",type:"string",minLength:1,pattern:"^[0-9A-F]*$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"currency",description:"The three-character code or hexadecimal string used to denote currencies",type:"string",link:"currency",pattern:"^([a-zA-Z0-9<>(){}[\\]|?!@#$%^&*]{3}|[A-F0-9]{40})$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"signedValue",description:"A string representation of a floating point number",type:"string",link:"value",pattern:"^[-]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"orderbook",type:"object",properties:{base:{$ref:"issue"},counter:{$ref:"issue"}},required:["base","counter"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"instructions",link:"transaction-instructions",description:"Instructions for executing the transaction",type:"object",properties:{sequence:{description:"The initiating account's sequence number for this transaction.",$ref:"sequence"},fee:{description:"An exact fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information.",$ref:"value"},maxFee:{description:"The maximum fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information.",$ref:"value"},maxLedgerVersion:{description:"The highest ledger version that the transaction can be included in. If this option and `maxLedgerVersionOffset` are both omitted, the `maxLedgerVersion` option will default to 3 greater than the current validated ledger version (equivalent to `maxLedgerVersionOffset=3`). Use `null` to not set a maximum ledger version.",oneOf:[{$ref:"ledgerVersion"},{type:"null"}]},maxLedgerVersionOffset:{description:"Offset from current validated legder version to highest ledger version that the transaction can be included in.",type:"integer",minimum:0},signersCount:{description:"Number of signers that will be signing this transaction.",type:"integer",minimum:1}},additionalProperties:!1,not:{anyOf:[{description:"fee and maxFee are mutually exclusive",required:["fee","maxFee"]},{description:"maxLedgerVersion and maxLedgerVersionOffset are mutually exclusive",required:["maxLedgerVersion","maxLedgerVersionOffset"]}]}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"settingsPlusMemos",type:"object",properties:{passwordSpent:{type:"boolean",description:"Indicates that the account has used its free SetRegularKey transaction."},requireDestinationTag:{type:"boolean",description:"Requires incoming payments to specify a destination tag."},requireAuthorization:{type:"boolean",description:"If set, this account must individually approve other users in order for those users to hold this account’s issuances."},disallowIncomingXRP:{type:"boolean",description:"Indicates that client applications should not send XRP to this account. Not enforced by rippled."},disableMasterKey:{type:"boolean",description:"Disallows use of the master key to sign transactions for this account."},enableTransactionIDTracking:{type:"boolean",description:"Track the ID of this account’s most recent transaction."},noFreeze:{type:"boolean",description:"Permanently give up the ability to freeze individual trust lines. This flag can never be disabled after being enabled."},globalFreeze:{type:"boolean",description:"Freeze all assets issued by this account."},defaultRipple:{type:"boolean",description:"Enable [rippling](https://ripple.com/knowledge_center/understanding-the-noripple-flag/) on this account’s trust lines by default. (New in [rippled 0.27.3](https://github.com/ripple/rippled/releases/tag/0.27.3))"},emailHash:{description:"Hash of an email address to be used for generating an avatar image. Conventionally, clients use Gravatar to display this image. Use `null` to clear.",oneOf:[{type:"null"},{$ref:"hash128"}]},messageKey:{type:"string",description:"Public key for sending encrypted messages to this account. Conventionally, it should be a secp256k1 key, the same encryption that is used by the rest of Ripple."},domain:{type:"string",description:" The domain that owns this account, as a hexadecimal string representing the ASCII for the domain in lowercase."},transferRate:{description:" The fee to charge when users transfer this account’s issuances, as the decimal amount that must be sent to deliver 1 unit. Has precision up to 9 digits beyond the decimal point. Use `null` to set no fee.",oneOf:[{type:"null"},{type:"number",minimum:1,maximum:4.294967295}]},regularKey:{oneOf:[{$ref:"address"},{type:"null"}],description:"The public key of a new keypair, to use as the regular key to this account, as a base-58-encoded string in the same format as an account address. Use `null` to remove the regular key."},signers:{type:"object",description:"Settings that determine what sets of accounts can be used to sign a transaction on behalf of this account using multisigning.",properties:{threshold:{$ref:"uint32",description:"A target number for the signer weights. A multi-signature from this list is valid only if the sum weights of the signatures provided is equal or greater than this value. To delete the signers setting, use the value `0`."},weights:{type:"array",description:"Weights of signatures for each signer.",items:{type:"object",description:"An association of an address and a weight.",properties:{address:{$ref:"address"},weight:{$ref:"uint32",description:"The weight that the signature of this account counts as towards the threshold."}},required:["address","weight"],additionalProperties:!1},minItems:1,maxItems:8}}},memos:{$ref:"memos"}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"settings",link:"settings",$ref:"settingsPlusMemos",oneOf:[{required:["memos"],minProperties:2,maxProperties:2},{not:{required:["memos"]},minProperties:1,maxProperties:1}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"payment",link:"payment",type:"object",properties:{source:{$ref:"sourceAdjustment",description:"The source of the funds to be sent."},destination:{$ref:"destinationAdjustment",description:"The destination of the funds to be sent."},paths:{type:"string",description:"The paths of trustlines and orders to use in executing the payment."},memos:{$ref:"memos"},invoiceID:{description:"A 256-bit hash that can be used to identify a particular payment.",$ref:"hash256"},allowPartialPayment:{description:"A boolean that, if set to true, indicates that this payment should go through even if the whole amount cannot be delivered because of a lack of liquidity or funds in the source account account",type:"boolean"},noDirectRipple:{description:"A boolean that can be set to true if paths are specified and the sender would like the Ripple Network to disregard any direct paths from the source account to the destination account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet",type:"boolean"},limitQuality:{description:"Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of destination.amount:source.maxAmount.",type:"boolean"}},required:["source","destination"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"escrowCancellation",link:"escrow-cancellation",type:"object",properties:{memos:{$ref:"memos"},owner:{$ref:"address",description:"The address of the owner of the escrow to cancel."},escrowSequence:{$ref:"sequence",description:"The [account sequence number](#account-sequence-number) of the [Escrow Creation](#escrow-creation) transaction for the escrow to cancel."}},required:["owner","escrowSequence"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"orderCancellation",link:"order-cancellation",type:"object",properties:{orderSequence:{$ref:"sequence",description:"The [account sequence number](#account-sequence-number) of the order to cancel."},memos:{$ref:"memos"}},required:["orderSequence"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"order",link:"order",type:"object",properties:{direction:{type:"string","enum":["buy","sell"],description:'Equal to "buy" for buy orders and "sell" for sell orders.'},quantity:{$ref:"amount",description:"The amount of currency to buy or sell."},totalPrice:{$ref:"amount",description:"The total price to be paid for the `quantity` to be bought or sold."},immediateOrCancel:{type:"boolean",description:"Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, the offer will never become a ledger node: it only attempts to match existing offers in the ledger."},fillOrKill:{type:"boolean",description:"Treat the offer as a [Fill or Kill order](http://en.wikipedia.org/wiki/Fill_or_kill). Only attempt to match existing offers in the ledger, and only do so if the entire quantity can be exchanged."},passive:{description:"If enabled, the offer will not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It will still consume offers that cross it.",type:"boolean"},expirationTime:{type:"string",format:"date-time",description:"Time after which the offer is no longer active, as an [ISO 8601 date-time](https://en.wikipedia.org/wiki/ISO_8601)."},orderToReplace:{$ref:"sequence",description:"The [account sequence number](#account-sequence-number) of an order to cancel before the new order is created, effectively replacing the old order."},memos:{$ref:"memos"}},required:["direction","quantity","totalPrice"],additionalProperties:!1,not:{description:"immediateOrCancel and fillOrKill are mutually exclusive",required:["immediateOrCancel","fillOrKill"]}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"escrowExecution",link:"escrow-execution",type:"object",properties:{memos:{$ref:"memos"},owner:{$ref:"address",description:"The address of the owner of the escrow to execute."},escrowSequence:{$ref:"sequence",description:"The [account sequence number](#account-sequence-number) of the [Escrow Creation](#escrow-creation) transaction for the escrow to execute."},condition:{type:"string",description:"A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). This must match the original `condition` from the escrow creation transaction.",pattern:"^[A-F0-9]{0,256}$"},fulfillment:{type:"string",description:"A hex value representing the [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1) fulfillment for `condition`.",pattern:"^[A-F0-9]+$"}},required:["owner","escrowSequence"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"escrowCreation",link:"escrow-creation",type:"object",properties:{amount:{$ref:"value",description:"Amount of XRP for sender to escrow."},destination:{$ref:"address",description:"Address to receive escrowed XRP."},memos:{$ref:"memos"},condition:{type:"string",description:"A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). If present, `fulfillment` is required upon execution.",pattern:"^[A-F0-9]{0,256}$"},allowCancelAfter:{type:"string",format:"date-time",description:"If present, the escrow may be cancelled after this time."},allowExecuteAfter:{type:"string",format:"date-time",description:"If present, the escrow can not be executed before this time."},sourceTag:{$ref:"tag",description:"Source tag."},destinationTag:{$ref:"tag",description:"Destination tag."}},required:["amount","destination"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"paymentChannelCreate",link:"payment-channel-create",type:"object",properties:{amount:{$ref:"value",description:"Amount of XRP for sender to set aside in this channel."},destination:{$ref:"address",description:"Address to receive XRP claims against this channel."},settleDelay:{type:"number",description:"Amount of seconds the source address must wait before closing the channel if it has unclaimed XRP."},publicKey:{$ref:"publicKey",description:"Public key of the key pair the source will use to sign claims against this channel."},cancelAfter:{type:"string",format:"date-time",description:"Time when this channel expires."},sourceTag:{$ref:"tag",description:"Source tag."},destinationTag:{$ref:"tag",description:"Destination tag."}},required:["amount","destination","settleDelay","publicKey"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"paymentChannelFund",link:"payment-channel-fund",type:"object",properties:{amount:{$ref:"value",description:"Amount of XRP to fund the channel with."},channel:{$ref:"hash256",description:"256-bit hexadecimal channel identifier."},expiration:{type:"string",format:"date-time",description:"New expiration for this channel."}},required:["amount","channel"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"paymentChannelClaim",link:"payment-channel-claim",type:"object",properties:{channel:{$ref:"hash256",description:"256-bit hexadecimal channel identifier."},amount:{$ref:"value",description:"XRP balance of this channel after claim is processed."},balance:{$ref:"value",description:"Amount of XRP authorized by signature."},signature:{$ref:"signature",description:"Signature of this claim."},publicKey:{$ref:"publicKey",description:"Public key of the channel's sender"},renew:{type:"boolean",description:"Clear the channel's expiration time."},close:{type:"boolean",description:"Request to close the channel."}},required:["channel"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"trustline",link:"trustline",type:"object",properties:{currency:{$ref:"currency",description:"The currency this trustline applies to."},counterparty:{$ref:"address",description:"The address of the account this trustline extends trust to."},limit:{$ref:"value",description:"The maximum amount that the owner of the trustline can be owed through the trustline."},qualityIn:{$ref:"quality",description:"Incoming balances on this trustline are valued at this ratio."},qualityOut:{$ref:"quality",description:"Outgoing balances on this trustline are valued at this ratio."},ripplingDisabled:{type:"boolean",description:"If true, payments cannot ripple through this trustline."},authorized:{type:"boolean",description:"If true, authorize the counterparty to hold issuances from this account."},frozen:{type:"boolean",description:"If true, the trustline is frozen, which means that funds can only be sent to the owner."},memos:{$ref:"memos"}},required:["currency","counterparty","limit"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"sign",type:"object",properties:{signedTransaction:{type:"string",pattern:"^[A-F0-9]+$",description:"The signed transaction represented as an uppercase hexadecimal string."},id:{$ref:"id",description:"The [Transaction ID](#transaction-id) of the signed transaction."}},required:["signedTransaction","id"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"submit",type:"object",properties:{resultCode:{type:"string",description:"The result code returned by rippled. [List of transaction responses](https://ripple.com/build/transactions/#full-transaction-response-list)"},resultMessage:{type:"string",description:"Human-readable explanation of the status of the transaction."}},required:["resultCode","resultMessage"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getAccountInfo",type:"object",properties:{sequence:{$ref:"sequence",description:"The next (smallest unused) sequence number for this account."},xrpBalance:{$ref:"value",description:"The XRP balance owned by the account."},ownerCount:{type:"integer",minimum:0,description:"Number of other ledger entries (specifically, trust lines and offers) attributed to this account. This is used to calculate the total reserve required to use the account."},previousInitiatedTransactionID:{$ref:"hash256",description:"Hash value representing the most recent transaction that was initiated by this account."},previousAffectingTransactionID:{$ref:"hash256",description:"Hash value representing the most recent transaction that affected this account node directly. **Note:** This does not include changes to the account’s trust lines and offers."},previousAffectingTransactionLedgerVersion:{$ref:"ledgerVersion",description:"The ledger version that the transaction identified by the `previousAffectingTransactionID` was validated in."}},required:["sequence","xrpBalance","ownerCount","previousAffectingTransactionID","previousAffectingTransactionLedgerVersion"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getBalances",type:"array",items:{$ref:"balance"}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getBalanceSheet",description:"getBalanceSheet response",type:"object",properties:{balances:{type:"array",items:{$ref:"amount"},description:"Amounts issued to the hotwallet accounts from the request. The keys are hot wallet addresses and the values are arrays of currency amounts they hold. The issuer (omitted from the currency amounts) is the account from the request."},assets:{type:"array",items:{$ref:"amount"},description:"Total amounts held that are issued by others. For the recommended gateway configuration, there should be none."},obligations:{type:"array",items:{type:"object",required:["currency","value"],additionalProperties:!1,properties:{currency:{$ref:"currency"},value:{$ref:"value"}},description:"An amount that is owed."},description:"Total amounts issued to accounts that are not hot wallets, as a map of currencies to the total value issued."}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getLedger",type:"object",properties:{stateHash:{$ref:"hash256",description:"Hash of all state information in this ledger."},closeTime:{type:"string",format:"date-time",description:"The time at which this ledger was closed."},closeTimeResolution:{type:"integer",minimum:1,description:"Approximate number of seconds between closing one ledger version and closing the next one."},closeFlags:{type:"integer",minimum:0,description:'A bit-map of flags relating to the closing of this ledger. Currently, the ledger has only one flag defined for `closeFlags`: **sLCF_NoConsensusTime** (value 1). If this flag is enabled, it means that validators were in conflict regarding the correct close time for the ledger, but built otherwise the same ledger, so they declared consensus while "agreeing to disagree" on the close time. In this case, the consensus ledger contains a `closeTime` value that is 1 second after that of the previous ledger. (In this case, there is no official close time, but the actual real-world close time is probably 3-6 seconds later than the specified `closeTime`.)'},ledgerHash:{$ref:"hash256",description:"Unique identifying hash of the entire ledger."},ledgerVersion:{$ref:"ledgerVersion",description:"The ledger version of this ledger."},parentLedgerHash:{$ref:"hash256",description:"Unique identifying hash of the ledger that came immediately before this one."},parentCloseTime:{type:"string",format:"date-time",description:"The time at which the previous ledger was closed."},totalDrops:{$ref:"value",description:"Total number of drops (1/1,000,000th of an XRP) in the network, as a quoted integer. (This decreases as transaction fees cause XRP to be destroyed.)"},transactionHash:{$ref:"hash256",description:"Hash of the transaction information included in this ledger."},transactions:{description:"Array of all transactions that were validated in this ledger. Transactions are represented in the same format as the return value of [getTransaction](#gettransaction).",type:"array",items:{$ref:"getTransaction",description:"A transaction in the same format as the return value of [getTransaction](#gettransaction)."}},rawTransactions:{type:"string",description:"A JSON string containing rippled format transaction JSON for all transactions that were validated in this ledger."},transactionHashes:{description:"An array of hashes of all transactions that were validated in this ledger.",type:"array",items:{$ref:"id"}},rawState:{type:"string",description:"A JSON string containing all state data for this ledger in rippled JSON format."},stateHashes:{description:"An array of hashes of all state data in this ledger.",type:"array",items:{$ref:"hash256"}}},required:["stateHash","closeTime","closeTimeResolution","closeFlags","ledgerHash","ledgerVersion","parentLedgerHash","parentCloseTime","totalDrops","transactionHash"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getOrderbook",type:"object",properties:{bids:{$ref:"orderbookOrders",description:"The buy orders in the order book."},asks:{$ref:"orderbookOrders",description:"The sell orders in the order book."}},required:["bids","asks"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getOrders",
|
||
type:"array",items:{type:"object",properties:{specification:{$ref:"order",description:"An order specification that would create an order equivalent to the current state of this order."},properties:{description:"Properties of the order not in the specification.",type:"object",properties:{maker:{$ref:"address",description:"The address of the account that submitted the order."},sequence:{$ref:"sequence",description:"The account sequence number of the transaction that created this order."},makerExchangeRate:{$ref:"value",description:'The exchange rate from the point of view of the account that submitted the order (also known as "quality").'}},required:["maker","sequence","makerExchangeRate"],addtionalProperties:!1}},required:["specification","properties"],additionalProperties:!1}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"orderChange",type:"object",description:"A change to an order.",properties:{direction:{type:"string","enum":["buy","sell"],description:'Equal to "buy" for buy orders and "sell" for sell orders.'},quantity:{$ref:"amount",description:"The amount to be bought or sold by the maker."},totalPrice:{$ref:"amount",description:"The total amount to be paid or received by the taker."},makerExchangeRate:{$ref:"value",description:"The exchange rate between the `quantity` currency and the `totalPrice` currency from the point of view of the maker."},sequence:{$ref:"sequence",description:"The order sequence number, used to identify the order for cancellation"},status:{"enum":["created","filled","partially-filled","cancelled"],description:'The status of the order. One of "created", "filled", "partially-filled", "cancelled".'},expirationTime:{type:"string",format:"date-time",description:"The time after which the order expires, if any."}},required:["direction","quantity","totalPrice","sequence","status"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getPaymentChannel",type:"object",properties:{account:{$ref:"address",description:"Address that created the payment channel."},destination:{$ref:"address",description:"Address to receive XRP claims against this channel."},amount:{$ref:"value",description:"The total amount of XRP funded in this channel."},balance:{$ref:"value",description:"The total amount of XRP delivered by this channel."},settleDelay:{type:"number",description:"Amount of seconds the source address must wait before closing the channel if it has unclaimed XRP."},expiration:{type:"string",format:"date-time",description:"Time when this channel expires."},publicKey:{$ref:"publicKey",description:"Public key of the key pair the source will use to sign claims against this channel."},cancelAfter:{type:"string",format:"date-time",description:"Time when this channel expires as specified at creation."},sourceTag:{$ref:"tag",description:"Source tag."},destinationTag:{$ref:"tag",description:"Destination tag."},previousAffectingTransactionID:{$ref:"hash256",description:"Hash value representing the most recent transaction that affected this payment channel."},previousAffectingTransactionLedgerVersion:{$ref:"ledgerVersion",description:"The ledger version that the transaction identified by the `previousAffectingTransactionID` was validated in."}},required:["account","destination","amount","balance","settleDelay","previousAffectingTransactionID","previousAffectingTransactionLedgerVersion"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepare",description:"Result of prepare function",type:"object",properties:{txJSON:{type:"string",description:"The prepared transaction in rippled JSON format."},instructions:{description:"The instructions for how to execute the transaction after adding automatic defaults.",type:"object",properties:{fee:{$ref:"value",description:"An exact fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information."},sequence:{$ref:"sequence",description:"The initiating account's sequence number for this transaction."},maxLedgerVersion:{oneOf:[{$ref:"ledgerVersion"},{type:"null"}],description:"The highest ledger version that the transaction can be included in. Set to `null` if there is no maximum."}},additionalProperties:!1,required:["fee","sequence","maxLedgerVersion"]}},additionalProperties:!1,required:["txJSON","instructions"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"ledgerEvent",description:"A ledger event message",type:"object",properties:{baseFeeXRP:{$ref:"value",description:"Base fee, in XRP."},ledgerHash:{$ref:"hash256",description:"Unique hash of the ledger that was closed, as hex."},ledgerVersion:{$ref:"ledgerVersion",description:"Ledger version of the ledger that closed."},ledgerTimestamp:{type:"string",format:"date-time",description:"The time at which this ledger closed."},reserveBaseXRP:{$ref:"value",description:"The minimum reserve, in XRP, that is required for an account."},reserveIncrementXRP:{$ref:"value",description:"The increase in account reserve that is added for each item the account owns, such as offers or trust lines."},transactionCount:{type:"integer",minimum:0,description:"Number of new transactions included in this ledger."},validatedLedgerVersions:{type:"string",description:"Range of ledgers that the server has available. This may be discontiguous."}},addtionalProperties:!1,required:["baseFeeXRP","ledgerHash","ledgerTimestamp","reserveBaseXRP","reserveIncrementXRP","transactionCount","ledgerVersion","validatedLedgerVersions"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getPaths",type:"array",items:{type:"object",properties:{source:{$ref:"sourceAdjustment",description:"Properties of the source of the payment."},destination:{$ref:"destinationAdjustment",description:"Properties of the destination of the payment."},paths:{type:"string",description:"The paths of trustlines and orders to use in executing the payment."}},required:["source","destination","paths"],additionalProperties:!1}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getServerInfo",type:"object",properties:{buildVersion:{type:"string",description:"The version number of the running rippled version."},completeLedgers:{type:"string",pattern:"[0-9,-]+",description:"Range expression indicating the sequence numbers of the ledger versions the local rippled has in its database. It is possible to be a disjoint sequence, e.g. “2500-5000,32570-7695432”."},hostID:{type:"string",description:"On an admin request, returns the hostname of the server running the rippled instance; otherwise, returns a unique four letter word."},ioLatencyMs:{type:"number",description:"Amount of time spent waiting for I/O operations to be performed, in milliseconds. If this number is not very, very low, then the rippled server is probably having serious load issues."},load:{type:"object",description:"*(Admin only)* Detailed information about the current load state of the server.",properties:{jobTypes:{type:"array",description:"*(Admin only)* Information about the rate of different types of jobs being performed by the server and how much time it spends on each.",items:{type:"object"}},threads:{type:"number",description:"*(Admin only)* The number of threads in the server’s main job pool, performing various Ripple Network operations."}},required:["jobTypes","threads"]},lastClose:{type:"object",description:"Information about the last time the server closed a ledger.",properties:{convergeTimeS:{type:"number",description:"The time it took to reach a consensus for the last ledger closing, in seconds."},proposers:{type:"integer",minimum:0,description:"Number of trusted validators participating in the ledger closing."}},required:["convergeTimeS","proposers"]},loadFactor:{type:"number",description:"The load factor the server is currently enforcing, as a multiplier on the base transaction fee. The load factor is determined by the highest of the individual server’s load factor, cluster’s load factor, and the overall network’s load factor."},peers:{type:"integer",minimum:0,description:"How many other rippled servers the node is currently connected to."},pubkeyNode:{type:"string",description:"Public key used to verify this node for internal communications; this key is automatically generated by the server the first time it starts up. (If deleted, the node can just create a new pair of keys.)"},pubkeyValidator:{type:"string",description:"*(Admin only)* Public key used by this node to sign ledger validations."},serverState:{type:"string",description:"A string indicating to what extent the server is participating in the network. See [Possible Server States](https://ripple.com/build/rippled-apis/#possible-server-states) for more details.","enum":["disconnected","connected","syncing","tracking","full","validating","proposing"]},validatedLedger:{type:"object",description:"Information about the fully-validated ledger with the highest sequence number (the most recent).",properties:{age:{type:"integer",minimum:0,description:"The time since the ledger was closed, in seconds."},baseFeeXRP:{$ref:"value",description:"Base fee, in XRP. This may be represented in scientific notation such as 1e-05 for 0.00005."},hash:{$ref:"hash256",description:"Unique hash for the ledger, as an uppercase hexadecimal string."},reserveBaseXRP:{$ref:"value",description:"Minimum amount of XRP necessary for every account to keep in reserve."},reserveIncrementXRP:{$ref:"value",description:"Amount of XRP added to the account reserve for each object an account is responsible for in the ledger."},ledgerVersion:{type:"integer",minimum:0,description:"Identifying sequence number of this ledger version."}},additionalProperties:!1,required:["age","baseFeeXRP","hash","reserveBaseXRP","reserveIncrementXRP","ledgerVersion"]},validationQuorum:{type:"number",description:"Minimum number of trusted validations required in order to validate a ledger version. Some circumstances may cause the server to require more validations."}},required:["buildVersion","completeLedgers","hostID","ioLatencyMs","lastClose","loadFactor","peers","pubkeyNode","serverState","validatedLedger","validationQuorum"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getSettings",$ref:"settingsPlusMemos",not:{required:["memos"]}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"orderbookOrders",type:"array",items:{description:"An order in the order book.",type:"object",properties:{specification:{$ref:"order",description:"An order specification that would create an order equivalent to the current state of this order."},properties:{description:"Properties of the order not in the specification.",type:"object",properties:{maker:{$ref:"address",description:"The address of the account that submitted the order."},sequence:{$ref:"sequence",description:"The account sequence number of the transaction that created this order."},makerExchangeRate:{$ref:"value",description:'The exchange rate from the point of view of the account that submitted the order (also known as "quality").'}},required:["maker","sequence","makerExchangeRate"],addtionalProperties:!1},state:{description:"The state of the order.",type:"object",properties:{fundedAmount:{$ref:"amount",description:"How much of the amount the maker would have to pay that the maker currently holds."},priceOfFundedAmount:{$ref:"amount",description:"How much the `fundedAmount` would convert to through the exchange rate of this order."}},required:["fundedAmount","priceOfFundedAmount"],additionalProperties:!1}},required:["specification","properties"],additionalProperties:!1}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"outcome",type:"object",description:"The outcome of the transaction (what effects it had).",properties:{result:{type:"string",description:"Result code returned by rippled. See [Transaction Results](https://ripple.com/build/transactions/#full-transaction-response-list) for a complete list."},timestamp:{type:"string",format:"date-time",description:"The timestamp when the transaction was validated. (May be missing when requesting transactions in binary mode.)"},fee:{$ref:"value",description:"The XRP fee that was charged for the transaction."},deliveredAmount:{$ref:"amount",description:"For payment transactions, it is impossible to reliably compute the actual delivered amount from the balanceChanges due to fixed precision. If the payment is not a partial payment and the transaction succeeded, the deliveredAmount should always be considered to be the amount specified in the transaction."},balanceChanges:{type:"object",additionalProperties:{type:"array",description:"Key is the ripple address; value is an array of signed amounts representing changes of balances for that address.",items:{$ref:"balance"}}},orderbookChanges:{type:"object",additionalProperties:{type:"array",description:"Key is the maker's ripple address; value is an array of changes",items:{$ref:"orderChange"}}},ledgerVersion:{$ref:"ledgerVersion",description:"The ledger version that the transaction was validated in."},indexInLedger:{type:"integer",minimum:0,description:"The ordering index of the transaction in the ledger."}},required:["result","fee","balanceChanges","orderbookChanges","ledgerVersion","indexInLedger"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTransaction",link:"gettransaction",properties:{type:{$ref:"transactionType"},specification:{description:"A specification that would produce the same outcome as this transaction. The structure of the specification depends on the value of the `type` field (see [Transaction Types](#transaction-types) for details). *Note:* This is **not** necessarily the same as the original specification."},outcome:{$ref:"outcome",description:"The outcome of the transaction (what effects it had)."},id:{$ref:"id",description:"A hash of the transaction that can be used to identify it."},address:{$ref:"address",description:"The address of the account that initiated the transaction."},sequence:{$ref:"sequence",description:"The account sequence number of the transaction for the account that initiated it."}},required:["id","address","sequence","type","specification","outcome"],additionalProperties:!1,oneOf:[{properties:{type:{"enum":["payment"]},specification:{$ref:"payment"}}},{properties:{type:{"enum":["order"]},specification:{$ref:"order"}}},{properties:{type:{"enum":["orderCancellation"]},specification:{$ref:"orderCancellation"}}},{properties:{type:{"enum":["trustline"]},specification:{$ref:"trustline"}}},{properties:{type:{"enum":["settings"]},specification:{$ref:"getSettings"}}},{properties:{type:{"enum":["escrowCreation"]},specification:{$ref:"escrowCreation"}}},{properties:{type:{"enum":["escrowCancellation"]},specification:{$ref:"escrowCancellation"}}},{properties:{type:{"enum":["escrowExecution"]},specification:{$ref:"escrowExecution"}}},{properties:{type:{"enum":["paymentChannelCreate"]},specification:{$ref:"paymentChannelCreate"}}},{properties:{type:{"enum":["paymentChannelFund"]},specification:{$ref:"paymentChannelFund"}}},{properties:{type:{"enum":["paymentChannelClaim"]},specification:{$ref:"paymentChannelClaim"}}}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTransactions",type:"array",items:{$ref:"getTransaction"}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTrustlines",type:"array",items:{properties:{specification:{$ref:"trustline",description:"A trustline specification that would produce this trustline in its current state."},counterparty:{properties:{limit:{$ref:"value",description:"The maximum amount that the counterparty can be owed through the trustline."},ripplingDisabled:{type:"boolean",description:"If true, payments cannot ripple through this trustline."},frozen:{type:"boolean",description:"If true, the trustline is frozen, which means that funds can only be sent to the counterparty."},authorized:{type:"boolean",description:"If true, the counterparty authorizes this party to hold issuances from the counterparty."}},description:"Properties of the trustline from the perspective of the counterparty.",required:["limit"],additionalProperties:!1},state:{properties:{balance:{$ref:"signedValue",description:"The balance on the trustline, representing which party owes the other and by how much."}},description:"Properties of the trustline regarding it's current state that are not part of the specification.",required:["balance"],additionalProperties:!1}},required:["specification","counterparty","state"],additionalProperties:!1}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"signPaymentChannelClaim",type:"string",$ref:"signature",additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"verifyPaymentChannelClaim",type:"boolean",additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getBalancesParameters",description:"Parameters for getBalances",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get balances for."},options:{description:"Options to filter and determine which balances to return.",properties:{counterparty:{$ref:"address",description:"Only return balances with this counterparty."},currency:{$ref:"currency",description:"Only return balances for this currency."},limit:{type:"integer",minimum:1,description:"Return at most this many balances."},ledgerVersion:{$ref:"ledgerVersion",description:"Return balances as they were in this historical ledger version."}},additionalProperties:!1}},additionalProperties:!1,required:["address"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getBalanceSheetParameters",description:"Parameters for getBalanceSheet",type:"object",properties:{address:{$ref:"address",description:"The Ripple address of the account to get the balance sheet of."},options:{properties:{excludeAddresses:{type:"array",items:{$ref:"address"},uniqueItems:!0,description:"Addresses to exclude from the balance totals."},ledgerVersion:{$ref:"ledgerVersion",description:"Get the balance sheet as of this historical ledger version."}},description:"Options to determine how the balances will be calculated.",additionalProperties:!1}},additionalProperties:!1,required:["address"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getLedgerParameters",description:"Parameters for getLedger",type:"object",properties:{options:{description:"Options affecting what ledger and how much data to return.",properties:{ledgerVersion:{$ref:"ledgerVersion",description:"Get ledger data for this historical ledger version."},includeAllData:{type:"boolean",description:"Include full transactions and/or state information if `includeTransactions` and/or `includeState` is set."},includeTransactions:{type:"boolean",description:"Return an array of hashes for each transaction or an array of all transactions that were validated in this ledger version, depending on whether `includeAllData` is set."},includeState:{type:"boolean",description:"Return an array of hashes for all state data or an array of all state data in this ledger version, depending on whether `includeAllData` is set."}},additionalProperties:!1}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getOrdersParameters",description:"Parameters for getOrders",type:"object",properties:{address:{$ref:"address",description:"The Ripple address of the account to get open orders for."},options:{description:"Options that determine what orders will be returned.",properties:{limit:{type:"integer",minimum:1,description:"At most this many orders will be returned."},ledgerVersion:{$ref:"ledgerVersion",description:"Return orders as of this historical ledger version."}},additionalProperties:!1}},required:["address"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getOrderbookParameters",description:"Parameters for getOrderbook",type:"object",properties:{address:{$ref:"address",description:"Address of an account to use as point-of-view. (This affects which unfunded offers are returned.)"},orderbook:{$ref:"orderbook",description:"The order book to get."},options:{description:"Options to determine what to return.",properties:{limit:{type:"integer",minimum:1,description:"Return at most this many orders from the order book."},ledgerVersion:{$ref:"ledgerVersion",description:"Return the order book as of this historical ledger version."}},additionalProperties:!1}},required:["address","orderbook"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getPathsParameters",type:"object",properties:{pathfind:{description:"Specification of a pathfind request.",properties:{source:{description:"Properties of the source of funds.",type:"object",properties:{address:{$ref:"address",description:"The Ripple address of the account where funds will come from."},amount:{$ref:"laxAmount",description:"The amount of funds to send."},currencies:{description:"An array of currencies (with optional counterparty) that may be used in the payment paths.",type:"array",items:{description:"A currency with optional counterparty.",type:"object",properties:{currency:{$ref:"currency"},counterparty:{$ref:"address",description:"The counterparty for the currency; if omitted any counterparty may be used."}},required:["currency"],additionalProperties:!1},uniqueItems:!0}},not:{required:["amount","currencies"]},additionalProperties:!1,required:["address"]},destination:{description:"Properties of the destination of funds.",type:"object",properties:{address:{$ref:"address",description:"The address to send to."},amount:{$ref:"laxLaxAmount",description:"The amount to be received by the receiver (`value` may be ommitted if a source amount is specified)."}},required:["address","amount"],additionalProperties:!1}},required:["source","destination"],additionalProperties:!1}},additionalProperties:!1,required:["pathfind"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getPaymentChannelParameters",description:"Parameters for getPaymentChannel",type:"object",properties:{id:{$ref:"hash256",description:"256-bit hexadecimal channel identifier."}},additionalProperties:!1,required:["id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"api-options",type:"object",properties:{trace:{type:"boolean",description:"If true, log rippled requests and responses to stdout."},feeCushion:{type:"number",minimum:1,description:"Factor to multiply estimated fee by to provide a cushion in case the required fee rises during submission of a transaction. Defaults to `1.2`."},server:{type:"string",description:"URI for rippled websocket port to connect to. Must start with `wss://` or `ws://`.",format:"uri",pattern:"^wss?://"},proxy:{format:"uri",description:"URI for HTTP/HTTPS proxy to use to connect to the rippled server."},timeout:{type:"integer",description:"Timeout in milliseconds before considering a request to have failed.",minimum:1},proxyAuthorization:{type:"string",description:"Username and password for HTTP basic authentication to the proxy in the format **username:password**."},authorization:{type:"string",description:"Username and password for HTTP basic authentication to the rippled server in the format **username:password**."},trustedCertificates:{type:"array",description:"Array of PEM-formatted SSL certificates to trust when connecting to a proxy. This is useful if you want to use a self-signed certificate on the proxy server. Note: Each element must contain a single certificate; concatenated certificates are not valid.",items:{type:"string",description:"A PEM-formatted SSL certificate to trust when connecting to a proxy."}},key:{type:"string",description:"A string containing the private key of the client in PEM format. (Can be an array of keys)."},passphrase:{type:"string",description:"The passphrase for the private key of the client."},certificate:{type:"string",description:"A string containing the certificate key of the client in PEM format. (Can be an array of certificates)."}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getSettingsParameters",description:"Parameters for getSettings",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get the settings of."},options:{description:"Options that affect what to return.",properties:{ledgerVersion:{$ref:"ledgerVersion",description:"Get the settings as of this historical ledger version."}},additionalProperties:!1}},required:["address"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getAccountInfoParameters",description:"Parameters for getAccountInfo",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get the account info of."},options:{description:"Options that affect what to return.",properties:{ledgerVersion:{$ref:"ledgerVersion",description:"Get the account info as of this historical ledger version."}},additionalProperties:!1}},required:["address"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTransactionParameters",description:"Parameters for getTransaction",type:"object",properties:{id:{$ref:"id"},options:{description:"Options to limit the ledger versions to search.",properties:{minLedgerVersion:{$ref:"ledgerVersion",description:"The lowest ledger version to search."},maxLedgerVersion:{$ref:"ledgerVersion",description:"The highest ledger version to search"}},additionalProperties:!1}},additionalProperties:!1,required:["id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTransactionsParameters",description:"Parameters for getTransactions",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get transactions for."},options:{description:"Options to filter the resulting transactions.",properties:{start:{$ref:"hash256",description:"If specified, this transaction will be the first transaction in the result."},limit:{type:"integer",minimum:1,description:"If specified, return at most this many transactions."},minLedgerVersion:{$ref:"ledgerVersion",description:"Return only transactions in this ledger verion or higher."},maxLedgerVersion:{$ref:"ledgerVersion",description:"Return only transactions in this ledger version or lower."},earliestFirst:{type:"boolean",description:"If true, sort transactions so that the earliest ones come first. By default, the newest transactions will come first."},excludeFailures:{type:"boolean",description:"If true, the result will omit transactions that did not succeed."},initiated:{type:"boolean",description:"If true, return only transactions initiated by the account specified by `address`. If false, return only transactions not initiated by the account specified by `address`."},counterparty:{$ref:"address",description:"If provided, only return transactions with this account as a counterparty to the transaction."},types:{type:"array",items:{$ref:"transactionType"},description:"Only return transactions of the specified [Transaction Types](#transaction-types)."},binary:{type:"boolean",description:"If true, the transactions will be sent from the server in a condensed binary format rather than JSON."}},additionalProperties:!1,not:{anyOf:[{required:["start","minLedgerVersion"]},{required:["start","maxLedgerVersion"]}]}}},additionalProperties:!1,required:["address"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTrustlinesParameters",description:"Parameters for getTrustlines",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get trustlines for."},options:{description:"Options to filter and determine which trustlines to return.",properties:{counterparty:{$ref:"address",description:"Only return trustlines with this counterparty."},currency:{$ref:"currency",description:"Only return trustlines for this currency."},limit:{type:"integer",minimum:1,description:"Return at most this many trustlines."},ledgerVersion:{$ref:"ledgerVersion",description:"Return trustlines as they were in this historical ledger version."}},additionalProperties:!1}},additionalProperties:!1,required:["address"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"preparePaymentParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},payment:{$ref:"payment",description:"The specification of the payment to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","payment"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareOrderParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},order:{$ref:"order",description:"The specification of the order to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","order"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareTrustlineParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},trustline:{$ref:"trustline",description:"The specification of the trustline to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","trustline"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareOrderCancellationParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},orderCancellation:{$ref:"orderCancellation",description:"The specification of the order cancellation to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","orderCancellation"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareSettingsParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},settings:{$ref:"settings",description:"The specification of the settings to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","settings"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareEscrowCreationParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},escrowCreation:{$ref:"escrowCreation",description:"The specification of the escrow creation to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","escrowCreation"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareEscrowCancellationParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},escrowCancellation:{$ref:"escrowCancellation",description:"The specification of the escrow cancellation to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","escrowCancellation"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareEscrowExecutionParameters",type:"object",
|
||
properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},escrowExecution:{$ref:"escrowExecution",description:"The specification of the escrow execution to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","escrowExecution"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"preparePaymentChannelCreateParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},paymentChannelCreate:{$ref:"paymentChannelCreate",description:"The specification of the payment channel to create."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","paymentChannelCreate"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"preparePaymentChannelFundParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},paymentChannelFund:{$ref:"paymentChannelFund",description:"The channel to fund, and the details of how to fund it."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","paymentChannelFund"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"preparePaymentChannelClaimParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},paymentChannelClaim:{$ref:"paymentChannelClaim",description:"Details of the channel and claim."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","paymentChannelClaim"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"computeLedgerHashParameters",type:"object",properties:{ledger:{$ref:"getLedger",description:"The ledger header to hash."}},additionalProperties:!1,required:["ledger"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"signParameters",type:"object",properties:{txJSON:{type:"string",description:"Transaction represented as a JSON string in rippled format."},secret:{type:"string",format:"secret",description:"The secret of the account that is initiating the transaction."},options:{type:"object",description:"Options that control the type of signature that will be generated.",properties:{signAs:{$ref:"address",description:"The account that the signature should count for in multisigning."}},additionalProperties:!1}},additionalProperties:!1,required:["txJSON","secret"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"submitParameters",type:"object",properties:{signedTransaction:{$ref:"blob",description:"A signed transaction as returned by [sign](#sign)."}},additionalProperties:!1,required:["signedTransaction"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"generateAddressParameters",type:"object",properties:{options:{type:"object",description:"Options to control how the address and secret are generated.",properties:{entropy:{type:"array",items:{type:"integer",minimum:0,maximum:255},description:"The entropy to use to generate the seed."},algorithm:{type:"string","enum":["ecdsa-secp256k1","ed25519"],description:"The digital signature algorithm to generate an address for. Can be `ecdsa-secp256k1` (default) or `ed25519`."}},additionalProperties:!1}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"signPaymentChannelClaimParameters",type:"object",properties:{channel:{$ref:"hash256",description:"256-bit hexadecimal channel identifier."},amount:{$ref:"value",description:"Amount of XRP authorized by the claim."},privateKey:{$ref:"publicKey",description:"The private key to sign the payment channel claim."}},additionalProperties:!1,required:["channel","amount","privateKey"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"verifyPaymentChannelClaimParameters",type:"object",properties:{channel:{$ref:"hash256",description:"256-bit hexadecimal channel identifier."},amount:{$ref:"value",description:"Amount of XRP authorized by the claim."},signature:{$ref:"signature",description:"Signature of this claim."},publicKey:{$ref:"publicKey",description:"Public key of the channel's sender"}},additionalProperties:!1,required:["channel","amount","signature","publicKey"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"combineParameters",type:"object",properties:{signedTransactions:{type:"array",description:"An array of signed transactions (from the output of [sign](#sign)) to combine.",items:{type:"string",pattern:"^[A-F0-9]+$",description:"A single-signed transaction represented as an uppercase hexadecimal string (from the output of [sign](#sign))"},minLength:1}},additionalProperties:!1,required:["signedTransactions"]}},function(e,t,n){"use strict";function r(e,t){_.forEach(t,function(t,n){e[t]=e[n],delete e[n]})}function i(e){return e.request({command:"server_info"}).then(function(e){var t=c(e.info);return r(t,{hostid:"hostID"}),t.validatedLedger&&(r(t.validatedLedger,{baseFeeXrp:"baseFeeXRP",reserveBaseXrp:"reserveBaseXRP",reserveIncXrp:"reserveIncrementXRP",seq:"ledgerVersion"}),t.validatedLedger.baseFeeXRP=t.validatedLedger.baseFeeXRP.toString(),t.validatedLedger.reserveBaseXRP=t.validatedLedger.reserveBaseXRP.toString(),t.validatedLedger.reserveIncrementXRP=t.validatedLedger.reserveIncrementXRP.toString()),t})}function o(e,t){return(Number(t.validatedLedger.baseFeeXRP)*Number(t.loadFactor)*e).toString()}function s(e,t){return i(e).then(_.partial(o,t))}var _=n(300),a=n(303),c=a.convertKeysFromSnakeCaseToCamelCase;e.exports={getServerInfo:i,getFee:s}},function(e,t,n){"use strict";function r(){return this.connection.isConnected()}function i(){return this.connection.getLedgerVersion()}function o(){return this.connection.connect()}function s(){return this.connection.disconnect()}function a(){return f.serverInfo.getServerInfo(this.connection)}function c(){var e=this._feeCushion||1.2;return f.serverInfo.getFee(this.connection,e)}function u(e){return{baseFeeXRP:f.dropsToXrp(e.fee_base),ledgerHash:e.ledger_hash,ledgerVersion:e.ledger_index,ledgerTimestamp:f.rippleTimeToISO8601(e.ledger_time),reserveBaseXRP:f.dropsToXrp(e.reserve_base),reserveIncrementXRP:f.dropsToXrp(e.reserve_inc),transactionCount:e.txn_count,validatedLedgerVersions:e.validated_ledgers}}var f=n(302);e.exports={connect:o,disconnect:s,isConnected:r,getServerInfo:a,getFee:c,getLedgerVersion:i,formatLedgerClose:u}},function(e,t,n){"use strict";function r(e,t){if(t.date)return Promise.resolve(t);var n=t.ledger_index||t.LedgerSequence;if(!n)return new Promise(function(){throw new d.NotFoundError("ledger_index and LedgerSequence not found in tx")});var r={command:"ledger",ledger_index:n};return e.request(r).then(function(e){if("number"==typeof e.ledger.close_time)return _.assign({date:e.ledger.close_time},t);throw new d.UnexpectedError("Ledger missing close_time")})["catch"](function(e){if(e instanceof d.UnexpectedError)throw e;throw new d.NotFoundError("Transaction ledger not found")})}function i(e,t){return(!t.minLedgerVersion||e.ledger_index>=t.minLedgerVersion)&&(!t.maxLedgerVersion||e.ledger_index<=t.maxLedgerVersion)}function o(e,t,n){var r="txnNotFound"===n.message?new d.NotFoundError("Transaction not found"):n;return r instanceof d.NotFoundError?c.hasCompleteLedgerRange(e,t.minLedgerVersion,t.maxLedgerVersion).then(function(n){return n?r:c.isPendingLedgerVersion(e,t.maxLedgerVersion).then(function(e){return e?new d.PendingLedgerVersionError:new d.MissingLedgerHistoryError})}):Promise.resolve(r)}function s(e,t){if(t.validated!==!0||!i(t,e))throw new d.NotFoundError("Transaction not found");return u(t)}function a(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.getTransaction({id:e,options:n});var i={command:"tx",transaction:e,binary:!1};return c.ensureLedgerVersion.call(this,n).then(function(e){return t.connection.request(i).then(function(e){return r(t.connection,e)}).then(_.partial(s,e))["catch"](function(n){return o(t.connection,e,n).then(function(e){throw e})})})}var _=n(300),c=n(541),u=n(542),f=c.common,h=f.validate,d=f.errors;e.exports=a},function(e,t,n){"use strict";function r(e,t,n){return p(t<=n,"Illegal clamp bounds"),Math.min(Math.max(e,t),n)}function i(e,t,n){var r={command:"account_info",account:t,ledger_index:n};return e.request(r).then(function(e){return g(e.account_data.Balance)})}function o(e,t,n){return e(t,n).then(function(t){var r=n-t.results.length;return r>0&&void 0!==t.marker?o(e,t.marker,r).then(function(e){return t.results.concat(e)}):t.results.slice(0,n)})}function s(e,t){return o(e,void 0,t||1/0)}function a(e){if(void 0!==e){var t=void 0===e.counterparty?void 0!==e.issuer?e.issuer:void 0:e.counterparty,n=_.assign({},e,{issuer:t});return _.omit(n,"counterparty")}}function c(e){var t=a(e.taker_gets),n=a(e.taker_pays),r={taker_gets:t,taker_pays:n};return _.assign({},e,_.omit(r,_.isUndefined))}function u(e){return 0===e?0:e>0?1:-1}function f(e,t){return e.outcome&&t.outcome?e.outcome.ledgerVersion===t.outcome.ledgerVersion?u(e.outcome.indexInLedger-t.outcome.indexInLedger):e.outcome.ledgerVersion<t.outcome.ledgerVersion?-1:1:0}function h(e,t,n){var r=32570;return e.hasLedgerVersions(t||r,n)}function d(e,t){return e.getLedgerVersion().then(function(e){return e<(t||0)})}function l(e){return Boolean(e)&&void 0!==e.ledgerVersion&&null!==e.ledgerVersion?Promise.resolve(e):this.getLedgerVersion().then(function(t){return _.assign({},e,{ledgerVersion:t})})}var _=n(300),p=n(306),m=n(302),g=m.dropsToXrp;e.exports={getXRPBalance:i,ensureLedgerVersion:l,compareTransactions:f,renameCounterpartyToIssuerInOrder:c,getRecursive:s,hasCompleteLedgerRange:h,isPendingLedgerVersion:d,clamp:r,common:m}},function(e,t,n){"use strict";function r(e){var t={Payment:"payment",TrustSet:"trustline",OfferCreate:"order",OfferCancel:"orderCancellation",AccountSet:"settings",SetRegularKey:"settings",EscrowCreate:"escrowCreation",EscrowFinish:"escrowExecution",EscrowCancel:"escrowCancellation",PaymentChannelCreate:"paymentChannelCreate",PaymentChannelFund:"paymentChannelFund",PaymentChannelClaim:"paymentChannelClaim",SignerListSet:"settings",SetFee:"feeUpdate",EnableAmendment:"amendment"};return t[e]||null}function i(e){var t=r(e.TransactionType),n={payment:a,trustline:c,order:u,orderCancellation:f,settings:h,escrowCreation:d,escrowExecution:l,escrowCancellation:p,paymentChannelCreate:m,paymentChannelFund:g,paymentChannelClaim:v,feeUpdate:y,amendment:b},i=n[t];o(void 0!==i,"Unrecognized transaction type");var w=i(e),S=s.parseOutcome(e);return s.removeUndefined({type:t,address:e.Account,sequence:e.Sequence,id:e.hash,specification:s.removeUndefined(w),outcome:S?s.removeUndefined(S):void 0})}var o=n(306),s=n(543),a=n(550),c=n(551),u=n(552),f=n(553),h=n(554),d=n(556),l=n(557),p=n(558),m=n(559),g=n(560),v=n(561),y=n(562),b=n(563);e.exports=i},function(e,t,n){(function(t){"use strict";function r(e,t,n){var r="XRP"===n?-6:0,i="XRP"===t?-6:0,o=r-i;return 0===o?e:new g(e).shift(o).toString()}function i(e){if("number"==typeof e)return new g(e).shift(-9).toNumber()}function o(e){return e?m.common.rippleTimeToISO8601(e):void 0}function s(e){""===e.counterparty&&delete e.counterparty}function a(e){_.forEach(e,function(e){_.forEach(e,s)})}function c(e){_.forEach(e,function(e){_.forEach(e,function(e){_.forEach(e,s)})})}function u(e){return 0!==(e.Flags&m.common.txFlags.Payment.PartialPayment)}function f(e){if("Payment"===e.TransactionType&&"tesSUCCESS"===e.meta.TransactionResult&&(!e.meta.delivered_amount||"unavailable"!==e.meta.delivered_amount))return e.meta.delivered_amount?v(e.meta.delivered_amount):e.meta.DeliveredAmount?v(e.meta.DeliveredAmount):e.Amount&&!u(e)?v(e.Amount):e.Amount&&e.ledger_index>4594094?v(e.Amount):void 0}function h(e){var t=e.meta||e.metaData;if(t){var n=p.parseBalanceChanges(t),r=p.parseOrderbookChanges(t);return a(n),c(r),m.common.removeUndefined({result:e.meta.TransactionResult,timestamp:o(e.date),fee:m.common.dropsToXrp(e.Fee),balanceChanges:n,orderbookChanges:r,ledgerVersion:e.ledger_index,indexInLedger:e.meta.TransactionIndex,deliveredAmount:f(e)})}}function d(e){return e?new t(e,"hex").toString("utf-8"):void 0}function l(e){if(Array.isArray(e.Memos)&&0!==e.Memos.length)return e.Memos.map(function(e){return m.common.removeUndefined({type:e.Memo.parsed_memo_type||d(e.Memo.MemoType),format:e.Memo.parsed_memo_format||d(e.Memo.MemoFormat),data:e.Memo.parsed_memo_data||d(e.Memo.MemoData)})})}var _=n(300),p=n(544),m=n(541),g=n(304),v=n(549);e.exports={parseQuality:i,parseOutcome:h,parseMemos:l,hexToString:d,parseTimestamp:o,adjustQualityForXRP:r,isPartialPayment:u,dropsToXrp:m.common.dropsToXrp,constants:m.common.constants,txFlags:m.common.txFlags,removeUndefined:m.common.removeUndefined,rippleTimeToISO8601:m.common.rippleTimeToISO8601}}).call(t,n(312).Buffer)},function(e,t,n){e.exports.parseBalanceChanges=n(545).parseBalanceChanges,e.exports.parseOrderbookChanges=n(547).parseOrderbookChanges,e.exports.getAffectedAccounts=n(546).getAffectedAccounts},function(e,t,n){function r(e){return new f(e.value||e)}function i(e){return e.newFields.Balance?r(e.newFields.Balance):e.previousFields.Balance&&e.finalFields.Balance?r(e.finalFields.Balance).minus(r(e.previousFields.Balance)):new f(0)}function o(e){var t=i(e);return t.isZero()?null:{address:e.finalFields.Account||e.newFields.Account,balance_change:{counterparty:"",currency:"XRP",value:d(t).toString()}}}function s(e){var t=new f(e.balance_change.value).negated();return{address:e.balance_change.counterparty,balance_change:{counterparty:e.address,currency:e.balance_change.currency,value:t.toString()}}}function a(e){var t=i(e);if(t.isZero())return null;var n=_.isEmpty(e.newFields)?e.finalFields:e.newFields,r={address:n.LowLimit.issuer,balance_change:{counterparty:n.HighLimit.issuer,currency:n.Balance.currency,value:t.toString()}};return[r,s(r)]}function c(e){var t=_.groupBy(e,function(e){return e.address});return _.mapValues(t,function(e){return _.map(e,function(e){return e.balance_change})})}function u(e){var t=h(e).map(function(e){return"AccountRoot"===e.entryType?[o(e)]:"RippleState"===e.entryType?a(e):[]});return c(_.compact(_.flatten(t)))}var _=n(300),f=n(304),h=n(546).normalizeNodes,d=n(546).dropsToXRP;e.exports.parseBalanceChanges=u},function(e,t,n){"use strict";function r(e){return e.dividedBy(1e6)}function i(e){var t=Object.keys(e)[0],n=e[t];return{diffType:t,entryType:n.LedgerEntryType,ledgerIndex:n.LedgerIndex,newFields:n.NewFields||{},finalFields:n.FinalFields||{},previousFields:n.PreviousFields||{}}}function o(e){return e.AffectedNodes?e.AffectedNodes.map(i):[]}function s(e){if(void 0!==e)return"string"==typeof e?{currency:"XRP",value:r(new f(e)).toString()}:{currency:e.currency,counterparty:e.issuer,value:e.value}}function a(e){var t=["Account","Owner","Destination","Issuer","Target"];return _.includes(t,e)}function c(e){var t=["LowLimit","HighLimit","TakerPays","TakerGets"];return _.includes(t,e)}function u(e){var t=[];return _.forEach(o(e),function(e){var n="CreatedNode"===e.diffType?e.newFields:e.finalFields;_.forEach(n,function(e,n){a(n)?t.push(e):c(n)&&e.issuer&&t.push(e.issuer)})}),_.uniq(t)}var _=n(300),f=n(304);e.exports={dropsToXRP:r,normalizeNodes:o,parseCurrencyAmount:s,getAffectedAccounts:u}},function(e,t,n){"use strict";function r(e){return _.omit(e,_.isUndefined)}function i(e){var t=e.taker_gets,n=e.taker_pays,i=e.sell?"sell":"buy",o="buy"===i?n:t,s="buy"===i?t:n;return r({direction:i,quantity:o,totalPrice:s,sequence:e.sequence,status:e.status,makerExchangeRate:e.quality,expirationTime:e.expiration})}function o(e){return 1e3*(e+946684800)}function s(e){var t=e.finalFields.Expiration||e.newFields.Expiration;if(void 0!==t)return new Date(o(t)).toISOString()}function a(e){var t=e.finalFields.TakerGets||e.newFields.TakerGets,n=e.finalFields.TakerPays||e.newFields.TakerPays,r=t.currency||"XRP",i=n.currency||"XRP",o=e.finalFields.BookDirectory||e.newFields.BookDirectory,s=o.substring(o.length-16);return g(s,r,i)}function c(e){return"CreatedNode"===e.diffType?"created":"ModifiedNode"===e.diffType?"partially-filled":"DeletedNode"===e.diffType?e.previousFields.hasOwnProperty("TakerPays")?"filled":"cancelled":void 0}function u(e,t){if(t){var n=new m(e.value),r=new m(t.value);return n.minus(r).abs().toString()}return"0"}function f(e,t){var n=c(e);if("cancelled"===n)return l.parseCurrencyAmount(e.finalFields[t]);if("created"===n)return l.parseCurrencyAmount(e.newFields[t]);var r=l.parseCurrencyAmount(e.finalFields[t]),i=l.parseCurrencyAmount(e.previousFields[t]),o=u(r,i);return _.assign({},r,{value:o})}function h(e){var t=i({taker_pays:f(e,"TakerPays"),taker_gets:f(e,"TakerGets"),sell:0!==(e.finalFields.Flags&v),sequence:e.finalFields.Sequence||e.newFields.Sequence,status:c(e),quality:a(e),expiration:s(e)});return Object.defineProperty(t,"account",{value:e.finalFields.Account||e.newFields.Account}),t}function d(e){return _.groupBy(e,function(e){return e.account})}var _=n(300),l=n(546),p=n(304),m=p.another({DECIMAL_PLACES:40}),g=n(548),v=131072;t.parseOrderbookChanges=function(e){var t=l.normalizeNodes(e),n=_.map(_.filter(t,function(e){return"Offer"===e.entryType}),h);return d(n)}},function(e,t,n){"use strict";function r(e,t,n){var r="XRP"===n?-6:0,i="XRP"===t?-6:0,o=r-i;return 0===o?new s(e).toString():new s(e).shift(o).toString()}function i(e,t,n){o(16===e.length);var i=new s(e.substring(2),16),a=parseInt(e.substring(0,2),16)-100,c=i.toString()+"e"+a.toString();return r(c,t,n)}var o=n(306),s=n(304);e.exports=i},function(e,t,n){"use strict";function r(e){return"string"==typeof e?{currency:"XRP",value:i.common.dropsToXrp(e)}:{currency:e.currency,value:e.value,counterparty:e.issuer}}var i=n(541);e.exports=r},function(e,t,n){"use strict";function r(e){return 0!==(e.Flags&f.Payment.NoRippleDirect)}function i(e){return 0!==(e.Flags&f.Payment.LimitQuality)}function o(e,t){return e.counterparty===t?_.omit(e,"counterparty"):e}function s(e){a("Payment"===e.TransactionType);var t={address:e.Account,maxAmount:o(u(e.SendMax||e.Amount),e.Account),tag:e.SourceTag},n={address:e.Destination,amount:o(u(e.Amount),e.Destination),tag:e.DestinationTag};return c.removeUndefined({source:c.removeUndefined(t),destination:c.removeUndefined(n),memos:c.parseMemos(e),invoiceID:e.InvoiceID,paths:e.Paths?JSON.stringify(e.Paths):void 0,allowPartialPayment:c.isPartialPayment(e)||void 0,noDirectRipple:r(e)||void 0,limitQuality:i(e)||void 0})}var _=n(300),a=n(306),c=n(543),u=n(549),f=c.txFlags;e.exports=s},function(e,t,n){"use strict";function r(e,t,n){return!!(e&t)||!(e&n)&&void 0}function i(e){return o("TrustSet"===e.TransactionType),s.removeUndefined({limit:e.LimitAmount.value,currency:e.LimitAmount.currency,counterparty:e.LimitAmount.issuer,qualityIn:s.parseQuality(e.QualityIn),qualityOut:s.parseQuality(e.QualityOut),ripplingDisabled:r(e.Flags,a.SetNoRipple,a.ClearNoRipple),frozen:r(e.Flags,a.SetFreeze,a.ClearFreeze),authorized:r(e.Flags,a.SetAuth,0)})}var o=n(306),s=n(543),a=s.txFlags.TrustSet;e.exports=i},function(e,t,n){"use strict";function r(e){i("OfferCreate"===e.TransactionType);var t=0===(e.Flags&a.Sell)?"buy":"sell",n=s(e.TakerGets),r=s(e.TakerPays),c="buy"===t?r:n,u="buy"===t?n:r;return o.removeUndefined({direction:t,quantity:c,totalPrice:u,passive:0!==(e.Flags&a.Passive)||void 0,immediateOrCancel:0!==(e.Flags&a.ImmediateOrCancel)||void 0,fillOrKill:0!==(e.Flags&a.FillOrKill)||void 0,expirationTime:o.parseTimestamp(e.Expiration)})}var i=n(306),o=n(543),s=n(549),a=o.txFlags.OfferCreate;e.exports=r},function(e,t,n){"use strict";function r(e){return i("OfferCancel"===e.TransactionType),{orderSequence:e.OfferSequence}}var i=n(306);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.meta.AffectedNodes.filter(function(e){return"AccountRoot"===e.ModifiedNode.LedgerEntryType});return s(1===t.length),t[0].ModifiedNode}function i(e){var t={};if("AccountSet"!==e.TransactionType)return t;var n=r(e),i=_.get(n.PreviousFields,"Flags"),o=_.get(n.FinalFields,"Flags");if(void 0!==i&&void 0!==o){var s=i^o,c=o&s,u=i&s;_.forEach(a,function(e,n){c&e?t[n]=!0:u&e&&(t[n]=!1)})}var f=_.get(n.PreviousFields,"AccountTxnID"),h=_.get(n.FinalFields,"AccountTxnID");return h&&!f?t.enableTransactionIDTracking=!0:f&&!h&&(t.enableTransactionIDTracking=!1),t}function o(e){var t=e.TransactionType;return s("AccountSet"===t||"SetRegularKey"===t||"SignerListSet"===t),_.assign({},i(e),c(e))}var _=n(300),s=n(306),a=n(543).constants.AccountFlags,c=n(555);e.exports=o},function(e,t,n){(function(t){"use strict";function r(e,n){return"hex"!==e.encoding||e.length?e.shift?new o(n).shift(-e.shift).toNumber():n:new t(n,"hex").toString("ascii")}function i(e){var t={};for(var n in s){var i=e[n];if(void 0!==i){var o=s[n];t[o.name]=r(o,i)}}return e.RegularKey&&(t.regularKey=e.RegularKey),(e.SignerQuorum||e.SignerEntries)&&(t.signers={},e.SignerQuorum&&(t.signers.threshold=e.SignerQuorum),e.SignerEntries&&(t.signers.weights=_.map(e.SignerEntries,function(e){return{address:e.SignerEntry.Account,weight:e.SignerEntry.SignerWeight}}))),t}var _=n(300),o=n(304),s=n(543).constants.AccountFields;e.exports=i}).call(t,n(312).Buffer)},function(e,t,n){"use strict";function r(e){return i("EscrowCreate"===e.TransactionType),o.removeUndefined({amount:s(e.Amount).value,destination:e.Destination,memos:o.parseMemos(e),condition:e.Condition,allowCancelAfter:o.parseTimestamp(e.CancelAfter),allowExecuteAfter:o.parseTimestamp(e.FinishAfter),sourceTag:e.SourceTag,destinationTag:e.DestinationTag})}var i=(n(300),n(306)),o=n(543),s=n(549);e.exports=r},function(e,t,n){"use strict";function r(e){return i("EscrowFinish"===e.TransactionType),o.removeUndefined({memos:o.parseMemos(e),owner:e.Owner,escrowSequence:e.OfferSequence,condition:e.Condition,fulfillment:e.Fulfillment})}var i=n(306),o=n(543);e.exports=r},function(e,t,n){"use strict";function r(e){return i("EscrowCancel"===e.TransactionType),o.removeUndefined({memos:o.parseMemos(e),owner:e.Owner,escrowSequence:e.OfferSequence})}var i=n(306),o=n(543);e.exports=r},function(e,t,n){"use strict";function r(e){return i("PaymentChannelCreate"===e.TransactionType),o.removeUndefined({amount:s(e.Amount).value,destination:e.Destination,settleDelay:e.SettleDelay,publicKey:e.PublicKey,cancelAfter:e.CancelAfter&&o.parseTimestamp(e.CancelAfter),sourceTag:e.SourceTag,destinationTag:e.DestinationTag})}var i=n(306),o=n(543),s=n(549);e.exports=r},function(e,t,n){"use strict";function r(e){return i("PaymentChannelFund"===e.TransactionType),o.removeUndefined({channel:e.Channel,amount:s(e.Amount).value,expiration:e.Expiration&&o.parseTimestamp(e.Expiration)})}var i=n(306),o=n(543),s=n(549);e.exports=r},function(e,t,n){"use strict";function r(e){return i("PaymentChannelClaim"===e.TransactionType),o.removeUndefined({channel:e.Channel,balance:e.Balance&&s(e.Balance).value,amount:e.Amount&&s(e.Amount).value,signature:e.Signature,publicKey:e.PublicKey,renew:Boolean(e.Flags&a.Renew)||void 0,close:Boolean(e.Flags&a.Close)||void 0})}var i=n(306),o=n(543),s=n(549),a=o.txFlags.PaymentChannelClaim;e.exports=r},function(e,t,n){"use strict";function r(e){var t=new i(e.BaseFee,16).toString();return{baseFeeXRP:s(t),referenceFeeUnits:e.ReferenceFeeUnits,reserveBaseXRP:s(e.ReserveBase),reserveIncrementXRP:s(e.ReserveIncrement)}}var i=n(304),o=n(543),s=o.dropsToXrp;e.exports=r},function(e,t){"use strict";function n(e){return{amendment:e.Amendment}}e.exports=n},function(e,t,n){"use strict";function r(e){var t=p.decode(e.tx_blob);return t.hash=g(t),t.ledger_index=e.ledger_index,{tx:t,meta:p.decode(e.meta),validated:e.validated}}function i(e){var t=e.tx_blob?r(e):e;return y(_.assign({},t.tx,{meta:t.meta,validated:t.validated}))}function o(e,t){return!!(t.address===e.counterparty||t.specification&&(t.specification.destination&&t.specification.destination.address===e.counterparty||t.specification.counterparty===e.counterparty))}function s(e,t,n){return(!t.excludeFailures||"tesSUCCESS"===n.outcome.result)&&(!(t.types&&!_.includes(t.types,n.type))&&((t.initiated!==!0||n.address===e)&&((t.initiated!==!1||n.address!==e)&&!(t.counterparty&&!o(t,n)))))}function a(e,t){return!e.startTx||(e.earliestFirst?v.compareTransactions(t,e.startTx)>0:v.compareTransactions(t,e.startTx)<0)}function c(e,t,n){return{marker:n.marker,results:n.transactions.filter(function(e){return e.validated}).map(i).filter(_.partial(s,e,t)).filter(_.partial(a,t))}}function u(e,t,n,r,i){var o={command:"account_tx",account:t,ledger_index_min:n.minLedgerVersion||-1,ledger_index_max:n.maxLedgerVersion||-1,forward:n.earliestFirst,binary:n.binary,limit:v.clamp(i,10,400),marker:r};return e.request(o).then(function(e){return c(t,n,e)})}function f(e,t,n){var r=t.minLedgerVersion,i=t.maxLedgerVersion;return t.limit&&n.length===t.limit&&(t.earliestFirst?i=_.last(n).outcome.ledgerVersion:r=_.last(n).outcome.ledgerVersion),v.hasCompleteLedgerRange(e,r,i).then(function(e){if(!e)throw new v.common.errors.MissingLedgerHistoryError})}function h(e,t,n){var r=t.earliestFirst?v.compareTransactions:_.rearg(v.compareTransactions,1,0),i=n.sort(r);return f(e,t,i).then(function(){return i})}function d(e,t,n){var r=_.partial(u,e,t,n),i=_.partial(h,e,n);return v.getRecursive(r,n.limit).then(i)}function l(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w.getTransactions({address:e,options:n});var r={maxLedgerVersion:-1};if(n.start)return b.call(this,n.start).then(function(i){var o=i.outcome.ledgerVersion,s=n.earliestFirst?{minLedgerVersion:o}:{maxLedgerVersion:o},a=_.assign({},r,n,{startTx:i},s);return d(t.connection,e,a)});var i=_.assign({},r,n);return d(this.connection,e,i)}var _=n(300),p=n(565),m=n(614),g=m.computeTransactionHash,v=n(541),y=n(542),b=n(540),w=v.common.validate;e.exports=l},function(e,t,n){"use strict";function r(e){return h("string"==typeof e,"binary must be a hex string"),b(e)}function i(e){return h("object"===("undefined"==typeof e?"undefined":f(e))),m(w(e))}function o(e){return h("object"===("undefined"==typeof e?"undefined":f(e))),m(g(e))}function s(e){return h("object"===("undefined"==typeof e?"undefined":f(e))),m(v(e))}function a(e,t){return h("object"===("undefined"==typeof e?"undefined":f(e))),h.equal(e.SigningPubKey,""),m(y(e,t))}function c(e){return h("string"==typeof e),m(l.encode(e))}function u(e){return h("string"==typeof e),l.decode(e).toString()}var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},h=n(306),d=n(566),l=d.quality,p=d.binary,m=p.bytesToHex,g=p.signingData,v=p.signingClaimData,y=p.multiSigningData,b=p.binaryToJSON,w=p.serializeObject;e.exports={decode:r,encode:i,encodeForSigning:o,encodeForSigningClaim:s,encodeForMultisigning:a,encodeQuality:c,decodeQuality:u}},function(e,t,n){"use strict";var _=n(300),r=n(567),i=r.Field,o=n(571),s=n(593),a=n(610),c=a.ShaMap,u=n(611),f=n(596),h=n(612),d=n(613),l=n(594),p=l.HashPrefix;e.exports=_.assign({hashes:_.assign({},f,u),binary:s,enums:r,signing:d,quality:h,Field:i,HashPrefix:p,ShaMap:c},o)},function(e,t,n){"use strict";function r(e,t){return _.transform(t,e)}function i(e,t){return _.transform(e,function(e,n,r){e[r]=n,e[n[t]]=n})}function o(e,t){return d({inherits:p,statics:_.assign(t,{enumName:e})})}function s(e,t,n){e[n]=o(n,t)}var a=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=n(306),_=n(300),u=n(568),f=u.parseBytes,h=u.serializeUIntN,d=n(569),l=n(570),p=d({EnumType:function(e){_.assign(this,e),c(this.bytes instanceof Uint8Array),c("number"==typeof this.ordinal),c("string"==typeof this.name)},toString:function(){return this.name},toJSON:function(){return this.name},toBytesSink:function(e){e.put(this.bytes)},statics:{ordinalByteWidth:1,fromParser:function(e){return this.from(e.readUIntN(this.ordinalByteWidth))},from:function(e){var t=e instanceof this?e:this[e];if(!t)throw new Error(e+" is not a valid name or ordinal for "+this.enumName);return t},valuesByName:function(){var e=this;return _.transform(this.initVals,function(t,n,r){var i=h(n,e.ordinalByteWidth),o=new e({name:r,ordinal:n,bytes:i});t[r]=o})},init:function(){var e=this.valuesByName();return _.assign(this,i(e,"ordinal")),this.values=_.values(e),this}}}),m=r(s,{Type:{initVals:l.TYPES},LedgerEntryType:{initVals:l.LEDGER_ENTRY_TYPES,ordinalByteWidth:2},TransactionType:{initVals:l.TRANSACTION_TYPES,ordinalByteWidth:2},TransactionResult:{initVals:l.TRANSACTION_RESULTS,ordinalByteWidth:1}});m.Field=d({inherits:p,statics:{enumName:"Field",initVals:l.FIELDS,valuesByName:function(){var e=this,t=_.map(this.initVals,function(t){var n=a(t,2),r=n[0],i=n[1],o=m.Type[i.type],s=e.header(o.ordinal,i.nth),c=o.ordinal<<16|i.nth,u={ordinal:c,name:r,type:o,bytes:s};return new e(_.assign(i,u))});return _.keyBy(t,"name")},header:function g(e,t){var n=t,g=[],r=g.push.bind(g);return e<16?n<16?r(e<<4|n):r(e<<4,n):n<16?r(n,e):r(0,e,n),f(g,Uint8Array)}}}),e.exports=m},function(e,t,n){"use strict";function r(e,t){return e<t?-1:e===t?0:1}function i(e){for(var t=Array(e.length),n=e.length-1;n>=0;n--)t[n]=d[e[n]];return t.join("")}function o(e){var t=h[e];if(void 0===t)throw new Error("`"+e+"` is not a valid hex representation of a byte");return t}function s(e){var t=arguments.length<=1||void 0===arguments[1]?Array:arguments[1];if(!e||void 0===e.length)throw new Error(e+" is not a sequence");if("string"==typeof e){for(var n=e.length%2,r=new t((e.length+n)/2),i=e.length,s=r.length-1;s>=n;i-=2,s--)r[s]=o(e.slice(i-2,i));return 1===n&&(r[0]=o(e[0])),r}if(e instanceof t)return e;if(t===Uint8Array)return new t(e);for(var a=new t(e.length),c=e.length-1;c>=0;c--)a[c]=e[c];return a}function a(e,t){for(var n=new Uint8Array(t),r=t-1,i=0;i<t;i++)n[r-i]=e>>>8*i&255;return n}function c(e,t){f(e.length===t.length);for(var n=0;n<e.length;n++){var i=r(e[n],t[n]);if(0!==i)return i}return 0}function u(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=arguments.length<=2||void 0===arguments[2]?e.length:arguments[2],r=arguments.length<=3||void 0===arguments[3]?e.constructor:arguments[3];t<0&&(t+=e.length),n<0&&(n+=e.length);for(var i=n-t,o=new r(i),s=n-1;s>=t;s--)o[s-t]=e[s];return o}var f=n(306),h=function(){for(var e={},t=e.reverse=new Array(256),n=0;n<16;n++){var r=n.toString(16).toUpperCase();e[r]=n;for(var i=0;i<16;i++){var o=i.toString(16).toUpperCase(),s=(n<<4)+i,a=r+o;e[a]=s,t[s]=a}}return e}(),d=h.reverse;e.exports={parseBytes:s,bytesToHex:i,slice:u,compareBytes:c,serializeUIntN:a}},function(e,t,n){"use strict";function r(e,t){Object.keys(e||{}).forEach(function(n){t(e[n],n)})}function i(e){return Array.isArray(e)?e:[e]}var _=n(300),o=n(309);e.exports=function(e,t){function n(e,t,n){f[t]=n||e}var s=t||e,a="function"==typeof e?e:null;if(null===a)for(var c in s)if(c[0].match(/[A-Z]/)){a=s[c];break}var u=s.inherits;u&&(null===a&&(a=function(){u.apply(this,arguments)}),o(a,u),_.defaults(a,u)),null===a&&(a=function(){});var f=a.prototype;return(s.getters||[]).forEach(function(e){var t="_"+e;f[e]=function(){return this[t]}}),r(s.virtuals,function(e,t){n(e,t,function(){throw new Error("unimplemented")})}),r(s.methods,n),r(s,function(e,t){_.isFunction(e)&&e!==a&&n(e,t)}),_.assign(a,s.statics),"function"==typeof a.init&&a.init(),r(s.cached,function(e,t){var r="_"+t;n(e,t,function(){var t=this[r];return void 0===t&&(t=this[r]=e.call(this)),t})}),s.mixins&&!function(){var e={};i(s.mixins).reverse().forEach(function(t){
|
||
_.defaults(e,t)}),_.defaults(f,e)}(),a}},function(e,t){e.exports={TYPES:{Validation:10003,Done:-1,Hash128:4,Blob:7,AccountID:8,Amount:6,Hash256:5,UInt8:16,Vector256:19,STObject:14,Unknown:-2,Transaction:10001,Hash160:17,PathSet:18,LedgerEntry:10002,UInt16:1,NotPresent:0,UInt64:3,UInt32:2,STArray:15},LEDGER_ENTRY_TYPES:{Ticket:84,LedgerHashes:104,Amendments:102,SignerList:83,Offer:111,AccountRoot:97,RippleState:114,FeeSettings:115,Escrow:117,DirectoryNode:100,GeneratorMap:103,Contract:99,PayChannel:120,Invalid:-1},FIELDS:[["Generic",{nth:0,isVLEncoded:!1,isSerialized:!1,isSigningField:!1,type:"Unknown"}],["Invalid",{nth:-1,isVLEncoded:!1,isSerialized:!1,isSigningField:!1,type:"Unknown"}],["LedgerEntryType",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt16"}],["TransactionType",{nth:2,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt16"}],["SignerWeight",{nth:3,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt16"}],["Flags",{nth:2,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["SourceTag",{nth:3,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["Sequence",{nth:4,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["PreviousTxnLgrSeq",{nth:5,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LedgerSequence",{nth:6,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["CloseTime",{nth:7,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ParentCloseTime",{nth:8,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["SigningTime",{nth:9,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["Expiration",{nth:10,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["TransferRate",{nth:11,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["WalletSize",{nth:12,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["OwnerCount",{nth:13,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["DestinationTag",{nth:14,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["HighQualityIn",{nth:16,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["HighQualityOut",{nth:17,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LowQualityIn",{nth:18,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LowQualityOut",{nth:19,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["QualityIn",{nth:20,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["QualityOut",{nth:21,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["StampEscrow",{nth:22,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["BondAmount",{nth:23,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LoadFee",{nth:24,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["OfferSequence",{nth:25,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["FirstLedgerSequence",{nth:26,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LastLedgerSequence",{nth:27,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["TransactionIndex",{nth:28,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["OperationLimit",{nth:29,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ReferenceFeeUnits",{nth:30,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ReserveBase",{nth:31,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ReserveIncrement",{nth:32,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["SetFlag",{nth:33,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ClearFlag",{nth:34,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["SignerQuorum",{nth:35,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["CancelAfter",{nth:36,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["FinishAfter",{nth:37,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["IndexNext",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt64"}],["IndexPrevious",{nth:2,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt64"}],["BookNode",{nth:3,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt64"}],["OwnerNode",{nth:4,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt64"}],["BaseFee",{nth:5,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt64"}],["ExchangeRate",{nth:6,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt64"}],["LowNode",{nth:7,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt64"}],["HighNode",{nth:8,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt64"}],["EmailHash",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash128"}],["LedgerHash",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["ParentHash",{nth:2,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["TransactionHash",{nth:3,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["AccountHash",{nth:4,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["PreviousTxnID",{nth:5,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["LedgerIndex",{nth:6,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["WalletLocator",{nth:7,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["RootIndex",{nth:8,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["AccountTxnID",{nth:9,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["BookDirectory",{nth:16,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["InvoiceID",{nth:17,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["Nickname",{nth:18,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["Amendment",{nth:19,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["TicketID",{nth:20,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["Digest",{nth:21,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["hash",{nth:257,isVLEncoded:!1,isSerialized:!1,isSigningField:!1,type:"Hash256"}],["index",{nth:258,isVLEncoded:!1,isSerialized:!1,isSigningField:!1,type:"Hash256"}],["Amount",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["Balance",{nth:2,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["LimitAmount",{nth:3,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["TakerPays",{nth:4,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["TakerGets",{nth:5,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["LowLimit",{nth:6,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["HighLimit",{nth:7,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["Fee",{nth:8,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["SendMax",{nth:9,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["DeliverMin",{nth:10,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["MinimumOffer",{nth:16,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["RippleEscrow",{nth:17,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["DeliveredAmount",{nth:18,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Amount"}],["taker_gets_funded",{nth:258,isVLEncoded:!1,isSerialized:!1,isSigningField:!1,type:"Amount"}],["taker_pays_funded",{nth:259,isVLEncoded:!1,isSerialized:!1,isSigningField:!1,type:"Amount"}],["PublicKey",{nth:1,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["MessageKey",{nth:2,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["SigningPubKey",{nth:3,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["TxnSignature",{nth:4,isVLEncoded:!0,isSerialized:!0,isSigningField:!1,type:"Blob"}],["Generator",{nth:5,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["Signature",{nth:6,isVLEncoded:!0,isSerialized:!0,isSigningField:!1,type:"Blob"}],["Domain",{nth:7,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["FundCode",{nth:8,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["RemoveCode",{nth:9,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["ExpireCode",{nth:10,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["CreateCode",{nth:11,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["MemoType",{nth:12,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["MemoData",{nth:13,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["MemoFormat",{nth:14,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["Fulfillment",{nth:16,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["Condition",{nth:17,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Blob"}],["MasterSignature",{nth:18,isVLEncoded:!0,isSerialized:!0,isSigningField:!1,type:"Blob"}],["Account",{nth:1,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"AccountID"}],["Owner",{nth:2,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"AccountID"}],["Destination",{nth:3,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"AccountID"}],["Issuer",{nth:4,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"AccountID"}],["Target",{nth:7,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"AccountID"}],["RegularKey",{nth:8,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"AccountID"}],["ObjectEndMarker",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["TransactionMetaData",{nth:2,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["CreatedNode",{nth:3,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["DeletedNode",{nth:4,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["ModifiedNode",{nth:5,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["PreviousFields",{nth:6,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["FinalFields",{nth:7,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["NewFields",{nth:8,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["TemplateEntry",{nth:9,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["Memo",{nth:10,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["SignerEntry",{nth:11,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["Signer",{nth:16,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["Majority",{nth:18,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STObject"}],["ArrayEndMarker",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STArray"}],["Signers",{nth:3,isVLEncoded:!1,isSerialized:!0,isSigningField:!1,type:"STArray"}],["SignerEntries",{nth:4,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STArray"}],["Template",{nth:5,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STArray"}],["Necessary",{nth:6,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STArray"}],["Sufficient",{nth:7,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STArray"}],["AffectedNodes",{nth:8,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STArray"}],["Memos",{nth:9,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STArray"}],["Majorities",{nth:16,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"STArray"}],["CloseResolution",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt8"}],["Method",{nth:2,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt8"}],["TransactionResult",{nth:3,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt8"}],["TakerPaysCurrency",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash160"}],["TakerPaysIssuer",{nth:2,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash160"}],["TakerGetsCurrency",{nth:3,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash160"}],["TakerGetsIssuer",{nth:4,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash160"}],["Paths",{nth:1,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"PathSet"}],["Indexes",{nth:1,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Vector256"}],["Hashes",{nth:2,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Vector256"}],["Amendments",{nth:3,isVLEncoded:!0,isSerialized:!0,isSigningField:!0,type:"Vector256"}],["Transaction",{nth:1,isVLEncoded:!1,isSerialized:!1,isSigningField:!1,type:"Transaction"}],["LedgerEntry",{nth:1,isVLEncoded:!1,isSerialized:!1,isSigningField:!1,type:"LedgerEntry"}],["Validation",{nth:1,isVLEncoded:!1,isSerialized:!1,isSigningField:!1,type:"Validation"}],["SignerListID",{nth:38,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["SettleDelay",{nth:39,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt32"}],["Channel",{nth:22,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"Hash256"}],["TickSize",{nth:16,isVLEncoded:!1,isSerialized:!0,isSigningField:!0,type:"UInt8"}]],TRANSACTION_RESULTS:{tecINSUFFICIENT_RESERVE:141,telNO_DST_PARTIAL:-393,tecUNFUNDED_PAYMENT:104,tecNO_TARGET:138,temBAD_SRC_ACCOUNT:-281,tefPAST_SEQ:-189,terNO_ACCOUNT:-96,temREDUNDANT:-275,tefCREATED:-194,temDST_IS_SRC:-279,terRETRY:-99,temINVALID_FLAG:-276,temBAD_SEND_XRP_LIMIT:-288,terNO_LINE:-94,tefBAD_AUTH:-196,temBAD_EXPIRATION:-295,tecNO_ISSUER:133,temBAD_SEND_XRP_NO_DIRECT:-286,temBAD_SEND_XRP_PATHS:-284,tefBAD_LEDGER:-195,tefNO_AUTH_REQUIRED:-190,tecINSUF_RESERVE_LINE:122,terOWNERS:-93,tecNO_REGULAR_KEY:131,tecINSUFF_FEE:136,tecNO_ALTERNATIVE_KEY:130,tecNO_ENTRY:140,terLAST:-91,terNO_RIPPLE:-90,tecNO_PERMISSION:139,tecNEED_MASTER_KEY:142,temBAD_FEE:-294,terPRE_SEQ:-92,tecOVERSIZE:145,tecCRYPTOCONDITION_ERROR:146,tefMASTER_DISABLED:-187,temBAD_CURRENCY:-296,tefDST_TAG_NEEDED:-193,tecUNFUNDED_ADD:102,tecOWNERS:132,tecNO_LINE_REDUNDANT:127,temBAD_SIGNATURE:-282,tefFAILURE:-199,telBAD_PATH_COUNT:-397,temBAD_TRANSFER_RATE:-280,tefWRONG_PRIOR:-188,tecNO_DST:124,tecNO_AUTH:134,telBAD_DOMAIN:-398,temBAD_AMOUNT:-298,temBAD_AUTH_MASTER:-297,temBAD_LIMIT:-292,temBAD_ISSUER:-293,tecNO_DST_INSUF_XRP:125,tecPATH_PARTIAL:101,telBAD_PUBLIC_KEY:-396,tefBAD_ADD_AUTH:-197,tecDST_TAG_NEEDED:143,temBAD_OFFER:-291,temBAD_SEND_XRP_PARTIAL:-285,temDST_NEEDED:-278,tefALREADY:-198,tecUNFUNDED:129,tecNO_LINE:135,tecFROZEN:137,temUNCERTAIN:-272,tecFAILED_PROCESSING:105,telLOCAL_ERROR:-399,temREDUNDANT_SEND_MAX:-274,tefINTERNAL:-191,temBAD_PATH_LOOP:-289,tecPATH_DRY:128,tefEXCEPTION:-192,tecDIR_FULL:121,tecUNFUNDED_OFFER:103,temRIPPLE_EMPTY:-273,telINSUF_FEE_P:-394,temBAD_SEQUENCE:-283,tefMAX_LEDGER:-186,terFUNDS_SPENT:-98,temBAD_SEND_XRP_MAX:-287,telFAILED_PROCESSING:-395,terINSUF_FEE_B:-97,tecCLAIM:100,tesSUCCESS:0,temBAD_PATH:-290,temMALFORMED:-299,temUNKNOWN:-271,tecINTERNAL:144,temINVALID:-277,tecINSUF_RESERVE_OFFER:123,tecNO_LINE_INSUF_RESERVE:126,terNO_AUTH:-95,temBAD_TICK_SIZE:-270},TRANSACTION_TYPES:{OfferCancel:8,EnableAmendment:100,SetFee:101,SetRegularKey:5,TicketCreate:10,TicketCancel:11,NickNameSet:6,TrustSet:20,Payment:0,AccountSet:3,OfferCreate:7,SignerListSet:12,Contract:9,EscrowCreate:1,EscrowFinish:2,EscrowCancel:4,PaymentChannelCreate:13,PaymentChannelFund:14,PaymentChannelClaim:15,Invalid:-1}}},function(e,t,n){"use strict";var r=n(567),i=r.Field,o=n(572),s=o.AccountID,a=n(577),c=a.Amount,u=n(583),f=u.Blob,h=n(580),d=h.Currency,l=n(584),p=l.Hash128,m=n(573),g=m.Hash160,v=n(585),y=v.Hash256,b=n(586),w=b.PathSet,S=n(587),x=S.STArray,E=n(588),A=E.STObject,T=n(589),M=T.UInt16,P=n(590),I=P.UInt32,O=n(581),R=O.UInt64,k=n(591),N=k.UInt8,C=n(592),F=C.Vector256,L={AccountID:s,Amount:c,Blob:f,Currency:d,Hash128:p,Hash160:g,Hash256:y,PathSet:w,STArray:x,STObject:A,UInt8:N,UInt16:M,UInt32:I,UInt64:R,Vector256:F};i.values.forEach(function(e){e.associatedType=L[e.type]}),i.TransactionType.associatedType=r.TransactionType,i.TransactionResult.associatedType=r.TransactionResult,i.LedgerEntryType.associatedType=r.LedgerEntryType,e.exports=L},function(e,t,n){"use strict";var r=n(569),i=n(390),o=i.decodeAccountID,s=i.encodeAccountID,a=n(573),c=a.Hash160,u=r({AccountID:function(e){c.call(this,e)},inherits:c,statics:{from:function(e){return e instanceof this?e:/^r/.test(e)?this.fromBase58(e):new this(e)},cache:{},fromCache:function(e){var t=this.cache[e];return t||(t=this.cache[e]=this.fromBase58(e)),t},fromBase58:function(e){var t=new this(o(e));return t._toBase58=e,t}},toJSON:function(){return this.toBase58()},cached:{toBase58:function(){return s(this._bytes)}}});e.exports={AccountID:u}},function(e,t,n){"use strict";var r=n(569),i=n(574),o=i.Hash,s=r({inherits:o,statics:{width:20}});e.exports={Hash160:s}},function(e,t,n){"use strict";var r=n(306),i=n(569),o=n(575),s=o.Comparable,a=o.SerializedType,c=n(568),u=c.compareBytes,f=c.parseBytes,h=i({Hash:function(e){var t=this.constructor.width;this._bytes=e?f(e,Uint8Array):new Uint8Array(t),r.equal(this._bytes.length,t)},mixins:[s,a],statics:{width:NaN,from:function(e){return e instanceof this?e:new this(f(e))},fromParser:function(e,t){return new this(e.read(t||this.width))}},compareTo:function(e){return u(this._bytes,this.constructor.from(e)._bytes)},toString:function(){return this.toHex()},nibblet:function(e){var t=e>0?e/2|0:0,n=this._bytes[t];return n=e%2===0?(240&n)>>>4:15&n}});e.exports={Hash:h}},function(e,t,n){"use strict";function r(e,t){return{withChildren:function(n){if(t instanceof e)return t;for(var r=new e,i=0;i<t.length;i++)r.push(n.from(t[i]));return r}}}var i=n(568),o=i.bytesToHex,s=i.slice,a=n(576),c=a.BytesList,u={lt:function(e){return this.compareTo(e)<0},eq:function(e){return 0===this.compareTo(e)},gt:function(e){return this.compareTo(e)>0},gte:function(e){return this.compareTo(e)>-1},lte:function(e){return this.compareTo(e)<1}},f={toBytesSink:function(e){e.put(this._bytes)},toHex:function(){return o(this.toBytes())},toBytes:function(){if(this._bytes)return s(this._bytes);var e=new c;return this.toBytesSink(e),e.toBytes()},toJSON:function(){return this.toHex()},toString:function(){return this.toHex()}};e.exports={ensureArrayLikeIs:r,SerializedType:f,Comparable:u}},function(e,t,n){"use strict";var r=n(306),i=n(568),o=i.parseBytes,s=i.bytesToHex,a=n(569),c=n(567),u=c.Type,f=c.Field,h={put:function(){}},d=a({implementing:h,BytesList:function(){this.arrays=[],this.length=0},put:function(e){var t=o(e,Uint8Array);return this.length+=t.length,this.arrays.push(t),this},toBytesSink:function(e){this.arrays.forEach(function(t){e.put(t)})},toBytes:function(){var e=new Uint8Array(this.length),t=0;return this.arrays.forEach(function(n){e.set(n,t),t+=n.length}),e},toHex:function(){return s(this.toBytes())}}),l=a({BinarySerializer:function(e){this.sink=e},write:function(e){e.toBytesSink(this.sink)},put:function(e){this.sink.put(e)},writeType:function(e,t){this.write(e.from(t))},writeBytesList:function(e){e.toBytesSink(this.sink)},encodeVL:function(e){var t=e,n=new Uint8Array(4);if(t<=192)return n[0]=t,n.subarray(0,1);if(t<=12480)return t-=193,n[0]=193+(t>>>8),n[1]=255&t,n.subarray(0,2);if(t<=918744)return t-=12481,n[0]=241+(t>>>16),n[1]=t>>8&255,n[2]=255&t,n.subarray(0,3);throw new Error("Overflow error")},writeFieldAndValue:function(e,t){var n=this.sink,i=e.associatedType.from(t);r(i.toBytesSink,e),n.put(e.bytes),e.isVLEncoded?this.writeLengthEncoded(i):(i.toBytesSink(n),e.type===u.STObject?n.put(f.ObjectEndMarker.bytes):e.type===u.STArray&&n.put(f.ArrayEndMarker.bytes))},writeLengthEncoded:function(e){var t=new d;e.toBytesSink(t),this.put(this.encodeVL(t.length)),this.writeBytesList(t)}});e.exports={BytesList:d,BinarySerializer:l}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e){return!_.isUndefined(e)}function o(e){throw new Error(e.toString()+" is an illegal amount\n"+N)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_=n(300),a=n(306),c=n(578),u=n(579),f=n(569),h=n(575),d=h.SerializedType,l=n(568),p=l.bytesToHex,m=n(580),g=m.Currency,v=n(572),y=v.AccountID,b=n(581),w=b.UInt64,S=-96,x=80,E=16,A="1000000000000000",T="9999999999999999",M=new u(T+"e"+x),P=new u(A+"e"+S),I=new u("1e6"),O=new u("1e17"),R=new u("1e-6"),k=O.dividedBy(I);u.config({toExpPos:x+E,toExpNeg:S-E});var N="\nNative values must be described in drops, a million of which equal one XRP.\nThis must be an integer number, with the absolute value not exceeding "+O+"\n\nIOU values must have a maximum precision of "+E+" significant digits. They are serialized as\na canonicalised mantissa and exponent. \n\nThe valid range for a mantissa is between "+A+" and "+T+"\nThe exponent must be >= "+S+" and <= "+x+"\n\nThus the largest serializable IOU value is:\n"+M.toString()+"\n\nAnd the smallest:\n"+P.toString()+"\n",C={string:function(e){return e.match(/\d+/)||o(e),[new u(e).dividedBy(I),g.XRP]},object:function(e){return a(i(e.currency),"currency must be defined"),a(i(e.issuer),"issuer must be defined"),[new u(e.value),g.from(e.currency),y.from(e.issuer)]}},F=f({Amount:function(e,t,n){this.value=e||new u("0"),this.currency=t||g.XRP,this.issuer=n||null,this.assertValueIsValid()},mixins:d,statics:{from:function(e){if(e instanceof this)return e;var t=C["undefined"==typeof e?"undefined":s(e)];if(t)return new(Function.prototype.bind.apply(this,[null].concat(r(t(e)))));throw new Error("unsupported value: "+e)},fromParser:function(e){var t=e.read(8),n=t[0],r=t[1],i=128&n,o=64&n,s=o?"":"-";if(i){t[0]=0;var a=e.readType(g),c=e.readType(y),f=((63&n)<<2)+((255&r)>>6)-97;t[1]&=63;var h=new u(s+"0x"+p(t)).times("1e"+f);return new this(h,a,c)}t[0]&=63;var d=new u(s+"0x"+p(t)),l=d.dividedBy(I);return new this(l,g.XRP)}},assertValueIsValid:function(){if(!this.isZero())if(this.isNative()){var e=this.value.abs();(e.lt(R)||e.gt(k))&&o(this.value.times(I))}else{var t=this.value.precision(),n=this.exponent();(t>E||n>x||n<S)&&o(this.value)}},isNative:function(){return this.currency.isNative()},mantissa:function(){return new w(new c(this.value.times("1e"+-this.exponent()).abs().toString()))},isZero:function(){return this.value.isZero()},exponent:function(){return this.isNative()?-6:this.value.e-15},valueString:function(){return(this.isNative()?this.value.times(I):this.value).toString()},toBytesSink:function(e){var t=this.isNative(),n=!this.value.isNegative(),r=this.mantissa().toBytes();if(t)r[0]|=n?64:0,e.put(r);else{if(r[0]|=128,!this.isZero()){n&&(r[0]|=64);var i=this.value.e-15,o=97+i;r[0]|=o>>>2,r[1]|=(3&o)<<6}e.put(r),this.currency.toBytesSink(e),this.issuer.toBytesSink(e)}},toJSON:function(){var e=this.valueString();return this.isNative()?e:{value:e,currency:this.currency.toJSON(),issuer:this.issuer.toJSON()}}});e.exports={Amount:F}},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){return o.isBN(e)?e:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))))}function s(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var s=e.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function a(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}function c(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}function u(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var f=c>>>26,h=67108863&c,d=Math.min(u,t.length-1),l=Math.max(0,u-e.length+1);l<=d;l++){var p=u-l|0;i=0|e.words[p],o=0|t.words[l],s=i*o+h,f+=s/67108864|0,h=67108863&s}n.words[u]=0|h,c=0|f}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}function f(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,c=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=c;u++){var f=o-u,h=0|e.words[f],d=0|t.words[u],l=h*d,p=67108863&l;s=s+(l/67108864|0)|0,p=p+a|0,a=67108863&p,s=s+(p>>>26)|0,i+=s>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}function h(e,t,n){var r=new d;return r.mulp(e,t,n)}function d(e,t){this.x=e,this.y=t}function l(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){l.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){l.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){l.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){l.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function b(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;var w;try{w=n(312).Buffer}catch(S){}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=e.length-6,r=0;n>=t;n-=6)i=s(e,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,o+=24,o>=26&&(o-=26,r++);n+6!==t&&(i=s(e,t,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,c=Math.min(o,o-s)+n,u=0,f=n;f<c;f+=r)u=a(e,f,f+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=a(e,f,e.length,t),f=0;f<s;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){e=e||10,t=0|t||1;var n;if(16===e||"hex"===e){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,n=0!==o||s!==this.length-1?x[6-c.length]+c+n:c+n,i+=2,i>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=E[e],f=A[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var d=h.modn(f).toString(e);h=h.idivn(f),n=h.isZero()?d+n:x[u-d.length]+d+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r("undefined"!=typeof w),this.toArrayLike(w,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,c="le"===t,u=new e(o),f=this.clone();if(c){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a<o;a++)u[a]=0}else{for(a=0;a<o-i;a++)u[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[o-a-1]=s}return u},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone();
|
||
},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return r(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return r(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return r(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<i:this.words[n]=this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,r;this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;var r,i;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)t=(0|r.words[s])-(0|i.words[s])+o,o=t>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)t=(0|r.words[s])+o,o=t>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var T=function(e,t,n){var r,i,o,s=e.words,a=t.words,c=n.words,u=0,f=0|s[0],h=8191&f,d=f>>>13,l=0|s[1],p=8191&l,m=l>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,S=b>>>13,x=0|s[4],E=8191&x,A=x>>>13,T=0|s[5],M=8191&T,P=T>>>13,I=0|s[6],O=8191&I,R=I>>>13,k=0|s[7],N=8191&k,C=k>>>13,F=0|s[8],L=8191&F,B=F>>>13,j=0|s[9],q=8191&j,D=j>>>13,z=0|a[0],U=8191&z,V=z>>>13,$=0|a[1],H=8191&$,X=$>>>13,K=0|a[2],G=8191&K,J=K>>>13,W=0|a[3],Y=8191&W,Z=W>>>13,Q=0|a[4],ee=8191&Q,te=Q>>>13,ne=0|a[5],re=8191&ne,ie=ne>>>13,oe=0|a[6],se=8191&oe,ae=oe>>>13,ce=0|a[7],ue=8191&ce,fe=ce>>>13,he=0|a[8],de=8191&he,le=he>>>13,pe=0|a[9],me=8191&pe,ge=pe>>>13;n.negative=e.negative^t.negative,n.length=19,r=Math.imul(h,U),i=Math.imul(h,V),i=i+Math.imul(d,U)|0,o=Math.imul(d,V);var ve=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,U),i=Math.imul(p,V),i=i+Math.imul(m,U)|0,o=Math.imul(m,V),r=r+Math.imul(h,H)|0,i=i+Math.imul(h,X)|0,i=i+Math.imul(d,H)|0,o=o+Math.imul(d,X)|0;var ye=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(v,U),i=Math.imul(v,V),i=i+Math.imul(y,U)|0,o=Math.imul(y,V),r=r+Math.imul(p,H)|0,i=i+Math.imul(p,X)|0,i=i+Math.imul(m,H)|0,o=o+Math.imul(m,X)|0,r=r+Math.imul(h,G)|0,i=i+Math.imul(h,J)|0,i=i+Math.imul(d,G)|0,o=o+Math.imul(d,J)|0;var be=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,U),i=Math.imul(w,V),i=i+Math.imul(S,U)|0,o=Math.imul(S,V),r=r+Math.imul(v,H)|0,i=i+Math.imul(v,X)|0,i=i+Math.imul(y,H)|0,o=o+Math.imul(y,X)|0,r=r+Math.imul(p,G)|0,i=i+Math.imul(p,J)|0,i=i+Math.imul(m,G)|0,o=o+Math.imul(m,J)|0,r=r+Math.imul(h,Y)|0,i=i+Math.imul(h,Z)|0,i=i+Math.imul(d,Y)|0,o=o+Math.imul(d,Z)|0;var we=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(E,U),i=Math.imul(E,V),i=i+Math.imul(A,U)|0,o=Math.imul(A,V),r=r+Math.imul(w,H)|0,i=i+Math.imul(w,X)|0,i=i+Math.imul(S,H)|0,o=o+Math.imul(S,X)|0,r=r+Math.imul(v,G)|0,i=i+Math.imul(v,J)|0,i=i+Math.imul(y,G)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Y)|0,i=i+Math.imul(p,Z)|0,i=i+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0,r=r+Math.imul(h,ee)|0,i=i+Math.imul(h,te)|0,i=i+Math.imul(d,ee)|0,o=o+Math.imul(d,te)|0;var _e=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(M,U),i=Math.imul(M,V),i=i+Math.imul(P,U)|0,o=Math.imul(P,V),r=r+Math.imul(E,H)|0,i=i+Math.imul(E,X)|0,i=i+Math.imul(A,H)|0,o=o+Math.imul(A,X)|0,r=r+Math.imul(w,G)|0,i=i+Math.imul(w,J)|0,i=i+Math.imul(S,G)|0,o=o+Math.imul(S,J)|0,r=r+Math.imul(v,Y)|0,i=i+Math.imul(v,Z)|0,i=i+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,ee)|0,i=i+Math.imul(p,te)|0,i=i+Math.imul(m,ee)|0,o=o+Math.imul(m,te)|0,r=r+Math.imul(h,re)|0,i=i+Math.imul(h,ie)|0,i=i+Math.imul(d,re)|0,o=o+Math.imul(d,ie)|0;var Se=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(O,U),i=Math.imul(O,V),i=i+Math.imul(R,U)|0,o=Math.imul(R,V),r=r+Math.imul(M,H)|0,i=i+Math.imul(M,X)|0,i=i+Math.imul(P,H)|0,o=o+Math.imul(P,X)|0,r=r+Math.imul(E,G)|0,i=i+Math.imul(E,J)|0,i=i+Math.imul(A,G)|0,o=o+Math.imul(A,J)|0,r=r+Math.imul(w,Y)|0,i=i+Math.imul(w,Z)|0,i=i+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(v,ee)|0,i=i+Math.imul(v,te)|0,i=i+Math.imul(y,ee)|0,o=o+Math.imul(y,te)|0,r=r+Math.imul(p,re)|0,i=i+Math.imul(p,ie)|0,i=i+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0,r=r+Math.imul(h,se)|0,i=i+Math.imul(h,ae)|0,i=i+Math.imul(d,se)|0,o=o+Math.imul(d,ae)|0;var xe=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(N,U),i=Math.imul(N,V),i=i+Math.imul(C,U)|0,o=Math.imul(C,V),r=r+Math.imul(O,H)|0,i=i+Math.imul(O,X)|0,i=i+Math.imul(R,H)|0,o=o+Math.imul(R,X)|0,r=r+Math.imul(M,G)|0,i=i+Math.imul(M,J)|0,i=i+Math.imul(P,G)|0,o=o+Math.imul(P,J)|0,r=r+Math.imul(E,Y)|0,i=i+Math.imul(E,Z)|0,i=i+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(w,ee)|0,i=i+Math.imul(w,te)|0,i=i+Math.imul(S,ee)|0,o=o+Math.imul(S,te)|0,r=r+Math.imul(v,re)|0,i=i+Math.imul(v,ie)|0,i=i+Math.imul(y,re)|0,o=o+Math.imul(y,ie)|0,r=r+Math.imul(p,se)|0,i=i+Math.imul(p,ae)|0,i=i+Math.imul(m,se)|0,o=o+Math.imul(m,ae)|0,r=r+Math.imul(h,ue)|0,i=i+Math.imul(h,fe)|0,i=i+Math.imul(d,ue)|0,o=o+Math.imul(d,fe)|0;var Ee=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,U),i=Math.imul(L,V),i=i+Math.imul(B,U)|0,o=Math.imul(B,V),r=r+Math.imul(N,H)|0,i=i+Math.imul(N,X)|0,i=i+Math.imul(C,H)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(O,G)|0,i=i+Math.imul(O,J)|0,i=i+Math.imul(R,G)|0,o=o+Math.imul(R,J)|0,r=r+Math.imul(M,Y)|0,i=i+Math.imul(M,Z)|0,i=i+Math.imul(P,Y)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(E,ee)|0,i=i+Math.imul(E,te)|0,i=i+Math.imul(A,ee)|0,o=o+Math.imul(A,te)|0,r=r+Math.imul(w,re)|0,i=i+Math.imul(w,ie)|0,i=i+Math.imul(S,re)|0,o=o+Math.imul(S,ie)|0,r=r+Math.imul(v,se)|0,i=i+Math.imul(v,ae)|0,i=i+Math.imul(y,se)|0,o=o+Math.imul(y,ae)|0,r=r+Math.imul(p,ue)|0,i=i+Math.imul(p,fe)|0,i=i+Math.imul(m,ue)|0,o=o+Math.imul(m,fe)|0,r=r+Math.imul(h,de)|0,i=i+Math.imul(h,le)|0,i=i+Math.imul(d,de)|0,o=o+Math.imul(d,le)|0;var Ae=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(q,U),i=Math.imul(q,V),i=i+Math.imul(D,U)|0,o=Math.imul(D,V),r=r+Math.imul(L,H)|0,i=i+Math.imul(L,X)|0,i=i+Math.imul(B,H)|0,o=o+Math.imul(B,X)|0,r=r+Math.imul(N,G)|0,i=i+Math.imul(N,J)|0,i=i+Math.imul(C,G)|0,o=o+Math.imul(C,J)|0,r=r+Math.imul(O,Y)|0,i=i+Math.imul(O,Z)|0,i=i+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(M,ee)|0,i=i+Math.imul(M,te)|0,i=i+Math.imul(P,ee)|0,o=o+Math.imul(P,te)|0,r=r+Math.imul(E,re)|0,i=i+Math.imul(E,ie)|0,i=i+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,r=r+Math.imul(w,se)|0,i=i+Math.imul(w,ae)|0,i=i+Math.imul(S,se)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(v,ue)|0,i=i+Math.imul(v,fe)|0,i=i+Math.imul(y,ue)|0,o=o+Math.imul(y,fe)|0,r=r+Math.imul(p,de)|0,i=i+Math.imul(p,le)|0,i=i+Math.imul(m,de)|0,o=o+Math.imul(m,le)|0,r=r+Math.imul(h,me)|0,i=i+Math.imul(h,ge)|0,i=i+Math.imul(d,me)|0,o=o+Math.imul(d,ge)|0;var Te=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(q,H),i=Math.imul(q,X),i=i+Math.imul(D,H)|0,o=Math.imul(D,X),r=r+Math.imul(L,G)|0,i=i+Math.imul(L,J)|0,i=i+Math.imul(B,G)|0,o=o+Math.imul(B,J)|0,r=r+Math.imul(N,Y)|0,i=i+Math.imul(N,Z)|0,i=i+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(O,ee)|0,i=i+Math.imul(O,te)|0,i=i+Math.imul(R,ee)|0,o=o+Math.imul(R,te)|0,r=r+Math.imul(M,re)|0,i=i+Math.imul(M,ie)|0,i=i+Math.imul(P,re)|0,o=o+Math.imul(P,ie)|0,r=r+Math.imul(E,se)|0,i=i+Math.imul(E,ae)|0,i=i+Math.imul(A,se)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(w,ue)|0,i=i+Math.imul(w,fe)|0,i=i+Math.imul(S,ue)|0,o=o+Math.imul(S,fe)|0,r=r+Math.imul(v,de)|0,i=i+Math.imul(v,le)|0,i=i+Math.imul(y,de)|0,o=o+Math.imul(y,le)|0,r=r+Math.imul(p,me)|0,i=i+Math.imul(p,ge)|0,i=i+Math.imul(m,me)|0,o=o+Math.imul(m,ge)|0;var Me=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(q,G),i=Math.imul(q,J),i=i+Math.imul(D,G)|0,o=Math.imul(D,J),r=r+Math.imul(L,Y)|0,i=i+Math.imul(L,Z)|0,i=i+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,r=r+Math.imul(N,ee)|0,i=i+Math.imul(N,te)|0,i=i+Math.imul(C,ee)|0,o=o+Math.imul(C,te)|0,r=r+Math.imul(O,re)|0,i=i+Math.imul(O,ie)|0,i=i+Math.imul(R,re)|0,o=o+Math.imul(R,ie)|0,r=r+Math.imul(M,se)|0,i=i+Math.imul(M,ae)|0,i=i+Math.imul(P,se)|0,o=o+Math.imul(P,ae)|0,r=r+Math.imul(E,ue)|0,i=i+Math.imul(E,fe)|0,i=i+Math.imul(A,ue)|0,o=o+Math.imul(A,fe)|0,r=r+Math.imul(w,de)|0,i=i+Math.imul(w,le)|0,i=i+Math.imul(S,de)|0,o=o+Math.imul(S,le)|0,r=r+Math.imul(v,me)|0,i=i+Math.imul(v,ge)|0,i=i+Math.imul(y,me)|0,o=o+Math.imul(y,ge)|0;var Pe=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(q,Y),i=Math.imul(q,Z),i=i+Math.imul(D,Y)|0,o=Math.imul(D,Z),r=r+Math.imul(L,ee)|0,i=i+Math.imul(L,te)|0,i=i+Math.imul(B,ee)|0,o=o+Math.imul(B,te)|0,r=r+Math.imul(N,re)|0,i=i+Math.imul(N,ie)|0,i=i+Math.imul(C,re)|0,o=o+Math.imul(C,ie)|0,r=r+Math.imul(O,se)|0,i=i+Math.imul(O,ae)|0,i=i+Math.imul(R,se)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(M,ue)|0,i=i+Math.imul(M,fe)|0,i=i+Math.imul(P,ue)|0,o=o+Math.imul(P,fe)|0,r=r+Math.imul(E,de)|0,i=i+Math.imul(E,le)|0,i=i+Math.imul(A,de)|0,o=o+Math.imul(A,le)|0,r=r+Math.imul(w,me)|0,i=i+Math.imul(w,ge)|0,i=i+Math.imul(S,me)|0,o=o+Math.imul(S,ge)|0;var Ie=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(q,ee),i=Math.imul(q,te),i=i+Math.imul(D,ee)|0,o=Math.imul(D,te),r=r+Math.imul(L,re)|0,i=i+Math.imul(L,ie)|0,i=i+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,r=r+Math.imul(N,se)|0,i=i+Math.imul(N,ae)|0,i=i+Math.imul(C,se)|0,o=o+Math.imul(C,ae)|0,r=r+Math.imul(O,ue)|0,i=i+Math.imul(O,fe)|0,i=i+Math.imul(R,ue)|0,o=o+Math.imul(R,fe)|0,r=r+Math.imul(M,de)|0,i=i+Math.imul(M,le)|0,i=i+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0,r=r+Math.imul(E,me)|0,i=i+Math.imul(E,ge)|0,i=i+Math.imul(A,me)|0,o=o+Math.imul(A,ge)|0;var Oe=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(q,re),i=Math.imul(q,ie),i=i+Math.imul(D,re)|0,o=Math.imul(D,ie),r=r+Math.imul(L,se)|0,i=i+Math.imul(L,ae)|0,i=i+Math.imul(B,se)|0,o=o+Math.imul(B,ae)|0,r=r+Math.imul(N,ue)|0,i=i+Math.imul(N,fe)|0,i=i+Math.imul(C,ue)|0,o=o+Math.imul(C,fe)|0,r=r+Math.imul(O,de)|0,i=i+Math.imul(O,le)|0,i=i+Math.imul(R,de)|0,o=o+Math.imul(R,le)|0,r=r+Math.imul(M,me)|0,i=i+Math.imul(M,ge)|0,i=i+Math.imul(P,me)|0,o=o+Math.imul(P,ge)|0;var Re=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(q,se),i=Math.imul(q,ae),i=i+Math.imul(D,se)|0,o=Math.imul(D,ae),r=r+Math.imul(L,ue)|0,i=i+Math.imul(L,fe)|0,i=i+Math.imul(B,ue)|0,o=o+Math.imul(B,fe)|0,r=r+Math.imul(N,de)|0,i=i+Math.imul(N,le)|0,i=i+Math.imul(C,de)|0,o=o+Math.imul(C,le)|0,r=r+Math.imul(O,me)|0,i=i+Math.imul(O,ge)|0,i=i+Math.imul(R,me)|0,o=o+Math.imul(R,ge)|0;var ke=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(q,ue),i=Math.imul(q,fe),i=i+Math.imul(D,ue)|0,o=Math.imul(D,fe),r=r+Math.imul(L,de)|0,i=i+Math.imul(L,le)|0,i=i+Math.imul(B,de)|0,o=o+Math.imul(B,le)|0,r=r+Math.imul(N,me)|0,i=i+Math.imul(N,ge)|0,i=i+Math.imul(C,me)|0,o=o+Math.imul(C,ge)|0;var Ne=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(q,de),i=Math.imul(q,le),i=i+Math.imul(D,de)|0,o=Math.imul(D,le),r=r+Math.imul(L,me)|0,i=i+Math.imul(L,ge)|0,i=i+Math.imul(B,me)|0,o=o+Math.imul(B,ge)|0;var Ce=(u+r|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(q,me),i=Math.imul(q,ge),i=i+Math.imul(D,me)|0,o=Math.imul(D,ge);var Fe=(u+r|0)+((8191&i)<<13)|0;return u=(o+(i>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,c[0]=ve,c[1]=ye,c[2]=be,c[3]=we,c[4]=_e,c[5]=Se,c[6]=xe,c[7]=Ee,c[8]=Ae,c[9]=Te,c[10]=Me,c[11]=Pe,c[12]=Ie,c[13]=Oe,c[14]=Re,c[15]=ke,c[16]=Ne,c[17]=Ce,c[18]=Fe,0!==u&&(c[19]=u,n.length++),n};Math.imul||(T=u),o.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?T(this,e,t):r<63?u(this,e,t):r<1024?f(this,e,t):h(this,e,t)},d.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},d.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},d.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},d.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var h=c,d=u,l=0;l<s;l++){var p=n[f+l],m=r[f+l],g=n[f+l+s],v=r[f+l+s],y=h*g-d*v;v=h*v+d*g,g=y,n[f+l]=p+g,r[f+l]=m+v,n[f+l+s]=p-g,r[f+l+s]=m-v,l!==a&&(y=c*h-u*d,d=c*d+u*h,h=y)}},d.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},d.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},d.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},d.prototype.convert13b=function(e,t,n,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===o),r(0===(o&-8192))},d.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},d.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),_=this.stub(r),o=new Array(r),s=new Array(r),a=new Array(r),c=new Array(r),u=new Array(r),f=new Array(r),h=n.words;h.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,c,r),this.transform(o,_,s,a,r,i),this.transform(c,_,u,f,r,i);for(var d=0;d<r;d++){var l=s[d]*u[d]-a[d]*f[d];a[d]=s[d]*f[d]+a[d]*u[d],s[d]=l}return this.conjugate(s,a,r),this.transform(s,a,h,_,r,i),this.conjugate(h,_,r),this.normalize13b(h,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),h(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=c(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,c=(0|this.words[t])-a<<n;this.words[t]=c|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){r("number"==typeof e&&e>=0);var i;i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=n;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var h=0|this.words[u];this.words[u]=f<<26-o|h>>>o,f=h&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return!1;var o=this.words[n];return!!(o&i)},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o=e.length+n;this._expand(o);var s,a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var c=(0|e.words[i])*t;s-=67108863&c,a=(s>>26)-(c/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)s=(0|this.words[i+n])+a,a=s>>26,this.words[i+n]=67108863&s;if(0===a)return this.strip();for(r(a===-1),a=0,i=0;i<this.length;i++)s=-(0|this.words[i])+a,a=s>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=this.length-e.length,r=this.clone(),i=e,s=0|i.words[i.length-1],a=this._countBits(s);n=26-a,0!==n&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var c,u=r.length-i.length;if("mod"!==t){c=new o(null),c.length=u+1,c.words=new Array(c.length);for(var f=0;f<c.length;f++)c.words[f]=0}var h=r.clone()._ishlnsubmul(i,1,u);0===h.negative&&(r=h,c&&(c.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(l=Math.min(l/s|0,67108863),r._ishlnsubmul(i,l,d);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);c&&(c.words[d]=l)}return c&&c.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:c||null,mod:r}},o.prototype.divmod=function(e,t,n){if(r(!e.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var i,s,a;return 0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var f=n.clone(),h=t.clone();!t.isZero();){for(var d=0,l=1;0===(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(f),c.isub(h)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(c)):(n.isub(t),a.isub(i),c.isub(s))}return{a:a,b:c,gcd:n.iushln(u)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(a),i.iushrn(1);for(var f=0,h=1;0===(n.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s)):(n.isub(t),s.isub(i))}var d;return d=0===t.cmpn(1)?i:s,d.cmpn(0)<0&&d.iadd(e),d},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];a+=o,o=a>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];n=i===e?0:i<e?-1:1}return 0!==this.negative?0|-n:n},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return this.cmpn(e)===-1},o.prototype.lt=function(e){return this.cmp(e)===-1},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new y(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var M={k256:null,p224:null,p192:null,p25519:null};l.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},l.prototype.ireduce=function(e){var t,n=e;do this.split(n,this.tmp),n=this.imulK(n),n=n.iadd(this.tmp),t=n.bitLength();while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},l.prototype.split=function(e,t){e.iushrn(this.n,0,t)},l.prototype.imulK=function(e){return e.imul(this.k)},i(p,l),p.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},p.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(m,l),i(g,l),i(v,l),v.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function P(e){if(M[e])return M[e];var P;if("k256"===e)P=new p;else if("p224"===e)P=new m;else if("p192"===e)P=new g;else{if("p25519"!==e)throw new Error("Unknown prime "+e);P=new v}return M[e]=P,P},y.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},y.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());
|
||
var a=new o(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var h=this.pow(f,i),d=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(a);){for(var m=l,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),l=l.redMul(h),p=g}return d},y.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},y.prototype.pow=function(e,t){if(t.isZero())return new o(1);if(0===t.cmpn(1))return e.clone();var n=4,r=new Array(1<<n);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var s=r[0],a=0,c=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],h=u-1;h>=0;h--){var d=f>>h&1;s!==r[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,c++,(c===n||0===i&&0===h)&&(s=this.mul(s,r[a]),c=0,a=0)):c=0}u=26}return s},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new b(e)},i(b,y),b.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},b.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},b.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},b.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},b.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}("undefined"==typeof e||e,this)}).call(t,n(375)(e))},function(e,t,n){var r;!function(i){"use strict";function o(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)r=e[t]+"",n=Le-r.length,n&&(o+=g(n)),o+=r;s=e[t],r=s+"",n=Le-r.length,n&&(o+=g(n))}else if(0===s)return"0";for(;s%10===0;)s/=10;return o+s}function s(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Me+e)}function a(e,t,n,r){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=Le,i=0):(i=Math.ceil((t+1)/Le),t%=Le),o=Oe(10,Le-t),a=e[i]%o|0,null==r?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),s=n<4&&99999==a||n>3&&49999==a||5e4==a||0==a):s=(n<4&&a+1==o||n>3&&a+1==o/2)&&(e[i+1]/o/100|0)==Oe(10,t-2)-1||(a==o/2||0==a)&&0==(e[i+1]/o/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),s=(r||n<4)&&9999==a||!r&&n>3&&4999==a):s=((r||n<4)&&a+1==o||!r&&n>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==Oe(10,t-3)-1,s}function c(e,t,n){for(var r,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=we.indexOf(e.charAt(s++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function u(e,t){var n,r,i=t.d.length;i<32?(n=Math.ceil(i/3),r=Math.pow(4,-n).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=M(e,1,t.times(r),new e(1));for(var o=n;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=n,t}function f(e,t,n,r){var i,o,s,a,c,u,f,h,d,l=e.constructor;e:if(null!=t){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=Le,s=t,f=h[d=0],c=f/Oe(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/Le),a=h.length,d>=a){if(!r)break e;for(;a++<=d;)h.push(0);f=c=0,i=1,o%=Le,s=o-Le+1}else{for(f=a=h[d],i=1;a>=10;a/=10)i++;o%=Le,s=o-Le+i,c=s<0?0:f/Oe(10,i-s-1)%10|0}if(r=r||t<0||void 0!==h[d+1]||(s<0?f:f%Oe(10,i-s-1)),u=n<4?(c||r)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||r||6==n&&(o>0?s>0?f/Oe(10,i-s):0:h[d-1])%10&1||n==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=Oe(10,(Le-t%Le)%Le),e.e=-t||0):h[0]=e.e=0,e;if(0==o?(h.length=d,a=1,d--):(h.length=d+1,a=Oe(10,Le-o),h[d]=s>0?(f/Oe(10,i-s)%Oe(10,s)|0)*a:0),u)for(;;){if(0==d){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==Fe&&(h[0]=1));break}if(h[d]+=a,h[d]!=Fe)break;h[d--]=0,a=1}for(o=h.length;0===h[--o];)h.pop()}return Ae&&(e.e>l.maxE?(e.d=null,e.e=NaN):e.e<l.minE&&(e.e=0,e.d=[0])),e}function h(e,t,n){if(!e.isFinite())return x(e);var r,i=e.e,s=o(e.d),a=s.length;return t?(n&&(r=n-a)>0?s=s.charAt(0)+"."+s.slice(1)+g(r):a>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):i<0?(s="0."+g(-i-1)+s,n&&(r=n-a)>0&&(s+=g(r))):i>=a?(s+=g(i+1-a),n&&(r=n-i-1)>0&&(s=s+"."+g(r))):((r=i+1)<a&&(s=s.slice(0,r)+"."+s.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(s+="."),s+=g(r))),s}function d(e,t){for(var n=1,r=e[0];r>=10;r/=10)n++;return n+t*Le-1}function l(e,t,n){if(t>je)throw Ae=!0,n&&(e.precision=n),Error(Pe);return f(new e(_e),t,1,!0)}function p(e,t,n){if(t>qe)throw Error(Pe);return f(new e(Se),t,n,!0)}function m(e){var t=e.length-1,n=t*Le+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function g(e){for(var t="";e--;)t+="0";return t}function v(e,t,n,r){var i,o=new e(1),s=Math.ceil(r/Le+4);for(Ae=!1;;){if(n%2&&(o=o.times(t),O(o.d,s)&&(i=!0)),n=Ie(n/2),0===n){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}t=t.times(t),O(t.d,s)}return Ae=!0,o}function y(e){return 1&e.d[e.d.length-1]}function b(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(r=new e(t[o]),!r.s){i=r;break}i[n](r)&&(i=r)}return i}function w(e,t){var n,r,i,s,c,u,h,d=0,l=0,p=0,m=e.constructor,g=m.rounding,v=m.precision;if(!e.d||!e.d[0]||e.e>17)return new m(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(Ae=!1,h=v):h=t,u=new m(.03125);e.e>-2;)e=e.times(u),p+=5;for(r=Math.log(Oe(2,p))/Math.LN10*2+5|0,h+=r,n=s=c=new m(1),m.precision=h;;){if(s=f(s.times(e),h,1),n=n.times(++l),u=c.plus(ze(s,n,h,1)),o(u.d).slice(0,h)===o(c.d).slice(0,h)){for(i=p;i--;)c=f(c.times(c),h,1);if(null!=t)return m.precision=v,c;if(!(d<3&&a(c.d,h-r,g,d)))return f(c,m.precision=v,g,Ae=!0);m.precision=h+=10,n=s=u=new m(1),l=0,d++}c=u}}function S(e,t){var n,r,i,s,c,u,h,d,p,m,g,v=1,y=10,b=e,w=b.d,x=b.constructor,E=x.rounding,A=x.precision;if(b.s<0||!w||!w[0]||!b.e&&1==w[0]&&1==w.length)return new x(w&&!w[0]?-1/0:1!=b.s?NaN:w?0:b);if(null==t?(Ae=!1,p=A):p=t,x.precision=p+=y,n=o(w),r=n.charAt(0),!(Math.abs(s=b.e)<15e14))return d=l(x,p+2,A).times(s+""),b=S(new x(r+"."+n.slice(1)),p-y).plus(d),x.precision=A,null==t?f(b,A,E,Ae=!0):b;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)b=b.times(e),n=o(b.d),r=n.charAt(0),v++;for(s=b.e,r>1?(b=new x("0."+n),s++):b=new x(r+"."+n.slice(1)),m=b,h=c=b=ze(b.minus(1),b.plus(1),p,1),g=f(b.times(b),p,1),i=3;;){if(c=f(c.times(g),p,1),d=h.plus(ze(c,new x(i),p,1)),o(d.d).slice(0,p)===o(h.d).slice(0,p)){if(h=h.times(2),0!==s&&(h=h.plus(l(x,p+2,A).times(s+""))),h=ze(h,new x(v),p,1),null!=t)return x.precision=A,h;if(!a(h.d,p-y,E,u))return f(h,x.precision=A,E,Ae=!0);x.precision=p+=y,d=c=b=ze(m.minus(1),m.plus(1),p,1),g=f(b.times(b),p,1),i=u=1}h=d,i+=2}}function x(e){return String(e.s*e.s/0)}function E(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%Le,n<0&&(r+=Le),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Le;r<i;)e.d.push(+t.slice(r,r+=Le));t=t.slice(r),r=Le-t.length}else r-=i;for(;r--;)t+="0";e.d.push(+t),Ae&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function A(e,t){var n,r,i,o,s,a,u,f,h;if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(ke.test(t))n=16,t=t.toLowerCase();else if(Re.test(t))n=2;else{if(!Ne.test(t))throw Error(Me+t);n=8}for(o=t.search(/p/i),o>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,r=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=v(r,new r(n),o,2*o)),f=c(t,n,Fe),h=f.length-1,o=h;0===f[o];--o)f.pop();return o<0?new r(0*e.s):(e.e=d(f,h),e.d=f,Ae=!1,s&&(e=ze(e,i,4*a)),u&&(e=e.times(Math.abs(u)<54?Math.pow(2,u):xe.pow(2,u))),Ae=!0,e)}function T(e,t){var n,r=t.d.length;if(r<3)return M(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:0|n,t=t.times(Math.pow(5,-n)),t=M(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function M(e,t,n,r,i){var o,s,a,c,u=1,f=e.precision,h=Math.ceil(f/Le);for(Ae=!1,c=n.times(n),a=new e(r);;){if(s=ze(a.times(c),new e(t++*t++),f,1),a=i?r.plus(s):r.minus(s),r=ze(s.times(c),new e(t++*t++),f,1),s=a.plus(r),void 0!==s.d[h]){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=r,r=s,s=o,u++}return Ae=!0,s.d.length=h+1,s}function P(e,t){var n,r=t.s<0,i=p(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return ve=r?4:1,t;if(n=t.divToInt(i),n.isZero())ve=r?3:2;else{if(t=t.minus(n.times(i)),t.lte(o))return ve=y(n)?r?2:3:r?4:1,t;ve=y(n)?r?1:4:r?3:2}return t.minus(i).abs()}function I(e,t,n,r){var i,o,a,u,f,d,l,p,m,g=e.constructor,v=void 0!==n;if(v?(s(n,1,be),void 0===r?r=g.rounding:s(r,0,8)):(n=g.precision,r=g.rounding),e.isFinite()){for(l=h(e),a=l.indexOf("."),v?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,a>=0&&(l=l.replace(".",""),m=new g(1),m.e=l.length-a,m.d=c(h(m),10,i),m.e=m.d.length),p=c(l,10,i),o=f=p.length;0==p[--f];)p.pop();if(p[0]){if(a<0?o--:(e=new g(e),e.d=p,e.e=o,e=ze(e,m,n,r,0,i),p=e.d,o=e.e,d=ge),a=p[n],u=i/2,d=d||void 0!==p[n+1],d=r<4?(void 0!==a||d)&&(0===r||r===(e.s<0?3:2)):a>u||a===u&&(4===r||d||6===r&&1&p[n-1]||r===(e.s<0?8:7)),p.length=n,d)for(;++p[--n]>i-1;)p[n]=0,n||(++o,p.unshift(1));for(f=p.length;!p[f-1];--f);for(a=0,l="";a<f;a++)l+=we.charAt(p[a]);if(v){if(f>1)if(16==t||8==t){for(a=16==t?4:3,--f;f%a;f++)l+="0";for(p=c(l,i,t),f=p.length;!p[f-1];--f);for(a=1,l="1.";a<f;a++)l+=we.charAt(p[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>f)for(o-=f;o--;)l+="0";else o<f&&(l=l.slice(0,o)+"."+l.slice(o))}else l=v?"0p+0":"0";l=(16==t?"0x":2==t?"0b":8==t?"0o":"")+l}else l=x(e);return e.s<0?"-"+l:l}function O(e,t){if(e.length>t)return e.length=t,!0}function R(e){return new this(e).abs()}function k(e){return new this(e).acos()}function N(e){return new this(e).acosh()}function C(e,t){return new this(e).plus(t)}function F(e){return new this(e).asin()}function L(e){return new this(e).asinh()}function B(e){return new this(e).atan()}function j(e){return new this(e).atanh()}function q(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?p(this,r,i):new this(0),n.s=e.s):!e.d||t.isZero()?(n=p(this,o,1).times(.5),n.s=e.s):t.s<0?(this.precision=o,this.rounding=1,n=this.atan(ze(e,t,o,1)),t=p(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(ze(e,t,o,1)):(n=p(this,o,1).times(t.s>0?.25:.75),n.s=e.s):n=new this(NaN),n}function D(e){return new this(e).cbrt()}function z(e){return f(e=new this(e),e.e+1,2)}function U(e){if(!e||"object"!=typeof e)throw Error(Te+"Object expected");var t,n,r,i=["precision",1,be,"rounding",0,8,"toExpNeg",-ye,0,"toExpPos",0,ye,"maxE",0,ye,"minE",-ye,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(void 0!==(r=e[n=i[t]])){if(!(Ie(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(Me+n+": "+r);this[n]=r}if(e.hasOwnProperty(n="crypto"))if(void 0===(r=e[n]))this[n]=r;else{if(r!==!0&&r!==!1&&0!==r&&1!==r)throw Error(Me+n+": "+r);this[n]=!(!r||!Ee||!Ee.getRandomValues&&!Ee.randomBytes)}return this}function V(e){return new this(e).cos()}function $(e){return new this(e).cosh()}function H(e){function t(e){var n,r,i,o=this;if(!(o instanceof t))return new t(e);if(o.constructor=t,e instanceof t)return o.s=e.s,o.e=e.e,void(o.d=(e=e.d)?e.slice():e);if(i=typeof e,"number"===i){if(0===e)return o.s=1/e<0?-1:1,o.e=0,void(o.d=[0]);if(e<0?(e=-e,o.s=-1):o.s=1,e===~~e&&e<1e7){for(n=0,r=e;r>=10;r/=10)n++;return o.e=n,void(o.d=[e])}return 0*e!==0?(e||(o.s=NaN),o.e=NaN,void(o.d=null)):E(o,e.toString())}if("string"!==i)throw Error(Me+e);return 45===e.charCodeAt(0)?(e=e.slice(1),o.s=-1):o.s=1,Ce.test(e)?E(o,e):A(o,e)}var n,r,i;if(t.prototype=De,t.ROUND_UP=0,t.ROUND_DOWN=1,t.ROUND_CEIL=2,t.ROUND_FLOOR=3,t.ROUND_HALF_UP=4,t.ROUND_HALF_DOWN=5,t.ROUND_HALF_EVEN=6,t.ROUND_HALF_CEIL=7,t.ROUND_HALF_FLOOR=8,t.EUCLID=9,t.config=U,t.clone=H,t.abs=R,t.acos=k,t.acosh=N,t.add=C,t.asin=F,t.asinh=L,t.atan=B,t.atanh=j,t.atan2=q,t.cbrt=D,t.ceil=z,t.cos=V,t.cosh=$,t.div=X,t.exp=K,t.floor=G,t.fromJSON=J,t.hypot=W,t.ln=Y,t.log=Z,t.log10=ee,t.log2=Q,t.max=te,t.min=ne,t.mod=re,t.mul=ie,t.pow=oe,t.random=se,t.round=ae,t.sign=ce,t.sin=ue,t.sinh=fe,t.sqrt=he,t.sub=de,t.tan=le,t.tanh=pe,t.trunc=me,void 0===e&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return t.config(e),t}function X(e,t){return new this(e).div(t)}function K(e){return new this(e).exp()}function G(e){return f(e=new this(e),e.e+1,3)}function J(e){var t,n,r,i;if("string"!=typeof e||!e)throw Error(Me+e);if(r=e.length,i=we.indexOf(e.charAt(0)),1===r)return new this(i>81?[-1/0,1/0,NaN][i-82]:i>40?-(i-41):i);if(64&i)n=16&i,t=n?(7&i)-3:(15&i)-7,r=1;else{if(2===r)return i=88*i+we.indexOf(e.charAt(1)),new this(i>=2816?-(i-2816)-41:i+41);if(n=32&i,!(31&i))return e=c(e.slice(1),88,10).join(""),new this(n?"-"+e:e);t=15&i,r=t+1,t=1===t?we.indexOf(e.charAt(1)):2===t?88*we.indexOf(e.charAt(1))+we.indexOf(e.charAt(2)):+c(e.slice(1,r),88,10).join(""),16&i&&(t=-t)}return e=c(e.slice(r),88,10).join(""),t=t-e.length+1,e=e+"e"+t,new this(n?"-"+e:e)}function W(){var e,t,n=new this(0);for(Ae=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return Ae=!0,new this(1/0);n=t}return Ae=!0,n.sqrt()}function Y(e){return new this(e).ln()}function Z(e,t){return new this(e).log(t)}function Q(e){return new this(e).log(2)}function ee(e){return new this(e).log(10)}function te(){return b(this,arguments,"lt")}function ne(){return b(this,arguments,"gt")}function re(e,t){return new this(e).mod(t)}function ie(e,t){return new this(e).mul(t)}function oe(e,t){return new this(e).pow(t)}function se(e){var t,n,r,i,o=0,a=new this(1),c=[];if(void 0===e?e=this.precision:s(e,1,be),r=Math.ceil(e/Le),this.crypto===!1)for(;o<r;)c[o++]=1e7*Math.random()|0;else if(Ee&&Ee.getRandomValues)for(t=Ee.getRandomValues(new Uint32Array(r));o<r;)i=t[o],i>=429e7?t[o]=Ee.getRandomValues(new Uint32Array(1))[0]:c[o++]=i%1e7;else if(Ee&&Ee.randomBytes){for(t=Ee.randomBytes(r*=4);o<r;)i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24),i>=214e7?Ee.randomBytes(4).copy(t,o):(c.push(i%1e7),o+=4);o=r/4}else{if(this.crypto)throw Error(Te+"crypto unavailable");for(;o<r;)c[o++]=1e7*Math.random()|0}for(r=c[--o],e%=Le,r&&e&&(i=Oe(10,Le-e),c[o]=(r/i|0)*i);0===c[o];o--)c.pop();if(o<0)n=0,c=[0];else{for(n=-1;0===c[0];n-=Le)c.shift();for(r=1,i=c[0];i>=10;i/=10)r++;r<Le&&(n-=Le-r)}return a.e=n,a.d=c,a}function ae(e){return f(e=new this(e),e.e+1,this.rounding)}function ce(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function ue(e){return new this(e).sin()}function fe(e){return new this(e).sinh()}function he(e){return new this(e).sqrt()}function de(e,t){return new this(e).sub(t)}function le(e){return new this(e).tan()}function pe(e){return new this(e).tanh()}function me(e){return f(e=new this(e),e.e+1,1)}var ge,ve,ye=9e15,be=1e9,we="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%()*+,-./:;=?@[]^_`{|}~",_e="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Se="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",xe={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ye,maxE:ye,crypto:void 0},Ee="undefined"!=typeof crypto?crypto:null,Ae=!0,Te="[DecimalError] ",Me=Te+"Invalid argument: ",Pe=Te+"Precision limit exceeded",Ie=Math.floor,Oe=Math.pow,Re=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,ke=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ne=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ce=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Fe=1e7,Le=7,Be=9007199254740991,je=_e.length-1,qe=Se.length-1,De={};De.absoluteValue=De.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),f(e)},De.ceil=function(){return f(new this.constructor(this),this.e+1,2)},De.comparedTo=De.cmp=function(e){var t,n,r,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,c=o.s,u=e.s;if(!s||!a)return c&&u?c!==u?c:s===a?0:!s^c<0?1:-1:NaN;if(!s[0]||!a[0])return s[0]?c:a[0]?-u:0;if(c!==u)return c;if(o.e!==e.e)return o.e>e.e^c<0?1:-1;for(r=s.length,i=a.length,t=0,n=r<i?r:i;t<n;++t)if(s[t]!==a[t])return s[t]>a[t]^c<0?1:-1;return r===i?0:r>i^c<0?1:-1},De.cosine=De.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+Le,r.rounding=1,n=u(r,P(r,n)),r.precision=e,r.rounding=t,f(2==ve||3==ve?n.neg():n,e,t,!0)):new r(1):new r(NaN)},De.cubeRoot=De.cbrt=function(){var e,t,n,r,i,s,a,c,u,h,d=this,l=d.constructor;if(!d.isFinite()||d.isZero())return new l(d);for(Ae=!1,s=d.s*Math.pow(d.s*d,1/3),s&&Math.abs(s)!=1/0?r=new l(s.toString()):(n=o(d.d),e=d.e,(s=(e-n.length+1)%3)&&(n+=1==s||s==-2?"0":"00"),s=Math.pow(n,1/3),e=Ie((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?n="5e"+e:(n=s.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),r=new l(n),r.s=d.s),a=(e=l.precision)+3;;)if(c=r,u=c.times(c).times(c),h=u.plus(d),r=ze(h.plus(d).times(c),h.plus(u),a+2,1),o(c.d).slice(0,a)===(n=o(r.d)).slice(0,a)){if(n=n.slice(a-3,a+1),"9999"!=n&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(f(r,e+1,1),t=!r.times(r).times(r).eq(d));break}if(!i&&(f(c,e+1,0),c.times(c).times(c).eq(d))){r=c;break}a+=4,i=1}return Ae=!0,f(r,e,l.rounding,t)},De.decimalPlaces=De.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-Ie(this.e/Le))*Le,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},De.dividedBy=De.div=function(e){return ze(this,new this.constructor(e))},De.dividedToIntegerBy=De.divToInt=function(e){var t=this,n=t.constructor;return f(ze(t,new n(e),0,1,1),n.precision,n.rounding)},De.equals=De.eq=function(e){return 0===this.cmp(e)},De.floor=function(){return f(new this.constructor(this),this.e+1,3)},De.greaterThan=De.gt=function(e){return this.cmp(e)>0},De.greaterThanOrEqualTo=De.gte=function(e){var t=this.cmp(e);return 1==t||0===t},De.hyperbolicCosine=De.cosh=function(){var e,t,n,r,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;n=s.precision,r=s.rounding,s.precision=n+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=Math.pow(4,-e).toString()):(e=16,t="2.3283064365386962890625e-10"),o=M(s,1,o.times(t),new s(1),!0);for(var c,u=e,h=new s(8);u--;)c=o.times(o),o=a.minus(c.times(h.minus(c.times(h))));return f(o,s.precision=n,s.rounding=r,!0)},De.hyperbolicSine=De.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,r=i.d.length,r<3)i=M(o,2,i,i,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:0|e,i=i.times(Math.pow(5,-e)),i=M(o,2,i,i,!0);for(var s,a=new o(5),c=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(c.times(s).plus(u))))}return o.precision=t,o.rounding=n,f(i,t,n,!0)},De.hyperbolicTangent=De.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,ze(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},De.inverseCosine=De.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return r!==-1?0===r?t.isNeg()?p(n,i,o):new n(0):new n(NaN):t.isZero()?p(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=p(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},De.inverseHyperbolicCosine=De.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Ae=!1,n=n.times(n).minus(1).sqrt().plus(n),Ae=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},De.inverseHyperbolicSine=De.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Ae=!1,n=n.times(n).plus(1).sqrt().plus(n),Ae=!0,r.precision=e,r.rounding=t,n.ln())},De.inverseHyperbolicTangent=De.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?f(new o(i),e,t,!0):(o.precision=n=r-i.e,i=ze(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},De.inverseSine=De.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,t!==-1?0===t?(e=p(o,n+4,r).times(.5),e.s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},De.inverseTangent=De.atan=function(){var e,t,n,r,i,o,s,a,c,u=this,h=u.constructor,d=h.precision,l=h.rounding;if(u.isFinite()){if(u.isZero())return new h(u);if(u.abs().eq(1)&&d+4<=qe)return s=p(h,d+4,l).times(.25),s.s=u.s,s}else{if(!u.s)return new h(NaN);if(d+4<=qe)return s=p(h,d+4,l).times(.5),s.s=u.s,s}for(h.precision=a=d+10,h.rounding=1,n=Math.min(28,a/Le+2|0),e=n;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(Ae=!1,t=Math.ceil(a/Le),r=1,c=u.times(u),s=new h(u),i=u;e!==-1;)if(i=i.times(c),o=s.minus(i.div(r+=2)),i=i.times(c),s=o.plus(i.div(r+=2)),void 0!==s.d[t])for(e=t;s.d[e]===o.d[e]&&e--;);return n&&(s=s.times(2<<n-1)),Ae=!0,f(s,h.precision=d,h.rounding=l,!0)},De.isFinite=function(){return!!this.d},De.isInteger=De.isInt=function(){return!!this.d&&Ie(this.e/Le)>this.d.length-2},De.isNaN=function(){return!this.s},De.isNegative=De.isNeg=function(){return this.s<0},De.isPositive=De.isPos=function(){return this.s>0},De.isZero=function(){return!!this.d&&0===this.d[0]},De.lessThan=De.lt=function(e){return this.cmp(e)<0},De.lessThanOrEqualTo=De.lte=function(e){return this.cmp(e)<1},De.logarithm=De.log=function(e){var t,n,r,i,s,c,u,h,d=this,p=d.constructor,m=p.precision,g=p.rounding,v=5;if(null==e)e=new p(10),t=!0;else{if(e=new p(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new p(NaN);t=e.eq(10)}if(n=d.d,d.s<0||!n||!n[0]||d.eq(1))return new p(n&&!n[0]?-1/0:1!=d.s?NaN:n?0:1/0);if(t)if(n.length>1)s=!0;else{for(i=n[0];i%10===0;)i/=10;s=1!==i}if(Ae=!1,u=m+v,c=S(d,u),r=t?l(p,u+10):S(e,u),h=ze(c,r,u,1),a(h.d,i=m,g))do if(u+=10,c=S(d,u),r=t?l(p,u+10):S(e,u),h=ze(c,r,u,1),!s){+o(h.d).slice(i+1,i+15)+1==1e14&&(h=f(h,m+1,0));break}while(a(h.d,i+=10,g));return Ae=!0,f(h,m,g)},De.minus=De.sub=function(e){var t,n,r,i,o,s,a,c,u,h,l,p,m=this,g=m.constructor;if(e=new g(e),!m.d||!e.d)return m.s&&e.s?m.d?e.s=-e.s:e=new g(e.d||m.s!==e.s?m:NaN):e=new g(NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(u=m.d,p=e.d,a=g.precision,c=g.rounding,!u[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!u[0])return new g(3===c?-0:0);e=new g(m)}return Ae?f(e,a,c):e}if(n=Ie(e.e/Le),h=Ie(m.e/Le),u=u.slice(),o=h-n){for(l=o<0,l?(t=u,o=-o,s=p.length):(t=p,n=h,s=u.length),r=Math.max(Math.ceil(a/Le),s)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=u.length,s=p.length,l=r<s,l&&(s=r),r=0;r<s;r++)if(u[r]!=p[r]){l=u[r]<p[r];break}o=0}for(l&&(t=u,u=p,p=t,e.s=-e.s),s=u.length,r=p.length-s;r>0;--r)u[s++]=0;for(r=p.length;r>o;){if(u[--r]<p[r]){for(i=r;i&&0===u[--i];)u[i]=Fe-1;--u[i],u[r]+=Fe}u[r]-=p[r]}for(;0===u[--s];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(e.d=u,e.e=d(u,n),Ae?f(e,a,c):e):new g(3===c?-0:0)},De.modulo=De.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?f(new r(n),r.precision,r.rounding):(Ae=!1,9==r.modulo?(t=ze(n,e.abs(),0,3,1),t.s*=e.s):t=ze(n,e,0,r.modulo,1),t=t.times(e),Ae=!0,n.minus(t))},De.naturalExponential=De.exp=function(){return w(this)},De.naturalLogarithm=De.ln=function(){return S(this)},De.negated=De.neg=function(){var e=new this.constructor(this);return e.s=-e.s,f(e)},De.plus=De.add=function(e){var t,n,r,i,o,s,a,c,u,h,l=this,p=l.constructor;if(e=new p(e),!l.d||!e.d)return l.s&&e.s?l.d||(e=new p(e.d||l.s===e.s?l:NaN)):e=new p(NaN),e;if(l.s!=e.s)return e.s=-e.s,l.minus(e);if(u=l.d,h=e.d,a=p.precision,c=p.rounding,!u[0]||!h[0])return h[0]||(e=new p(l)),Ae?f(e,a,c):e;if(o=Ie(l.e/Le),r=Ie(e.e/Le),u=u.slice(),i=o-r){for(i<0?(n=u,i=-i,s=h.length):(n=h,r=o,s=u.length),o=Math.ceil(a/Le),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=u.length,i=h.length,s-i<0&&(i=s,n=h,h=u,u=n),t=0;i;)t=(u[--i]=u[i]+h[i]+t)/Fe|0,u[i]%=Fe;for(t&&(u.unshift(t),++r),s=u.length;0==u[--s];)u.pop();return e.d=u,e.e=d(u,r),Ae?f(e,a,c):e},De.precision=De.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Me+e);return n.d?(t=m(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},De.round=function(){var e=this,t=e.constructor;return f(new t(e),e.e+1,t.rounding)},De.sine=De.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+Le,r.rounding=1,n=T(r,P(r,n)),r.precision=e,r.rounding=t,f(ve>2?n.neg():n,e,t,!0)):new r(NaN)},De.squareRoot=De.sqrt=function(){var e,t,n,r,i,s,a=this,c=a.d,u=a.e,h=a.s,d=a.constructor;if(1!==h||!c||!c[0])return new d(!h||h<0&&(!c||c[0])?NaN:c?a:1/0);for(Ae=!1,h=Math.sqrt(+a),0==h||h==1/0?(t=o(c),(t.length+u)%2==0&&(t+="0"),h=Math.sqrt(t),u=Ie((u+1)/2)-(u<0||u%2),h==1/0?t="1e"+u:(t=h.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),r=new d(t)):r=new d(h.toString()),n=(u=d.precision)+3;;)if(s=r,r=s.plus(ze(a,s,n+2,1)).times(.5),o(s.d).slice(0,n)===(t=o(r.d)).slice(0,n)){if(t=t.slice(n-3,n+1),"9999"!=t&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(f(r,u+1,1),e=!r.times(r).eq(a));break}if(!i&&(f(s,u+1,0),s.times(s).eq(a))){r=s;break}n+=4,i=1}return Ae=!0,f(r,u,d.rounding,e)},De.tangent=De.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=ze(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,f(2==ve||4==ve?n.neg():n,e,t,!0)):new r(NaN)},De.times=De.mul=function(e){var t,n,r,i,o,s,a,c,u,h=this,l=h.constructor,p=h.d,m=(e=new l(e)).d;if(e.s*=h.s,!(p&&p[0]&&m&&m[0]))return new l(!e.s||p&&!p[0]&&!m||m&&!m[0]&&!p?NaN:p&&m?0*e.s:e.s/0);for(n=Ie(h.e/Le)+Ie(e.e/Le),c=p.length,u=m.length,c<u&&(o=p,p=m,m=o,s=c,c=u,u=s),o=[],s=c+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,i=c+r;i>r;)a=o[i]+m[r]*p[i-r-1]+t,o[i--]=a%Fe|0,t=a/Fe|0;o[i]=(o[i]+t)%Fe|0}for(;!o[--s];)o.pop();for(t?++n:o.shift(),r=o.length;!o[--r];)o.pop();return e.d=o,e.e=d(o,n),Ae?f(e,l.precision,l.rounding):e},De.toBinary=function(e,t){return I(this,2,e,t)},De.toDecimalPlaces=De.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(s(e,0,be),void 0===t?t=r.rounding:s(t,0,8),f(n,e+n.e+1,t))},De.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=h(r,!0):(s(e,0,be),void 0===t?t=i.rounding:s(t,0,8),r=f(new i(r),e+1,t),n=h(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},De.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=h(i):(s(e,0,be),void 0===t?t=o.rounding:s(t,0,8),r=f(new o(i),e+i.e+1,t),n=h(r,!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},De.toFraction=function(e){var t,n,r,i,s,a,c,u,f,h,d,l,p=this,g=p.d,v=p.constructor;if(!g)return new v(p);if(f=n=new v(1),r=u=new v(0),t=new v(r),s=t.e=m(g)-p.e-1,a=s%Le,t.d[0]=Oe(10,a<0?Le+a:a),null==e)e=s>0?t:f;else{if(c=new v(e),!c.isInt()||c.lt(f))throw Error(Me+c);e=c.gt(t)?s>0?t:f:c}for(Ae=!1,c=new v(o(g)),h=v.precision,v.precision=s=g.length*Le*2;d=ze(c,t,0,1,1),i=n.plus(d.times(r)),1!=i.cmp(e);)n=r,r=i,i=f,f=u.plus(d.times(i)),u=i,i=t,t=c.minus(d.times(i)),c=i;return i=ze(e.minus(n),r,0,1,1),u=u.plus(i.times(f)),n=n.plus(i.times(r)),u.s=f.s=p.s,l=ze(f,r,s,1).minus(p).abs().cmp(ze(u,n,s,1).minus(p).abs())<1?[f,r]:[u,n],v.precision=h,Ae=!0,l},De.toHexadecimal=De.toHex=function(e,t){return I(this,16,e,t)},De.toJSON=function(){var e,t,n,r,i,s,a,u,f=this,h=f.s<0;if(!f.d)return we.charAt(f.s?h?82:83:84);if(t=f.e,1===f.d.length&&t<4&&t>=0&&(s=f.d[0],s<2857))return s<41?we.charAt(h?s+41:s):(s-=41,h&&(s+=2816),r=s/88|0,we.charAt(r)+we.charAt(s-88*r));if(u=o(f.d),a="",!h&&t<=8&&t>=-7)r=64+t+7;else if(h&&t<=4&&t>=-3)r=80+t+3;else if(u.length===t+1)r=32*h;else if(r=32*h+16*(t<0),t=Math.abs(t),t<88)r+=1,a=we.charAt(t);else if(t<7744)r+=2,s=t/88|0,a=we.charAt(s)+we.charAt(t-88*s);else for(e=c(String(t),10,88),i=e.length,r+=i,n=0;n<i;n++)a+=we.charAt(e[n]);for(a=we.charAt(r)+a,e=c(u,10,88),i=e.length,n=0;n<i;n++)a+=we.charAt(e[n]);return a},De.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0!==t&&s(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(Ae=!1,t<4&&(t=[4,5,7,8][t]),n=ze(n,e,0,t,1).times(e),Ae=!0,f(n)):(e.s=n.s,n=e),n},De.toNumber=function(){return+this},De.toOctal=function(e,t){return I(this,8,e,t)},De.toPower=De.pow=function(e){var t,n,r,i,s,c,u,h=this,d=h.constructor,l=+(e=new d(e));if(!(h.d&&e.d&&h.d[0]&&e.d[0]))return new d(Oe(+h,l));if(h=new d(h),h.eq(1))return h;if(r=d.precision,s=d.rounding,e.eq(1))return f(h,r,s);if(t=Ie(e.e/Le),n=e.d.length-1,u=t>=n,c=h.s,u){if((n=l<0?-l:l)<=Be)return i=v(d,h,n,r),e.s<0?new d(1).div(i):f(i,r,s)}else if(c<0)return new d(NaN);return c=c<0&&1&e.d[Math.max(t,n)]?-1:1,n=Oe(+h,l),t=0!=n&&isFinite(n)?new d(n+"").e:Ie(l*(Math.log("0."+o(h.d))/Math.LN10+h.e+1)),t>d.maxE+1||t<d.minE-1?new d(t>0?c/0:0):(Ae=!1,d.rounding=h.s=1,n=Math.min(12,(t+"").length),i=w(e.times(S(h,r+n)),r),i=f(i,r+5,1),a(i.d,r,s)&&(t=r+10,
|
||
i=f(w(e.times(S(h,t+n)),t),t+5,1),+o(i.d).slice(r+1,r+15)+1==1e14&&(i=f(i,r+1,0))),i.s=c,Ae=!0,d.rounding=s,f(i,r,s))},De.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=h(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(s(e,1,be),void 0===t?t=i.rounding:s(t,0,8),r=f(new i(r),e,t),n=h(r,e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},De.toSignificantDigits=De.toSD=function(e,t){var n=this,r=n.constructor;return void 0===e?(e=r.precision,t=r.rounding):(s(e,1,be),void 0===t?t=r.rounding:s(t,0,8)),f(new r(n),e,t)},De.toString=function(){var e=this,t=e.constructor,n=h(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},De.truncated=De.trunc=function(){return f(new this.constructor(this),this.e+1,1)},De.valueOf=function(){var e=this,t=e.constructor,n=h(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var ze=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s,a,c){var u,h,d,l,p,m,g,v,y,b,w,S,x,E,A,T,M,P,I,O,R=r.constructor,k=r.s==i.s?1:-1,N=r.d,C=i.d;if(!(N&&N[0]&&C&&C[0]))return new R(r.s&&i.s&&(N?!C||N[0]!=C[0]:C)?N&&0==N[0]||!C?0*k:k/0:NaN);for(c?(p=1,h=r.e-i.e):(c=Fe,p=Le,h=Ie(r.e/p)-Ie(i.e/p)),I=C.length,M=N.length,y=new R(k),b=y.d=[],d=0;C[d]==(N[d]||0);d++);if(C[d]>(N[d]||0)&&h--,null==o?(E=o=R.precision,s=R.rounding):E=a?o+(r.e-i.e)+1:o,E<0)b.push(1),m=!0;else{if(E=E/p+2|0,d=0,1==I){for(l=0,C=C[0],E++;(d<M||l)&&E--;d++)A=l*c+(N[d]||0),b[d]=A/C|0,l=A%C|0;m=l||d<M}else{for(l=c/(C[0]+1)|0,l>1&&(C=e(C,l,c),N=e(N,l,c),I=C.length,M=N.length),T=I,w=N.slice(0,I),S=w.length;S<I;)w[S++]=0;O=C.slice(),O.unshift(0),P=C[0],C[1]>=c/2&&++P;do l=0,u=t(C,w,I,S),u<0?(x=w[0],I!=S&&(x=x*c+(w[1]||0)),l=x/P|0,l>1?(l>=c&&(l=c-1),g=e(C,l,c),v=g.length,S=w.length,u=t(g,w,v,S),1==u&&(l--,n(g,I<v?O:C,v,c))):(0==l&&(u=l=1),g=C.slice()),v=g.length,v<S&&g.unshift(0),n(w,g,S,c),u==-1&&(S=w.length,u=t(C,w,I,S),u<1&&(l++,n(w,I<S?O:C,S,c))),S=w.length):0===u&&(l++,w=[0]),b[d++]=l,u&&w[0]?w[S++]=N[T]||0:(w=[N[T]],S=1);while((T++<M||void 0!==w[0])&&E--);m=void 0!==w[0]}b[0]||b.shift()}if(1==p)y.e=h,ge=m;else{for(d=1,l=b[0];l>=10;l/=10)d++;y.e=d+h*p-1,f(y,a?o+y.e+1:o,s,m)}return y}}();xe=H(xe),_e=new xe(_e),Se=new xe(Se),r=function(){return xe}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)},function(e,t,n){"use strict";function r(e){var t=new Uint8Array(20);if("XRP"!==e){var n=e.split("").map(function(e){return e.charCodeAt(0)});t.set(n,12)}return t}function i(e){return 3===e.length}function o(e){return g.test(e)}function s(e){return _.isString(e)&&(i(e)||o(e))}function a(e){return 20===e.length}function c(e){return s(e)||a(e)}function u(e){if(c(e))return 3===e.length?r(e):e;throw new Error("Unsupported Currency repr: "+e)}var _=n(300),f=n(569),h=n(568),d=h.slice,l=n(573),p=l.Hash160,m=/^[A-Z0-9]{3}$/,g=/^[A-F0-9]{40}$/,v=p.prototype,y=f({inherits:p,getters:["isNative","iso"],statics:{init:function(){this.XRP=new this(new Uint8Array(20))},from:function(e){return e instanceof this?e:new this(u(e))}},Currency:function(e){p.call(this,e),this.classify()},classify:function(){for(var e=!0,t=this._bytes,n=d(this._bytes,12,15,Array),r=n.map(function(e){return String.fromCharCode(e)}).join(""),i=t.length-1;i>=0;i--)if(0!==t[i]&&12!==i&&13!==i&&14!==i){e=!1;break}var o=e&&"XRP"!==r&&m.test(r);this._isNative=e&&_.isEqual(n,[0,0,0]),this._iso=this._isNative?"XRP":o?r:null},toJSON:function(){return this.iso()?this.iso():v.toJSON.call(this)}});e.exports={Currency:y}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},i=n(306),o=n(578),s=n(569),a=n(568),c=a.bytesToHex,u=a.parseBytes,f=a.serializeUIntN,h=n(582),d=h.UInt,l=/^[A-F0-9]{16}$/,p=s({inherits:d,statics:{width:8},UInt64:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t="undefined"==typeof e?"undefined":r(e);if("number"===t)i(e>=0),this._bytes=new Uint8Array(8),this._bytes.set(f(e,4),4);else if(e instanceof o)this._bytes=u(e.toArray("be",8),Uint8Array),this._toBN=e;else{if("string"===t&&!l.test(e))throw new Error(e+" is not a valid UInt64 hex string");this._bytes=u(e,Uint8Array)}i(8===this._bytes.length)},toJSON:function(){return c(this._bytes)},valueOf:function(){return this.toBN()},cached:{toBN:function(){return new o(this._bytes)}},toBytes:function(){return this._bytes}});e.exports={UInt64:p}},function(e,t,n){"use strict";function r(e,t){return e<t?-1:e===t?0:1}var i=n(306),o=n(578),s=n(569),a=n(575),c=a.Comparable,u=a.SerializedType,f=n(568),h=f.serializeUIntN,d=[0,255,65535,16777215,4294967295],l=s({mixins:[c,u],UInt:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=d[this.constructor.width];if(e<0||!(e<=t))throw new Error(e+" not in range 0 <= $val <= "+t);this.val=e},statics:{width:0,fromParser:function(e){var t=this.width>4?e.read(this.width):e.readUIntN(this.width);return new this(t)},from:function(e){return e instanceof this?e:new this(e)}},toJSON:function(){return this.val},valueOf:function(){return this.val},compareTo:function(e){var t=this.valueOf(),n=e.valueOf();return t instanceof o?n instanceof o?t.cmp(n):t.cmpn(n):n instanceof o?-e.compareTo(this):(i("number"==typeof n),r(t,n))},toBytesSink:function(e){e.put(this.toBytes())},toBytes:function(){return h(this.val,this.constructor.width)}});e.exports={UInt:l}},function(e,t,n){"use strict";var r=n(569),i=n(568),o=i.parseBytes,s=n(575),a=s.SerializedType,c=r({mixins:a,Blob:function(e){e?this._bytes=o(e,Uint8Array):this._bytes=new Uint8Array(0)},statics:{fromParser:function(e,t){return new this(e.read(t))},from:function(e){return e instanceof this?e:new this(e)}}});e.exports={Blob:c}},function(e,t,n){"use strict";var r=n(569),i=n(574),o=i.Hash,s=r({inherits:o,statics:{width:16}});e.exports={Hash128:s}},function(e,t,n){"use strict";var r=n(569),i=n(574),o=i.Hash,s=r({inherits:o,statics:{width:32,init:function(){this.ZERO_256=new this(new Uint8Array(this.width))}}});e.exports={Hash256:s}},function(e,t,n){"use strict";var r=n(569),i=n(575),o=i.SerializedType,s=i.ensureArrayLikeIs,a=n(580),c=a.Currency,u=n(572),f=u.AccountID,h=0,d=255,l=1,p=16,m=32,g=r({statics:{from:function(e){if(e instanceof this)return e;var t=new g;return e.issuer&&(t.issuer=f.from(e.issuer)),e.account&&(t.account=f.from(e.account)),e.currency&&(t.currency=c.from(e.currency)),t},parse:function(e,t){var n=new g;return t&l&&(n.account=f.fromParser(e)),t&p&&(n.currency=c.fromParser(e)),t&m&&(n.issuer=f.fromParser(e)),n}},toJSON:function(){var e=this.type(),t={};return e&l&&(t.account=this.account.toJSON()),e&m&&(t.issuer=this.issuer.toJSON()),e&p&&(t.currency=this.currency.toJSON()),t},type:function b(){var b=0;return this.issuer&&(b+=m),this.account&&(b+=l),this.currency&&(b+=p),b}}),v=r({inherits:Array,statics:{from:function(e){return s(v,e).withChildren(g)}},toJSON:function(){return this.map(function(e){return e.toJSON()})}}),y=r({mixins:o,inherits:Array,statics:{from:function(e){return s(y,e).withChildren(v)},fromParser:function(e){for(var t=new this,n=void 0;!e.end();){var r=e.readUInt8();if(r===h)break;r!==d?(n||(n=new v,t.push(n)),n.push(g.parse(e,r))):n=null}return t}},toJSON:function(){return this.map(function(e){return e.toJSON()})},toBytesSink:function(e){var t=0;this.forEach(function(n){0!==t++&&e.put([d]),n.forEach(function(t){e.put([t.type()]),t.account&&t.account.toBytesSink(e),t.currency&&t.currency.toBytesSink(e),t.issuer&&t.issuer.toBytesSink(e)})}),e.put([h])}});e.exports={PathSet:y}},function(e,t,n){"use strict";var r=n(569),i=n(575),o=i.ensureArrayLikeIs,s=i.SerializedType,a=n(567),c=a.Field,u=n(588),f=u.STObject,h=c.ArrayEndMarker,d=r({mixins:s,inherits:Array,statics:{fromParser:function(e){for(var t=new d;!e.end();){var n=e.readField();if(n===h)break;var r=new f;r[n]=e.readFieldValue(n),t.push(r)}return t},from:function(e){return o(d,e).withChildren(f)}},toJSON:function(){return this.map(function(e){return e.toJSON()})},toBytesSink:function(e){this.forEach(function(t){return t.toBytesSink(e)})}});e.exports={STArray:d}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_=n(300),i=n(569),o=n(567),s=o.Field,a=n(576),c=a.BinarySerializer,u=s.ObjectEndMarker,f=n(575),h=f.SerializedType,d=i({mixins:h,statics:{fromParser:function(e,t){for(var n="number"==typeof t?e.pos()+t:null,r=new this;!e.end(n);){var i=e.readField();if(i===u)break;r[i]=e.readFieldValue(i)}return r},from:function(e){if(e instanceof this)return e;if("object"===("undefined"==typeof e?"undefined":r(e)))return _.transform(e,function(e,t,n){var r=s[n];r?e[r]=r.associatedType.from(t):e[n]=t},new this);throw new Error(e+" is unsupported")}},fieldKeys:function(){return Object.keys(this).map(function(e){return s[e]}).filter(Boolean)},toJSON:function(){var e={};return _.transform(this,function(e,t,n){e[n]=t&&t.toJSON?t.toJSON():t},e)},toBytesSink:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?function(){return!0}:arguments[1],r=new c(e),i=this.fieldKeys(),o=_.sortBy(i,"ordinal");o.filter(n).forEach(function(e){var n=t[e];e.isSerialized&&r.writeFieldAndValue(e,n)})}});e.exports={STObject:d}},function(e,t,n){"use strict";var r=n(569),i=n(582),o=i.UInt,s=r({inherits:o,statics:{width:2}});e.exports={UInt16:s}},function(e,t,n){"use strict";var r=n(569),i=n(582),o=i.UInt,s=r({inherits:o,statics:{width:4}});e.exports={UInt32:s}},function(e,t,n){"use strict";var r=n(569),i=n(582),o=i.UInt,s=r({inherits:o,statics:{width:1}});e.exports={UInt8:s}},function(e,t,n){"use strict";var r=n(569),i=n(585),o=i.Hash256,s=n(575),a=s.ensureArrayLikeIs,c=s.SerializedType,u=r({mixins:c,inherits:Array,statics:{fromParser:function(e,t){for(var n=new this,r=null!==t?t:e.size()-e.pos(),i=r/32,s=0;s<i;s++)n.push(o.fromParser(e));return n},from:function(e){return a(u,e).withChildren(o)}},toBytesSink:function(e){this.forEach(function(t){return t.toBytesSink(e)})},toJSON:function(){return this.map(function(e){return e.toJSON()})}});e.exports={Vector256:u}},function(e,t,n){"use strict";function r(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.prefix,r=t.suffix,i=t.signingFieldsOnly,o=void 0!==i&&i,s=new m;n&&s.put(n);var a=o?function(e){return e.isSigningField}:void 0;return c.STObject.from(e).toBytesSink(s,a),r&&s.put(r),s.toBytes()}function i(e){var t=arguments.length<=1||void 0===arguments[1]?f.transactionSig:arguments[1];return r(e,{prefix:t,signingFieldsOnly:!0})}function o(e){var t=f.paymentChannelClaim,n=c.Hash256.from(e.channel).toBytes(),r=new c.UInt64(new a(e.amount)).toBytes(),i=new m;return i.put(t),i.put(n),i.put(r),i.toBytes()}function s(e,t){var n=f.transactionMultiSig,i=c.AccountID.from(t).toBytes();return r(e,{prefix:n,suffix:i,signingFieldsOnly:!0})}var a=n(578),c=n(571),u=n(594),f=u.HashPrefix,h=n(595),d=h.BinaryParser,l=n(576),p=l.BinarySerializer,m=l.BytesList,g=n(568),v=g.bytesToHex,y=g.slice,b=g.parseBytes,w=n(596),S=w.sha512Half,x=w.transactionID,E=function(e){return new d(e)},A=function(e){return e.readType(c.STObject).toJSON()},T=function(e){return A(E(e))};e.exports={BinaryParser:d,BinarySerializer:p,BytesList:m,makeParser:E,serializeObject:r,readJSON:A,bytesToHex:v,parseBytes:b,multiSigningData:s,signingData:i,signingClaimData:o,binaryToJSON:T,sha512Half:S,transactionID:x,slice:y}},function(e,t,n){"use strict";function r(e){return o(e,4)}var i=n(568),o=i.serializeUIntN,s={transactionID:r(1415073280),transaction:r(1397638144),accountStateEntry:r(1296846336),innerNode:r(1296649728),ledgerHeader:r(1280791040),transactionSig:r(1398036480),transactionMultiSig:r(1397576704),validation:r(1447119872),proposal:r(1347571712),paymentChannelClaim:r(1129073920)};e.exports={HashPrefix:s}},function(e,t,n){"use strict";var r=n(306),i=n(569),o=n(567),s=o.Field,a=n(568),c=a.slice,u=a.parseBytes,f=i({BinaryParser:function(e){this._buf=u(e,Uint8Array),this._length=this._buf.length,this._cursor=0},skip:function(e){this._cursor+=e},read:function(e){var t=arguments.length<=1||void 0===arguments[1]?Uint8Array:arguments[1],n=this._cursor,i=this._cursor+e;return r(i<=this._buf.length),this._cursor=i,c(this._buf,n,i,t)},readUIntN:function(e){return this.read(e,Array).reduce(function(e,t){return e<<8|t})>>>0},readUInt8:function(){return this._buf[this._cursor++]},readUInt16:function(){return this.readUIntN(2)},readUInt32:function(){return this.readUIntN(4)},pos:function(){return this._cursor},size:function(){return this._buf.length},end:function(e){var t=this.pos();return t>=this._length||null!==e&&t>=e},readVL:function(){return this.read(this.readVLLength())},readVLLength:function(){var e=this.readUInt8();if(e<=192)return e;if(e<=240){var t=this.readUInt8();return 193+256*(e-193)+t}if(e<=254){var n=this.readUInt8(),r=this.readUInt8();return 12481+65536*(e-241)+256*n+r}throw new Error("Invalid varint length indicator")},readFieldOrdinal:function(){var e=this.readUInt8(),t=(240&e)>>>4||this.readUInt8(),n=15&e||this.readUInt8();return t<<16|n},readField:function(){return s.from(this.readFieldOrdinal())},readType:function(e){return e.fromParser(this)},typeForField:function(e){return e.associatedType},readFieldValue:function(e){var t=this.typeForField(e);if(!t)throw new Error("unsupported: ("+e.name+", "+e.type.name+")");var n=e.isVLEncoded?this.readVLLength():null,r=t.fromParser(this,n);if(void 0===r)throw new Error("fromParser for ("+e.name+", "+e.type.name+") -> undefined ");return r},readFieldAndValue:function(){var e=this.readField();return[e,this.readFieldValue(e)]}});e.exports={BinaryParser:f}},function(e,t,n){(function(t){"use strict";function r(){for(var e=new l,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){return e.put(t)}),h(e.finish256(),Uint8Array)}function i(e){return new u(r(a.transactionID,e))}var o=n(569),s=n(594),a=s.HashPrefix,c=n(571),u=c.Hash256,f=n(568),h=f.parseBytes,d=n(597),l=o({Sha512Half:function(){this.hash=d("sha512")},statics:{put:function(e){return(new this).put(e)}},put:function(e){return this.hash.update(h(e,t)),this},finish256:function(){var e=this.hash.digest();return e.slice(0,32)},finish:function(){return new u(this.finish256())}});e.exports={Sha512Half:l,sha512Half:r,transactionID:i}}).call(t,n(312).Buffer)},function(e,t,n){(function(t){"use strict";function r(e){u.call(this,"digest"),this._hash=e,this.buffers=[]}function i(e){u.call(this,"digest"),this._hash=e}var o=n(309),s=n(598),a=n(600),c=n(601),u=n(609);o(r,u),r.prototype._update=function(e){this.buffers.push(e)},r.prototype._final=function(){var e=t.concat(this.buffers),n=this._hash(e);return this.buffers=null,n},o(i,u),i.prototype._update=function(e){this._hash.update(e)},i.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return e=e.toLowerCase(),"md5"===e?new r(s):"rmd160"===e||"ripemd160"===e?new r(a):new i(c(e))}}).call(t,n(312).Buffer)},function(e,t,n){"use strict";function r(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,i=-1732584194,f=271733878,h=0;h<e.length;h+=16){var d=n,l=r,p=i,m=f;n=o(n,r,i,f,e[h+0],7,-680876936),f=o(f,n,r,i,e[h+1],12,-389564586),i=o(i,f,n,r,e[h+2],17,606105819),r=o(r,i,f,n,e[h+3],22,-1044525330),n=o(n,r,i,f,e[h+4],7,-176418897),f=o(f,n,r,i,e[h+5],12,1200080426),i=o(i,f,n,r,e[h+6],17,-1473231341),r=o(r,i,f,n,e[h+7],22,-45705983),n=o(n,r,i,f,e[h+8],7,1770035416),f=o(f,n,r,i,e[h+9],12,-1958414417),i=o(i,f,n,r,e[h+10],17,-42063),r=o(r,i,f,n,e[h+11],22,-1990404162),n=o(n,r,i,f,e[h+12],7,1804603682),f=o(f,n,r,i,e[h+13],12,-40341101),i=o(i,f,n,r,e[h+14],17,-1502002290),r=o(r,i,f,n,e[h+15],22,1236535329),n=s(n,r,i,f,e[h+1],5,-165796510),f=s(f,n,r,i,e[h+6],9,-1069501632),i=s(i,f,n,r,e[h+11],14,643717713),r=s(r,i,f,n,e[h+0],20,-373897302),n=s(n,r,i,f,e[h+5],5,-701558691),f=s(f,n,r,i,e[h+10],9,38016083),i=s(i,f,n,r,e[h+15],14,-660478335),r=s(r,i,f,n,e[h+4],20,-405537848),n=s(n,r,i,f,e[h+9],5,568446438),f=s(f,n,r,i,e[h+14],9,-1019803690),i=s(i,f,n,r,e[h+3],14,-187363961),r=s(r,i,f,n,e[h+8],20,1163531501),n=s(n,r,i,f,e[h+13],5,-1444681467),f=s(f,n,r,i,e[h+2],9,-51403784),i=s(i,f,n,r,e[h+7],14,1735328473),r=s(r,i,f,n,e[h+12],20,-1926607734),n=a(n,r,i,f,e[h+5],4,-378558),f=a(f,n,r,i,e[h+8],11,-2022574463),i=a(i,f,n,r,e[h+11],16,1839030562),r=a(r,i,f,n,e[h+14],23,-35309556),n=a(n,r,i,f,e[h+1],4,-1530992060),f=a(f,n,r,i,e[h+4],11,1272893353),i=a(i,f,n,r,e[h+7],16,-155497632),r=a(r,i,f,n,e[h+10],23,-1094730640),n=a(n,r,i,f,e[h+13],4,681279174),f=a(f,n,r,i,e[h+0],11,-358537222),i=a(i,f,n,r,e[h+3],16,-722521979),r=a(r,i,f,n,e[h+6],23,76029189),n=a(n,r,i,f,e[h+9],4,-640364487),f=a(f,n,r,i,e[h+12],11,-421815835),i=a(i,f,n,r,e[h+15],16,530742520),r=a(r,i,f,n,e[h+2],23,-995338651),n=c(n,r,i,f,e[h+0],6,-198630844),f=c(f,n,r,i,e[h+7],10,1126891415),i=c(i,f,n,r,e[h+14],15,-1416354905),r=c(r,i,f,n,e[h+5],21,-57434055),n=c(n,r,i,f,e[h+12],6,1700485571),f=c(f,n,r,i,e[h+3],10,-1894986606),i=c(i,f,n,r,e[h+10],15,-1051523),r=c(r,i,f,n,e[h+1],21,-2054922799),n=c(n,r,i,f,e[h+8],6,1873313359),f=c(f,n,r,i,e[h+15],10,-30611744),i=c(i,f,n,r,e[h+6],15,-1560198380),r=c(r,i,f,n,e[h+13],21,1309151649),n=c(n,r,i,f,e[h+4],6,-145523070),f=c(f,n,r,i,e[h+11],10,-1120210379),i=c(i,f,n,r,e[h+2],15,718787259),r=c(r,i,f,n,e[h+9],21,-343485551),n=u(n,d),r=u(r,l),i=u(i,p),f=u(f,m)}return Array(n,r,i,f)}function i(e,t,n,r,i,o){return u(f(u(u(t,e),u(r,o)),i),n)}function o(e,t,n,r,o,s,a){return i(t&n|~t&r,e,t,o,s,a)}function s(e,t,n,r,o,s,a){return i(t&r|n&~r,e,t,o,s,a)}function a(e,t,n,r,o,s,a){return i(t^n^r,e,t,o,s,a)}function c(e,t,n,r,o,s,a){return i(n^(t|~r),e,t,o,s,a)}function u(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n}function f(e,t){return e<<t|e>>>32-t}var h=n(599);e.exports=function(e){return h.hash(e,r,16)}},function(e,t,n){(function(e){"use strict";function n(t,n){if(t.length%o!==0){var r=t.length+(o-t.length%o);t=e.concat([t,s],r)}for(var i=[],a=n?t.readInt32BE:t.readInt32LE,c=0;c<t.length;c+=o)i.push(a.call(t,c));return i}function r(t,n,r){for(var i=new e(n),o=r?i.writeInt32BE:i.writeInt32LE,s=0;s<t.length;s++)o.call(i,t[s],4*s,!0);return i}function i(t,i,o,s){e.isBuffer(t)||(t=new e(t));var c=i(n(t,s),t.length*a);return r(c,o,s)}var o=4,s=new e(o);s.fill(0);var a=8;t.hash=i}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function n(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t}function r(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t}function i(e,t,n){for(var r=0;r<16;r++){var i=n+r,h=t[i];t[i]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}var y,b,w,S,x,E,A,T,M,P;E=y=e[0],A=b=e[1],T=w=e[2],M=S=e[3],P=x=e[4];var I;for(r=0;r<80;r+=1)I=y+t[n+d[r]]|0,I+=r<16?o(b,w,S)+g[0]:r<32?s(b,w,S)+g[1]:r<48?a(b,w,S)+g[2]:r<64?c(b,w,S)+g[3]:u(b,w,S)+g[4],I=0|I,I=f(I,p[r]),I=I+x|0,y=x,x=S,S=f(w,10),w=b,b=I,I=E+t[n+l[r]]|0,I+=r<16?u(A,T,M)+v[0]:r<32?c(A,T,M)+v[1]:r<48?a(A,T,M)+v[2]:r<64?s(A,T,M)+v[3]:o(A,T,M)+v[4],I=0|I,I=f(I,m[r]),I=I+P|0,E=P,P=M,M=f(T,10),T=A,A=I;I=e[1]+w+M|0,e[1]=e[2]+S+P|0,e[2]=e[3]+x+E|0,e[3]=e[4]+y+A|0,e[4]=e[0]+b+T|0,e[0]=I}function o(e,t,n){return e^t^n}function s(e,t,n){return e&t|~e&n}function a(e,t,n){return(e|~t)^n}function c(e,t,n){return e&n|t&~n}function u(e,t,n){return e^(t|~n)}function f(e,t){return e<<t|e>>>32-t}function h(e){var o=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof e&&(e=new t(e,"utf8"));var s=n(e),a=8*e.length,c=8*e.length;s[a>>>5]|=128<<24-a%32,s[(a+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8);for(var u=0;u<s.length;u+=16)i(o,s,u);for(u=0;u<5;u++){var f=o[u];o[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var h=r(o);return new t(h)}var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],g=[0,1518500249,1859775393,2400959708,2840853838],v=[1352829926,1548603684,1836072691,2053994217,0];e.exports=h}).call(t,n(312).Buffer)},function(e,t,n){var t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n};t.sha=n(602),t.sha1=n(604),t.sha224=n(605),t.sha256=n(606),t.sha384=n(607),t.sha512=n(608)},function(e,t,n){(function(t){function r(){this.init(),this._w=f,c.call(this,64,56)}function i(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function s(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}var a=n(309),c=n(603),u=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);a(r,c),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,a=0|this._c,c=0|this._d,f=0|this._e,h=0;h<16;++h)t[h]=e.readInt32BE(4*h);for(;h<80;++h)t[h]=t[h-3]^t[h-8]^t[h-14]^t[h-16];for(var d=0;d<80;++d){var l=~~(d/20),p=i(n)+s(l,r,a,c)+f+t[d]+u[l]|0;f=c,c=a,a=o(r),r=n,n=p}this._a=n+this._a|0,this._b=r+this._b|0,this._c=a+this._c|0,this._d=c+this._d|0,this._e=f+this._e|0},r.prototype._hash=function(){var e=new t(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=r}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function n(e,n){this._block=new t(e),this._finalSize=n,this._blockSize=e,this._len=0,this._s=0}n.prototype.update=function(e,n){"string"==typeof e&&(n=n||"utf8",e=new t(e,n));for(var r=this._len+=e.length,i=this._s||0,o=0,s=this._block;i<r;){for(var a=Math.min(e.length,o+this._blockSize-i%this._blockSize),c=a-o,u=0;u<c;u++)s[i%this._blockSize+u]=e[u+o];i+=c,o+=c,i%this._blockSize===0&&this._update(s)}return this._s=i,this},n.prototype.digest=function(e){var t=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),t%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var n=this._update(this._block)||this._hash();return e?n.toString(e):n},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=n}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(){this.init(),this._w=h,u.call(this,64,56)}function i(e){return e<<1|e>>>31}function o(e){return e<<5|e>>>27}function s(e){return e<<30|e>>>2}function a(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}var c=n(309),u=n(603),f=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);c(r,u),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,c=0|this._c,u=0|this._d,h=0|this._e,d=0;d<16;++d)t[d]=e.readInt32BE(4*d);for(;d<80;++d)t[d]=i(t[d-3]^t[d-8]^t[d-14]^t[d-16]);for(var l=0;l<80;++l){var p=~~(l/20),m=o(n)+a(p,r,c,u)+h+t[l]+f[p]|0;h=u,u=c,c=s(r),r=n,n=m}this._a=n+this._a|0,this._b=r+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=h+this._e|0},r.prototype._hash=function(){var e=new t(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=r}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(){this.init(),this._w=a,s.call(this,64,56)}var i=n(309),o=n(606),s=n(603),a=new Array(64);i(r,o),r.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},r.prototype._hash=function(){var e=new t(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=r}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(){this.init(),this._w=l,h.call(this,64,56)}function i(e,t,n){return n^e&(t^n)}function o(e,t,n){return e&t|n&(e|t)}function s(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function a(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function c(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function u(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var f=n(309),h=n(603),d=[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],l=new Array(64);f(r,h),r.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},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,f=0|this._c,h=0|this._d,l=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)t[v]=e.readInt32BE(4*v);for(;v<64;++v)t[v]=u(t[v-2])+t[v-7]+c(t[v-15])+t[v-16]|0;for(var y=0;y<64;++y){var b=g+a(l)+i(l,p,m)+d[y]+t[y]|0,w=s(n)+o(n,r,f)|0;g=m,m=p,p=l,l=h+b|0,h=f,f=r,r=n,n=b+w|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=f+this._c|0,this._d=h+this._d|0,this._e=l+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},r.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=r}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(){this.init(),this._w=a,s.call(this,128,112)}var i=n(309),o=n(608),s=n(603),a=new Array(160);i(r,o),r.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},r.prototype._hash=function(){function e(e,t,r){n.writeInt32BE(e,r),n.writeInt32BE(t,r+4)}var n=new t(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),n},e.exports=r}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(){this.init(),this._w=g,p.call(this,128,112)}function i(e,t,n){return n^e&(t^n)}function o(e,t,n){return e&t|n&(e|t)}function s(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function a(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function f(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function h(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function d(e,t){return e>>>0<t>>>0?1:0}var l=n(309),p=n(603),m=[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],g=new Array(160);l(r,p),r.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},r.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,l=0|this._ch,p=0|this._dh,g=0|this._eh,v=0|this._fh,y=0|this._gh,b=0|this._hh,w=0|this._al,S=0|this._bl,x=0|this._cl,E=0|this._dl,A=0|this._el,T=0|this._fl,M=0|this._gl,P=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var O=t[I-30],R=t[I-30+1],k=c(O,R),N=u(R,O);O=t[I-4],R=t[I-4+1];var C=f(O,R),F=h(R,O),L=t[I-14],B=t[I-14+1],j=t[I-32],q=t[I-32+1],D=N+B|0,z=k+L+d(D,N)|0;D=D+F|0,z=z+C+d(D,F)|0,D=D+q|0,z=z+j+d(D,q)|0,t[I]=z,t[I+1]=D}for(var U=0;U<160;U+=2){z=t[U],D=t[U+1];var V=o(n,r,l),$=o(w,S,x),H=s(n,w),X=s(w,n),K=a(g,A),G=a(A,g),J=m[U],W=m[U+1],Y=i(g,v,y),Z=i(A,T,M),Q=P+G|0,ee=b+K+d(Q,P)|0;Q=Q+Z|0,ee=ee+Y+d(Q,Z)|0,Q=Q+W|0,ee=ee+J+d(Q,W)|0,Q=Q+D|0,ee=ee+z+d(Q,D)|0;var te=X+$|0,ne=H+V+d(te,X)|0;b=y,P=M,y=v,M=T,v=g,T=A,A=E+Q|0,g=p+ee+d(A,E)|0,p=l,E=x,l=r,x=S,r=n,S=w,w=Q+te|0,n=ee+ne+d(w,Q)|0}this._al=this._al+w|0,this._bl=this._bl+S|0,this._cl=this._cl+x|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+T|0,this._gl=this._gl+M|0,this._hl=this._hl+P|0,this._ah=this._ah+n+d(this._al,w)|0,this._bh=this._bh+r+d(this._bl,S)|0,this._ch=this._ch+l+d(this._cl,x)|0,this._dh=this._dh+p+d(this._dl,E)|0,this._eh=this._eh+g+d(this._el,A)|0,this._fh=this._fh+v+d(this._fl,T)|0,
|
||
this._gh=this._gh+y+d(this._gl,M)|0,this._hh=this._hh+b+d(this._hl,P)|0},r.prototype._hash=function(){function e(e,t,r){n.writeInt32BE(e,r),n.writeInt32BE(t,r+4)}var n=new t(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),n},e.exports=r}).call(t,n(312).Buffer)},function(e,t,n){(function(t){function r(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._decoder=null,this._encoding=null}var i=n(334).Transform,o=n(309),s=n(348).StringDecoder;e.exports=r,o(r,i),r.prototype.update=function(e,n,r){"string"==typeof e&&(e=new t(e,n));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},r.prototype.setAutoPadding=function(){},r.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},r.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},r.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},r.prototype._transform=function(e,_,t){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(r){n=r}finally{t(n)}},r.prototype._flush=function(e){var t;try{this.push(this._final())}catch(n){t=n}finally{e(t)}},r.prototype._finalOrDigest=function(e){var n=this._final()||new t("");return e&&(n=this._toString(n,e,!0)),n},r.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new s(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r}}).call(t,n(312).Buffer)},function(e,t,n){"use strict";var r=n(306),i=n(569),o=n(571),s=o.Hash256,a=n(594),c=a.HashPrefix,u=n(596),f=u.Sha512Half,h=i({virtuals:{hashPrefix:function(){},isLeaf:function(){},isInner:function(){}},cached:{hash:function(){var e=f.put(this.hashPrefix());return this.toBytesSink(e),e.finish()}}}),d=i({inherits:h,ShaMapLeaf:function(e,t){h.call(this),this.index=e,this.item=t},isLeaf:function(){return!0},isInner:function(){return!1},hashPrefix:function(){return this.item.hashPrefix()},toBytesSink:function(e){this.item.toBytesSink(e),this.index.toBytesSink(e)}}),l=h.prototype,p=i({inherits:h,ShaMapInner:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0];h.call(this),this.depth=e,this.slotBits=0,this.branches=Array(16)},isInner:function(){return!0},isLeaf:function(){return!1},hashPrefix:function(){return c.innerNode},setBranch:function(e,t){this.slotBits=this.slotBits|1<<e,this.branches[e]=t},empty:function(){return 0===this.slotBits},hash:function(){return this.empty()?s.ZERO_256:l.hash.call(this)},toBytesSink:function(e){for(var t=0;t<this.branches.length;t++){var n=this.branches[t],r=n?n.hash():s.ZERO_256;r.toBytesSink(e)}},addItem:function(e,t,n){r(e instanceof s);var i=e.nibblet(this.depth),o=this.branches[i];if(o)if(o.isLeaf()){var a=new p(this.depth+1);a.addItem(o.index,null,o),a.addItem(e,t,n),this.setBranch(i,a)}else o.isInner()?o.addItem(e,t,n):r(!1);else this.setBranch(i,n||new d(e,t))}}),m=i({inherits:p});e.exports={ShaMap:m}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){var n=new p;return t.forEach(function(t){return n.addItem.apply(n,r(e(t)))}),n.hash()}function o(e){u(e.hash);var t=d.from(e.hash),n={hashPrefix:function(){return g.transaction},toBytesSink:function(t){var n=new w(t);n.writeLengthEncoded(h.from(e)),n.writeLengthEncoded(h.from(e.metaData))}};return[t,n]}function s(e){var t=d.from(e.index),n=S(e),r={hashPrefix:function(){return g.accountStateEntry},toBytesSink:function(e){e.put(n)}};return[t,r]}function a(e){var t=new y;return t.put(g.ledgerHeader),u(void 0!==e.parent_close_time),u(void 0!==e.close_flags),f.UInt32.from(e.ledger_index).toBytesSink(t),f.UInt64.from(new c(e.total_coins)).toBytesSink(t),f.Hash256.from(e.parent_hash).toBytesSink(t),f.Hash256.from(e.transaction_hash).toBytesSink(t),f.Hash256.from(e.account_hash).toBytesSink(t),f.UInt32.from(e.parent_close_time).toBytesSink(t),f.UInt32.from(e.close_time).toBytesSink(t),f.UInt8.from(e.close_time_resolution).toBytesSink(t),f.UInt8.from(e.close_flags).toBytesSink(t),t.finish()}var _=n(300),c=n(578),u=n(306),f=n(571),h=f.STObject,d=f.Hash256,l=n(610),p=l.ShaMap,m=n(594),g=m.HashPrefix,v=n(596),y=v.Sha512Half,b=n(593),w=b.BinarySerializer,S=b.serializeObject,x=_.partial(i,o),E=_.partial(i,s);e.exports={accountStateHash:E,transactionTreeHash:x,ledgerHash:a}},function(e,t,n){"use strict";var r=n(579),i=n(568),o=i.bytesToHex,s=i.slice,a=i.parseBytes,c=n(571),u=c.UInt64,f=n(578);e.exports={encode:function(e){var t=e instanceof r?e:new r(e),n=t.e-15,i=t.times("1e"+-n).abs().toString(),o=new u(new f(i)).toBytes();return o[0]=n+100,o},decode:function(e){var t=s(a(e),-8),n=t[0]-100,i=new r("0x"+o(s(t,1)));return i.times("1e"+n)}}},function(e,t,n){"use strict";function r(e){e.Flags|=m,e.Flags>>>=0}function i(e){var t=f(e),n=l(t).toHex(),r=g(t);return{tx_json:e,tx_blob:r,hash:n}}function o(e,t){var n=arguments.length<=2||void 0===arguments[2]?null:arguments[2],o=_.clone(e);o.SigningPubKey="",r(o);var s=n||t.id(),a=t.sign(d(o,s)),c={Signer:{SigningPubKey:g(t.publicBytes()),TxnSignature:g(a),Account:s}},u=o.Signers=o.Signers||[];return u.push(c),u.sort(y),i(o)}function s(e,t){var n=_.clone(e);return r(n),n.SigningPubKey=g(t.publicBytes()),n.TxnSignature=g(t.sign(p(n))),i(n)}var _=n(300),a=n(571),c=a.AccountID,u=n(593),f=u.serializeObject,h=u.bytesToHex,d=u.multiSigningData,l=u.transactionID,p=u.signingData,m=2147483648,g=function(e){return h(e)},v=function(e){return c.from(e.Signer.Account)},y=function(e,t){return v(e).compareTo(v(t))};e.exports={signFor:o,sign:s}},function(e,t,n){(function(t){"use strict";function r(e){return N(new t(e,"hex"))}function i(e,t){return Array(t-e.length+1).join("0")+e}function o(e,t){return i(Number(e).toString(16),2*t)}function s(e){return new t(e).toString("hex")}function a(e,t){var n=new T(e).toString(16);return i(n,2*t)}function c(e){return o(k[e].charCodeAt(0),2)}function u(e){return new t(M(e)).toString("hex")}function f(e){if(3===e.length){var t=new Array(21).join("0").split("").map(parseFloat);return t[12]=255&e.charCodeAt(0),t[13]=255&e.charCodeAt(1),t[14]=255&e.charCodeAt(2),s(t)}return e}function h(e){var t=e.length/2;if(t<=192)return s([t])+e;if(t<=12480){var n=t-193;return s([193+(n>>>8),255&n])+e}if(t<=918744){var n=t-12481;return s([241+(n>>>16),n>>>8&255,255&n])+e}throw new Error("Variable integer overflow.")}function d(e){var t=I.HASH_TX_ID.toString(16).toUpperCase();return r(t+e)}function l(e){return d(P.encode(e))}function p(e){var t=I.HASH_TX_SIGN.toString(16).toUpperCase();return r(t+e)}function m(e){return p(P.encode(e))}function g(e){return r(c("account")+u(e))}function v(e){return r(c("signerList")+u(e)+"00000000")}function y(e,t){var n="00"+o(k.offer.charCodeAt(0),1);return r(n+u(e)+o(t,4))}function b(e,t,n){var i=u(e),o=u(t),s=new T(i,16).greaterThan(new T(o,16)),a=s?o:i,h=s?i:o,d=c("rippleState");return r(d+a+h+f(n))}function w(e){var t=new O;return e.forEach(function(e){var n=P.encode(e),r=P.encode(e.metaData),i=d(n),o=h(n)+h(r);t.add_item(i,o,R.TYPE_TRANSACTION_MD)}),t.hash()}function S(e){var t=new O;return e.forEach(function(e){var n=P.encode(e);t.add_item(e.index,n,R.TYPE_ACCOUNT_STATE)}),t.hash()}function x(e){var t=I.HASH_LEDGER.toString(16).toUpperCase();return r(t+o(e.ledger_index,4)+a(e.total_coins,8)+e.parent_hash+e.transaction_hash+e.account_hash+o(e.parent_close_time,4)+o(e.close_time,4)+o(e.close_time_resolution,1)+o(e.close_flags,1))}function E(e,t){return r(c("escrow")+u(e)+o(t,4))}function A(e,t,n){return r(c("paychan")+u(e)+u(t)+o(n,4))}var T=n(304),M=n(390).decodeAddress,P=n(565),I=n(615),O=n(616).SHAMap,R=n(616).SHAMapTreeNode,k=n(618),N=n(617);e.exports={computeTransactionHash:l,computeBinaryTransactionHash:d,computeTransactionSigningHash:m,computeBinaryTransactionSigningHash:p,computeAccountHash:g,computeOrderHash:y,computeTrustlineHash:b,computeSignerListHash:v,computeStateTreeHash:S,computeTransactionTreeHash:w,computeLedgerHash:x,computeEscrowHash:E,computePaymentChannelHash:A}}).call(t,n(312).Buffer)},function(e,t){"use strict";t.HASH_TX_ID=1415073280,t.HASH_TX_NODE=1397638144,t.HASH_INNER_NODE=1296649728,t.HASH_INNER_NODE_V2=1229869568,t.HASH_LEAF_NODE=1296846336,t.HASH_TX_SIGN=1398036480,t.HASH_TX_SIGN_TESTNET=1937012736,t.HASH_TX_MULTISIGN=1397576704,t.HASH_LEDGER=1280791040},function(e,t,n){(function(e){"use strict";function r(){}function i(t){return h(new e(t,"hex"))}function o(e){r.call(this),this.leaves={},this.type=r.INNER,this.depth=void 0===e?0:e,this.empty=!0}function s(e){o.call(this,e),this.common=""}function a(e,t,n){if(r.call(this),"string"!=typeof e)throw new Error("Tag is unexpected type.");this.tag=e,this.type=n,this.data=t}function c(e){this.version=void 0===e?1:e,this.root=1===this.version?new o(0):new s(0)}var u=n(307),f=n(615),h=n(617),d="0000000000000000000000000000000000000000000000000000000000000000";r.TYPE_INNER=1,r.TYPE_TRANSACTION_NM=2,r.TYPE_TRANSACTION_MD=3,r.TYPE_ACCOUNT_STATE=4,r.prototype.add_item=function(e,t){throw new Error("Called unimplemented virtual method SHAMapTreeNode#add_item.")},r.prototype.hash=function(){throw new Error("Called unimplemented virtual method SHAMapTreeNode#hash.")},u.inherits(o,r),o.prototype.add_item=function(e,t){var n=this.depth,r=this.get_node(e[n]);if(r)if(r instanceof o)r.add_item(e,t);else{if(r.tag===e)throw new Error("Tried to add a node to a SHAMap that was already in there.");var i=new o(n+1);i.add_item(r.tag,r),i.add_item(e,t),this.set_node(e[n],i)}else this.set_node(e[n],t)},o.prototype.set_node=function(e,t){this.leaves[e]=t,this.empty=!1},o.prototype.get_node=function(e){return this.leaves[e]},o.prototype.hash=function(){if(this.empty)return d;for(var e="",t=0;t<16;t++){var n=t.toString(16).toUpperCase();e+=this.leaves[n]?this.leaves[n].hash():d}var r=f.HASH_INNER_NODE.toString(16);return i(r+e)},u.inherits(s,o),s.prototype.get_common_prefix=function(e){for(var t=0,n=0;n<this.depth;n++)this.common[n]===e[n]&&t++;return t},s.prototype.has_common_prefix=function(e){for(var t=0;t<this.depth;t++)if(this.common[t]!==e[t])return!1;return!0},s.prototype.add_item=function(e,t){var n=this.depth,r=this.get_node(e[n]);if(r)if(r instanceof s)if(r.has_common_prefix(e))r.add_item(e,t);else{var i=r.get_common_prefix(e),o=new s(i);o.common=e.slice(0,i-64),o.set_node(r.common[i],r),o.add_item(e,t),this.set_node(e[n],o)}else{if(r.tag===e)throw new Error("Tried to add a node to a SHAMap that was already in there.");for(var o=new s(0),a=0;e[a]===r.tag[a];a++)o.common+=e[a],o.depth++;o.add_item(r.tag,r),o.add_item(e,t),this.set_node(e[n],o)}else this.set_node(e[n],t)},s.prototype.hash=function(){if(this.empty)return d;for(var e="",t=0;t<16;t++){var n=t.toString(16).toUpperCase();e+=this.leaves[n]?this.leaves[n].hash():d}this.depth<16&&(e+="0"),e+=this.depth.toString(16).toUpperCase(),e+=this.common,this.common.length%2&&(e+="0");var r=f.HASH_INNER_NODE_V2.toString(16);return i(r+e)},u.inherits(a,r),a.prototype.hash=function(){switch(this.type){case r.TYPE_ACCOUNT_STATE:var e=f.HASH_LEAF_NODE.toString(16);return i(e+this.data+this.tag);case r.TYPE_TRANSACTION_NM:var t=f.HASH_TX_ID.toString(16);return i(t+this.data);case r.TYPE_TRANSACTION_MD:var t=f.HASH_TX_NODE.toString(16);return i(t+this.data+this.tag);default:throw new Error("Tried to hash a SHAMap node of unknown type.")}},c.prototype.add_item=function(e,t,n){this.root.add_item(e,new a(e,t,n))},c.prototype.hash=function(){return this.root.hash()},t.SHAMap=c,t.SHAMapTreeNode=r,t.SHAMapTreeNodeInner=o,t.SHAMapTreeNodeInnerV2=s,t.SHAMapTreeNodeLeaf=a}).call(t,n(312).Buffer)},function(e,t,n){"use strict";function r(e){var t=i("sha512");return t.update(e).digest("hex").toUpperCase().slice(0,64)}var i=n(597);e.exports=r},function(e,t){e.exports={account:"a",dirNode:"d",generatorMap:"g",rippleState:"r",offer:"o",ownerDir:"O",bookDir:"B",contract:"c",skipList:"s",amendment:"f",feeSettings:"e",signerList:"S",escrow:"u",paychan:"x"}},function(e,t,n){"use strict";function r(e,t){return null===e||t.specification.currency===e}function i(e,t){return{marker:t.marker,results:t.lines.map(u).filter(_.partial(r,e.currency||null))}}function o(e,t,n,r,o,s){var c={command:"account_lines",account:t,ledger_index:n,marker:o,limit:a.clamp(s,10,400),peer:r.counterparty};return e.request(c).then(_.partial(i,r))}function s(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c.getTrustlines({address:e,options:n}),this.getLedgerVersion().then(function(r){var i=_.partial(o,t.connection,e,n.ledgerVersion||r,n);return a.getRecursive(i,n.limit)})}var _=n(300),a=n(541),c=a.common.validate,u=n(620);e.exports=s},function(e,t,n){"use strict";function r(e){var t=i.removeUndefined({limit:e.limit,currency:e.currency,counterparty:e.account,qualityIn:i.parseQuality(e.quality_in)||void 0,qualityOut:i.parseQuality(e.quality_out)||void 0,ripplingDisabled:e.no_ripple||void 0,frozen:e.freeze||void 0,authorized:e.authorized||void 0}),n=i.removeUndefined({limit:e.limit_peer,ripplingDisabled:e.no_ripple_peer||void 0,frozen:e.freeze_peer||void 0,authorized:e.peer_authorized||void 0}),r={balance:e.balance};return{specification:t,counterparty:n,state:r}}var i=n(543);e.exports=r},function(e,t,n){"use strict";function r(e){return{currency:e.specification.currency,counterparty:e.specification.counterparty,value:e.state.balance}}function i(e,t){var n=t.trustlines.map(r);if(!(e.counterparty||e.currency&&"XRP"!==e.currency)){var i={currency:"XRP",value:t.xrp};n.unshift(i)}if(e.limit&&n.length>e.limit){var o=n.length-e.limit;n.splice(-o,o)}return n}function o(e,t){return void 0!==t&&null!==t?Promise.resolve(t):e.getLedgerVersion()}function s(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c.getTrustlines({address:e,options:n}),Promise.all([o(this.connection,n.ledgerVersion).then(function(n){return a.getXRPBalance(t.connection,e,n)}),this.getTrustlines(e,n)]).then(function(e){return i(n,{xrp:e[0],trustlines:e[1]})})}var a=n(541),c=a.common.validate;e.exports=s},function(e,t,n){"use strict";function r(e){var t={};return _.isUndefined(e.balances)||(t.balances=[],_.forEach(e.balances,function(e,n){_.forEach(e,function(e){t.balances.push(Object.assign({counterparty:n},e))})})),_.isUndefined(e.assets)||(t.assets=[],_.forEach(e.assets,function(e,n){_.forEach(e,function(e){t.assets.push(Object.assign({counterparty:n},e))})})),_.isUndefined(e.obligations)||(t.obligations=_.map(e.obligations,function(e,t){return{currency:t,value:e}})),t}function i(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.getBalanceSheet({address:e,options:n}),o.ensureLedgerVersion.call(this,n).then(function(n){var i={command:"gateway_balances",account:e,strict:!0,hotwallet:n.excludeAddresses,ledger_index:n.ledgerVersion};return t.connection.request(i).then(r)})}var _=n(300),o=n(541),s=o.common.validate;e.exports=i},function(e,t,n){"use strict";function r(e,t){return _.defaults(_.assign({},t,{source_account:e.source_account,source_currencies:e.source_currencies}),{destination_amount:e.destination_amount})}function i(e,t){var n=_.assign({value:-1},t.destination.amount),i={command:"ripple_path_find",source_account:t.source.address,destination_account:t.destination.address,destination_amount:v(n)};if("object"!==h(i.destination_amount)||i.destination_amount.issuer||(i.destination_amount.issuer=i.destination_account),t.source.currencies&&t.source.currencies.length>0&&(i.source_currencies=t.source.currencies.map(function(e){return _.omit(v(e),"value")})),t.source.amount){if(void 0!==t.destination.amount.value)throw new ValidationError("Cannot specify both source.amount and destination.amount.value in getPaths");i.send_max=v(t.source.amount),i.send_max.currency&&!i.send_max.issuer&&(i.send_max.issuer=t.source.address)}return e.request(i).then(function(e){return r(i,e)})}function o(e,t){var n=e.destination_amount;return new d(t).greaterThanOrEqualTo(n)&&e.alternatives.unshift({paths_computed:[],source_amount:e.destination_amount}),e}function s(e){return"object"===("undefined"==typeof e?"undefined":h(e))&&e.currency&&"XRP"!==e.currency}function a(e,t,n){return s(n.destination_amount)||!_.includes(n.destination_currencies,"XRP")?Promise.resolve(n):l.getXRPBalance(e,t,void 0).then(function(e){return o(n,e)})}function c(e,t){return e.source.amount&&void 0===e.destination.amount.value&&t.alternatives&&(t.alternatives=_.filter(t.alternatives,function(t){return t.source_amount&&e.source.amount&&new d(t.source_amount.value).eq(e.source.amount.value)})),t}function u(e,t){if(t.alternatives&&t.alternatives.length>0)return p(t);throw new NotFoundError(void 0===t.destination_currencies||_.includes(t.destination_currencies,e.destination.amount.currency)?t.source_currencies&&t.source_currencies.length>0?"No paths found. Please ensure that the source_account has sufficient funds to execute the payment in one of the specified source_currencies. If it does there may be insufficient liquidity in the network to execute this payment right now":"No paths found. Please ensure that the source_account has sufficient funds to execute the payment. If it does there may be insufficient liquidity in the network to execute this payment right now":"No paths found. The destination_account does not accept "+e.destination.amount.currency+", they only accept: "+t.destination_currencies.join(", "))}function f(e){var t=this;g.getPaths({pathfind:e});var n=e.source.address;return i(this.connection,e).then(function(e){return a(t.connection,n,e)}).then(function(t){return c(e,t)}).then(function(t){return u(e,t)})}var h="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},_=n(300),d=n(304),l=n(541),p=n(624),m=l.common,g=m.validate,v=m.toRippledAmount,NotFoundError=l.common.errors.NotFoundError,ValidationError=l.common.errors.ValidationError;e.exports=f},function(e,t,n){"use strict";function r(e){return e.map(function(e){return e.map(function(e){return _.omit(e,["type","type_hex"])})})}function i(e,t){return t.counterparty===e?_.omit(t,"counterparty"):t}function o(e,t){var n=_.keys(t)[0],r=t[n];return _.set({address:e},n,i(e,r))}function s(e,t,n,i){var s=void 0!==i.destination_amount?{source:{amount:c(i.source_amount)},destination:{minAmount:c(i.destination_amount)}}:{source:{maxAmount:c(i.source_amount)},destination:{amount:c(n)}};return{source:o(e,s.source),destination:o(t,s.destination),paths:JSON.stringify(r(i.paths_computed))}}function a(e){var t=e.source_account,n=e.destination_account,r=e.destination_amount;return e.alternatives.map(_.partial(s,t,n,r))}var _=n(300),c=n(549);e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r,i){return e.request({command:"account_offers",account:t,marker:r,limit:o.clamp(i,10,400),ledger_index:n}).then(function(e){return{marker:e.marker,results:e.offers.map(_.partial(a,t))}})}function i(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.getOrders({address:e,options:n}),o.ensureLedgerVersion.call(this,n).then(function(n){var i=_.partial(r,t.connection,e,n.ledgerVersion);return o.getRecursive(i,n.limit).then(function(e){return _.sortBy(e,function(e){return e.properties.sequence})})})}var _=n(300),o=n(541),s=o.common.validate,a=n(626);e.exports=i},function(e,t,n){"use strict";function r(e,t){var n=new c(t.value).dividedBy(e.value);return n.toDigits(16,c.ROUND_HALF_UP).toString()}function i(e,t){var n=0===(t.flags&s.Sell)?"buy":"sell",i=a(t.taker_gets),c=a(t.taker_pays),u="buy"===n?c:i,f="buy"===n?i:c,h=o.removeUndefined({direction:n,quantity:u,totalPrice:f,passive:0!==(t.flags&s.Passive)||void 0,expirationTime:o.parseTimestamp(t.expiration)}),d=t.quality?o.adjustQualityForXRP(t.quality.toString(),i.currency,c.currency):r(i,c),l={maker:e,sequence:t.seq,makerExchangeRate:d};return{specification:h,properties:l}}var o=n(543),s=n(627).orderFlags,a=n(549),c=n(304);e.exports=i},function(e,t){"use strict";var n={Passive:65536,Sell:131072},r={LowReserve:65536,HighReserve:131072,LowAuth:262144,HighAuth:524288,LowNoRipple:1048576,HighNoRipple:2097152,LowFreeze:4194304,HighFreeze:8388608};e.exports={orderFlags:n,trustlineFlags:r}},function(e,t,n){"use strict";function r(e,t,n,r,i,o){return e.request(f.renameCounterpartyToIssuerInOrder({command:"book_offers",taker_gets:i,taker_pays:o,ledger_index:n||"validated",limit:r,taker:t})).then(function(e){return e.offers})}function i(e,t){return e.currency===t.currency&&e.counterparty===t.counterparty}function o(e,t){return t.specification.direction===e}function s(e){var t=e.specification,n={quantity:t.totalPrice,totalPrice:t.quantity,direction:"buy"===t.direction?"sell":"buy"},r=_.merge({},t,n);return _.merge({},e,{specification:r})}function a(e,t){var n=t.specification.quantity;return i(n,e)?t:s(t)}function c(e,t){var n=_.sortBy(t,"quality").map(d),r=n.map(_.partial(a,e.base)),i=r.filter(_.partial(o,"buy")),s=r.filter(_.partial(o,"sell"));return{bids:i,asks:s}}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};h.getOrderbook({address:e,orderbook:t,options:n});var i=_.partial(r,this.connection,e,n.ledgerVersion,n.limit),o=_.partial(i,t.base,t.counter),s=_.partial(i,t.counter,t.base);return Promise.all([o(),s()]).then(function(e){return c(t,_.flatten(e))})}var _=n(300),f=n(541),h=f.common.validate,d=n(629);e.exports=u},function(e,t,n){"use strict";function r(e){var t=0===(e.Flags&o.Sell)?"buy":"sell",n=s(e.TakerGets),r=s(e.TakerPays),a="buy"===t?r:n,c="buy"===t?n:r,u=i.removeUndefined({direction:t,quantity:a,totalPrice:c,passive:0!==(e.Flags&o.Passive)||void 0,expirationTime:i.parseTimestamp(e.Expiration)}),f={maker:e.Account,sequence:e.Sequence,makerExchangeRate:i.adjustQualityForXRP(e.quality,n.currency,r.currency)},h=e.taker_gets_funded?s(e.taker_gets_funded):void 0,d=e.taker_pays_funded?s(e.taker_pays_funded):void 0,l=i.removeUndefined({fundedAmount:h,priceOfFundedAmount:d}),p=_.isEmpty(l)?void 0:l;return i.removeUndefined({specification:u,properties:f,state:p})}var _=n(300),i=n(543),o=n(627).orderFlags,s=n(549);e.exports=r},function(e,t,n){"use strict";function r(e){var t={};for(var n in u)e&u[n]&&(t[n]=!0);return t}function i(e){var t=e.account_data,n=r(t.Flags),i=a(t);return _.assign({},n,i)}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c.getSettings({address:e,options:t});var n={command:"account_info",account:e,ledger_index:t.ledgerVersion||"validated"};return this.connection.request(n).then(i)}var _=n(300),s=n(541),a=n(555),c=s.common.validate,u=s.common.constants.AccountFlags;e.exports=o},function(e,t,n){"use strict";function r(e){var t=e.account_data;return c({sequence:t.Sequence,xrpBalance:o.common.dropsToXrp(t.Balance),ownerCount:t.OwnerCount,previousInitiatedTransactionID:t.AccountTxnID,previousAffectingTransactionID:t.PreviousTxnID,previousAffectingTransactionLedgerVersion:t.PreviousTxnLgrSeq})}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a.getAccountInfo({address:e,options:t});var n={command:"account_info",account:e,ledger_index:t.ledgerVersion||"validated"};return this.connection.request(n).then(r)}var o=n(541),s=o.common,a=s.validate,c=s.removeUndefined;e.exports=i},function(e,t,n){"use strict";function r(e){if(void 0!==e.node&&"PayChannel"===e.node.LedgerEntryType)return s(e.node);throw new NotFoundError("Payment channel ledger entry not found")}function i(e){c.getPaymentChannel({id:e});var t={command:"ledger_entry",index:e,binary:!1,ledger_index:"validated"};return this.connection.request(t).then(_.partial(r))}var _=n(300),o=n(541),s=n(633),a=o.common,c=a.validate,NotFoundError=(a.removeUndefined,o.common.errors.NotFoundError);e.exports=i},function(e,t,n){"use strict";function r(e){return i.removeUndefined({account:e.Account,amount:i.dropsToXrp(e.Amount),balance:i.dropsToXrp(e.Balance),destination:e.Destination,publicKey:e.PublicKey,settleDelay:e.SettleDelay,expiration:i.parseTimestamp(e.Expiration),cancelAfter:i.parseTimestamp(e.CancelAfter),sourceTag:e.SourceTag,destinationTag:e.DestinationTag,previousAffectingTransactionID:e.PreviousTxnID,previousAffectingTransactionLedgerVersion:e.PreviousTxnLgrSeq})}var i=(n(300),n(543));e.exports=r},function(e,t,n){"use strict";function r(e){var t=_.get(e,"source.maxAmount.currency",_.get(e,"source.amount.currency")),n=_.get(e,"destination.amount.currency",_.get(e,"destination.minAmount.currency"));return"XRP"===t&&"XRP"===n}function i(e){return e&&"XRP"!==e.currency&&void 0===e.counterparty}function o(e){_.forEach([e.source,e.destination],function(e){_.forEach(["amount","minAmount","maxAmount"],function(t){i(e[t])&&(e[t].counterparty=e.address)})})}function s(e){var t="100000000000",n="9999999999999999e80",r="XRP"===e.currency?t:n;return _.assign({},e,{value:r})}function a(e,t){var n=_.cloneDeep(t);if(o(n),e!==n.source.address)throw new ValidationError("address must match payment.source.address");if(n.source.maxAmount&&n.destination.minAmount||n.source.amount&&n.destination.amount)throw new ValidationError("payment must specify either (source.maxAmount and destination.amount) or (source.amount and destination.minAmount)");var i=n.destination.minAmount&&!r(n)?s(n.destination.minAmount):n.destination.amount||n.destination.minAmount,a={TransactionType:"Payment",Account:n.source.address,Destination:n.destination.address,Amount:h(i),Flags:0};if(void 0!==n.invoiceID&&(a.InvoiceID=n.invoiceID),void 0!==n.source.tag&&(a.SourceTag=n.source.tag),void 0!==n.destination.tag&&(a.DestinationTag=n.destination.tag),void 0!==n.memos&&(a.Memos=_.map(n.memos,u.convertMemo)),n.noDirectRipple===!0&&(a.Flags|=d.NoRippleDirect),n.limitQuality===!0&&(a.Flags|=d.LimitQuality),r(n)){if(n.allowPartialPayment===!0)throw new ValidationError("XRP to XRP payments cannot be partial payments")}else n.allowPartialPayment!==!0&&void 0===n.destination.minAmount||(a.Flags|=d.PartialPayment),a.SendMax=h(n.source.maxAmount||n.source.amount),void 0!==n.destination.minAmount&&(a.DeliverMin=h(n.destination.minAmount)),void 0!==n.paths&&(a.Paths=JSON.parse(n.paths));return a}function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f.preparePayment({address:e,payment:t,instructions:n});var r=a(e,t);return u.prepareTransaction(r,this,n)}var _=n(300),u=n(635),f=u.common.validate,h=u.common.toRippledAmount,d=u.common.txFlags.Payment,ValidationError=u.common.errors.ValidationError;e.exports=c},function(e,t,n){(function(t){"use strict";function r(e){var t={fee:f.dropsToXrp(e.Fee),sequence:e.Sequence,maxLedgerVersion:void 0===e.LastLedgerSequence?null:e.LastLedgerSequence};return{txJSON:JSON.stringify(e),instructions:_.omit(t,_.isUndefined)}}function i(e){e.Flags|=h.Universal.FullyCanonicalSig,e.Flags=e.Flags>>>0}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new u(e).times(t).plus(n).toString()}function s(e,n,s){function a(){if(void 0!==s.maxLedgerVersion)return null!==s.maxLedgerVersion&&(e.LastLedgerSequence=s.maxLedgerVersion),Promise.resolve(e);var t=void 0!==s.maxLedgerVersionOffset?s.maxLedgerVersionOffset:3;return n.connection.getLedgerVersion().then(function(n){return e.LastLedgerSequence=n+t,e})}function c(){var r=void 0===s.signersCount?1:s.signersCount+1;if(void 0!==s.fee)return e.Fee=o(f.xrpToDrops(s.fee),r),Promise.resolve(e);var i=n._feeCushion;return f.serverInfo.getFee(n.connection,i).then(function(a){return n.connection.getFeeRef().then(function(n){var c="EscrowFinish"!==e.TransactionType||void 0===e.Fulfillment?0:i*n*(32+Math.floor(new t(e.Fulfillment,"hex").length/16)),h=f.xrpToDrops(a);if(void 0!==s.maxFee){var d=f.xrpToDrops(s.maxFee),l=o(h,r,c);e.Fee=u.min(l,d).toString()}else e.Fee=o(h,r,c);return e})})}function h(){if(void 0!==s.sequence)return e.Sequence=s.sequence,Promise.resolve(e);var t={command:"account_info",account:d};return n.connection.request(t).then(function(t){return e.Sequence=t.account_data.Sequence,e})}f.validate.instructions(s);var d=e.Account;return i(e),Promise.all([a(),c(),h()]).then(function(){return r(e)})}function a(e){return e?new t(e,"utf8").toString("hex").toUpperCase():void 0}function c(e){return{Memo:f.removeUndefined({MemoData:a(e.data),MemoType:a(e.type),MemoFormat:a(e.format)})}}var _=n(300),u=n(304),f=n(302),h=f.txFlags;e.exports={convertStringToHex:a,convertMemo:c,prepareTransaction:s,common:f}}).call(t,n(312).Buffer)},function(e,t,n){"use strict";function r(e){return new u(e).shift(9).truncated().toNumber()}function i(e,t){var n={currency:t.currency,issuer:t.counterparty,value:t.limit},i={TransactionType:"TrustSet",Account:e,LimitAmount:n,Flags:0};return void 0!==t.qualityIn&&(i.QualityIn=r(t.qualityIn)),void 0!==t.qualityOut&&(i.QualityOut=r(t.qualityOut)),t.authorized===!0&&(i.Flags|=c.SetAuth),void 0!==t.ripplingDisabled&&(i.Flags|=t.ripplingDisabled?c.NoRipple:c.ClearNoRipple),void 0!==t.frozen&&(i.Flags|=t.frozen?c.SetFreeze:c.ClearFreeze),void 0!==t.memos&&(i.Memos=_.map(t.memos,s.convertMemo)),i}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a.prepareTrustline({address:e,trustline:t,instructions:n});var r=i(e,t);return s.prepareTransaction(r,this,n)}var _=n(300),s=n(635),a=s.common.validate,c=s.common.txFlags.TrustSet,u=n(304);e.exports=o},function(e,t,n){"use strict";function r(e,t){var n=o.common.toRippledAmount("buy"===t.direction?t.quantity:t.totalPrice),r=o.common.toRippledAmount("buy"===t.direction?t.totalPrice:t.quantity),i={TransactionType:"OfferCreate",Account:e,TakerGets:r,TakerPays:n,Flags:0};return"sell"===t.direction&&(i.Flags|=s.Sell),t.passive===!0&&(i.Flags|=s.Passive),t.immediateOrCancel===!0&&(i.Flags|=s.ImmediateOrCancel),t.fillOrKill===!0&&(i.Flags|=s.FillOrKill),void 0!==t.expirationTime&&(i.Expiration=u(t.expirationTime)),void 0!==t.orderToReplace&&(i.OfferSequence=t.orderToReplace),void 0!==t.memos&&(i.Memos=_.map(t.memos,o.convertMemo)),i}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};c.prepareOrder({address:e,order:t,instructions:n});var i=r(e,t);return o.prepareTransaction(i,this,n)}var _=n(300),o=n(635),s=o.common.txFlags.OfferCreate,a=o.common,c=a.validate,u=a.iso8601ToRippleTime;e.exports=i},function(e,t,n){"use strict";function r(e,t){var n={TransactionType:"OfferCancel",Account:e,OfferSequence:t.orderSequence};return void 0!==t.memos&&(n.Memos=_.map(t.memos,o.convertMemo)),n}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s.prepareOrderCancellation({address:e,orderCancellation:t,instructions:n});var i=r(e,t);return o.prepareTransaction(i,this,n)}var _=n(300),o=n(635),s=o.common.validate;e.exports=i},function(e,t,n){"use strict";function r(e,t){var n={TransactionType:"EscrowCreate",Account:e,Destination:t.destination,Amount:u(t.amount)};if(void 0!==t.condition&&(n.Condition=t.condition),void 0!==t.allowCancelAfter&&(n.CancelAfter=c(t.allowCancelAfter)),void 0!==t.allowExecuteAfter&&(n.FinishAfter=c(t.allowExecuteAfter)),void 0!==t.sourceTag&&(n.SourceTag=t.sourceTag),void 0!==t.destinationTag&&(n.DestinationTag=t.destinationTag),void 0!==t.memos&&(n.Memos=_.map(t.memos,o.convertMemo)),Boolean(t.allowCancelAfter)&&Boolean(t.allowExecuteAfter)&&n.CancelAfter<=n.FinishAfter)throw new ValidationError('"CancelAfter" must be after "FinishAfter" for EscrowCreate');return n}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a.prepareEscrowCreation({address:e,escrowCreation:t,instructions:n});var i=r(e,t);return o.prepareTransaction(i,this,n)}var _=n(300),o=n(635),s=o.common,a=s.validate,c=s.iso8601ToRippleTime,u=s.xrpToDrops,ValidationError=o.common.errors.ValidationError;
|
||
e.exports=i},function(e,t,n){"use strict";function r(e,t){var n={TransactionType:"EscrowFinish",Account:e,Owner:t.owner,OfferSequence:t.escrowSequence};if(Boolean(t.condition)!==Boolean(t.fulfillment))throw new ValidationError('"condition" and "fulfillment" fields on EscrowFinish must only be specified together.');return void 0!==t.condition&&(n.Condition=t.condition),void 0!==t.fulfillment&&(n.Fulfillment=t.fulfillment),void 0!==t.memos&&(n.Memos=_.map(t.memos,o.convertMemo)),n}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s.prepareEscrowExecution({address:e,escrowExecution:t,instructions:n});var i=r(e,t);return o.prepareTransaction(i,this,n)}var _=n(300),o=n(635),s=o.common.validate;e.exports=i},function(e,t,n){"use strict";function r(e,t){var n={TransactionType:"EscrowCancel",Account:e,Owner:t.owner,OfferSequence:t.escrowSequence};return void 0!==t.memos&&(n.Memos=_.map(t.memos,o.convertMemo)),n}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s.prepareEscrowCancellation({address:e,escrowCancellation:t,instructions:n});var i=r(e,t);return o.prepareTransaction(i,this,n)}var _=n(300),o=n(635),s=o.common.validate;e.exports=i},function(e,t,n){"use strict";function r(e,t){var n={Account:e,TransactionType:"PaymentChannelCreate",Amount:u(t.amount),Destination:t.destination,SettleDelay:t.settleDelay,PublicKey:t.publicKey.toUpperCase()};return void 0!==t.cancelAfter&&(n.CancelAfter=c(t.cancelAfter)),void 0!==t.sourceTag&&(n.SourceTag=t.sourceTag),void 0!==t.destinationTag&&(n.DestinationTag=t.destinationTag),n}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a.preparePaymentChannelCreate({address:e,paymentChannelCreate:t,instructions:n});var i=r(e,t);return o.prepareTransaction(i,this,n)}var o=n(635),s=o.common,a=s.validate,c=s.iso8601ToRippleTime,u=s.xrpToDrops;e.exports=i},function(e,t,n){"use strict";function r(e,t){var n={Account:e,TransactionType:"PaymentChannelFund",Channel:t.channel,Amount:u(t.amount)};return void 0!==t.expiration&&(n.Expiration=c(t.expiration)),n}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a.preparePaymentChannelFund({address:e,paymentChannelFund:t,instructions:n});var i=r(e,t);return o.prepareTransaction(i,this,n)}var o=n(635),s=o.common,a=s.validate,c=s.iso8601ToRippleTime,u=s.xrpToDrops;e.exports=i},function(e,t,n){"use strict";function r(e,t){var n={Account:e,TransactionType:"PaymentChannelClaim",Channel:t.channel,Flags:0};if(void 0!==t.balance&&(n.Balance=u(t.balance)),void 0!==t.amount&&(n.Amount=u(t.amount)),Boolean(t.signature)!==Boolean(t.publicKey))throw new ValidationError('"signature" and "publicKey" fields on PaymentChannelClaim must only be specified together.');if(void 0!==t.signature&&(n.Signature=t.signature),void 0!==t.publicKey&&(n.PublicKey=t.publicKey),t.renew===!0&&t.close===!0)throw new ValidationError('"renew" and "close" flags on PaymentChannelClaim are mutually exclusive');return t.renew===!0&&(n.Flags|=s.Renew),t.close===!0&&(n.Flags|=s.Close),n}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};c.preparePaymentChannelClaim({address:e,paymentChannelClaim:t,instructions:n});var i=r(e,t);return o.prepareTransaction(i,this,n)}var o=n(635),ValidationError=o.common.errors.ValidationError,s=o.common.txFlags.PaymentChannelClaim,a=o.common,c=a.validate,u=a.xrpToDrops;e.exports=i},function(e,t,n){(function(t){"use strict";function r(e,t){var n=Object.keys(t);f(1===n.length,"ERROR: can only set one setting per transaction");var r=n[0],i=t[r],o=p[r];void 0!==o&&(i?e.SetFlag=o:e.ClearFlag=o)}function i(e,n){var r=m;for(var i in r){var o=r[i],s=n[o.name];void 0!==s&&(s===g&&o.hasOwnProperty("defaults")&&(s=o.defaults),"hex"!==o.encoding||o.length||(s=new t(s,"ascii").toString("hex").toUpperCase()),e[i]=s)}}function o(e){return new h(e).shift(9).toNumber()}function s(e){return{SignerEntry:{Account:e.address,SignerWeight:e.weight}}}function a(e,t){if(void 0!==t.regularKey){var n={TransactionType:"SetRegularKey",Account:e};return null===t.regularKey?n:_.assign({},n,{RegularKey:t.regularKey})}if(void 0!==t.signers)return{TransactionType:"SignerListSet",Account:e,SignerQuorum:t.signers.threshold,SignerEntries:_.map(t.signers.weights,s)};var a={TransactionType:"AccountSet",Account:e};return r(a,_.omit(t,"memos")),i(a,t),void 0!==a.TransferRate&&(a.TransferRate=o(a.TransferRate)),a}function c(e,t){var n=a(e,t);return void 0!==t.memos&&(n.Memos=_.map(t.memos,d.convertMemo)),n}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l.prepareSettings({address:e,settings:t,instructions:n});var r=c(e,t);return d.prepareTransaction(r,this,n)}var _=n(300),f=n(306),h=n(304),d=n(635),l=d.common.validate,p=d.common.constants.AccountFlagIndices,m=d.common.constants.AccountFields,g=null;e.exports=u}).call(t,n(312).Buffer)},function(e,t,n){"use strict";function r(e,t,n){var r=n?a.encodeForMultisigning(e,n):a.encodeForSigning(e);return s.sign(r,t)}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f.sign({txJSON:e,secret:t});var i=JSON.parse(e);if(i.TxnSignature||i.Signers)throw new o.common.errors.ValidationError('txJSON must not contain "TxnSignature" or "Signers" properties');var c=s.deriveKeypair(t);if(i.SigningPubKey=n.signAs?"":c.publicKey,n.signAs){var h={Account:n.signAs,SigningPubKey:c.publicKey,TxnSignature:r(i,c.privateKey,n.signAs)};i.Signers=[{Signer:h}]}else i.TxnSignature=r(i,c.privateKey);var d=a.encode(i);return{signedTransaction:d,id:u(d)}}var o=n(635),s=n(305),a=n(565),c=n(614),u=c.computeBinaryTransactionHash,f=o.common.validate;e.exports=i},function(e,t,n){(function(t){"use strict";function r(e){var n=new t(f(e)).toString("hex");return new c(n,16)}function i(e,t){return r(e.Signer.Account).comparedTo(r(t.Signer.Account))}function o(e){h.combine({signedTransactions:e});var t=_.map(e,s.decode),n=_.omit(t[0],"Signers");if(!_.every(t,function(e){return _.isEqual(n,_.omit(e,"Signers"))}))throw new a.common.errors.ValidationError("txJSON is not the same for all signedTransactions");var r=_.reduce(t,function(e,t){return e.concat(t.Signers||[])},[]),o=r.sort(i),c=_.assign({},n,{Signers:o}),u=s.encode(c),f=l(u);return{signedTransaction:u,id:f}}var _=n(300),s=n(565),a=n(635),c=n(304),u=n(390),f=u.decodeAddress,h=a.common.validate,d=n(614),l=d.computeBinaryTransactionHash;e.exports=o}).call(t,n(312).Buffer)},function(e,t,n){"use strict";function r(e){return _.startsWith(e,"tem")}function i(e){var t={resultCode:e.engine_result,resultMessage:e.engine_result_message};if(r(e.engine_result))throw new s.common.errors.RippledError("Submit failed",t);return t}function o(e){a.submit({signedTransaction:e});var t={command:"submit",tx_blob:e};return this.connection.request(t).then(i)}var _=n(300),s=n(635),a=s.common.validate;e.exports=o},function(e,t,n){"use strict";function r(e){var t=o.generateSeed(e),n=o.deriveKeypair(t),r=o.deriveAddress(n.publicKey);return{secret:t,address:r}}function i(e){c.generateAddress({options:e});try{return r(e)}catch(t){throw new a.UnexpectedError(t.message)}}var o=n(305),s=n(302),a=s.errors,c=s.validate;e.exports={generateAddressAPI:i}},function(e,t,n){"use strict";function r(e){return{account_hash:e.stateHash,close_time:c.iso8601ToRippleTime(e.closeTime),close_time_resolution:e.closeTimeResolution,close_flags:e.closeFlags,hash:e.ledgerHash,ledger_hash:e.ledgerHash,ledger_index:e.ledgerVersion.toString(),seqNum:e.ledgerVersion.toString(),parent_hash:e.parentLedgerHash,parent_close_time:c.iso8601ToRippleTime(e.parentCloseTime),total_coins:e.totalDrops,totalCoins:e.totalDrops,transaction_hash:e.transactionHash}}function i(e){var t=r(e);return u.computeLedgerHash(t)}function o(e,t){if(void 0===e.rawTransactions)return e.transactionHash;var n=JSON.parse(e.rawTransactions),r=_.map(n,function(e){var t=_.assign({},_.omit(e,"tx"),e.tx||{}),n=_.assign({},_.omit(t,"meta"),e.meta?{metaData:e.meta}:{});return n}),i=u.computeTransactionTreeHash(r,t);if(void 0!==e.transactionHash&&e.transactionHash!==i)throw new c.errors.ValidationError("transactionHash in header does not match computed hash of transactions");return i}function s(e,t){if(void 0===e.rawState)return e.stateHash;var n=JSON.parse(e.rawState),r=u.computeStateTreeHash(n,t);if(void 0!==e.stateHash&&e.stateHash!==r)throw new c.errors.ValidationError("stateHash in header does not match computed hash of state");return r}function a(e){var t=0===(e.closeFlags&f)?1:2,n={transactionHash:o(e,t),stateHash:s(e,t)};return i(_.assign({},e,n))}var _=n(300),c=n(302),u=n(614),f=2;e.exports=a},function(e,t,n){"use strict";function r(e,t,n){a.signPaymentChannelClaim({channel:e,amount:t,privateKey:n});var r=s.encodeForSigningClaim({channel:e,amount:c(t)});return o.sign(r,n)}var i=n(302),o=n(305),s=n(565),a=i.validate,c=i.xrpToDrops;e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){a.verifyPaymentChannelClaim({channel:e,amount:t,signature:n,publicKey:r});var i=s.encodeForSigningClaim({channel:e,amount:c(t)});return o.verify(i,n,r)}var i=n(302),o=n(305),s=n(565),a=i.validate,c=i.xrpToDrops;e.exports=r},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o.getLedger({options:e});var t={command:"ledger",ledger_index:e.ledgerVersion||"validated",expand:e.includeAllData,transactions:e.includeTransactions,accounts:e.includeState};return this.connection.request(t).then(function(e){return s(e.ledger)})}var i=n(541),o=i.common.validate,s=n(654);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=_.assign({},_.omit(t,"metaData"),{meta:t.metaData,ledger_index:e}),r=f(n);return r.outcome.ledgerVersion||(r.outcome.ledgerVersion=e),r}function i(e,t){return _.isEmpty(e)?{}:_.isString(e[0])?{transactionHashes:e}:{transactions:_.map(e,_.partial(r,t)),rawTransactions:JSON.stringify(e)}}function o(e){return _.isEmpty(e)?{}:_.isString(e[0])?{stateHashes:e}:{rawState:JSON.stringify(e)}}function s(e){var t=parseInt(e.ledger_index||e.seqNum,10);return c(_.assign({stateHash:e.account_hash,closeTime:u(e.close_time),closeTimeResolution:e.close_time_resolution,closeFlags:e.close_flags,ledgerHash:e.hash||e.ledger_hash,ledgerVersion:t,parentLedgerHash:e.parent_hash,parentCloseTime:u(e.parent_close_time),totalDrops:e.total_coins||e.totalCoins,transactionHash:e.transaction_hash},i(e.transactions,t),o(e.accountState)))}var _=n(300),a=n(543),c=a.removeUndefined,u=a.rippleTimeToISO8601,f=n(542);e.exports=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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 s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=n(300),a=n(1).RippleAPI,c=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));o.ledgerVersion=0;var s=e.map(function(e){return new a(_.assign({},n,{server:e}))});o._apis=s,o.getMethodNames().forEach(function(e){o[e]=function(){var t=arguments;return Promise.race(s.map(function(n){return n[e].apply(n,t)}))}}),o.connect=function(){return Promise.all(s.map(function(e){return e.connect()}))},o.disconnect=function(){return Promise.all(s.map(function(e){return e.disconnect()}))},o.isConnected=function(){return _.every(s.map(function(e){return e.isConnected()}))};var c=s[0],u=["sign","generateAddress","computeLedgerHash"];return u.forEach(function(e){o[e]=c[e].bind(c)}),s.forEach(function(e){e.on("ledger",o.onLedgerEvent.bind(o)),e.on("error",function(e,t,n){return o.emit("error",e,t,n)})}),o}return o(t,e),s(t,[{key:"onLedgerEvent",value:function(e){e.ledgerVersion>this.ledgerVersion&&(this.ledgerVersion=e.ledgerVersion,this.emit("ledger",e))}},{key:"getMethodNames",value:function(){var e=[];for(var t in a.prototype)a.prototype.hasOwnProperty(t)&&"function"==typeof a.prototype[t]&&e.push(t);return e}}]),t}(a);e.exports={RippleAPIBroadcast:c}}]); |