1try{let t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="569b5905-ee6c-468c-9673-d7804935edb1",t._sentryDebugIdIdentifier="sentry-dbid-569b5905-ee6c-468c-9673-d7804935edb1")}catch(t){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"d2911879bc35c39df91a8e85b8eeba45c19f4ad7"},(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9409],{81506:function(t){t.exports=function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},48926:function(t){function asyncGeneratorStep(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){r(t);return}a.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function _next(t){asyncGeneratorStep(o,n,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(o,n,i,_next,_throw,"throw",t)}_next(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},34575:function(t){t.exports=function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},93913:function(t){function _defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},29754:function(t){function _getPrototypeOf(e){return t.exports=_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,_getPrototypeOf(e)}t.exports=_getPrototypeOf,t.exports.__esModule=!0,t.exports.default=t.exports},2205:function(t,e,r){var n=r(99489);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},95318:function(t){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},78585:function(t,e,r){var n=r(50008).default,i=r(81506);t.exports=function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},59591:function(t,e,r){var n=r(50008).default;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=_regeneratorRuntime=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i,o=Object.create((e&&e.prototype instanceof Generator?e:Generator).prototype),s=new Context(n||[]);return o._invoke=(i="suspendedStart",function(e,n){if("executing"===i)throw Error("Generator is already running");if("completed"===i){if("throw"===e)throw n;return doneResult()}for(s.method=e,s.arg=n;;){var o=s.delegate;if(o){var a=function maybeInvokeDelegate(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&
vendor: 4,342 bytes, line 1
1(e.method="return",e.arg=void 0,maybeInvokeDelegate(t,e),"throw"===e.method))return c;e.method="throw",e.arg=TypeError("The iterator does not provide a 'throw' method")}return c}var n=tryCatch(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=TypeError("iterator result is not an object"),e.delegate=null,c)}(o,s);if(a){if(a===c)continue;return a}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===i)throw i="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);i="executing";var u=tryCatch(t,r,s);if("normal"===u.type){if(i=s.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:s.done}}"throw"===u.type&&(i="completed",s.method="throw",s.arg=u.arg)}}),o}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var c={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var l={};define(l,s,function(){return this});var f=Object.getPrototypeOf,d=f&&f(f(values([])));d&&d!==r&&i.call(d,s)&&(l=d);var p=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(l);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t)})})}function AsyncIterator(t,e){var r;this._invoke=function(o,s){function callInvokeWithMethodAndArg(){return new e(function(r,a){!function invoke(r,o,s,a){var u=tryCatch(t[r],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==n(l)&&i.call(l,"__await")?e.resolve(l.__await).then(function(t){invoke("next",t,s,a)},function(t){invoke("throw",t,s,a)}):e.resolve(l).then(function(t){c.value=t,s(c)},function(t){return invoke("throw",t,s,a)})}a(u.arg)}(o,s,r,a)})}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,next=function next(){for(;++r<t.length;)if(i.call(t,r))return next.value=t[r],next.done=!1,next;return next.value=void 0,next.done=!0,next};return next.next=next}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}return GeneratorFunction.prototype=GeneratorFunctionPrototype,define(p,"constructor",GeneratorFunctionPrototype),define(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(p),t},e.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,a,function(){return this}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new AsyncIterator(wrap(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then(function(t){return t.done?t.value:s.next()})},defineIteratorMethods(p),define(p,u,"Generator"),define(p,s,function(){return this}),define(p,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function next(){for(;e.length;){var r=e.pop();if(r in t)return next.value=r,next.done=!1,next}return next.done=!0,next}},e.values=values,Context.prototype={constructor:Context,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
1h(resetTryEntry),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function handle(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],o=n.completion;if("root"===n.tryLoc)return handle("end");if(n.tryLoc<=this.prev){var s=i.call(n,"catchLoc"),a=i.call(n,"finallyLoc");if(s&&a){if(this.prev<n.catchLoc)return handle(n.catchLoc,!0);if(this.prev<n.finallyLoc)return handle(n.finallyLoc)}else if(s){if(this.prev<n.catchLoc)return handle(n.catchLoc,!0)}else{if(!a)throw Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return handle(n.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;resetTryEntry(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:values(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}t.exports=_regeneratorRuntime,t.exports.__esModule=!0,t.exports.default=t.exports},99489:function(t){function _setPrototypeOf(e,r){return t.exports=_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,_setPrototypeOf(e,r)}t.exports=_setPrototypeOf,t.exports.__esModule=!0,t.exports.default=t.exports},50008:function(t){function _typeof(e){return t.exports=_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,_typeof(e)}t.exports=_typeof,t.exports.__esModule=!0,t.exports.default=t.exports},87757:function(t,e,r){var n=r(59591)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},88216:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.networkById=e.default=void 0;var n,i=(n=r(37918))&&n.__esModule?n:{default:n},o=r(59917);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(t,e,r){var n;return(n=function(t,e){if("object"!==_typeof(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==_typeof(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"===_typeof(n)?n:String(n))in t)?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s={XRP:"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",TRX:"TVau3x4zuCaAWN6oX2b8BTputTrJSPTGx8",ETH:"0xd41c4805a9a3128f9f7a7074da25965371ba50d5",SOL:"9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E",TON:"UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ"},ethValidator=function(t){try{i.default.utils.toChecksumAddress(t)}catch(t){return"Address should be like ".concat(s.ETH)}},caseSensitive=function(t){return t},a={placeholder:s.ETH,normalizeAddress:function(t){return t.toLowerCase()},validator:ethValidator,isDeadAddress:function(t){return"0x0000000000000000000000000000000000000000"===t||"0x000000000000000000000000000000000000dead"===t||"0xdEAD000000000000000042069420694206942069"===t},erc20:!0},u={ETH:_objectSpread(_objectSpread({},a),{}
1,{name:"Ethereum",shortName:"Ethereum",slither:"",symbol:"ETH",makeExplorerTxLink:function(t){return"https://etherscan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://etherscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://etherscan.io/token/".concat(t)},feesCheckerContract:"0x7F97A0db6309003d4F0CB00D237dc9a85B400488",lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",onChainAggregatorContract:"0x335c40873C1aCC296Cfb01eeA2540C7Aa2845400",listed:!0,chainId:1,rpc:"https://eth-mainnet.public.blastapi.io",routerAddress:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",dividentTracker:"0x687D7a1a6fF81974ed101557b98030d77e905a0d",wrapped:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}),BSC:_objectSpread(_objectSpread({},a),{},{name:"Binance Smart Chain",shortName:"BSC",slither:"bsc",symbol:"BNB",makeExplorerTxLink:function(t){return"https://bscscan.com/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://bscscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://bscscan.com/token/".concat(t)},feesCheckerContract:"0xA127ddf1747adcbE45a15dcadF69a844492424a6",lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",onChainAggregatorContract:"0xfCC9D294D2Fa97aFc9b366751DE5ECb387DdEbB5",listed:!0,chainId:56,rpc:"https://bsc-dataseed.bnbchain.org/",routerAddress:"0x10ED43C718714eb63d5aA57B78B54704E256024E",dividentTracker:"0x9795DcF2CfEe83456bCD4801eeB7a7f9c7A7551B",wrapped:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}),MATIC:_objectSpread(_objectSpread({},a),{},{name:"Matic",shortName:"Matic",slither:"poly",symbol:"MATIC",makeExplorerTxLink:function(t){return"https://polygonscan.com/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://polygonscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://polygonscan.com/token/".concat(t)},feesCheckerContract:"0xcD9d5f112828839f0D470E7b26f186167493EcF7",lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",onChainAggregatorContract:"0xA10D8b1C871573297Ad63f0cE3A3f376A4547F4e",listed:!0,chainId:137,rpc:"https://polygon-rpc.com",routerAddress:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",dividentTracker:"0xEC8eea03ec866514F8e7Caa2131f1c4B4564d974",wrapped:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}),AVAX:_objectSpread(_objectSpread({},a),{},{name:"Avalanche",shortName:"Avax",slither:"avax",symbol:"AVAX",makeExplorerTxLink:function(t){return"https://snowtrace.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://snowtrace.io/address/".concat(t)},makeExplorerLink:function(t){return"https://snowtrace.io/token/".concat(t)},lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",feesCheckerContract:"0x7F97A0db6309003d4F0CB00D237dc9a85B400488",feesCheckerContract2:"0xf1d320D75650b95e3a5c4b6942a7488bEa5EE519",onChainAggregatorContract:"0x335c40873C1aCC296Cfb01eeA2540C7Aa2845400",listed:!0,chainId:43114,rpc:"https://avalanche.drpc.org",routerAddress:"0x60aE616a2155Ee3d9A68541Ba4544862310933d4",wrapped:"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"}),ARBITRUM:_objectSpread(_objectSpread({},a),{},{name:"Arbitrum One",shortName:"Arbitrum",slither:"arbi",symbol:"ETH",makeExplorerTxLink:function(t){return"https://arbiscan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://arbiscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://arbiscan.io/token/".concat(t)},listed:!0,chainId:42161,rpc:"https://arb1.arbitrum.io/rpc",routerAddress:"0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",dividentTracker:"0x4EF50A0E87481CAe04927eDA96231CDA5891FD4F",wrapped:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1"}),CRO:_objectSpread(_objectSpread({},a),{},{name:"Cronos",shortName:"Cronos",symbol:"CRO",makeExplorerTxLink:function(t){return"https://cronoscan.com/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://cronoscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://cronoscan.com/token/".concat(t)},lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",listed:!0,chainId:25,rpc:"https://evm.cronos.org",routerAddress:"0xcd7d16fB918511BF7269eC4f48d61D79Fb26f918",wrapped:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23"}),DOGE:_objectSpread(_objectSpread({},a),{}
1,{name:"Doge",shortName:"Doge",symbol:"DOGE",makeExplorerTxLink:function(t){return"https://explorer.dogechain.dog/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://explorer.dogechain.dog/address/".concat(t)},makeExplorerLink:function(t){return"https://explorer.dogechain.dog/token/".concat(t)},listed:!0,chainId:2e3,rpc:"https://rpc01-sg.dogechain.dog",routerAddress:"0x6258c967337D3faF0C2ba3ADAe5656bA95419d5f",wrapped:"0xB7ddC6414bf4F5515b52D8BdD69973Ae205ff101"}),ONE:_objectSpread(_objectSpread({},a),{},{name:"Harmony One",shortName:"One",symbol:"ONE",makeExplorerTxLink:function(t){return"https://explorer.harmony.one/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://explorer.harmony.one/address/".concat(t)},makeExplorerLink:function(t){return"https://explorer.harmony.one/token/".concat(t)},lockerFactory:"0x097f5E933306ad0EbB1c0027B223a3dd153520BE",listed:!0,chainId:16666e5,rpc:"https://api.harmony.one",wrapped:"0xcf664087a5bb0237a0bad6742852ec6c8d69a27a"}),FTM:_objectSpread(_objectSpread({},a),{},{name:"Fantom",shortName:"Fantom",slither:"ftm",symbol:"FTM",makeExplorerTxLink:function(t){return"https://ftmscan.com/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://ftmscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://ftmscan.com/token/".concat(t)},lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",listed:!0,chainId:250,rpc:"https://rpc.ankr.com/fantom",routerAddress:"0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",wrapped:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83"}),BLAST:_objectSpread(_objectSpread({},a),{},{name:"Blast",shortName:"Blast",symbol:"BLAST",makeExplorerTxLink:function(t){return"https://blastscan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://blastscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://blastscan.io/token/".concat(t)},listed:!0,rpc:"https://rpc.blast.io",chainId:81457,routerAddress:"0xaE32a2f7fF8f3eB9858602F0663391511e4cb9C0",onChainAggregatorContract:"0xd6445e06226f0178FE6e4077C26F3Df926FaA656",wrapped:"0x4300000000000000000000000000000000000004"}),TELOS:_objectSpread(_objectSpread({},a),{},{name:"Telos",shortName:"Telos",symbol:"TLOS",makeExplorerTxLink:function(t){return"https://www.teloscan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://www.teloscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://www.teloscan.io/address/".concat(t)},lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",listed:!0,chainId:40,rpc:"https://mainnet.telos.net/evm",routerAddress:"0xb9667Cf9A495A123b0C43B924f6c2244f42817BE",wrapped:"0xD102cE6A4dB07D247fcc28F366A623Df0938CA9E"}),KCC:_objectSpread(_objectSpread({},a),{},{name:"KuCoin",shortName:"KuCoin",symbol:"KCS",makeExplorerTxLink:function(t){return"https://explorer.kcc.io/en/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://explorer.kcc.io/en/address/".concat(t)},makeExplorerLink:function(t){return"https://explorer.kcc.io/en/token/".concat(t)},listed:!0,rpc:"https://rpc-mainnet.kcc.network",chainId:321,routerAddress:"0xa58350d6dee8441aa42754346860e3545cc83cda",wrapped:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521"}),KLAY:_objectSpread(_objectSpread({},a),{},{name:"Klaytn",shortName:"Klaytn",symbol:"KLAY",makeExplorerTxLink:function(t){return"https://scope.klaytn.com/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://scope.klaytn.com/account/".concat(t)},makeExplorerLink:function(t){return"https://scope.klaytn.com/token/".concat(t)},listed:!0,rpc:"https://public-en-cypress.klaytn.net",chainId:8217,routerAddress:"0xe0fbb27d0e7f3a397a67a9d4864d4f4dd7cf8cb9"}),TRX:{name:"Tron",shortName:"Tron",symbol:"TRX",makeExplorerTxLink:function(t){return"https://tronscan.org/#/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://tronscan.org/#/address/".concat(t)},makeExplorerLink:function(t){return"https://tronscan.org/#/transaction/".concat(t)},placeholder:s.TRX,isDeadAddress:function(){return!1},normalizeAddress:caseSensitive,validator:function(t){return t.startsWith("T")?/^T[a-zA-Z0-9]{33}$/.test(t)?void 0:"TRX address should be like ".concat(s.TRX):"TRX address should start with T"},listed:!0}
1,XRP:{name:"XRP",shortName:"XRP",symbol:"XRP",makeExplorerTxLink:function(t){return"https://xrpscan.com/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://xrpscan.com/account/".concat(t)},makeExplorerLink:function(t){return"https://xrpscan.com/account/".concat(t)},placeholder:s.XRP,isDeadAddress:function(){return!1},normalizeAddress:caseSensitive,validator:function(t){return t.startsWith("r")?/^r[a-zA-Z0-9]{25,35}$/.test(t)?void 0:"XRP address should be like ".concat(s.XRP):"XRP address should start with r"},listed:!0},SOL:{name:"Solana",shortName:"Solana",symbol:"SOL",makeExplorerTxLink:function(t){return"https://solscan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://solscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://solscan.io/token/".concat(t)},placeholder:s.SOL,normalizeAddress:caseSensitive,isDeadAddress:function(t){return"1nc1nerator11111111111111111111111111111111"===t||"11111111111111111111111111111111"===t},validator:function(t){try{new o.PublicKey(t)}catch(t){return"SOL address should be like ".concat(s.SOL)}},listed:!0},AME:_objectSpread(_objectSpread({},a),{},{name:"AME Chain",shortName:"Ame",symbol:"AME",makeExplorerTxLink:function(t){return"https://amescan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://amescan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://amescan.io/token/".concat(t)},placeholder:s.ETH,validator:ethValidator,listed:!0,chainId:180,rpc:"https://node1.amechain.io/",wrapped:"0xCc9bD40124EfedF6F198B8b5b50697dC635FaaC4"}),VLX:_objectSpread(_objectSpread({},a),{},{name:"Velas",shortName:"Velas",symbol:"VLX",makeExplorerTxLink:function(t){return"https://evmexplorer.velas.com/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://evmexplorer.velas.com/address/".concat(t)},makeExplorerLink:function(t){return"https://evmexplorer.velas.com/token/".concat(t)},listed:!0,chainId:106,rpc:"https://explorer.velas.com/rpc",routerAddress:"0x5896bfbdc09fcc9deda4c39f27010b91510eecba",wrapped:"0xc579d1f3cf86749e05cd06f7ade17856c2ce3126"}),HT:_objectSpread(_objectSpread({},a),{},{name:"Heco Chain",shortName:"Heco",symbol:"HT",makeExplorerTxLink:function(t){return"https://hecoinfo.com/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://hecoinfo.com/address/".concat(t)},makeExplorerLink:function(t){return"https://hecoinfo.com/token/".concat(t)},listed:!0,chainId:128,rpc:"https://http-mainnet-node.huobichain.com",routerAddress:"0x0f1c2d1fdd202768a4bda7a38eb0377bd58d278e",wrapped:"0x5545153ccfca01fbd7dd11c0b23ba694d9509a6f"}),ROSE:_objectSpread(_objectSpread({},a),{},{name:"Oasis Network",shortName:"Oasis",symbol:"ROSE",makeExplorerTxLink:function(t){return"https://explorer.emerald.oasis.dev/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://explorer.emerald.oasis.dev/address/".concat(t)},makeExplorerLink:function(t){return"https://explorer.emerald.oasis.dev/token/".concat(t)},placeholder:s.ETH,validator:function(){return!1},listed:!0,chainId:42262,rpc:"https://emerald.oasis.dev",routerAddress:"0x612a405AECBFBd8049333a91141f712Dae37c172",wrapped:"0x21C718C22D52d0F3a789b752D4c2fD5908a8A733"}),MOVR:_objectSpread(_objectSpread({},a),{},{name:"Moonriver",shortName:"Moonriver",symbol:"MOVR",makeExplorerTxLink:function(t){return"https://moonriver.moonscan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://moonriver.moonscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://moonriver.moonscan.io/token/".concat(t)},listed:!0,chainId:1285,rpc:"https://rpc.api.moonriver.moonbeam.network",routerAddress:"0xAA30eF758139ae4a7f798112902Bf6d65612045f",wrapped:"0x98878b06940ae243284ca214f92bb71a2b032b8a"}),GLMR:_objectSpread(_objectSpread({},a),{},{name:"Moonbeam",shortName:"Moonbeam",symbol:"GLMR",makeExplorerTxLink:function(t){return"https://moonscan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://moonscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://moonscan.io/token/".concat(t)},listed:!0,chainId:1284,rpc:"https://rpc.api.moonbeam.network",routerAddress:"0x96b244391D98B62D19aE89b1A4dCcf0fc56970C7",wrapped:"0xacc15dc74880c9944775448304b263d191c6077f"}),CELO:_objectSpread(_objectSpread({},a),{}
1,{name:"Celo",shortName:"Celo",symbol:"CELO",makeExplorerTxLink:function(t){return"https://explorer.celo.org/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://explorer.celo.org/address/".concat(t)},makeExplorerLink:function(t){return"https://explorer.celo.org/token/".concat(t)},listed:!0,chainId:42220,rpc:"https://forno.celo.org",routerAddress:"0xE3D8bd6Aed4F159bc8000a9cD47CffDb95F96121",wrapped:"0x471EcE3750Da237f93B8E339c536989b8978a438"}),ETC:_objectSpread(_objectSpread({},a),{},{name:"Ethereum Classic",shortName:"ETC",symbol:"ETC",makeExplorerTxLink:function(t){return"https://blockscout.com/etc/mainnet/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://blockscout.com/etc/mainnet/address/".concat(t)},makeExplorerLink:function(t){return"https://blockscout.com/etc/mainnet/token/".concat(t)},listed:!0,chainId:61,rpc:"https://etc.rivet.link",routerAddress:"0x79Bf07555C34e68C4Ae93642d1007D7f908d60F5",wrapped:"0x82A618305706B14e7bcf2592D4B9324A366b6dAd"}),XDAI:_objectSpread(_objectSpread({},a),{},{name:"Gnosis",shortName:"Gnosis",symbol:"xDAI",makeExplorerTxLink:function(t){return"https://blockscout.com/xdai/mainnet/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://blockscout.com/xdai/mainnet/address/".concat(t)},makeExplorerLink:function(t){return"https://blockscout.com/xdai/mainnet/token/".concat(t)},listed:!0,chainId:100,rpc:"https://rpc.gnosischain.com",routerAddress:"0xE43e60736b1cb4a75ad25240E2f9a62Bff65c0C0",wrapped:"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d"}),ROPSTEN:_objectSpread(_objectSpread({},a),{},{name:"Ropsten Ethereum Testnet",shortName:"Ropsten",slither:"ropsten",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://ropsten.etherscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://ropsten.etherscan.io/token/".concat(t)},makeExplorerTxLink:function(t){return"https://ropsten.etherscan.io/tx/".concat(t)},listed:!1,chainId:3,rpc:"https://rpc.ankr.com/eth_ropsten",deprecated:!0}),RINKEBY:_objectSpread(_objectSpread({},a),{},{name:"Rinkeby Ethereum Testnet",shortName:"Rinkeby",slither:"rinkeby",symbol:"ETH",lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",makeExplorerAddressLink:function(t){return"https://rinkeby.etherscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://rinkeby.etherscan.io/token/".concat(t)},makeExplorerTxLink:function(t){return"https://rinkeby.etherscan.io/tx/".concat(t)},listed:!1,chainId:4,rpc:"https://rpc.ankr.com/eth_rinkeby",deprecated:!0}),OPTIMISM:_objectSpread(_objectSpread({},a),{},{name:"Optimism",shortName:"Optimism",symbol:"ETH",slither:"optim",makeExplorerTxLink:function(t){return"https://optimistic.etherscan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://optimistic.etherscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://optimistic.etherscan.io/token/".concat(t)},listed:!0,chainId:10,rpc:"https://mainnet.optimism.io",wrapped:"0x4200000000000000000000000000000000000006"}),BRISE:_objectSpread(_objectSpread({},a),{},{name:"Brise Chain",shortName:"Brise",symbol:"BRISE",makeExplorerAddressLink:function(t){return"https://brisescan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://brisescan.com/token/".concat(t)},makeExplorerTxLink:function(t){return"https://brisescan.com/tx/".concat(t)},listed:!0,chainId:32520,rpc:"https://mainnet-rpc.brisescan.com",routerAddress:"0xBb5e1777A331ED93E07cF043363e48d320eb96c4",wrapped:"0x0eb9036cbE0f052386f36170c6b07eF0a0E3f710"}),LOOP:_objectSpread(_objectSpread({},a),{},{name:"Loop Network",shortName:"LOOP",symbol:"LOOP",makeExplorerAddressLink:function(t){return"https://explorer.mainnetloop.com/address/".concat(t)},makeExplorerLink:function(t){return"https://explorer.mainnetloop.com/token/".concat(t)},makeExplorerTxLink:function(t){return"https://explorer.mainnetloop.com/tx/".concat(t)},listed:!0,chainId:15551,rpc:"https://api.mainnetloop.com"}),ZKSYNC:_objectSpread(_objectSpread({},a),{},{name:"zkSync Era",shortName:"zkSync",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://explorer.zksync.io/address/".concat(t)},makeExplorerLink:function(t){return"https://explorer.zksync.io/address/".concat(t)},makeExplorerTxLink:function(t){return"https://explorer.zksync.io/tx/".concat(t)},chainId:324,listed:!0,rpc:"https://mainnet.era.zksync.io",wrapped:"0x000000000000000000000000000000000000800A"}),BASE:_objectSpread(_objectSpread({},a),{}
1,{name:"Base Mainnet",shortName:"Base",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://basescan.org/address/".concat(t)},makeExplorerLink:function(t){return"https://basescan.org/token/".concat(t)},makeExplorerTxLink:function(t){return"https://basescan.org/tx/".concat(t)},chainId:8453,listed:!0,rpc:"https://mainnet.base.org",routerAddress:"0xd55a4d54f39baf26da2f3ee7be9a6388c15f9831",onChainAggregatorContract:"0x25FE1E520fBA14e7B80307de05A37C5B72630B64",wrapped:"0x4200000000000000000000000000000000000006"}),AREON:_objectSpread(_objectSpread({},a),{},{name:"Areon Mainnet",shortName:"Areon",symbol:"AREA",makeExplorerAddressLink:function(t){return"https://areonscan.com/contracts/".concat(t)},makeExplorerLink:function(t){return"https://areonscan.com/tokens/".concat(t)},makeExplorerTxLink:function(t){return"https://areonscan.com/transactions/".concat(t)},chainId:463,listed:!0,rpc:"https://mainnet-rpc.areon.network",routerAddress:"0xda0f518d521e0de83fadc8500c2d21b6a6c39bf9",wrapped:"0x1d1bc800e71576a59f9ef88bb679fa13c2e10abf"}),LINEA:_objectSpread(_objectSpread({},a),{},{name:"Linea Mainnet",shortName:"Linea",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://lineascan.build/address/".concat(t)},makeExplorerLink:function(t){return"https://lineascan.build/token/".concat(t)},makeExplorerTxLink:function(t){return"https://lineascan.build/tx/".concat(t)},chainId:59144,listed:!0,rpc:"https://rpc.linea.build",routerAddress:"0x610D2f07b7EdC67565160F587F37636194C34E74",wrapped:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f"}),MANTLE:_objectSpread(_objectSpread({},a),{},{name:"Mantle Mainnet",shortName:"Mantle",symbol:"MNT",makeExplorerAddressLink:function(t){return"https://mantlescan.xyz/address/".concat(t)},makeExplorerLink:function(t){return"https://mantlescan.xyz/token/".concat(t)},makeExplorerTxLink:function(t){return"https://mantlescan.xyz/tx/".concat(t)},chainId:5e3,listed:!0,rpc:"https://rpc.mantle.xyz",wrapped:"0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000"}),CORE:_objectSpread(_objectSpread({},a),{},{name:"Core Blockchain",shortName:"Core",symbol:"CORE",makeExplorerAddressLink:function(t){return"https://scan.coredao.org/address/".concat(t)},makeExplorerLink:function(t){return"https://scan.coredao.org/token/".concat(t)},makeExplorerTxLink:function(t){return"https://scan.coredao.org/tx/".concat(t)},chainId:1116,listed:!0,rpc:"https://rpc.coredao.org/",routerAddress:"0x74f56a7560ef0c72cf6d677e3f5f51c2d579ff15",wrapped:"0x191E94fa59739e188dcE837F7f6978d84727AD01"}),FUSE:_objectSpread(_objectSpread({},a),{},{name:"Fuse Network",shortName:"Fuse",symbol:"FUSE",makeExplorerAddressLink:function(t){return"https://explorer.fuse.io/address/".concat(t)},makeExplorerLink:function(t){return"https://explorer.fuse.io/token/".concat(t)},makeExplorerTxLink:function(t){return"https://explorer.fuse.io/tx/".concat(t)},chainId:122,listed:!0,rpc:"https://rpc.fuse.io/",routerAddress:"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5",wrapped:"0x0BE9e53fd7EDaC9F859882AfdDa116645287C629"}),SCROLL:_objectSpread(_objectSpread({},a),{},{name:"Scroll",shortName:"Scroll",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://scrollscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://scrollscan.com/token/".concat(t)},makeExplorerTxLink:function(t){return"https://scrollscan.com/tx/".concat(t)},chainId:534352,listed:!0,rpc:"https://rpc.scroll.io/",routerAddress:"0xAAA45c8F5ef92a000a121d102F4e89278a711Faa",wrapped:"0x5300000000000000000000000000000000000004"}),TAIKO:_objectSpread(_objectSpread({},a),{},{name:"Taiko Mainnet",shortName:"Taiko",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://taikoscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://taikoscan.io/token/".concat(t)},makeExplorerTxLink:function(t){return"https://taikoscan.io/tx/".concat(t)},chainId:167e3,listed:!0,rpc:"https://rpc.mainnet.taiko.xyz",wrapped:"0xA51894664A773981C6C112C43ce576f315d5b1B6"}),WANCHAIN:_objectSpread(_objectSpread({},a),{},{name:"Wanchain",shortName:"Wanchain",symbol:"WAN",makeExplorerAddressLink:function(t){return"https://wanscan.org/address/".concat(t)},makeExplorerLink:function(t){return"https://wanscan.org/token/".concat(t)},makeExplorerTxLink:function(t){return"https://wanscan.org/tx/".concat(t)},chainId:888,listed:!0,rpc:"https://gwan2-ssl.wandevs.org",routerAddress:"0xeA300406FE2eED9CD2bF5c47D01BECa8Ad294Ec1",wrapped:"0xdabD997aE5E4799BE47d6E69D9431615CBa28f48"}),OP_BNB:_objectSpread(_objectSpread({},a),{},{name:"opBNB Mainnet",shortName:"opBNB",symbol:"BNB",makeExplorerAddressLink:function(t){return"https://opbnb.bscscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://opbnb.bscscan.com/token/".concat(t)},makeExplorerTxLink:function(t){return"https://opbnb.bscscan.com/tx/".concat(t)},chainId:204,listed:!0,rpc:"https://opbnb-mainnet-rpc.bnbchain.org",routerAddress:"0x8cFe327CEc66d1C090Dd72bd0FF11d690C33a2Eb",wrapped:"0x4200000000000000000000000000000000000006"}),XDC:_objectSpread(_objectSpread({},a),{},{name:"XDC",shortName:"XDC",symbol:"XDC",makeExplorerAddressLink:function(t){return"https://xdcscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://xdcscan.com/token/".concat(t)},makeExplorerTxLink:function(t){return"https://xdcscan.com/tx/".concat(t)},chainId:50,listed:!0,rpc:"https://erpc.xinfin.network",wrapped:"0x951857744785E80e2De051c32EE7b25f9c458C42"}),TON:{name:"TON",shortName:"TON",symbol:"TON",makeExplorerAddressLink:function(t){return"https://tonscan.org/address/".concat(t)},makeExplorerLink:function(t){return"https://tonscan.org/jetton/".concat(t)},makeExplorerTxLink:function(t){return"https://tonscan.org/tx/".concat(t)},placeholder:s.TON,isDeadAddress:function(t){return"UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ"===t},normalizeAddress:caseSensitive,validator:function(t){return t.startsWith("UQ")||t.startsWith("EQ")?/^(UQ|EQ)[A-Za-z0-9_-]{46}$/.test(t)?void 0:"TON address should be like ".concat(s.TON):"TON address should start with UQ or EQ"},listed:!0},X_LAYER:_objectSpread(_objectSpread({},a),{}
1,{name:"X Layer",shortName:"X Layer",symbol:"OKB",makeExplorerAddressLink:function(t){return"https://www.okx.com/web3/explorer/xlayer/address/".concat(t)},makeExplorerLink:function(t){return"https://www.okx.com/web3/explorer/xlayer/token/".concat(t)},makeExplorerTxLink:function(t){return"https://www.okx.com/web3/explorer/xlayer/tx/".concat(t)},chainId:196,rpc:"https://rpc.xlayer.tech",listed:!0,routerAddress:"0x881fB2f98c13d521009464e7D1CBf16E1b394e8E",wrapped:"0xe538905cf8410324e03A5A23C1c177a474D59b2b"}),ROBINHOOD:_objectSpread(_objectSpread({},a),{},{name:"Robinhood",shortName:"Robinhood",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://robinhoodchain.blockscout.com/address/".concat(t)},makeExplorerLink:function(t){return"https://robinhoodchain.blockscout.com/token/".concat(t)},makeExplorerTxLink:function(t){return"https://robinhoodchain.blockscout.com/tx/".concat(t)},chainId:4663,rpc:"https://rpc.mainnet.chain.robinhood.com",listed:!0,routerAddress:"0x89e5db8b5aa49aa85ac63f691524311aeb649eba",wrapped:"0x0Bd7
1D308f8E1639FAb988df18A8011f41EAcAD73"}),SEPOLIA:_objectSpread(_objectSpread({},a),{},{name:"Sepolia Ethereum Testnet",shortName:"Sepolia",symbol:"SEP",makeExplorerAddressLink:function(t){return"https://sepolia.etherscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://sepolia.etherscan.io/token/".concat(t)},makeExplorerTxLink:function(t){return"https://sepolia.etherscan.io/tx/".concat(t)},lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",onChainAggregatorContract:"0x71cbBE40CbEBd3026b0bF33Ae9E4728b312be713",rpc:"https://sepolia.drpc.org",chainId:11155111,listed:!1,routerAddress:"0xc532a74256d3db42d0bf7a0400fefdbad7694008",wrapped:"0x7b79995e5f793a07bc00c21412e50ecae098e7f9"}),GOERLI:_objectSpread(_objectSpread({},a),{},{name:"Goerli Ethereum Testnet",shortName:"Goerli",slither:"goerli",symbol:"ETH",makeExplorerTxLink:function(t){return"https://goerli.etherscan.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://goerli.etherscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://goerli.etherscan.io/token/".concat(t)},lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",listed:!1,chainId:5,rpc:"https://eth-goerli.public.blastapi.io",routerAddress:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",dividentTracker:"0x3401a9EfC55714cdE172B661f40FA398BFE16732",wrapped:"0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6"}),BSC_TESTNET:_objectSpread(_objectSpread({},a),{},{name:"Binance Smart Chain Testnet",shortName:"BSC Testnet",slither:"testnet.bsc",symbol:"BNB",makeExplorerTxLink:function(t){return"https://testnet.bscscan.com/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://testnet.bscscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://testnet.bscscan.com/token/".concat(t)},feesCheckerContract:"0xA127ddf1747adcbE45a15dcadF69a844492424a6",lockerFactory:"0x097f5E933306ad0EbB1c0027B223a3dd153520BE",onChainAggregatorContract:"0x10C0665E7c22996AdCE01bEa639acbE1C7C54091",listed:!1,chainId:97,rpc:"https://bsc-testnet.public.blastapi.io/",routerAddress:"0xD99D1c33F9fC3444f8101754aBC46c52416550D1",dividentTracker:"0xcF534A4CF13565F964c515877A08711e21e7F19D",wrapped:"0xae13d989dac2f0debff460ac112a837c89baa7cd"}),POLYGON_MUMBAI:_objectSpread(_objectSpread({},a),{},{name:"Polygon Mumbai",shortName:"Polygon Mumbai",symbol:"MATIC",slither:"mumbai",makeExplorerAddressLink:function(t){return"https://mumbai.polygonscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://mumbai.polygonscan.com/token/".concat(t)},makeExplorerTxLink:function(t){return"https://mumbai.polygonscan.com/tx/".concat(t)},lockerFactory:"0x269D4d211CBc9845B006128717eE51b0D6524955",listed:!1,chainId:80001,rpc:"https://polygon-mumbai-infura.wallet.coinbase.com",routerAddress:"0xb71c52BA5E0690A7cE3A0214391F4c03F5cbFB0d",wrapped:"0x734aef51d427b2f745210ec4bf1062abd48eceb6"}),AVAX_TESTNET:_objectSpread(_objectSpread({},a),{},{name:"Avax Testnet",shortName:"Avax Testnet",slither:"testnet.avax",symbol:"AVAX",makeExplorerTxLink:function(t){return"https://testnet.snowtrace.io/tx/".concat(t)},makeExplorerAddressLink:function(t){return"https://testnet.snowtrace.io/address/".concat(t)},makeExplorerLink:function(t){return"https://testnet.snowtrace.io/token/".concat(t)},listed:!1,chainId:43113,rpc:"https://api.avax-test.network/ext/bc/C/rpc",routerAddress:"0x688d21b0b8dc35971af58cff1f7bf65639937860",wrapped:"0x1d308089a2d1ced3f1ce36b1fcaf815b07217be3"}),OPTIMISTIC_GOERLI:_objectSpread(_objectSpread({},a),{},{name:"Optimistic G\xf6rli",shortName:"Optimistic G\xf6rli",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://goerli-optimism.etherscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://goerli-optimism.etherscan.io/token/".concat(t)},makeExplorerTxLink:function(t){return"https://goerli-optimism.etherscan.io/tx/".concat(t)},listed:!1,chainId:420,rpc:"https://goerli.optimism.io/",wrapped:"0x60a233b9b94c67e94e0a269429fb40004d4ba494"}),ARBITRUM_GOERLI:_objectSpread(_objectSpread({},a),{},{name:"Arbitrum Goerli",shortName:"Arbitrum Goerli",slither:"testnet.arbi",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://goerli.arbiscan.io/address/".concat(t)},makeExplorerLink:function(t){return"https://goerli.arbiscan.io/token/".concat(t)},makeExplorerTxLink:function(t){return"https://goerli.arbiscan.io/tx/".concat(t)}
1,listed:!1,chainId:421613,rpc:"https://goerli-rollup.arbitrum.io/rpc",wrapped:"0xee01c0cd76354c383b8c7b4e65ea88d00b06f36f"}),FANTOM_TESTNET:_objectSpread(_objectSpread({},a),{},{name:"Fantom Testnet",shortName:"Fantom Testnet",symbol:"FTM",makeExplorerAddressLink:function(t){return"https://testnet.ftmscan.com/address/".concat(t)},makeExplorerLink:function(t){return"https://testnet.ftmscan.com/token/".concat(t)},makeExplorerTxLink:function(t){return"https://testnet.ftmscan.com/tx/".concat(t)},listed:!1,chainId:4002,rpc:"https://rpc.ankr.com/fantom_testnet",routerAddress:"0xa6AD18C2aC47803E193F75c3677b14BF19B94883",wrapped:"0x07b9c47452c41e8e00f98ac4c075f5c443281d2a"}),ZKSYNC_TESTNET:_objectSpread(_objectSpread({},a),{},{name:"zkSync Era Testnet",shortName:"zkSync Testnet",symbol:"ETH",makeExplorerAddressLink:function(t){return"https://goerli.explorer.zksync.io/address/".concat(t)},makeExplorerLink:function(t){return"https://goerli.explorer.zksync.io/address/".concat(t)},makeExplorerTxLink:function(t){return"https://goerli.explorer.zksync.io/tx/".concat(t)},chainId:280,listed:!1,rpc:"https://testnet.era.zksync.dev",wrapped:"0x000000000000000000000000000000000000800A"})},c=Object.keys(u).filter(function(t){return u[t].chainId}).reduce(function(t,e){return _objectSpread(_objectSpread({},t),{},_defineProperty({},u[e].chainId,_objectSpread(_objectSpread({},u[e]),{},{id:e})))},{});e.networkById=c,e.default=u},4105:function(t,e,r){"use strict";e._O=e.Jq=e.KB=e.u8=e.cv=void 0,e.Ik=e.A9=e.n_=e.gM=void 0;let n=r(48764);function checkUint8Array(t){if(!(t instanceof Uint8Array))throw TypeError("b must be a Uint8Array")}function uint8ArrayToBuffer(t){return checkUint8Array(t),n.Buffer.from(t.buffer,t.byteOffset,t.length)}let Layout=class Layout{constructor(t,e){if(!Number.isInteger(t))throw TypeError("span must be an integer");this.span=t,this.property=e}makeDestinationObject(){return{}}getSpan(t,e){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(t){let e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}};function nameWithProperty(t,e){return e.property?t+"["+e.property+"]":t}let ExternalLayout=class ExternalLayout extends Layout{isCount(){throw Error("ExternalLayout is abstract")}};let OffsetLayout=class OffsetLayout extends ExternalLayout{constructor(t,e=0,r){if(!(t instanceof Layout))throw TypeError("layout must be a Layout");if(!Number.isInteger(e))throw TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof UInt||this.layout instanceof UIntBE}decode(t,e=0){return this.layout.decode(t,e+this.offset)}encode(t,e,r=0){return this.layout.encode(t,e,r+this.offset)}};let UInt=class UInt extends Layout{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e=0){return uint8ArrayToBuffer(t).readUIntLE(e,this.span)}encode(t,e,r=0){return uint8ArrayToBuffer(e).writeUIntLE(t,r,this.span),this.span}};let UIntBE=class UIntBE extends Layout{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e=0){return uint8ArrayToBuffer(t).readUIntBE(e,this.span)}encode(t,e,r=0){return uint8ArrayToBuffer(e).writeUIntBE(t,r,this.span),this.span}};function divmodInt64(t){let e=Math.floor(t/4294967296);return{hi32:e,lo32:t-4294967296*e}}
1function roundedInt64(t,e){return 4294967296*t+e}let NearUInt64=class NearUInt64 extends Layout{constructor(t){super(8,t)}decode(t,e=0){let r=uint8ArrayToBuffer(t),n=r.readUInt32LE(e),i=r.readUInt32LE(e+4);return roundedInt64(i,n)}encode(t,e,r=0){let n=divmodInt64(t),i=uint8ArrayToBuffer(e);return i.writeUInt32LE(n.lo32,r),i.writeUInt32LE(n.hi32,r+4),8}};let NearInt64=class NearInt64 extends Layout{constructor(t){super(8,t)}decode(t,e=0){let r=uint8ArrayToBuffer(t),n=r.readUInt32LE(e),i=r.readInt32LE(e+4);return roundedInt64(i,n)}encode(t,e,r=0){let n=divmodInt64(t),i=uint8ArrayToBuffer(e);return i.writeUInt32LE(n.lo32,r),i.writeInt32LE(n.hi32,r+4),8}};let Sequence=class Sequence extends Layout{constructor(t,e,r){if(!(t instanceof Layout))throw TypeError("elementLayout must be a Layout");if(!(e instanceof ExternalLayout&&e.isCount()||Number.isInteger(e)&&0<=e))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;e instanceof ExternalLayout||!(0<t.span)||(n=e*t.span),super(n,r),this.elementLayout=t,this.count=e}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0,n=this.count;if(n instanceof ExternalLayout&&(n=n.decode(t,e)),0<this.elementLayout.span)r=n*this.elementLayout.span;else{let i=0;for(;i<n;)r+=this.elementLayout.getSpan(t,e+r),++i}return r}decode(t,e=0){let r=[],n=0,i=this.count;for(i instanceof ExternalLayout&&(i=i.decode(t,e));n<i;)r.push(this.elementLayout.decode(t,e)),e+=this.elementLayout.getSpan(t,e),n+=1;return r}encode(t,e,r=0){let n=this.elementLayout,i=t.reduce((t,i)=>t+n.encode(i,e,r+t),0);return this.count instanceof ExternalLayout&&this.count.encode(t.length,e,r),i}};let Structure=class Structure extends Layout{constructor(t,e,r){if(!(Array.isArray(t)&&t.reduce((t,e)=>t&&e instanceof Layout,!0)))throw TypeError("fields must be array of Layout instances");for(let n of("boolean"==typeof e&&void 0===r&&(r=e,e=void 0),t))if(0>n.span&&void 0===n.property)throw Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((t,e)=>t+e.getSpan(),0)}catch(t){}super(n,e),this.fields=t,this.decodePrefixes=!!r}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((r,n)=>{let i=n.getSpan(t,e);return e+=i,r+i},0)}catch(t){throw RangeError("indeterminate span")}return r}decode(t,e=0){checkUint8Array(t);let r=this.makeDestinationObject();for(let n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(t,e)),e+=n.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return r}encode(t,e,r=0){let n=r,i=0,o=0;for(let n of this.fields){let s=n.span;if(o=0<s?s:0,void 0!==n.property){let i=t[n.property];void 0!==i&&(o=n.encode(i,e,r),0>s&&(s=n.getSpan(e,r)))}i=r,r+=s}return i+o-n}fromArray(t){let e=this.makeDestinationObject();for(let r of this.fields)void 0!==r.property&&0<t.length&&(e[r.property]=t.shift());return e}layoutFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}offsetOf(t){if("string"!=typeof t)throw TypeError("property must be string");let e=0;for(let r of this.fields){if(r.property===t)return e;0>r.span?e=-1:0<=e&&(e+=r.span)}}};let UnionDiscriminator=class UnionDiscriminator{constructor(t){this.property=t}decode(t,e){throw Error("UnionDiscriminator is abstract")}encode(t,e,r){throw Error("UnionDiscriminator is abstract")}};let UnionLayoutDiscriminator=class UnionLayoutDiscriminator extends UnionDiscriminator{constructor(t,e){if(!(t instanceof ExternalLayout&&t.isCount()))throw TypeError("layout must be an unsigned integer ExternalLayout");super(e||t.property||"variant"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,r){return this.layout.encode(t,e,r)}};let Union=class Union extends Layout{constructor(t,e,r){let n;if(t instanceof UInt||t instanceof UIntBE)n=new UnionLayoutDiscriminator(new OffsetLayout(t));else if(t instanceof ExternalLayout&&t.isCount())n=new UnionLayoutDiscriminator(t);else if(t instanceof UnionDiscriminator)n=t;else throw TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===e&&(e=null),!(null===e||e instanceof Layout))throw TypeError("defaultLayout must be null or a Layout");if(null!==e){if(0>e.span)throw Error("defaultLayout must have constant span");void 0===e.property&&(e=e.replicate("content"))}let i=-1;e&&0<=(i=e.span)&&(t instanceof UInt||t instanceof UIntBE)&&(i+=n.layout.span),super(i,r),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof UInt||t instanceof UIntBE,this.defaultLayout=e,this.registry={};let o=this.defaultGetSourceVariant.bind(this);
1this.getSourceVariant=function(t){return o(t)},this.configGetSourceVariant=function(t){o=t.bind(this)}}getSpan(t,e=0){if(0<=this.span)return this.span;let r=this.getVariant(t,e);if(!r)throw Error("unable to determine span for unrecognized variant");return r.getSpan(t,e)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||e.property&&Object.prototype.hasOwnProperty.call(t,e.property)))return e}else for(let e in this.registry){let r=this.registry[e];if(r.property&&Object.prototype.hasOwnProperty.call(t,r.property))return r}throw Error("unable to infer src variant")}decode(t,e=0){let r;let n=this.discriminator,i=n.decode(t,e),o=this.registry[i];if(void 0===o){let o=this.defaultLayout,s=0;this.usesPrefixDiscriminator&&(s=n.layout.span),(r=this.makeDestinationObject())[n.property]=i,r[o.property]=o.decode(t,e+s)}else r=o.decode(t,e);return r}encode(t,e,r=0){let n=this.getSourceVariant(t);if(void 0===n){let n=this.discriminator,i=this.defaultLayout,o=0;return this.usesPrefixDiscriminator&&(o=n.layout.span),n.encode(t[n.property],e,r),o+i.encode(t[i.property],e,r+o)}return n.encode(t,e,r)}addVariant(t,e,r){let n=new VariantLayout(this,t,e,r);return this.registry[t]=n,n}getVariant(t,e=0){let r;return r=t instanceof Uint8Array?this.discriminator.decode(t,e):t,this.registry[r]}};let VariantLayout=class VariantLayout extends Layout{constructor(t,e,r,n){if(!(t instanceof Union))throw TypeError("union must be a Union");if(!Number.isInteger(e)||0>e)throw TypeError("variant must be a (non-negative) integer");if("string"==typeof r&&void 0===n&&(n=r,r=null),r){if(!(r instanceof Layout))throw TypeError("layout must be a Layout");if(null!==t.defaultLayout&&0<=r.span&&r.span>t.defaultLayout.span)throw Error("variant span exceeds span of containing union");if("string"!=typeof n)throw TypeError("variant must have a String property")}let i=t.span;0>t.span&&0<=(i=r?r.span:0)&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span),super(i,n),this.union=t,this.variant=e,this.layout=r||null}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,e+r)),r+n}decode(t,e=0){let r=this.makeDestinationObject();if(this!==this.union.getVariant(t,e))throw Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(t,e+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,e,r=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,e,r);let i=n;if(this.layout&&(this.layout.encode(t[this.property],e,r+n),i+=this.layout.getSpan(e,r+n),0<=this.union.span&&i>this.union.span))throw Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}};function fixBitwiseResult(t){return 0>t&&(t+=4294967296),t}let BitStructure=class BitStructure extends Layout{constructor(t,e,r){if(!(t instanceof UInt||t instanceof UIntBE))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof e&&void 0===r&&(r=e,e=!1),4<t.span)throw RangeError("word cannot exceed 32 bits");super(t.span,r),this.word=t,this.msb=!!e,this.fields=[];let n=0;this._packedSetValue=function(t){return n=fixBitwiseResult(t),this},this._packedGetValue=function(){return n}}decode(t,e=0){let r=this.makeDestinationObject(),n=this.word.decode(t,e);for(let e of(this._packedSetValue(n),this.fields))void 0!==e.property&&(r[e.property]=e.decode(t));return r}encode(t,e,r=0){let n=this.word.decode(e,r);for(let e of(this._packedSetValue(n),this.fields))if(void 0!==e.property){let r=t[e.property];void 0!==r&&e.encode(r)}return this.word.encode(this._packedGetValue(),e,r)}addField(t,e){let r=new BitField(this,t,e);return this.fields.push(r),r}addBoolean(t){let e=new Boolean(this,t);return this.fields.push(e),e}fieldFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}};let BitField=class BitField{constructor(t,e,r){if(!(t instanceof BitStructure))throw TypeError("container must be a BitStructure");
1if(!Number.isInteger(e)||0>=e)throw TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((t,e)=>t+e.bits,0);if(e+i>n)throw Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=e,this.valueMask=(1<<e)-1,32===e&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-e),this.wordMask=fixBitwiseResult(this.valueMask<<this.start),this.property=r}decode(t,e){let r=this.container._packedGetValue(),n=fixBitwiseResult(r&this.wordMask),i=n>>>this.start;return i}encode(t){if("number"!=typeof t||!Number.isInteger(t)||t!==fixBitwiseResult(t&this.valueMask))throw TypeError(nameWithProperty("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let e=this.container._packedGetValue(),r=fixBitwiseResult(t<<this.start);this.container._packedSetValue(fixBitwiseResult(e&~this.wordMask)|r)}};let Boolean=class Boolean extends BitField{constructor(t,e){super(t,1,e)}decode(t,e){return!!super.decode(t,e)}encode(t){"boolean"==typeof t&&(t=+t),super.encode(t)}};let Blob=class Blob extends Layout{constructor(t,e){if(!(t instanceof ExternalLayout&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;t instanceof ExternalLayout||(r=t),super(r,e),this.length=t}getSpan(t,e){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),r}decode(t,e=0){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),uint8ArrayToBuffer(t).slice(e,e+r)}encode(t,e,r){let n=this.length;if(this.length instanceof ExternalLayout&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw TypeError(nameWithProperty("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>e.length)throw RangeError("encoding overruns Uint8Array");let i=uint8ArrayToBuffer(t);return uint8ArrayToBuffer(e).write(i.toString("hex"),r,n,"hex"),this.length instanceof ExternalLayout&&this.length.encode(n,e,r),n}};e.cv=(t,e,r)=>new OffsetLayout(t,e,r),e.u8=t=>new UInt(1,t),e.KB=t=>new UInt(2,t),e.Jq=t=>new UInt(4,t),e._O=t=>new NearUInt64(t),e.gM=t=>new NearInt64(t),e.n_=(t,e,r)=>new Structure(t,e,r),e.A9=(t,e,r)=>new Sequence(t,e,r),e.Ik=(t,e)=>new Blob(t,e)},10011:function(t,e,r){var n=r(58162);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},58162:function(t,e,r){"use strict";var n=r(89509).Buffer;t.exports=function(t){if(t.length>=255)throw TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==e[s])throw TypeError(o+" is ambiguous");e[s]=i}var a=t.length,u=t.charAt(0),c=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function decodeUnsafe(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,i=0,o=0;t[r]===u;)i++,r++;for(var s=(t.length-r)*c+1>>>0,l=new Uint8Array(s);t[r];){var f=e[t.charCodeAt(r)];if(255===f)return;for(var d=0,p=s-1;(0!==f||d<o)&&-1!==p;p--,d++)f+=a*l[p]>>>0,l[p]=f%256>>>0,f=f/256>>>0;if(0!==f)throw Error("Non-zero carry");o=d,r++}for(var m=s-o;m!==s&&0===l[m];)m++;var y=n.allocUnsafe(i+(s-m));y.fill(0,0,i);for(var g=i;m!==s;)y[g++]=l[m++];return y}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,s=e.length;o!==s&&0===e[o];)o++,r++;for(var c=(s-o)*l+1>>>0,f=new Uint8Array(c);o!==s;){for(var d=e[o],p=0,m=c-1;(0!==d||p<i)&&-1!==m;m--,p++)d+=256*f[m]>>>0,f[m]=d%a>>>0,d=d/a>>>0;if(0!==d)throw Error("Non-zero carry");i=p,o++}for(var y=c-i;y!==c&&0===f[y];)y++;for(var g=u.repeat(r);y<c;++y)g+=t.charAt(f[y]);return g},decodeUnsafe:decodeUnsafe,decode:function(t){var e=decodeUnsafe(t);if(e)return e;throw Error("Non-base"+a+" character")}}}},40475:function(t,e,r){"use strict";var n=r(48764).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.toBigIntLE=function(t){{let e=n.from(t);e.reverse();let r=e.toString("hex");return 0===r.length?BigInt(0):BigInt(`0x${r}`)}},e.toBigIntBE=function(t){{let e=t.toString("hex");return 0===e.length?BigInt(0):BigInt(`0x${e}`)}},e.toBufferLE=function(t,e){{let r=t.toString(16),i=n.from(r.padStart(2*e,"0").slice(0,2*e),"hex");return i.reverse(),i}},e.toBufferBE=function(t,e){{let r=t.toString(16);return n.from(r.padStart(2*e,"0").slice(0,2*e),"hex")}}},13550:function(t,e,r){!function(t,e){"use strict";function assert(t,e){if(!t)throw Error(e||"Assertion failed")}function inherits(t,e){t.super_=e;var TempCtor=function(){};TempCtor.prototype=e.prototype,t.prototype=new TempCtor,t.prototype.constructor=t}function BN(t,e,r){if(BN.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(("le"===e||"be"===e)&&(r=e,e=10),this._init(t||0,e||10,r||"be"))}
vendor: 9,686 bytes, line 1
1"object"==typeof t?t.exports=BN:e.BN=BN,BN.BN=BN,BN.wordSize=26;try{n="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(46601).Buffer}catch(t){}function parseHex4Bits(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void assert(!1,"Invalid character in "+t)}function parseHexByte(t,e,r){var n=parseHex4Bits(t,r);return r-1>=e&&(n|=parseHex4Bits(t,r-1)<<4),n}function parseBase(t,e,r,n){for(var i=0,o=0,s=Math.min(t.length,r),a=e;a<s;a++){var u=t.charCodeAt(a)-48;i*=n,o=u>=49?u-49+10:u>=17?u-17+10:u,assert(u>=0&&o<n,"Invalid character"),i+=o}return i}function move(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(BN.isBN=function(t){return t instanceof BN||null!==t&&"object"==typeof t&&t.constructor.wordSize===BN.wordSize&&Array.isArray(t.words)},BN.max=function(t,e){return t.cmp(e)>0?t:e},BN.min=function(t,e){return 0>t.cmp(e)?t:e},BN.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),assert(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},BN.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(assert(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},BN.prototype._initArray=function(t,e,r){if(assert("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var n,i,o=0;o<this.length;o++)this.words[o]=0;var s=0;if("be"===r)for(o=t.length-1,n=0;o>=0;o-=3)i=t[o]|t[o-1]<<8|t[o-2]<<16,this.words[n]|=i<<s&67108863,this.words[n+1]=i>>>26-s&67108863,(s+=24)>=26&&(s-=26,n++);else if("le"===r)for(o=0,n=0;o<t.length;o+=3)i=t[o]|t[o+1]<<8|t[o+2]<<16,this.words[n]|=i<<s&67108863,this.words[n+1]=i>>>26-s&67108863,(s+=24)>=26&&(s-=26,n++);return this._strip()},BN.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=Array(this.length);for(var n,i=0;i<this.length;i++)this.words[i]=0;var o=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=parseHexByte(t,e,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=parseHexByte(t,e,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},BN.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c<a;c+=n)u=parseBase(t,c,c+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=parseBase(t,c,t.length,e),c=0;c<s;c++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},BN.prototype.copy=function(t){t.words=Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},BN.prototype._move=function(t){move(t,this)},BN.prototype.clone=function(){var t=new BN(null);return this.copy(t),t},BN.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},BN.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}catch(t){BN.prototype.inspect=inspect}else BN.prototype.inspect=inspect;function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var n,i=["","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"],o=[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],s=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function smallMulTo(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,d=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=d;p++){var m=c-p|0;l+=(s=(i=0|t.words[m])*(o=0|e.words[p])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}BN.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var r,n=0,a=0,u=0;u<this.length;u++){var c=this.words[u],l=((c<<n|a)&16777215).toString(16);a=c>>>24-n&16777215,(n+=2)>=26&&(n-=26,u--),r=0!==a||u!==this.length-1?i[6-l.length]+l+r:l+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=o[t],d=s[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:i[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},BN.prototype.toJSON=function(){return this.toString(16,2)},n&&(BN.prototype.toBuffer=function(t,e){return this.toArrayLike(n,t,e)}),BN.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},BN.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),i=r||Math.max(1,n);assert(n<=i,"byte array longer than desired length"),assert(i>0,"Requested array length <= 0");var o=t.allocUnsafe?t.allocUnsafe(i):new t(i);return this["_toArrayLike"+("le"===e?"LE":"BE")](o,n),o},BN.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},BN.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?BN.prototype._countBits=function(t){return 32-Math.clz32(t)}:BN.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},BN.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return(8191&e)==0&&(r+=13,e>>>=13),(127&e)==0&&(r+=7,e>>>=7),(15&e)==0&&(r+=4,e>>>=4),(3&e)==0&&(r+=2,e>>>=2),(1&e)==0&&r++,r},BN.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return(this.length-1)*26+e},BN.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},BN.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},BN.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function(){return 0!==this.negative},BN.prototype.neg=function(){return this.clone().ineg()},BN.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},BN.prototype.ior=function(t){return assert((this.negative|t.negative)==0),this.iuor(t)},BN.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},BN.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},BN.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},BN.prototype.iand=function(t){return assert((this.negative|t.negative)==0),this.iuand(t)},BN.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},BN.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},BN.prototype.iuxor=function(t){this.length>t.length?(e=this,r=t):(e=t,r=this);for(var e,r,n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},BN.prototype.ixor=function(t){return assert((this.negative|t.negative)==0),this.iuxor(t)}
vendor: 6,268 bytes, line 1
1,BN.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},BN.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},BN.prototype.inotn=function(t){assert("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},BN.prototype.notn=function(t){return this.clone().inotn(t)},BN.prototype.setn=function(t,e){assert("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),e?this.words[r]=this.words[r]|1<<n:this.words[r]=this.words[r]&~(1<<n),this._strip()},BN.prototype.iadd=function(t){if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var e,r,n,i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},BN.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},BN.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e,r,n=this.iadd(t);return t.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(e=this,r=t):(e=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(n=(0|e.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&n;for(;0!==o&&s<e.length;s++)o=(n=(0|e.words[s])+o)>>26,this.words[s]=67108863&n;if(0===o&&s<e.length&&e!==this)for(;s<e.length;s++)this.words[s]=e.words[s];return this.length=Math.max(this.length,s),e!==this&&(this.negative=1),this._strip()},BN.prototype.sub=function(t){return this.clone().isub(t)};var comb10MulTo=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],f=8191&l,d=l>>>13,p=0|s[1],m=8191&p,y=p>>>13,g=0|s[2],b=8191&g,v=g>>>13,w=0|s[3],x=8191&w,E=w>>>13,B=0|s[4],k=8191&B,A=B>>>13,M=0|s[5],_=8191&M,S=M>>>13,L=0|s[6],N=8191&L,T=L>>>13,I=0|s[7],O=8191&I,R=I>>>13,P=0|s[8],C=8191&P,F=P>>>13,j=0|s[9],D=8191&j,U=j>>>13,H=0|a[0],q=8191&H,z=H>>>13,Z=0|a[1],G=8191&Z,V=Z>>>13,K=0|a[2],$=8191&K,W=K>>>13,X=0|a[3],Y=8191&X,Q=X>>>13,J=0|a[4],tt=8191&J,te=J>>>13,tr=0|a[5],tn=8191&tr,ti=tr>>>13,to=0|a[6],ts=8191&to,ta=to>>>13,tu=0|a[7],tc=8191&tu,tl=tu>>>13,th=0|a[8],tf=8191&th,td=th>>>13,tp=0|a[9],tm=8191&tp,ty=tp>>>13;r.negative=t.negative^e.negative,r.length=19;var tg=(c+(n=Math.imul(f,q))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(d,q)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(tg>>>26)|0,tg&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,z))+Math.imul(y,q)|0,o=Math.imul(y,z);var tb=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,V)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(tb>>>26)|0,tb&=67108863,n=Math.imul(b,q),i=(i=Math.imul(b,z))+Math.imul(v,q)|0,o=Math.imul(v,z),n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,V)|0;var tv=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(tv>>>26)|0,tv&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(E,q)|0,o=Math.imul(E,z),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,W)|0;var tw=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(tw>>>26)|0,tw&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,W)|0,n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Q)|0;var tx=(c+(n=n+Math.imul(f,tt)|0)|0)+((8191&(i=(i=i+Math.imul(f,te)|0)+Math.imul(d,tt)|0))<<13)|0;c=((o=o+Math.imul(d,te)|0)+(i>>>13)|0)+(tx>>>26)|0,tx&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(S,q)|0,o=Math.imul(S,z),n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(m,tt)|0,i=(i=i+Math.imul(m,te)|0)+Math.imul(y,tt)|0,o=o+Math.imul(y,te)|0;var tE=(c+(n=n+Math.imul(f,tn)|0)|0)+((8191&(i=(i=i+Math.imul(f,ti)|0)+Math.imul(d,tn)|0))<<13)|0;c=((o=o+Math.imul(d,ti)|0)+(i>>>13)|0)+(tE>>>26)|0,tE&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,V)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(b,tt)|0,i=(i=i+Math.imul(b,te)|0)+Math.imul(v,tt)|0,o=o+Math.imul(v,te)|0,n=n+Math.imul(m,tn)|0,i=(i=i+Math.imul(m,ti)|0)+Math.imul(y,tn)|0,o=o+Math.imul(y,ti)|0;var tB=(c+(n=n+Math.imul(f,ts)|0)|0)+((8191&(i=(i=i+Math.imul(f,ta)|0)+Math.imul(d,ts)|0))<<13)|0;c=((o=o+Math.imul(d,ta)|0)+(i>>>13)|0)+(tB>>>26)|0,tB&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,z))+Math.imul(R,q)|0,o=Math.imul(R,z),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(x,tt)|0,i=(i=i+Math.imul(x,te)|0)+Math.imul(E,tt)|0,o=o+Math.imul(E,te)|0,n=n+Math.imul(b,tn)|0,i=(i=i+Math.imul(b,t
vendor: 4,905 bytes, line 1
1i)|0)+Math.imul(v,tn)|0,o=o+Math.imul(v,ti)|0,n=n+Math.imul(m,ts)|0,i=(i=i+Math.imul(m,ta)|0)+Math.imul(y,ts)|0,o=o+Math.imul(y,ta)|0;var tk=(c+(n=n+Math.imul(f,tc)|0)|0)+((8191&(i=(i=i+Math.imul(f,tl)|0)+Math.imul(d,tc)|0))<<13)|0;c=((o=o+Math.imul(d,tl)|0)+(i>>>13)|0)+(tk>>>26)|0,tk&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(F,q)|0,o=Math.imul(F,z),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(k,tt)|0,i=(i=i+Math.imul(k,te)|0)+Math.imul(A,tt)|0,o=o+Math.imul(A,te)|0,n=n+Math.imul(x,tn)|0,i=(i=i+Math.imul(x,ti)|0)+Math.imul(E,tn)|0,o=o+Math.imul(E,ti)|0,n=n+Math.imul(b,ts)|0,i=(i=i+Math.imul(b,ta)|0)+Math.imul(v,ts)|0,o=o+Math.imul(v,ta)|0,n=n+Math.imul(m,tc)|0,i=(i=i+Math.imul(m,tl)|0)+Math.imul(y,tc)|0,o=o+Math.imul(y,tl)|0;var tA=(c+(n=n+Math.imul(f,tf)|0)|0)+((8191&(i=(i=i+Math.imul(f,td)|0)+Math.imul(d,tf)|0))<<13)|0;c=((o=o+Math.imul(d,td)|0)+(i>>>13)|0)+(tA>>>26)|0,tA&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(F,G)|0,o=o+Math.imul(F,V)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(_,tt)|0,i=(i=i+Math.imul(_,te)|0)+Math.imul(S,tt)|0,o=o+Math.imul(S,te)|0,n=n+Math.imul(k,tn)|0,i=(i=i+Math.imul(k,ti)|0)+Math.imul(A,tn)|0,o=o+Math.imul(A,ti)|0,n=n+Math.imul(x,ts)|0,i=(i=i+Math.imul(x,ta)|0)+Math.imul(E,ts)|0,o=o+Math.imul(E,ta)|0,n=n+Math.imul(b,tc)|0,i=(i=i+Math.imul(b,tl)|0)+Math.imul(v,tc)|0,o=o+Math.imul(v,tl)|0,n=n+Math.imul(m,tf)|0,i=(i=i+Math.imul(m,td)|0)+Math.imul(y,tf)|0,o=o+Math.imul(y,td)|0;var tM=(c+(n=n+Math.imul(f,tm)|0)|0)+((8191&(i=(i=i+Math.imul(f,ty)|0)+Math.imul(d,tm)|0))<<13)|0;c=((o=o+Math.imul(d,ty)|0)+(i>>>13)|0)+(tM>>>26)|0,tM&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,V))+Math.imul(U,G)|0,o=Math.imul(U,V),n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(F,$)|0,o=o+Math.imul(F,W)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Q)|0,n=n+Math.imul(N,tt)|0,i=(i=i+Math.imul(N,te)|0)+Math.imul(T,tt)|0,o=o+Math.imul(T,te)|0,n=n+Math.imul(_,tn)|0,i=(i=i+Math.imul(_,ti)|0)+Math.imul(S,tn)|0,o=o+Math.imul(S,ti)|0,n=n+Math.imul(k,ts)|0,i=(i=i+Math.imul(k,ta)|0)+Math.imul(A,ts)|0,o=o+Math.imul(A,ta)|0,n=n+Math.imul(x,tc)|0,i=(i=i+Math.imul(x,tl)|0)+Math.imul(E,tc)|0,o=o+Math.imul(E,tl)|0,n=n+Math.imul(b,tf)|0,i=(i=i+Math.imul(b,td)|0)+Math.imul(v,tf)|0,o=o+Math.imul(v,td)|0;var t_=(c+(n=n+Math.imul(m,tm)|0)|0)+((8191&(i=(i=i+Math.imul(m,ty)|0)+Math.imul(y,tm)|0))<<13)|0;c=((o=o+Math.imul(y,ty)|0)+(i>>>13)|0)+(t_>>>26)|0,t_&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,W))+Math.imul(U,$)|0,o=Math.imul(U,W),n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(F,Y)|0,o=o+Math.imul(F,Q)|0,n=n+Math.imul(O,tt)|0,i=(i=i+Math.imul(O,te)|0)+Math.imul(R,tt)|0,o=o+Math.imul(R,te)|0,n=n+Math.imul(N,tn)|0,i=(i=i+Math.imul(N,ti)|0)+Math.imul(T,tn)|0,o=o+Math.imul(T,ti)|0,n=n+Math.imul(_,ts)|0,i=(i=i+Math.imul(_,ta)|0)+Math.imul(S,ts)|0,o=o+Math.imul(S,ta)|0,n=n+Math.imul(k,tc)|0,i=(i=i+Math.imul(k,tl)|0)+Math.imul(A,tc)|0,o=o+Math.imul(A,tl)|0,n=n+Math.imul(x,tf)|0,i=(i=i+Math.imul(x,td)|0)+Math.imul(E,tf)|0,o=o+Math.imul(E,td)|0;var tS=(c+(n=n+Math.imul(b,tm)|0)|0)+((8191&(i=(i=i+Math.imul(b,ty)|0)+Math.imul(v,tm)|0))<<13)|0;c=((o=o+Math.imul(v,ty)|0)+(i>>>13)|0)+(tS>>>26)|0,tS&=67108863,n=Math.imul(D,Y),i=(i=Math.imul(D,Q))+Math.imul(U,Y)|0,o=Math.imul(U,Q),n=n+Math.imul(C,tt)|0,i=(i=i+Math.imul(C,te)|0)+Math.imul(F,tt)|0,o=o+Math.imul(F,te)|0,n=n+Math.imul(O,tn)|0,i=(i=i+Math.imul(O,ti)|0)+Math.imul(R,tn)|0,o=o+Math.imul(R,ti)|0,n=n+Math.imul(N,ts)|0,i=(i=i+Math.imul(N,ta)|0)+Math.imul(T,ts)|0,o=o+Math.imul(T,ta)|0,n=n+Math.imul(_,tc)|0,i=(i=i+Math.imul(_,tl)|0)+Math.imul(S,tc)|0,o=o+Math.imul(S,tl)|0,n=n+Math.imul(k,tf)|0,i=(i=i+Math.imul(k,td)|0)+Math.imul(A,tf)|0,o=o+Math.imul(A,td)|0;var tL=(c+(n=n+Math.imul(x,tm)|0)|0)+((8191&(i=(i=i+Math.imul(x,ty)|0)+Math.imul(E,tm)|0))<<13)|0;c=((o=o+Math.imul(E,ty)|0)+(i>>>13)|0)+(tL>>>26)|0,tL&=67108863,n=Math.imul(D,tt),i=(i=Math.imul(D,te))+Math.imul(U,tt)|0,o=Math.imul(U,te),n=n+Math.imul(C,tn)|0,i=(i=i+Math.imul(C,ti)|0)+Math.imul(F,tn)|0,o=o+Math.imul(F,ti)|0,n=n+Math.imul(O,ts)|0,i=(i=i+Math.imul(O,ta)|0)+Math.imul(R,ts)|0,o=o+Math.imul(R,ta)|0,n=n+Math.imul(N,tc)|0,i=(i=i+Math.imul(N,tl)|0)+Math.imul(T,tc)|0,o=o+Math.imul(T,tl)|0,n=n+Math.imul(_,tf)|0,i=(i=i+Math.imul(_,td)|0)+Math.imul(S,tf)|0,o=o+Math.imul(S,td)|0;var tN=(c+(n=n+Math.imul(k,tm)|0)|0)+((8191&(i=(i=i+Math.imul(k,ty)|0)+Math.imul(A,tm)|0))<<13)|0;c=((o=o+Math.imul(A,ty)|0)+(i>>>13)|0)+(tN>>>
vendor: 4,824 bytes, line 1
126)|0,tN&=67108863,n=Math.imul(D,tn),i=(i=Math.imul(D,ti))+Math.imul(U,tn)|0,o=Math.imul(U,ti),n=n+Math.imul(C,ts)|0,i=(i=i+Math.imul(C,ta)|0)+Math.imul(F,ts)|0,o=o+Math.imul(F,ta)|0,n=n+Math.imul(O,tc)|0,i=(i=i+Math.imul(O,tl)|0)+Math.imul(R,tc)|0,o=o+Math.imul(R,tl)|0,n=n+Math.imul(N,tf)|0,i=(i=i+Math.imul(N,td)|0)+Math.imul(T,tf)|0,o=o+Math.imul(T,td)|0;var tT=(c+(n=n+Math.imul(_,tm)|0)|0)+((8191&(i=(i=i+Math.imul(_,ty)|0)+Math.imul(S,tm)|0))<<13)|0;c=((o=o+Math.imul(S,ty)|0)+(i>>>13)|0)+(tT>>>26)|0,tT&=67108863,n=Math.imul(D,ts),i=(i=Math.imul(D,ta))+Math.imul(U,ts)|0,o=Math.imul(U,ta),n=n+Math.imul(C,tc)|0,i=(i=i+Math.imul(C,tl)|0)+Math.imul(F,tc)|0,o=o+Math.imul(F,tl)|0,n=n+Math.imul(O,tf)|0,i=(i=i+Math.imul(O,td)|0)+Math.imul(R,tf)|0,o=o+Math.imul(R,td)|0;var tI=(c+(n=n+Math.imul(N,tm)|0)|0)+((8191&(i=(i=i+Math.imul(N,ty)|0)+Math.imul(T,tm)|0))<<13)|0;c=((o=o+Math.imul(T,ty)|0)+(i>>>13)|0)+(tI>>>26)|0,tI&=67108863,n=Math.imul(D,tc),i=(i=Math.imul(D,tl))+Math.imul(U,tc)|0,o=Math.imul(U,tl),n=n+Math.imul(C,tf)|0,i=(i=i+Math.imul(C,td)|0)+Math.imul(F,tf)|0,o=o+Math.imul(F,td)|0;var tO=(c+(n=n+Math.imul(O,tm)|0)|0)+((8191&(i=(i=i+Math.imul(O,ty)|0)+Math.imul(R,tm)|0))<<13)|0;c=((o=o+Math.imul(R,ty)|0)+(i>>>13)|0)+(tO>>>26)|0,tO&=67108863,n=Math.imul(D,tf),i=(i=Math.imul(D,td))+Math.imul(U,tf)|0,o=Math.imul(U,td);var tR=(c+(n=n+Math.imul(C,tm)|0)|0)+((8191&(i=(i=i+Math.imul(C,ty)|0)+Math.imul(F,tm)|0))<<13)|0;c=((o=o+Math.imul(F,ty)|0)+(i>>>13)|0)+(tR>>>26)|0,tR&=67108863;var tP=(c+(n=Math.imul(D,tm))|0)+((8191&(i=(i=Math.imul(D,ty))+Math.imul(U,tm)|0))<<13)|0;return c=((o=Math.imul(U,ty))+(i>>>13)|0)+(tP>>>26)|0,tP&=67108863,u[0]=tg,u[1]=tb,u[2]=tv,u[3]=tw,u[4]=tx,u[5]=tE,u[6]=tB,u[7]=tk,u[8]=tA,u[9]=tM,u[10]=t_,u[11]=tS,u[12]=tL,u[13]=tN,u[14]=tT,u[15]=tI,u[16]=tO,u[17]=tR,u[18]=tP,0!==c&&(u[19]=c,r.length++),r};function bigMulTo(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,f=(0|t.words[l])*(0|e.words[c]),d=67108863&f;s=s+(f/67108864|0)|0,a=67108863&(d=d+a|0),i+=(s=s+(d>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function FFTM(t,e){this.x=t,this.y=e}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return 10===this.length&&10===t.length?comb10MulTo(this,t,e):n<63?smallMulTo(this,t,e):bigMulTo(this,t,e)},FFTM.prototype.makeRBT=function(t){for(var e=Array(t),r=BN.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},FFTM.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},FFTM.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},FFTM.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var f=u,d=c,p=0;p<s;p++){var m=r[l+p],y=n[l+p],g=r[l+p+s],b=n[l+p+s],v=f*g-d*b;b=f*b+d*g,g=v,r[l+p]=m+g,n[l+p]=y+b,r[l+p+s]=m-g,n[l+p+s]=y-b,p!==a&&(v=u*f-c*d,d=u*d+c*f,f=v)}},FFTM.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},FFTM.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},FFTM.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},FFTM.prototype.convert13b=function(t,e,r,n){for(var i=0,o=0;o<e;o++)i+=0|t[o],r[2*o]=8191&i,i>>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*e;o<n;++o)r[o]=0;assert(0===i),assert((-8192&i)==0)},FFTM.prototype.stub=function(t){for(var e=Array(t),r=0;r<t;r++)e[r]=0;return e},FFTM.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=Array(n),a=Array(n),u=Array(n),c=Array(n),l=Array(n),f=Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,f,n,i);for(var p=0;p<n;p++){var m=a[p]*l[p]-u[p]*f[p];u[p]=a[p]*f[p]+u[p]*l[p],a[p]=m}return this.conjugate(a,u,n),this.transform(a,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},BN.prototype.mul=function(t){var e=new BN(null);return e.words=Array(this.length+t.length),this.mulTo(t,e)},BN.prototype.mulf=function(t){var e=new BN(null);return e.words=Array(this.length+t.length),bigMulTo(this,t,e)},BN.prototype.imul=function(t){return this.clone().mulTo(t,this)},BN.prototype.imuln=function(t){var e=t<0;
vendor: 19,530 bytes, line 1
1e&&(t=-t),assert("number"==typeof t),assert(t<67108864);for(var r=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&r);r>>=26,r+=(i/67108864|0)+(o>>>26),this.words[n]=67108863&o}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},BN.prototype.muln=function(t){return this.clone().imuln(t)},BN.prototype.sqr=function(){return this.mul(this)},BN.prototype.isqr=function(){return this.imul(this.clone())},BN.prototype.pow=function(t){var e=function(t){for(var e=Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new BN(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},BN.prototype.iushln=function(t){assert("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e<this.length;e++){var s=this.words[e]&i,a=(0|this.words[e])-s<<r;this.words[e]=a|o,o=s>>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},BN.prototype.ishln=function(t){return assert(0===this.negative),this.iushln(t)},BN.prototype.iushrn=function(t,e,r){assert("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var n,i=t%26,o=Math.min((t-i)/26,this.length),s=67108863^67108863>>>i<<i;if(n-=o,n=Math.max(0,n),r){for(var a=0;a<o;a++)r.words[a]=this.words[a];r.length=o}if(0===o);else if(this.length>o)for(this.length-=o,a=0;a<this.length;a++)this.words[a]=this.words[a+o];else this.words[0]=0,this.length=1;var u=0;for(a=this.length-1;a>=0&&(0!==u||a>=n);a--){var c=0|this.words[a];this.words[a]=u<<26-i|c>>>i,u=c&s}return r&&0!==u&&(r.words[r.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},BN.prototype.ishrn=function(t,e,r){return assert(0===this.negative),this.iushrn(t,e,r)},BN.prototype.shln=function(t){return this.clone().ishln(t)},BN.prototype.ushln=function(t){return this.clone().iushln(t)},BN.prototype.shrn=function(t){return this.clone().ishrn(t)},BN.prototype.ushrn=function(t){return this.clone().iushrn(t)},BN.prototype.testn=function(t){assert("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return!(this.length<=r)&&!!(this.words[r]&1<<e)},BN.prototype.imaskn=function(t){assert("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==e&&r++,this.length=Math.min(r,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<<e),this._strip())},BN.prototype.maskn=function(t){return this.clone().imaskn(t)},BN.prototype.iaddn=function(t){return(assert("number"==typeof t),assert(t<67108864),t<0)?this.isubn(-t):0!==this.negative?(1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(t),this.negative=1),this):this._iaddn(t)},BN.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},BN.prototype.isubn=function(t){if(assert("number"==typeof t),assert(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},BN.prototype.addn=function(t){return this.clone().iaddn(t)},BN.prototype.subn=function(t){return this.clone().isubn(t)},BN.prototype.iabs=function(){return this.negative=0,this},BN.prototype.abs=function(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function(t,e,r){var n,i,o=t.length+r;this._expand(o);var s=0;for(n=0;n<t.length;n++){i=(0|this.words[n+r])+s;var a=(0|t.words[n])*e;i-=67108863&a,s=(i>>26)-(a/67108864|0),this.words[n+r]=67108863&i}for(;n<this.length-r;n++)s=(i=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&i;if(0===s)return this._strip();for(assert(-1===s),s=0,n=0;n<this.length;n++)s=(i=-(0|this.words[n])+s)>>26,this.words[n]=67108863&i;return this.negative=1,this._strip()},BN.prototype._wordDiv=function(t,e){var r,n=this.length-t.length,i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var a=i.length-o.length;if("mod"!==e){(r=new BN(null)).length=a+1,r.words=Array(r.length);for(var u=0;u<r.length;u++)r.words[u]=0}var c=i.clone()._ishlnsubmul(o,1,a);0===c.negative&&(i=c,r&&(r.words[a]=1));for(var l=a-1;l>=0;l--){var f=(0|i.words[o.length+l])*67108864+(0|i.words[o.length+l-1]);for(f=Math.min(f/s|0,67108863),i._ishlnsubmul(o,f,l);0!==i.negative;)f--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);r&&(r.words[l]=f)}return r&&r._strip(),i._strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},BN.prototype.divmod=function(t,e,r){var n,i,o;return(assert(!t.isZero()),this.isZero())?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(i=o.mod.neg(),r&&0!==i.negative&&i.iadd(t)),{div:n,mod:i}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):(this.negative&t.negative)!=0?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(i=o.mod.neg(),r&&0!==i.negative&&i.isub(t)),{div:o.div,mod:i}):t.length>this.length||0>this.cmp(t)?{div:new BN(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new BN(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new BN(this.modrn(t.words[0]))}:this._wordDiv(t,e)},BN.prototype.div=function(t){return this.divmod(t,"div",!1).div},BN.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},BN.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},BN.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},BN.prototype.modrn=function(t){var e=t<0;e&&(t=-t),assert(t<=67108863);for(var r=67108864%t,n=0,i=this.length-1;i>=0;i--)n=(r*n+(0|this.words[i]))%t;return e?-n:n},BN.prototype.modn=function(t){return this.modrn(t)},BN.prototype.idivn=function(t){var e=t<0;e&&(t=-t),assert(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*r;this.words[n]=i/t|0,r=i%t}return this._strip(),e?this.ineg():this},BN.prototype.divn=function(t){return this.clone().idivn(t)},BN.prototype.egcd=function(t){assert(0===t.negative),assert(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new BN(1),i=new BN(0),o=new BN(0),s=new BN(1),a=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++a;for(var u=r.clone(),c=e.clone();!e.isZero();){for(var l=0,f=1;(e.words[0]&f)==0&&l<26;++l,f<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(u),i.isub(c)),n.iushrn(1),i.iushrn(1);for(var d=0,p=1;(r.words[0]&p)==0&&d<26;++d,p<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(u),s.isub(c)),o.iushrn(1),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),i.isub(s)):(r.isub(e),o.isub(n),s.isub(i))}return{a:o,b:s,gcd:r.iushln(a)}},BN.prototype._invmp=function(t){assert(0===t.negative),assert(!t.isZero());var e,r=this,n=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var i=new BN(1),o=new BN(0),s=n.clone();r.cmpn(1)>0&&n.cmpn(1)>0;){for(var a=0,u=1;(r.words[0]&u)==0&&a<26;++a,u<<=1);if(a>0)for(r.iushrn(a);a-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var c=0,l=1;(n.words[0]&l)==0&&c<26;++c,l<<=1);if(c>0)for(n.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);r.cmp(n)>=0?(r.isub(n),i.isub(o)):(n.isub(r),o.isub(i))}return 0>(e=0===r.cmpn(1)?i:o).cmpn(0)&&e.iadd(t),e},BN.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},BN.prototype.invm=function(t){return this.egcd(t).a.umod(t)},BN.prototype.isEven=function(){return(1&this.words[0])==0},BN.prototype.isOdd=function(){return(1&this.words[0])==1},BN.prototype.andln=function(t){return this.words[0]&t},BN.prototype.bincn=function(t){assert("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var i=n,o=r;0!==i&&o<this.length;o++){var s=0|this.words[o];s+=i,i=s>>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},BN.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),assert(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},BN.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return -1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},BN.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return -1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},BN.prototype.gtn=function(t){return 1===this.cmpn(t)},BN.prototype.gt=function(t){return 1===this.cmp(t)},BN.prototype.gten=function(t){return this.cmpn(t)>=0},BN.prototype.gte=function(t){return this.cmp(t)>=0},BN.prototype.ltn=function(t){return -1===this.cmpn(t)},BN.prototype.lt=function(t){return -1===this.cmp(t)},BN.prototype.lten=function(t){return 0>=this.cmpn(t)},BN.prototype.lte=function(t){return 0>=this.cmp(t)},BN.prototype.eqn=function(t){return 0===this.cmpn(t)},BN.prototype.eq=function(t){return 0===this.cmp(t)},BN.red=function(t){return new Red(t)},BN.prototype.toRed=function(t){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},BN.prototype.fromRed=function(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function(t){return this.red=t,this},BN.prototype.forceRed=function(t){return assert(!this.red,"Already a number in reduction context"),this._forceRed(t)},BN.prototype.redAdd=function(t){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},BN.prototype.redIAdd=function(t){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},BN.prototype.redSub=function(t){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},BN.prototype.redISub=function(t){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},BN.prototype.redShl=function(t){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},BN.prototype.redMul=function(t){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},BN.prototype.redIMul=function(t){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},BN.prototype.redSqr=function(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function(t){return assert(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var a={k256:null,p224:null,p192:null,p25519:null};function MPrime(t,e){this.name=t,this.p=new BN(e,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(t){if("string"==typeof t){var e=BN._prime(t);this.m=e.p,this.prime=e}else assert(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function Mont(t){Red.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function(){var t=new BN(null);return t.words=Array(Math.ceil(this.n/13)),t},MPrime.prototype.ireduce=function(t){var e,r=t;do this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},MPrime.prototype.split=function(t,e){t.iushrn(this.n,0,e)},MPrime.prototype.imulK=function(t){return t.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9){t.words[0]=0,t.length=1;return}var i=t.words[9];for(n=10,e.words[e.length++]=4194303&i;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},K256.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=(0|t.words[r])*19+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},BN._prime=function(t){var e;if(a[t])return a[t];if("k256"===t)e=new K256;else if("p224"===t)e=new P224;else if("p192"===t)e=new P192;else if("p25519"===t)e=new P25519;else throw Error("Unknown prime "+t);return a[t]=e,e},Red.prototype._verify1=function(t){assert(0===t.negative,"red works only with positives"),assert(t.red,"red works only with red numbers")},Red.prototype._verify2=function(t,e){assert((t.negative|e.negative)==0,"red works only with positives"),assert(t.red&&t.red===e.red,"red works only with red numbers")},Red.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(move(t,t.umod(this.m)._forceRed(this)),t)},Red.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},Red.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},Red.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},Red.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},Red.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r},Red.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},Red.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},Red.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},Red.prototype.isqr=function(t){return this.imul(t,t.clone())},Red.prototype.sqr=function(t){return this.mul(t,t)},Red.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(assert(e%2==1),3===e){var r=this.m.add(new BN(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),i=0;!n.isZero()&&0===n.andln(1);)i++,n.iushrn(1);assert(!n.isZero());var o=new BN(1).toRed(this),s=o.redNeg(),a=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new BN(2*u*u).toRed(this);0!==this.pow(u,a).cmp(s);)u.redIAdd(s);for(var c=this.pow(u,n),l=this.pow(t,n.addn(1).iushrn(1)),f=this.pow(t,n),d=i;0!==f.cmp(o);){for(var p=f,m=0;0!==p.cmp(o);m++)p=p.redSqr();assert(m<d);var y=this.pow(c,new BN(1).iushln(d-m-1));l=l.redMul(y),c=y.redSqr(),f=f.redMul(c),d=m}return l},Red.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},Red.prototype.pow=function(t,e){if(e.isZero())return new BN(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=Array(16);r[0]=new BN(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,s=0,a=e.bitLength()%26;for(0===a&&(a=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],c=a-1;c>=0;c--){var l=u>>c&1;if(i!==r[0]&&(i=this.sqr(i)),0===l&&0===o){s=0;continue}o<<=1,o|=l,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)}a=26}return i},Red.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},Red.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},BN.mont=function(t){return new Mont(t)},inherits(Mont,Red),Mont.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},Mont.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},Mont.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},Mont.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new BN(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},Mont.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},25532:function(t,e,r){"use strict";var n=r(48764).Buffer,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
1a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeUnchecked=e.deserialize=e.serialize=e.BinaryReader=e.BinaryWriter=e.BorshError=e.baseDecode=e.baseEncode=void 0;let c=u(r(13550)),l=u(r(97304)),f=a(r(21127)),d="function"!=typeof TextDecoder?f.TextDecoder:TextDecoder,p=new d("utf-8",{fatal:!0});e.baseEncode=function(t){return"string"==typeof t&&(t=n.from(t,"utf8")),l.default.encode(n.from(t))},e.baseDecode=function(t){return n.from(l.default.decode(t))};let BorshError=class BorshError extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".")}};e.BorshError=BorshError;let BinaryWriter=class BinaryWriter{constructor(){this.buf=n.alloc(1024),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=n.concat([this.buf,n.alloc(1024)]))}writeU8(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4}writeU64(t){this.maybeResize(),this.writeBuffer(n.from(new c.default(t).toArray("le",8)))}writeU128(t){this.maybeResize(),this.writeBuffer(n.from(new c.default(t).toArray("le",16)))}writeU256(t){this.maybeResize(),this.writeBuffer(n.from(new c.default(t).toArray("le",32)))}writeU512(t){this.maybeResize(),this.writeBuffer(n.from(new c.default(t).toArray("le",64)))}writeBuffer(t){this.buf=n.concat([n.from(this.buf.subarray(0,this.length)),t,n.alloc(1024)]),this.length+=t.length}writeString(t){this.maybeResize();let e=n.from(t,"utf8");this.writeU32(e.length),this.writeBuffer(e)}writeFixedArray(t){this.writeBuffer(n.from(t))}writeArray(t,e){for(let r of(this.maybeResize(),this.writeU32(t.length),t))this.maybeResize(),e(r)}toArray(){return this.buf.subarray(0,this.length)}};function handlingRangeError(t,e,r){let n=r.value;r.value=function(...t){try{return n.apply(this,t)}catch(t){if(t instanceof RangeError){let e=t.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new BorshError("Reached the end of buffer when deserializing")}throw t}}}e.BinaryWriter=BinaryWriter;let BinaryReader=class BinaryReader{constructor(t){this.buf=t,this.offset=0}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new c.default(t,"le")}readU128(){let t=this.readBuffer(16);return new c.default(t,"le")}readU256(){let t=this.readBuffer(32);return new c.default(t,"le")}readU512(){let t=this.readBuffer(64);return new c.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new BorshError(`Expected buffer length ${t} isn't within bounds`);let e=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,e}readString(){let t=this.readU32(),e=this.readBuffer(t);try{return p.decode(e)}catch(t){throw new BorshError(`Error decoding UTF-8 string: ${t}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let e=this.readU32(),r=[];for(let n=0;n<e;++n)r.push(t());return r}};function capitalizeFirstLetter(t){return t.charAt(0).toUpperCase()+t.slice(1)}function serializeField(t,e,r,n,i){try{if("string"==typeof n)i[`write${capitalizeFirstLetter(n)}`](r);else if(n instanceof Array){if("number"==typeof n[0]){if(r.length!==n[0])throw new BorshError(`Expecting byte array of length ${n[0]}, but got ${r.length} bytes`);i.writeFixedArray(r)}else if(2===n.length&&"number"==typeof n[1]){if(r.length!==n[1])throw new BorshError(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let e=0;e<n[1];e++)serializeField(t,null,r[e],n[0],i)}else i.writeArray(r,r=>{serializeField(t,e,r,n[0],i)})}else if(void 0!==n.kind)switch(n.kind){case"option":null==r?i.writeU8(0):(i.writeU8(1),serializeField(t,e,r,n.type,i));break;case"map":i.writeU32(r.size),r.forEach((r,o)=>{serializeField(t,e,o,n.key,i),serializeField(t,e,r,n.value,i)});break;default:throw new BorshError(`FieldType ${n} unrecognized`)}else serializeStruct(t,r,i)}catch(t){throw t instanceof BorshError&&t.addToFieldPath(e),t}}function serializeStruct(t,e,r){if("function"==typeof e.borshSerialize){e.borshSerialize(r);return}let n=t.get(e.constructor);if(!n)throw new BorshError(`Class ${e.constructor.name} is missing in schema`);if("struct"===n.kind)n.fields.map(([n,i])=>{serializeField(t,n,e[n],i,r)});else if("enum"===n.kind){let i=e[n.field];for(let o=0;o<n.values.length;++o){let[s,a]=n.values[o];if(s===i){r.writeU8(o),serializeField(t,s,e[s],a,r);break}}}else throw new BorshError(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}function deserializeField(t,e,r,n){try{if("string"==typeof r)return n[`read${capitalizeFirstLetter(r)}`]();if(r instanceof Array){if("number"==typeof r[0])return n.readFixedArray(r[0]);if("number"!=typeof r[1])return n.readArray(()=>
1deserializeField(t,e,r[0],n));{let e=[];for(let i=0;i<r[1];i++)e.push(deserializeField(t,null,r[0],n));return e}}if("option"===r.kind){let i=n.readU8();if(i)return deserializeField(t,e,r.type,n);return}if("map"===r.kind){let i=new Map,o=n.readU32();for(let s=0;s<o;s++){let o=deserializeField(t,e,r.key,n),s=deserializeField(t,e,r.value,n);i.set(o,s)}return i}return deserializeStruct(t,r,n)}catch(t){throw t instanceof BorshError&&t.addToFieldPath(e),t}}function deserializeStruct(t,e,r){if("function"==typeof e.borshDeserialize)return e.borshDeserialize(r);let n=t.get(e);if(!n)throw new BorshError(`Class ${e.name} is missing in schema`);if("struct"===n.kind){let n={};for(let[i,o]of t.get(e).fields)n[i]=deserializeField(t,i,o,r);return new e(n)}if("enum"===n.kind){let i=r.readU8();if(i>=n.values.length)throw new BorshError(`Enum index: ${i} is out of range`);let[o,s]=n.values[i],a=deserializeField(t,o,s,r);return new e({[o]:a})}throw new BorshError(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}s([handlingRangeError],BinaryReader.prototype,"readU8",null),s([handlingRangeError],BinaryReader.prototype,"readU16",null),s([handlingRangeError],BinaryReader.prototype,"readU32",null),s([handlingRangeError],BinaryReader.prototype,"readU64",null),s([handlingRangeError],BinaryReader.prototype,"readU128",null),s([handlingRangeError],BinaryReader.prototype,"readU256",null),s([handlingRangeError],BinaryReader.prototype,"readU512",null),s([handlingRangeError],BinaryReader.prototype,"readString",null),s([handlingRangeError],BinaryReader.prototype,"readFixedArray",null),s([handlingRangeError],BinaryReader.prototype,"readArray",null),e.BinaryReader=BinaryReader,e.serialize=function(t,e,r=BinaryWriter){let n=new r;return serializeStruct(t,e,n),n.toArray()},e.deserialize=function(t,e,r,n=BinaryReader){let i=new n(r),o=deserializeStruct(t,e,i);if(i.offset<r.length)throw new BorshError(`Unexpected ${r.length-i.offset} bytes after deserialized data`);return o},e.deserializeUnchecked=function(t,e,r,n=BinaryReader){let i=new n(r);return deserializeStruct(t,e,i)}},97304:function(t,e,r){var n=r(58162);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},26729:function(t){"use strict";var e=Object.prototype.hasOwnProperty,r="~";function Events(){}function EE(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function addListener(t,e,n,i,o){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new EE(n,i||t,o),a=r?r+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function clearEvent(t,e){0==--t._eventsCount?t._events=new Events:delete t._events[e]}function EventEmitter(){this._events=new Events,this._eventsCount=0}Object.create&&(Events.prototype=Object.create(null),new Events().__proto__||(r=!1)),EventEmitter.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},EventEmitter.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},EventEmitter.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},EventEmitter.prototype.emit=function(t,e,n,i,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var u,c,l=this._events[a],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,i),!0;case 5:return l.fn.call(l.context,e,n,i,o),!0;case 6:return l.fn.call(l.context,e,n,i,o,s),!0}for(c=1,u=Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var d,p=l.length;for(c=0;c<p;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,n);break;case 4:l[c].fn.call(l[c].context,e,n,i);break;default:if(!u)for(d=1,u=Array(f-1);d<f;d++)u[d-1]=arguments[d];l[c].fn.apply(l[c].context,u)}}return!0},EventEmitter.prototype.on=function(t,e,r){return addListener(this,t,e,r,!1)},EventEmitter.prototype.once=function(t,e,r){return addListener(this,t,e,r,!0)},EventEmitter.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return clearEvent(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||clearEvent(this,o);else{for(var a=0,u=[],c=s.length;a<c;a++)(s[a].fn!==e||i&&!s[a].once||n&&s[a].context!==n)&&u.push(s[a]);u.length?this._events[o]=1===u.length?u[0]:u:clearEvent(this,o)}return this},EventEmitter.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&clearEvent(this,e)):(this._events=new Events,this._eventsCount=0),this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.addListener=EventEmitter.prototype.on,EventEmitter.prefixed=r,EventEmitter.EventEmitter=EventEmitter,t.exports=EventEmitter},31198:function(t,e,r){"use strict";
1let n=r(64667).v4,i=r(17741),ClientBrowser=function(t,e){if(!(this instanceof ClientBrowser))return new ClientBrowser(t,e);e||(e={}),this.options={reviver:void 0!==e.reviver?e.reviver:null,replacer:void 0!==e.replacer?e.replacer:null,generator:void 0!==e.generator?e.generator:function(){return n()},version:void 0!==e.version?e.version:2,notificationIdNull:"boolean"==typeof e.notificationIdNull&&e.notificationIdNull},this.callServer=t};t.exports=ClientBrowser,ClientBrowser.prototype.request=function(t,e,r,n){let o;let s=this,a=null,u=Array.isArray(t)&&"function"==typeof e;if(1===this.options.version&&u)throw TypeError("JSON-RPC 1.0 does not support batching");let c=!u&&t&&"object"==typeof t&&"function"==typeof e;if(u||c)n=e,a=t;else{"function"==typeof r&&(n=r,r=void 0);let o="function"==typeof n;try{a=i(t,e,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(t){if(o)return n(t);throw t}if(!o)return a}try{o=JSON.stringify(a,this.options.replacer)}catch(t){return n(t)}return this.callServer(o,function(t,e){s._parseResponse(t,e,n)}),a},ClientBrowser.prototype._parseResponse=function(t,e,r){let n;if(t){r(t);return}if(!e)return r();try{n=JSON.parse(e,this.options.reviver)}catch(t){return r(t)}if(3===r.length){if(!Array.isArray(n))return r(null,n.error,n.result);{let isError=function(t){return void 0!==t.error};return r(null,n.filter(isError),n.filter(function(t){return!isError(t)}))}}r(null,n)}},17741:function(t,e,r){"use strict";let n=r(64667).v4;t.exports=function(t,e,r,i){if("string"!=typeof t)throw TypeError(t+" must be a string");i=i||{};let o="number"==typeof i.version?i.version:2;if(1!==o&&2!==o)throw TypeError(o+" must be 1 or 2");let s={method:t};if(2===o&&(s.jsonrpc="2.0"),e){if("object"!=typeof e&&!Array.isArray(e))throw TypeError(e+" must be an object, array or omitted");s.params=e}if(void 0===r){let t="function"==typeof i.generator?i.generator:function(){return n()};s.id=t(s,i)}else 2===o&&null===r?i.notificationIdNull&&(s.id=null):s.id=r;return s}},64667:function(t,e,r){"use strict";r.d(e,{v4:function(){return esm_browser_v4}});for(var n,i=new Uint8Array(16),o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var esm_browser_stringify=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase();if(!("string"==typeof r&&o.test(r)))throw TypeError("Stringified UUID is invalid");return r},esm_browser_v4=function(t,e,r){var o=(t=t||{}).random||(t.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){r=r||0;for(var s=0;s<16;++s)e[r+s]=o[s];return e}return esm_browser_stringify(o)}},66855:function(t,e,r){"use strict";var n=r(48764).Buffer,i=r(95318);e.Z=void 0;var o=i(r(87757)),s=i(r(48926)),a=i(r(50008)),u=i(r(34575)),c=i(r(93913)),l=i(r(2205)),f=i(r(78585)),d=i(r(29754)),p=r(26729),__rest=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)0>e.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},m=function(t){(0,l.default)(CommonClient,t);var e,r,i,p,m,y=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,r=(0,d.default)(CommonClient);if(e){var n=(0,d.default)(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return(0,f.default)(this,t)});function CommonClient(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ws://localhost:8080",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;(0,u.default)(this,CommonClient);var o=n.autoconnect,s=n.reconnect,a=n.reconnect_interval,c=n.max_reconnects,l=__rest(n,["autoconnect","reconnect","reconnect_interval","max_reconnects"]);return(e=y.call(this)).webSocketFactory=t,e.queue={},e.rpc_id=0,e.address=r,e.autoconnect=void 0===o||o,e.ready=!1,e.reconnect=void 0===s||s,e.reconnect_timer_id=void 0,e.reconnect_interval=void 0===a?1e3:a,e.max_reconnects=void 0===c?5:c,e.rest_options=l,e.current_reconnects=0,e.generate_request_id=i||function(){return++e.rpc_id},e.autoconnect&&e._connect(e.address,Object.assign({autoconnect:e.autoconnect,reconnect:e.reconnect,reconnect_interval:e.reconnect_interval,max_reconnects:e.max_reconnects},e.rest_options)),e}
1return(0,c.default)(CommonClient,[{key:"connect",value:function(){this.socket||this._connect(this.address,Object.assign({autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects},this.rest_options))}},{key:"call",value:function(t,e,r,n){var i=this;return n||"object"!==(0,a.default)(r)||(n=r,r=null),new Promise(function(o,s){if(!i.ready)return s(Error("socket not ready"));var a=i.generate_request_id(t,e);i.socket.send(JSON.stringify({jsonrpc:"2.0",method:t,params:e||null,id:a}),n,function(t){if(t)return s(t);i.queue[a]={promise:[o,s]},r&&(i.queue[a].timeout=setTimeout(function(){delete i.queue[a],s(Error("reply timeout"))},r))})})}},{key:"login",value:(r=(0,s.default)(o.default.mark(function _callee(t){var e;return o.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.call("rpc.login",t);case 2:if(e=r.sent){r.next=5;break}throw Error("authentication failed");case 5:return r.abrupt("return",e);case 6:case"end":return r.stop()}},_callee,this)})),function(t){return r.apply(this,arguments)})},{key:"listMethods",value:(i=(0,s.default)(o.default.mark(function _callee2(){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call("__listMethods");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},_callee2,this)})),function(){return i.apply(this,arguments)})},{key:"notify",value:function(t,e){var r=this;return new Promise(function(n,i){if(!r.ready)return i(Error("socket not ready"));r.socket.send(JSON.stringify({jsonrpc:"2.0",method:t,params:e||null}),function(t){if(t)return i(t);n()})})}},{key:"subscribe",value:(p=(0,s.default)(o.default.mark(function _callee3(t){var e;return o.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return"string"==typeof t&&(t=[t]),r.next=3,this.call("rpc.on",t);case 3:if(e=r.sent,!("string"==typeof t&&"ok"!==e[t])){r.next=6;break}throw Error("Failed subscribing to an event '"+t+"' with: "+e[t]);case 6:return r.abrupt("return",e);case 7:case"end":return r.stop()}},_callee3,this)})),function(t){return p.apply(this,arguments)})},{key:"unsubscribe",value:(m=(0,s.default)(o.default.mark(function _callee4(t){var e;return o.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return"string"==typeof t&&(t=[t]),r.next=3,this.call("rpc.off",t);case 3:if(e=r.sent,!("string"==typeof t&&"ok"!==e[t])){r.next=6;break}throw Error("Failed unsubscribing from an event with: "+e);case 6:return r.abrupt("return",e);case 7:case"end":return r.stop()}},_callee4,this)})),function(t){return m.apply(this,arguments)})},{key:"close",value:function(t,e){this.socket.close(t||1e3,e)}},{key:"_connect",value:function(t,e){var r=this;clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(t,e),this.socket.addEventListener("open",function(){r.ready=!0,r.emit("open"),r.current_reconnects=0}),this.socket.addEventListener("message",function(t){var e=t.data;e instanceof ArrayBuffer&&(e=n.from(e).toString());try{e=JSON.parse(e)}catch(t){return}if(e.notification&&r.listeners(e.notification).length){if(!Object.keys(e.params).length)return r.emit(e.notification);var i=[e.notification];if(e.params.constructor===Object)i.push(e.params);else for(var o=0;o<e.params.length;o++)i.push(e.params[o]);return Promise.resolve().then(function(){r.emit.apply(r,i)})}if(!r.queue[e.id])return e.method&&e.params?Promise.resolve().then(function(){r.emit(e.method,e.params)}):void 0;"error"in e=="result"in e&&r.queue[e.id].promise[1](Error('Server response malformed. Response must include either "result" or "error", but not both.')),r.queue[e.id].timeout&&clearTimeout(r.queue[e.id].timeout),e.error?r.queue[e.id].promise[1](e.error):r.queue[e.id].promise[0](e.result),delete r.queue[e.id]}),this.socket.addEventListener("error",function(t){return r.emit("error",t)}),this.socket.addEventListener("close",function(n){var i=n.code,o=n.reason;r.ready&&setTimeout(function(){return r.emit("close",i,o)},0),r.ready=!1,r.socket=void 0,1e3!==i&&(r.current_reconnects++,r.reconnect&&(r.max_reconnects>r.current_reconnects||0===r.max_reconnects)&&(r.reconnect_timer_id=setTimeout(function(){return r._connect(t,e)},r.reconnect_interval)))})}}]),CommonClient}(p.EventEmitter);e.Z=m},89062:function(t,e,r){"use strict";var n=r(95318);e.Z=function(t,e){return new c(t,e)};
1var i=n(r(34575)),o=n(r(93913)),s=n(r(2205)),a=n(r(78585)),u=n(r(29754)),c=function(t){(0,s.default)(WebSocketBrowserImpl,t);var e,r=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,r=(0,u.default)(WebSocketBrowserImpl);if(e){var n=(0,u.default)(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return(0,a.default)(this,t)});function WebSocketBrowserImpl(t,e,n){var o;return(0,i.default)(this,WebSocketBrowserImpl),(o=r.call(this)).socket=new window.WebSocket(t,n),o.socket.onopen=function(){return o.emit("open")},o.socket.onmessage=function(t){return o.emit("message",t.data)},o.socket.onerror=function(t){return o.emit("error",t)},o.socket.onclose=function(t){o.emit("close",t.code,t.reason)},o}return(0,o.default)(WebSocketBrowserImpl,[{key:"send",value:function(t,e,r){var n=r||e;try{this.socket.send(t),n()}catch(t){n(t)}}},{key:"close",value:function(t,e){this.socket.close(t,e)}},{key:"addEventListener",value:function(t,e,r){this.socket.addEventListener(t,e,r)}}]),WebSocketBrowserImpl}(r(26729).EventEmitter)},89509:function(t,e,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=r(48764),i=n.Buffer;function copyProps(t,e){for(var r in t)e[r]=t[r]}function SafeBuffer(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(copyProps(n,e),e.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(i.prototype),copyProps(i,SafeBuffer),SafeBuffer.from=function(t,e,r){if("number"==typeof t)throw TypeError("Argument must not be a number");return i(t,e,r)},SafeBuffer.alloc=function(t,e,r){if("number"!=typeof t)throw TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},SafeBuffer.allocUnsafe=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return i(t)},SafeBuffer.allocUnsafeSlow=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return n.SlowBuffer(t)}},93527:function(t,e,r){"use strict";function number(t){if(!Number.isSafeInteger(t)||t<0)throw Error(`positive integer expected, not ${t}`)}function bytes(t,...e){if(!(t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name))throw Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function hash(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.wrapConstructor");number(t.outputLen),number(t.blockLen)}function exists(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function output(t,e){bytes(t);let r=e.outputLen;if(t.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}r.d(e,{Gg:function(){return exists},J8:function(){return output},Rx:function(){return number},aI:function(){return bytes},vp:function(){return hash}})},4359:function(t,e,r){"use strict";r.d(e,{VR:function(){return HashMD},bc:function(){return Chi},l3:function(){return Maj}});var n=r(93527),i=r(66409);let Chi=(t,e,r)=>t&e^~t&r,Maj=(t,e,r)=>t&e^t&r^e&r;let HashMD=class HashMD extends i.kb{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.GL)(this.buffer)}update(t){(0,n.Gg)(this);let{view:e,buffer:r,blockLen:o}=this;t=(0,i.O0)(t);let s=t.length;for(let n=0;n<s;){let a=Math.min(o-this.pos,s-n);if(a===o){let e=(0,i.GL)(t);for(;o<=s-n;n+=o)this.process(e,n);continue}r.set(t.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.Gg)(this),(0,n.J8)(t,this),this.finished=!0;let{buffer:e,view:r,blockLen:o,isLE:s}=this,{pos:a}=this;e[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let t=a;t<o;t++)e[t]=0;(function(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);let i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,c=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+c,a,n)})(r,o-8,BigInt(8*this.length),s),this.process(r,0);let u=(0,i.GL)(t),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=c/4,f=this.get();if(l>f.length)throw Error("_sha2: outputLen bigger than state");for(let t=0;t<l;t++)u.setUint32(4*t,f[t],s)}digest(){let{buffer:t,outputLen:e}=this;this.digestInto(t);let r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}},91881:function(t,e,r){"use strict";r.d(e,{EP:function(){return rotlSH},SD:function(){return rotlBH},Vl:function(){return split},gm:function(){return rotlSL},mk:function(){return rotlBL}});let n=BigInt(4294967296-1),i=BigInt(32);function fromBig(t,e=!1){return e?{h:Number(t&n),l:Number(t>>i&n)}:{h:0|Number(t>>i&n),l:0|Number(t&n)}}function split(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){let{h:o,l:s}=fromBig(t[i],e);[r[i],n[i]]=[o,s]}return[r,n]}let rotlSH=(t,e,r)=>t<<r|e>>>32-r,rotlSL=(t,e,r)=>e<<r|t>>>32-r,rotlBH=(t,e,r)=>e<<r-32|t>>>64-r,rotlBL=(t,e,r)=>t<<r-32|e>>>64-r;e.ZP={fromBig,split,toBig:(t,e)=>BigInt(t>>>0)<<i|BigInt(e>>>0),shrSH:(t,e,r)=>t>>>r,shrSL:(t,e,r)=>t<<32-r|e>>
1>r,rotrSH:(t,e,r)=>t>>>r|e<<32-r,rotrSL:(t,e,r)=>t<<32-r|e>>>r,rotrBH:(t,e,r)=>t<<64-r|e>>>r-32,rotrBL:(t,e,r)=>t>>>r-32|e<<64-r,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH,rotlSL,rotlBH,rotlBL,add:function(t,e,r,n){let i=(e>>>0)+(n>>>0);return{h:t+r+(i/4294967296|0)|0,l:0|i}},add3L:(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H:(t,e,r,n)=>e+r+n+(t/4294967296|0)|0,add4L:(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),add4H:(t,e,r,n,i)=>e+r+n+i+(t/4294967296|0)|0,add5H:(t,e,r,n,i,o)=>e+r+n+i+o+(t/4294967296|0)|0,add5L:(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0)}},17748:function(t,e,r){"use strict";r.d(e,{J:function(){return u}});var n=r(4359),i=r(66409);let o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);let SHA256=class SHA256 extends n.VR{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){let{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){let e=a[t-15],r=a[t-2],n=(0,i.np)(e,7)^(0,i.np)(e,18)^e>>>3,o=(0,i.np)(r,17)^(0,i.np)(r,19)^r>>>10;a[t]=o+a[t-7]+n+a[t-16]|0}let{A:r,B:s,C:u,D:c,E:l,F:f,G:d,H:p}=this;for(let t=0;t<64;t++){let e=(0,i.np)(l,6)^(0,i.np)(l,11)^(0,i.np)(l,25),m=p+e+(0,n.bc)(l,f,d)+o[t]+a[t]|0,y=(0,i.np)(r,2)^(0,i.np)(r,13)^(0,i.np)(r,22),g=y+(0,n.l3)(r,s,u)|0;p=d,d=f,f=l,l=c+m|0,c=u,u=s,s=r,r=m+g|0}r=r+this.A|0,s=s+this.B|0,u=u+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,d=d+this.G|0,p=p+this.H|0,this.set(r,s,u,c,l,f,d,p)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};let u=(0,i.hE)(()=>new SHA256)},85609:function(t,e,r){"use strict";r.d(e,{fr:function(){return b}});var n=r(93527),i=r(91881),o=r(66409);let s=[],a=[],u=[],c=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(7),p=BigInt(256),m=BigInt(113);for(let t=0,e=l,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((t+1)*(t+2)/2%64);let i=c;for(let t=0;t<7;t++)(e=(e<<l^(e>>d)*m)%p)&f&&(i^=l<<(l<<BigInt(t))-l);u.push(i)}let[y,g]=(0,i.Vl)(u,!0),rotlH=(t,e,r)=>r>32?(0,i.SD)(t,e,r):(0,i.EP)(t,e,r),rotlL=(t,e,r)=>r>32?(0,i.mk)(t,e,r):(0,i.gm)(t,e,r);let Keccak=class Keccak extends o.kb{constructor(t,e,r,i=!1,s=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.Rx)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.Jq)(this.state)}keccak(){o.iA||(0,o.l1)(this.state32),function(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=rotlH(o,s,1)^r[n],u=rotlL(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r<24;r++){let n=a[r],o=rotlH(e,i,n),u=rotlL(e,i,n),c=s[r];e=t[c],i=t[c+1],t[c]=o,t[c+1]=u}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=y[n],t[1]^=g[n]}r.fill(0)}(this.state32,this.rounds),o.iA||(0,o.l1)(this.state32),this.posOut=0,this.pos=0}update(t){(0,n.Gg)(this);let{blockLen:e,state:r}=this;t=(0,o.O0)(t);let i=t.length;for(let n=0;n<i;){let o=Math.min(e-this.pos,i-n);for(let e=0;e<o;e++)r[this.pos++]^=t[n++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,(128&e)!=0&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){(0,n.Gg)(this,!1),(0,n.aI)(t),this.finish();let e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n<i;){this.posOut>=r&&this.keccak();let o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,n.Rx)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,n.J8)(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new Keccak(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}};let b=(0,o.hE)(()=>new Keccak(136,1,32))},66409:function(t,e,r){"use strict";r.d(e,{kb:function(){return Hash},l1:function(){return byteSwap32},eV:function(){return concatBytes},GL:function(){return createView},iA:function(){return o},O6:function(){return randomBytes},np:function(){return rotr},O0:function(){return toBytes},Jq:function(){return u32},iY:function(){return utf8ToBytes},hE:function(){return wrapConstructor}});let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;var i=r(93527);let u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),rotr=(t,e)=>t<<32-e|t>>>e,o=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],byteSwap=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;function byteSwap32(t){for(let e=0;e<t.length;e++)t[e]=byteSwap(t[e])}function utf8ToBytes(t){if("string"!=typeof t)throw Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function toBytes(t){return"string"==typeof t&&(t=utf8ToBytes(t)),(0,i.aI)(t),t}function concatBytes(...t){let e=0;for(let r=0;r<t.length;r++){let n=t[r];(0,i.aI)(n),e+=n.length}let r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){let i=t[e];r.set(i,n),n+=i.length}return r}let Hash=class Hash{clone(){return this._cloneInto()}};function wrapConstructor(t){let hashC=e=>t().update(toBytes(e)).digest(),e=t();return hashC.outputLen=e.outputLen,hashC.blockLen=e.blockLen,hashC.create=()=>t(),hashC}function randomBytes(t=32){if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(t));throw Error("crypto.getRandomValues must be defined")}},84277:function(t,e,r){"use strict";r.d(e,{K:function(){return validateBasic},M:function(){return wNAF}});var n=r(1893),i=r(12957);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let o=BigInt(0),s=BigInt(1);function wNAF(t,e){let constTimeNegate=(t,e)=>{let r=e.negate();return t?r:e},opts=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(t,e){let{windows:r,windowSize:n}=opts(e),i=[],o=t,s=o;for(let t=0;t<r;t++){s=o,i.push(s);for(let t=1;t<n;t++)s=s.add(o),i.push(s);o=s.double()}return i},wNAF(e,r,n){let{windows:i,windowSize:o}=opts(e),a=t.ZERO,u=t.BASE,c=BigInt(2**e-1),l=2**e,f=BigInt(e);for(let t=0;t<i;t++){let e=t*o,i=Number(n&c);n>>=f,i>o&&(i-=l,n+=s);let d=e+Math.abs(i)-1,p=t%2!=0,m=i<0;0===i?u=u.add(constTimeNegate(p,r[e])):a=a.add(constTimeNegate(m,r[d]))}return{p:a,f:u}},wNAFCached(t,e,r,n){let i=t._WINDOW_SIZE||1,o=e.get(t);
1return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}}function validateBasic(t){return(0,n.OP)(t.Fp),(0,i.FF)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.kK)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}},1893:function(t,e,r){"use strict";r.d(e,{DV:function(){return FpSqrtEven},OP:function(){return validateField},PS:function(){return getMinHashLength},Tu:function(){return isNegativeLE},U_:function(){return invert},Us:function(){return mapHashToField},gN:function(){return Field},kK:function(){return nLength},oA:function(){return pow2},wQ:function(){return mod}});var n=r(12957);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);function mod(t,e){let r=t%e;return r>=i?r:e+r}function pow2(t,e,r){let n=t;for(;e-- >i;)n*=n,n%=r;return n}function invert(t,e){if(t===i||e<=i)throw Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=mod(t,e),n=e,s=i,a=o,u=o,c=i;for(;r!==i;){let t=n/r,e=n%r,i=s-u*t,o=a-c*t;n=r,r=e,s=u,a=c,u=i,c=o}let l=n;if(l!==o)throw Error("invert: does not exist");return mod(s,e)}BigInt(9),BigInt(16);let isNegativeLE=(t,e)=>(mod(t,e)&o)===o,f=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function validateField(t){let e=f.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.FF)(t,e)}function nLength(t,e){let r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function Field(t,e,r=!1,f={}){if(t<=i)throw Error(`Expected Field ORDER > 0, got ${t}`);let{nBitLength:d,nByteLength:p}
1=nLength(t,e);if(p>2048)throw Error("Field lengths over 2048 bytes are not supported");let m=function(t){if(t%u===a){let e=(t+o)/u;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}if(t%l===c){let e=(t-c)/l;return function(t,r){let n=t.mul(r,s),i=t.pow(n,e),o=t.mul(r,i),a=t.mul(t.mul(o,s),i),u=t.mul(o,t.sub(a,t.ONE));if(!t.eql(t.sqr(u),r))throw Error("Cannot find square root");return u}}return function(t){let e,r,n;let a=(t-o)/s;for(e=t-o,r=0;e%s===i;e/=s,r++);for(n=s;n<t&&function(t,e,r){if(r<=i||e<i)throw Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;e>i;)e&o&&(n=n*t%r),t=t*t%r,e>>=o;return n}(n,a,t)!==t-o;n++);if(1===r){let e=(t+o)/u;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}let c=(e+o)/s;return function(t,i){if(t.pow(i,a)===t.neg(t.ONE))throw Error("Cannot find square root");let s=r,u=t.pow(t.mul(t.ONE,n),e),l=t.pow(i,c),f=t.pow(i,e);for(;!t.eql(f,t.ONE);){if(t.eql(f,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(f);e<s&&!t.eql(r,t.ONE);e++)r=t.sqr(r);let r=t.pow(u,o<<BigInt(s-e-1));u=t.sqr(r),l=t.mul(l,r),f=t.mul(f,u),s=e}return l}}(t)}(t),y=Object.freeze({ORDER:t,BITS:d,BYTES:p,MASK:(0,n.dQ)(d),ZERO:i,ONE:o,create:e=>mod(e,t),isValid:e=>{if("bigint"!=typeof e)throw Error(`Invalid field element: expected bigint, got ${typeof e}`);return i<=e&&e<t},is0:t=>t===i,isOdd:t=>(t&o)===o,neg:e=>mod(-e,t),eql:(t,e)=>t===e,sqr:e=>mod(e*e,t),add:(e,r)=>mod(e+r,t),sub:(e,r)=>mod(e-r,t),mul:(e,r)=>mod(e*r,t),pow:(t,e)=>(function(t,e,r){if(r<i)throw Error("Expected power > 0");if(r===i)return t.ONE;if(r===o)return e;let n=t.ONE,s=e;for(;r>i;)r&o&&(n=t.mul(n,s)),s=t.sqr(s),r>>=o;return n})(y,t,e),div:(e,r)=>mod(e*invert(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>invert(e,t),sqrt:f.sqrt||(t=>m(y,t)),invertBatch:t=>(function(t,e){let r=Array(e.length),n=e.reduce((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n)),t.ONE),i=t.inv(n);return e.reduceRight((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n)),i),r})(y,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?(0,n.S5)(t,p):(0,n.tL)(t,p),fromBytes:t=>{if(t.length!==p)throw Error(`Fp.fromBytes: expected ${p}, got ${t.length}`);return r?(0,n.ty)(t):(0,n.bytesToNumberBE)(t)}});return Object.freeze(y)}function FpSqrtEven(t,e){if(!t.isOdd)throw Error("Field doesn't have isOdd");let r=t.sqrt(e);return t.isOdd(r)?t.neg(r):r}function getFieldBytesLength(t){if("bigint"!=typeof t)throw Error("field order must be bigint");let e=t.toString(2).length;return Math.ceil(e/8)}function getMinHashLength(t){let e=getFieldBytesLength(t);return e+Math.ceil(e/2)}function mapHashToField(t,e,r=!1){let i=t.length,s=getFieldBytesLength(e),a=getMinHashLength(e);if(i<16||i<a||i>1024)throw Error(`expected ${a}-1024 bytes of input, got ${i}`);let u=r?(0,n.bytesToNumberBE)(t):(0,n.ty)(t),c=mod(u,e-o)+o;return r?(0,n.S5)(c,s):(0,n.tL)(c,s)}},12957:function(t,e,r){"use strict";r.d(e,{FF:function(){return validateObject},S5:function(){return numberToBytesLE},_t:function(){return isBytes},bytesToNumberBE:function(){return bytesToNumberBE},ci:function(){return bytesToHex},dQ:function(){return bitMask},eV:function(){return concatBytes},gk:function(){return abytes},hexToBytes:function(){return hexToBytes},n$:function(){return createHmacDrbg},ql:function(){return ensureBytes},tL:function(){return numberToBytesBE},ty:function(){return bytesToNumberLE}}),BigInt(0);let n=BigInt(1),i=BigInt(2);function isBytes(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}function abytes(t){if(!isBytes(t))throw Error("Uint8Array expected")}let o=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function bytesToHex(t){abytes(t);let e="";for(let r=0;r<t.length;r++)e+=o[t[r]];return e}function hexToNumber(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":`0x${t}`)}let s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function asciiToBase16(t){return t>=s._0&&t<=s._9?t-s._0:t>=s._A&&t<=s._F?t-(s._A-10):t>=s._a&&t<=s._f?t-(s._a-10):void 0}function hexToBytes(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw Error("padded hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){let r=asciiToBase16(t.charCodeAt(i)),o=asciiToBase16(t.charCodeAt(i+1));if(void 0===r||void 0===o){let e=t[i]+t[i+1];throw Error('hex string expected, got non-hex character "'+e+'" at index '+i)}n[e]=16*r+o}return n}function bytesToNumberBE(t){return hexToNumber(bytesToHex(t))}function bytesToNumberLE(t){return abytes(t),hexToNumber(bytesToHex(Uint8Array.from(t).reverse()))}function numberToBytesBE(t,e){return hexToBytes(t.toString(16).padStart(2*e,"0"))}function numberToBytesLE(t,e){return numberToBytesBE(t,e).reverse()}function ensureBytes(t,e,r){let n;if("string"==typeof e)try{n=hexToBytes(e)}catch(r){throw Error(`${t} must be valid hex string, got "${e}". Cause: ${r}`)}else if(isBytes(e))n=Uint8Array.from(e);else throw Error(`${t} must be hex string or Uint8Array`);let i=n.length;if("number"==typeof r&&i!==r)throw Error(`${t} expected ${r} bytes, got ${i}`);return n}function concatBytes(...t){let e=0;for(let r=0;r<t.length;r++){let n=t[r];abytes(n),e+=n.length}let r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){let i=t[e];r.set(i,n),n+=i.length}return r}let bitMask=t=>(i<<BigInt(t-1))-n,u8n=t=>new Uint8Array(t),u8fr=t=>Uint8Array.from(t);function createHmacDrbg(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=u8n(t),i=u8n(t),o=0,reset=()=>{n.fill(1),i.fill(0),o=0},h=(...t)=>r(i,n,...t),reseed=(t=u8n())=>{i=h(u8fr([0]),t),n=h(),0!==t.length&&(i=h(u8fr([1]),t),n=h())},gen=()=>
1{if(o++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t<e;){n=h();let e=n.slice();r.push(e),t+=n.length}return concatBytes(...r)};return(t,e)=>{let r;for(reset(),reseed(t);!(r=e(gen()));)reseed();return reset(),r}}let a={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||isBytes(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function validateObject(t,e,r={}){let checkField=(e,r,n)=>{let i=a[r];if("function"!=typeof i)throw Error(`Invalid validator "${r}", expected function`);let o=t[e];if((!n||void 0!==o)&&!i(o,t))throw Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(let[t,r]of Object.entries(e))checkField(t,r,!1);for(let[t,e]of Object.entries(r))checkField(t,e,!0);return t}},64775:function(t,e,r){"use strict";r.d(e,{UN:function(){return I}});var n=r(4359),i=r(91881),o=r(66409);let[s,a]=i.ZP.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
15771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),u=new Uint32Array(80),c=new Uint32Array(80);let SHA512=class SHA512 extends n.VR{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:t,Al:e,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:u,El:c,Fh:l,Fl:f,Gh:d,Gl:p,Hh:m,Hl:y}=this;return[t,e,r,n,i,o,s,a,u,c,l,f,d,p,m,y]}set(t,e,r,n,i,o,s,a,u,c,l,f,d,p,m,y){this.Ah=0|t,this.Al=0|e,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|f,this.Gh=0|d,this.Gl=0|p,this.Hh=0|m,this.Hl=0|y}process(t,e){for(let r=0;r<16;r++,e+=4)u[r]=t.getUint32(e),c[r]=t.getUint32(e+=4);for(let t=16;t<80;t++){let e=0|u[t-15],r=0|c[t-15],n=i.ZP.rotrSH(e,r,1)^i.ZP.rotrSH(e,r,8)^i.ZP.shrSH(e,r,7),o=i.ZP.rotrSL(e,r,1)^i.ZP.rotrSL(e,r,8)^i.ZP.shrSL(e,r,7),s=0|u[t-2],a=0|c[t-2],l=i.ZP.rotrSH(s,a,19)^i.ZP.rotrBH(s,a,61)^i.ZP.shrSH(s,a,6),f=i.ZP.rotrSL(s,a,19)^i.ZP.rotrBL(s,a,61)^i.ZP.shrSL(s,a,6),d=i.ZP.add4L(o,f,c[t-7],c[t-16]),p=i.ZP.add4H(d,n,l,u[t-7],u[t-16]);u[t]=0|p,c[t]=0|d}let{Ah:r,Al:n,Bh:o,Bl:l,Ch:f,Cl:d,Dh:p,Dl:m,Eh:y,El:g,Fh:b,Fl:v,Gh:w,Gl:x,Hh:E,Hl:B}=this;for(let t=0;t<80;t++){let e=i.ZP.rotrSH(y,g,14)^i.ZP.rotrSH(y,g,18)^i.ZP.rotrBH(y,g,41),k=i.ZP.rotrSL(y,g,14)^i.ZP.rotrSL(y,g,18)^i.ZP.rotrBL(y,g,41),A=y&b^~y&w,M=g&v^~g&x,_=i.ZP.add5L(B,k,M,a[t],c[t]),S=i.ZP.add5H(_,E,e,A,s[t],u[t]),L=0|_,N=i.ZP.rotrSH(r,n,28)^i.ZP.rotrBH(r,n,34)^i.ZP.rotrBH(r,n,39),T=i.ZP.rotrSL(r,n,28)^i.ZP.rotrBL(r,n,34)^i.ZP.rotrBL(r,n,39),I=r&o^r&f^o&f,O=n&l^n&d^l&d;E=0|w,B=0|x,w=0|b,x=0|v,b=0|y,v=0|g,({h:y,l:g}=i.ZP.add(0|p,0|m,0|S,0|L)),p=0|f,m=0|d,f=0|o,d=0|l,o=0|r,l=0|n;let R=i.ZP.add3L(L,T,O);r=i.ZP.add3H(R,S,N,I),n=0|R}({h:r,l:n}=i.ZP.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:l}=i.ZP.add(0|this.Bh,0|this.Bl,0|o,0|l)),({h:f,l:d}=i.ZP.add(0|this.Ch,0|this.Cl,0|f,0|d)),({h:p,l:m}=i.ZP.add(0|this.Dh,0|this.Dl,0|p,0|m)),({h:y,l:g}=i.ZP.add(0|this.Eh,0|this.El,0|y,0|g)),({h:b,l:v}=i.ZP.add(0|this.Fh,0|this.Fl,0|b,0|v)),({h:w,l:x}=i.ZP.add(0|this.Gh,0|this.Gl,0|w,0|x)),({h:E,l:B}=i.ZP.add(0|this.Hh,0|this.Hl,0|E,0|B)),this.set(r,n,o,l,f,d,p,m,y,g,b,v,w,x,E,B)}roundClean(){u.fill(0),c.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};let l=(0,o.hE)(()=>new SHA512);var f=r(1893),d=r(12957),p=r(84277);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let m=BigInt(0),y=BigInt(1),g=BigInt(2),b=BigInt(8),v={zip215:!0},w=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),x=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),E=BigInt(0),B=BigInt(1),k=BigInt(2),A=BigInt(5),M=BigInt(10),_=BigInt(20),S=BigInt(40),L=BigInt(80);function uvRatio(t,e){let r=(0,f.wQ)(e*e*e,w),n=(0,f.wQ)(r*r*e,w),i=function(t){let e=t*t%w,r=e*t%w,n=(0,f.oA)(r,k,w)*r%w,i=(0,f.oA)(n,B,w)*t%w,o=(0,f.oA)(i,A,w)*i%w,s=(0,f.oA)(o,M,w)*o%w,a=(0,f.oA)(s,_,w)*s%w,u=(0,f.oA)(a,S,w)*a%w,c=(0,f.oA)(u,L,w)*u%w,l=(0,f.oA)(c,L,w)*u%w,d=(0,f.oA)(l,M,w)*o%w,p=(0,f.oA)(d,k,w)*t%w;return{pow_p_5_8:p,b2:r}}(t*n).pow_p_5_8,o=(0,f.wQ)(t*r*i,w),s=(0,f.wQ)(e*o*o,w),a=o,u=(0,f.wQ)(o*x,w),c=s===t,l=s===(0,f.wQ)(-t,w),d=s===(0,f.wQ)(-t*x,w);return c&&(o=a),(l||d)&&(o=u),(0,f.Tu)(o,w)&&(o=(0,f.wQ)(-o,w)),{isValid:c||l,value:o}}let N=(0,f.gN)(w,void 0,!0),T={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:N,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:l,randomBytes:o.O6,adjustScalarBytes:function(t){return t[0]&=248,t[31]&=127,t[31]|=64,t},uvRatio},I=function(t){let e=function(t){let e=(0,p.K)(t);return d.FF(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}(t),{Fp:r,n:n,prehash:i,hash:o,randomBytes:s,nByteLength:a,h:u}=e,c=g<<BigInt(8*a)-y,l=r.create,w=e.uvRatio||((t,e)=>{try{return{isValid:!0,value:r.sqrt(t*r.inv(e))}}catch(t){return{isValid:!1,value:m}}}),x=e.adjustScalarBytes||(t=>t),E=e.domain||((t,e,r)=>{if(e.length||r)throw Error("Contexts/pre-hash are not supported");return t}),inBig=t=>"bigint"==typeof t&&m<t,inRange=(t,e)=>inBig(t)&&inBig(e)&&t<e,in0MaskRange=t=>t===m||inRange(t,c);function assertInRange(t,e){if(inRange(t,e))return t;throw Error(`Expected valid scalar < ${e}, got ${typeof t} ${t}`)}function assertGE0(t){return t===m?t:assertInRange(t,n)}let B=new Map;function isPoint(t){if(!(t instanceof Point))throw Error("ExtendedPoint expected")}let Point=class Point{constructor(t,e,r,n){if(this.ex=t,this.ey=e,this.ez=r,this.et=n,!in0MaskRange(t))throw Error("x required");if(!in0MaskRange(e))throw Error("y required");if(!in0MaskRange(r))throw Error("z required");if(!in0MaskRange(n))throw Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(t){if(t instanceof Point)throw Error("extended point not allowed");let{x:e,y:r}=t||{};if(!in0MaskRange(e)||!in0MaskRange(r))throw Error("invalid affine point");return new Point(e,r,y,l(e*r))}static normalizeZ(t){let e=r.invertBatch(t.map(t=>t.ez));return t.map((t,r)=>t.toAffine(e[r])).map(Point.fromAffine)}_setWindowSize(t){this._WINDOW_SIZE=t,B.delete(this)}assertValidity(){let{a:t,d:r}=e;if(this.is0())throw Error("bad point: ZERO");let{ex:n,ey:i,ez:o,et:s}=this,a=l(n*n),u=l(i*i),c=l(o*o),f=l(c*c),d=l(a*t),p=l(c*l(d+u)),m=l(f+l(r*l(a*u)));if(p!==m)throw Error("bad point: equation left != right (1)");let y=l(n*i),g=l(o*s);if(y!==g)throw Error("bad point: equation left != right (2)")}equals(t){isPoint(t);let{ex:e,ey:r,ez:n}=this,{ex:i,ey:o,ez:s}=t,a=l(e*s),u=l(i*n),c=l(r*s),f=l(o*n);return a===u&&c===f}is0(){return this.equals(Point.ZERO)}negate(){return new Point(l(-this.ex),this.ey,this.ez,l(-this.et))}double(){let{a:t}=e,{ex:r,ey:n,ez:i}=this,o=l(r*r),s=l(n*n),a=l(g*l(i*i)),u=l(t*o),c=r+n,f=l(l(c*c)-o-s),d=u+s,p=d-a,m=u-s,y=l(f*p),b=l(d*m),v=l(f*m),w=l(p*
1d);return new Point(y,b,w,v)}add(t){isPoint(t);let{a:r,d:n}=e,{ex:i,ey:o,ez:s,et:a}=this,{ex:u,ey:c,ez:f,et:d}=t;if(r===BigInt(-1)){let t=l((o-i)*(c+u)),e=l((o+i)*(c-u)),r=l(e-t);if(r===m)return this.double();let n=l(s*g*d),p=l(a*g*f),y=p+n,b=e+t,v=p-n,w=l(y*r),x=l(b*v),E=l(y*v),B=l(r*b);return new Point(w,x,B,E)}let p=l(i*u),y=l(o*c),b=l(a*n*d),v=l(s*f),w=l((i+o)*(u+c)-p-y),x=v-b,E=v+b,B=l(y-r*p),k=l(w*x),A=l(E*B),M=l(w*B),_=l(x*E);return new Point(k,A,_,M)}subtract(t){return this.add(t.negate())}wNAF(t){return M.wNAFCached(this,B,t,Point.normalizeZ)}multiply(t){let{p:e,f:r}=this.wNAF(assertInRange(t,n));return Point.normalizeZ([e,r])[0]}multiplyUnsafe(t){let e=assertGE0(t);return e===m?A:this.equals(A)||e===y?this:this.equals(k)?this.wNAF(e).p:M.unsafeLadder(this,e)}isSmallOrder(){return this.multiplyUnsafe(u).is0()}isTorsionFree(){return M.unsafeLadder(this,n).is0()}toAffine(t){let{ex:e,ey:n,ez:i}=this,o=this.is0();null==t&&(t=o?b:r.inv(i));let s=l(e*t),a=l(n*t),u=l(i*t);if(o)return{x:m,y:y};if(u!==y)throw Error("invZ was invalid");return{x:s,y:a}}clearCofactor(){let{h:t}=e;return t===y?this:this.multiplyUnsafe(t)}static fromHex(t,n=!1){let{d:i,a:o}=e,s=r.BYTES;t=(0,d.ql)("pointHex",t,s);let a=t.slice(),u=t[s-1];a[s-1]=-129&u;let f=d.ty(a);f===m||(n?assertInRange(f,c):assertInRange(f,r.ORDER));let p=l(f*f),g=l(p-y),b=l(i*p-o),{isValid:v,value:x}=w(g,b);if(!v)throw Error("Point.fromHex: invalid y coordinate");let E=(x&y)===y,B=(128&u)!=0;if(!n&&x===m&&B)throw Error("Point.fromHex: x=0 and x_0=1");return B!==E&&(x=l(-x)),Point.fromAffine({x,y:f})}static fromPrivateKey(t){return getExtendedPublicKey(t).point}toRawBytes(){let{x:t,y:e}=this.toAffine(),n=d.S5(e,r.BYTES);return n[n.length-1]|=t&y?128:0,n}toHex(){return d.ci(this.toRawBytes())}};Point.BASE=new Point(e.Gx,e.Gy,y,l(e.Gx*e.Gy)),Point.ZERO=new Point(m,y,y,m);let{BASE:k,ZERO:A}=Point,M=(0,p.M)(Point,8*a);function modN_LE(t){var e;return e=d.ty(t),(0,f.wQ)(e,n)}function getExtendedPublicKey(t){t=(0,d.ql)("private key",t,a);let e=(0,d.ql)("hashed private key",o(t),2*a),r=x(e.slice(0,a)),n=e.slice(a,2*a),i=modN_LE(r),s=k.multiply(i),u=s.toRawBytes();return{head:r,prefix:n,scalar:i,point:s,pointBytes:u}}function hashDomainToScalar(t=new Uint8Array,...e){let r=d.eV(...e);return modN_LE(o(E(r,(0,d.ql)("context",t),!!i)))}return k._setWindowSize(8),{CURVE:e,getPublicKey:function(t){return getExtendedPublicKey(t).pointBytes},sign:function(t,e,o={}){var s;t=(0,d.ql)("message",t),i&&(t=i(t));let{prefix:u,scalar:c,pointBytes:l}=getExtendedPublicKey(e),p=hashDomainToScalar(o.context,u,t),m=k.multiply(p).toRawBytes(),y=hashDomainToScalar(o.context,m,l,t),g=(s=p+y*c,(0,f.wQ)(s,n));assertGE0(g);let b=d.eV(m,d.S5(g,r.BYTES));return(0,d.ql)("result",b,2*a)},verify:function(t,e,n,o=v){let s,a,u;let{context:c,zip215:l}=o,f=r.BYTES;t=(0,d.ql)("signature",t,2*f),e=(0,d.ql)("message",e),i&&(e=i(e));let p=d.ty(t.slice(f,2*f));try{s=Point.fromHex(n,l),a=Point.fromHex(t.slice(0,f),l),u=k.multiplyUnsafe(p)}catch(t){return!1}if(!l&&s.isSmallOrder())return!1;let m=hashDomainToScalar(c,a.toRawBytes(),s.toRawBytes(),e),y=a.add(s.multiplyUnsafe(m));return y.subtract(u).clearCofactor().equals(Point.ZERO)},ExtendedPoint:Point,utils:{getExtendedPublicKey,randomPrivateKey:()=>s(r.BYTES),precompute:(t=8,e=Point.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}}(T);({...T});let O=(N.ORDER+BigInt(3))/BigInt(8);function assertRstPoint(t){if(!(t instanceof RistPoint))throw Error("RistrettoPoint expected")}N.pow(k,O),N.sqrt(N.neg(N.ONE)),N.ORDER,BigInt(5),BigInt(8),BigInt(486662),(0,f.DV)(N,N.neg(BigInt(486664)));let R=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),P=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),C=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),F=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),invertSqrt=t=>uvRatio(B,t),j=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),bytes255ToNumberLE=t=>I.CURVE.Fp.create(bytesToNumberLE(t)&j);function calcElligatorRistrettoMap(t){let{d:e}=I.CURVE,r=I.CURVE.Fp.ORDER,n=I.CURVE.Fp.create,i=n(null*t*t),o=n((i+B)*C),s=BigInt(-1),a=n((s-e*i)*n(i+e)),{isValid:u,value:c}=uvRatio(o,a),l=n(c*t);isNegativeLE(l,r)||(l=n(-l)),u||(c=l),u||(s=i);let f=n(s*(i-B)*F-a),d=c*c,p=n((c+c)*a),m=n(f*R),y=n(B-d),g=n(B+d);return new I.ExtendedPoint(n(p*g),n(y*m),n(m*g),n(p*y))}let RistPoint=class RistPoint{constructor(t){this.ep=t}static fromAffine(t){return new RistPoint(I.ExtendedPoint.fromAffine(t))}static hashToCurve(t){t=ensureBytes("ristrettoHash",t,64);let e=bytes255ToNumberLE(t.slice(0,32)),r=calcElligatorRistrettoMap(e),n=bytes255ToNumberLE(t.slice(32,64)),i=calcElligatorRistrettoMap(n);return new RistPoint(r.add(i))}static fromHex(t){t=ensureBytes("ristrettoHex",t,32);let{a:e,d:r}=I.CURVE,n=I.CURVE.Fp.ORDER,i=I.CURVE.Fp.create,o="RistrettoPoint.fromHex: the hex is not val
1id encoding of RistrettoPoint",s=bytes255ToNumberLE(t);if(!equalBytes(numberToBytesLE(s,32),t)||isNegativeLE(s,n))throw Error(o);let a=i(s*s),u=i(B+e*a),c=i(B-e*a),l=i(u*u),f=i(c*c),d=i(e*r*l-f),{isValid:p,value:m}=invertSqrt(i(d*f)),y=i(m*c),g=i(m*y*d),b=i((s+s)*y);isNegativeLE(b,n)&&(b=i(-b));let v=i(u*g),w=i(b*v);if(!p||isNegativeLE(w,n)||v===E)throw Error(o);return new RistPoint(new I.ExtendedPoint(b,v,B,w))}toRawBytes(){let t,{ex:e,ey:r,ez:n,et:i}=this.ep,o=I.CURVE.Fp.ORDER,s=I.CURVE.Fp.create,a=s(s(n+r)*s(n-r)),u=s(e*r),c=s(u*u),{value:l}=invertSqrt(s(a*c)),f=s(l*a),d=s(l*u),p=s(f*d*i);if(isNegativeLE(i*p,o)){let n=s(null*r),i=s(null*e);e=n,r=i,t=s(f*P)}else t=d;isNegativeLE(e*p,o)&&(r=s(-r));let m=s((n-r)*t);return isNegativeLE(m,o)&&(m=s(-m)),numberToBytesLE(m,32)}toHex(){return bytesToHex(this.toRawBytes())}toString(){return this.toHex()}equals(t){assertRstPoint(t);let{ex:e,ey:r}=this.ep,{ex:n,ey:i}=t.ep,o=I.CURVE.Fp.create,s=o(e*i)===o(r*n),a=o(r*i)===o(e*n);return s||a}add(t){return assertRstPoint(t),new RistPoint(this.ep.add(t.ep))}subtract(t){return assertRstPoint(t),new RistPoint(this.ep.subtract(t.ep))}multiply(t){return new RistPoint(this.ep.multiply(t))}multiplyUnsafe(t){return new RistPoint(this.ep.multiplyUnsafe(t))}double(){return new RistPoint(this.ep.double())}negate(){return new RistPoint(this.ep.negate())}}},16450:function(t,e,r){"use strict";r.d(e,{kA:function(){return x}});var n=r(17748),i=r(1893),o=r(93527),s=r(66409);let HMAC=class HMAC extends s.kb{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,o.vp)(t);let r=(0,s.O0)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?t.create().update(r).digest():r);for(let t=0;t<i.length;t++)i[t]^=54;this.iHash.update(i),this.oHash=t.create();for(let t=0;t<i.length;t++)i[t]^=106;this.oHash.update(i),i.fill(0)}update(t){return(0,o.Gg)(this),this.iHash.update(t),this}digestInto(t){(0,o.Gg)(this),(0,o.aI)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};let hmac=(t,e,r)=>new HMAC(t,e).update(r).digest();hmac.create=(t,e)=>new HMAC(t,e);var a=r(12957),u=r(84277);let{bytesToNumberBE:c,hexToBytes:l}=a,f={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){let{Err:e}=f;if(t.length<2||2!==t[0])throw new e("Invalid signature integer tag");let r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(128&n[0])throw new e("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new e("Invalid signature integer: unnecessary leading zero");return{d:c(n),l:t.subarray(r+2)}},toSig(t){let{Err:e}=f,r="string"==typeof t?l(t):t;a.gk(r);let n=r.length;if(n<2||48!=r[0])throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");let{d:i,l:o}=f._parseInt(r.subarray(2)),{d:s,l:u}=f._parseInt(o);if(u.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(t){let slice=t=>8&Number.parseInt(t[0],16)?"00"+t:t,h=t=>{let e=t.toString(16);return 1&e.length?`0${e}`:e},e=slice(h(t.s)),r=slice(h(t.r)),n=e.length/2,i=r.length/2,o=h(n),s=h(i);return`30${h(i+n+4)}02${s}${r}02${o}${e}`}},d=BigInt(0),p=BigInt(1),m=(BigInt(2),BigInt(3));BigInt(4);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let y=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),g=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b=BigInt(1),v=BigInt(2),divNearest=(t,e)=>(t+e/v)/e,w=(0,i.gN)(y,void 0,void 0,{sqrt:function(t){let e=BigInt(3),r=BigInt(6),n=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),u=BigInt(88),c=t*t*t%y,l=c*c*t%y,f=(0,i.oA)(l,e,y)*l%y,d=(0,i.oA)(f,e,y)*l%y,p=(0,i.oA)(d,v,y
1)*c%y,m=(0,i.oA)(p,n,y)*p%y,g=(0,i.oA)(m,o,y)*m%y,b=(0,i.oA)(g,a,y)*g%y,x=(0,i.oA)(b,u,y)*b%y,E=(0,i.oA)(x,a,y)*g%y,B=(0,i.oA)(E,e,y)*l%y,k=(0,i.oA)(B,s,y)*m%y,A=(0,i.oA)(k,r,y)*c%y,M=(0,i.oA)(A,v,y);if(!w.eql(w.sqr(M),t))throw Error("Cannot find square root");return M}}),x=function(t,e){let create=e=>(function(t){let e=function(t){let e=(0,u.K)(t);return a.FF(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n:n}=e,o=r.BYTES+1,s=2*r.BYTES+1;function modN(t){return i.wQ(t,n)}function invN(t){return i.U_(t,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:y,isWithinCurveOrder:g}=function(t){let e=/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function(t){let e=(0,u.K)(t);a.FF(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}(t),{Fp:r}=e,n=e.toBytes||((t,e,n)=>{let i=e.toAffine();return a.eV(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),o=e.fromBytes||(t=>{let e=t.subarray(1),n=r.fromBytes(e.subarray(0,r.BYTES)),i=r.fromBytes(e.subarray(r.BYTES,2*r.BYTES));return{x:n,y:i}});function weierstrassEquation(t){let{a:n,b:i}=e,o=r.sqr(t),s=r.mul(o,t);return r.add(r.add(s,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),weierstrassEquation(e.Gx)))throw Error("bad generator point: equation left != right");function isWithinCurveOrder(t){return"bigint"==typeof t&&d<t&&t<e.n}function assertGE(t){if(!isWithinCurveOrder(t))throw Error("Expected valid bigint: 0 < bigint < curve.n")}function normPrivateKeyToScalar(t){let r;let{allowedPrivateKeyLengths:n,nByteLength:o,wrapPrivateKey:s,n:u}=e;if(n&&"bigint"!=typeof t){if(a._t(t)&&(t=a.ci(t)),"string"!=typeof t||!n.includes(t.length))throw Error("Invalid key");t=t.padStart(2*o,"0")}try{r="bigint"==typeof t?t:a.bytesToNumberBE((0,a.ql)("private key",t,o))}catch(e){throw Error(`private key must be ${o} bytes, hex or bigint, not ${typeof t}`)}return s&&(r=i.wQ(r,u)),assertGE(r),r}let s=new Map;function assertPrjPoint(t){if(!(t instanceof Point))throw Error("ProjectivePoint expected")}let Point=class Point{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw Error("x required");if(null==e||!r.isValid(e))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required")}static fromAffine(t){let{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw Error("invalid affine point");if(t instanceof Point)throw Error("projective point not allowed");let is0=t=>r.eql(t,r.ZERO);return is0(e)&&is0(n)?Point.ZERO:new Point(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let e=r.invertBatch(t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(Point.fromAffine)}static fromHex(t){let e=Point.fromAffine(o((0,a.ql)("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return Point.BASE.multiply(normPrivateKeyToScalar(t))}_setWindowSize(t){this._WINDOW_SIZE=t,s.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw Error("bad point: ZERO")}let{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw Error("bad point: x or y not FE");let i=r.sqr(n),o=weierstrassEquation(t);if(!r.eql(i,o))throw Error("bad point: equation left != right");if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw Error("Field doesn't support isOdd")}equals(t){assertPrjPoint(t);let{px:e,py:n,pz:i}=this,{px:o,py:s,pz:a}=t,u=r.eql(r.mul(e,a),r.mul(o,i)),c=r.eql(r.mul(n,a),r.mul(s,i));return u&&c}negate(){return new Point(this.px,r.neg(this.py),this.pz)}double(){let{a:t,b:n}=e,i=r.mul(n,m),{px:o,py:s,pz:a}=this,u=r.ZERO,c=r.ZERO,l=r.ZERO,f=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),y=r.mul(o,s);return y=r.add(y,y),l=r.mul(o,a),l=r.add(l,l),u=r.mul(t,l),c=r.mul(i,p),c=r.add(u,c),u=r.sub(d,c),c=r.add(d,c),c=r.mul(u,c),u=r.mul(y,u),l=r.mul(i,l),p=r.mul(t,p),y=r.sub(f,p),y=r.mul(t,y),y=r.add(y,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,y),c=r.add(c,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,y),u=r.sub(u,f),l=r.mul(p,d),l=r.add(l,l),l=r.add(l,l),new Point(u,c,l)}
1add(t){assertPrjPoint(t);let{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=t,c=r.ZERO,l=r.ZERO,f=r.ZERO,d=e.a,p=r.mul(e.b,m),y=r.mul(n,s),g=r.mul(i,a),b=r.mul(o,u),v=r.add(n,i),w=r.add(s,a);v=r.mul(v,w),w=r.add(y,g),v=r.sub(v,w),w=r.add(n,o);let x=r.add(s,u);return w=r.mul(w,x),x=r.add(y,b),w=r.sub(w,x),x=r.add(i,o),c=r.add(a,u),x=r.mul(x,c),c=r.add(g,b),x=r.sub(x,c),f=r.mul(d,w),c=r.mul(p,b),f=r.add(c,f),c=r.sub(g,f),f=r.add(g,f),l=r.mul(c,f),g=r.add(y,y),g=r.add(g,y),b=r.mul(d,b),w=r.mul(p,w),g=r.add(g,b),b=r.sub(y,b),b=r.mul(d,b),w=r.add(w,b),y=r.mul(g,w),l=r.add(l,y),y=r.mul(x,w),c=r.mul(v,c),c=r.sub(c,y),y=r.mul(v,g),f=r.mul(x,f),f=r.add(f,y),new Point(c,l,f)}subtract(t){return this.add(t.negate())}is0(){return this.equals(Point.ZERO)}wNAF(t){return l.wNAFCached(this,s,t,t=>{let e=r.invertBatch(t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(Point.fromAffine)})}multiplyUnsafe(t){let n=Point.ZERO;if(t===d)return n;if(assertGE(t),t===p)return this;let{endo:i}=e;if(!i)return l.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:a,k2:u}=i.splitScalar(t),c=n,f=n,m=this;for(;s>d||u>d;)s&p&&(c=c.add(m)),u&p&&(f=f.add(m)),m=m.double(),s>>=p,u>>=p;return o&&(c=c.negate()),a&&(f=f.negate()),f=new Point(r.mul(f.px,i.beta),f.py,f.pz),c.add(f)}multiply(t){let n,i;assertGE(t);let{endo:o}=e;if(o){let{k1neg:e,k1:s,k2neg:a,k2:u}=o.splitScalar(t),{p:c,f:f}=this.wNAF(s),{p:d,f:p}=this.wNAF(u);c=l.constTimeNegate(e,c),d=l.constTimeNegate(a,d),d=new Point(r.mul(d.px,o.beta),d.py,d.pz),n=c.add(d),i=f.add(p)}else{let{p:e,f:r}=this.wNAF(t);n=e,i=r}return Point.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){let n=Point.BASE,mul=(t,e)=>e!==d&&e!==p&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),i=mul(this,e).add(mul(t,r));return i.is0()?void 0:i}toAffine(t){let{px:e,py:n,pz:i}=this,o=this.is0();null==t&&(t=o?r.ONE:r.inv(i));let s=r.mul(e,t),a=r.mul(n,t),u=r.mul(i,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){let{h:t,isTorsionFree:r}=e;if(t===p)return!0;if(r)return r(Point,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:r}=e;return t===p?this:r?r(Point,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),n(Point,this,t)}toHex(t=!0){return a.ci(this.toRawBytes(t))}};Point.BASE=new Point(e.Gx,e.Gy,r.ONE),Point.ZERO=new Point(r.ZERO,r.ONE,r.ZERO);let c=e.nBitLength,l=(0,u.M)(Point,e.endo?Math.ceil(c/2):c);return{CURVE:e,ProjectivePoint:Point,normPrivateKeyToScalar,weierstrassEquation,isWithinCurveOrder}}({...e,toBytes(t,e,n){let i=e.toAffine(),o=r.toBytes(i.x),s=a.eV;return n?s(Uint8Array.from([e.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){let e=t.length,n=t[0],i=t.subarray(1);if(e===o&&(2===n||3===n)){let t;let e=a.bytesToNumberBE(i);if(!(d<e&&e<r.ORDER))throw Error("Point is not on curve");let o=y(e);try{t=r.sqrt(o)}catch(e){let t=e instanceof Error?": "+e.message:"";throw Error("Point is not on curve"+t)}let s=(t&p)===p;return(1&n)==1!==s&&(t=r.neg(t)),{x:e,y:t}}if(e===s&&4===n){let t=r.fromBytes(i.subarray(0,r.BYTES)),e=r.fromBytes(i.subarray(r.BYTES,2*r.BYTES));return{x:t,y:e}}throw Error(`Point of length ${e} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}}),numToNByteStr=t=>a.ci(a.tL(t,e.nByteLength));function isBiggerThanHalfOrder(t){let e=n>>p;return t>e}let slcNum=(t,e,r)=>a.bytesToNumberBE(t.slice(e,r));let Signature=class Signature{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){let r=e.nByteLength;return t=(0,a.ql)("compactSignature",t,2*r),new Signature(slcNum(t,0,r),slcNum(t,r,2*r))}static fromDER(t){let{r:e,s:r}=f.toSig((0,a.ql)("DER",t));return new Signature(e,r)}assertValidity(){if(!g(this.r))throw Error("r must be 0 < r < CURVE.n");if(!g(this.s))throw Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new Signature(this.r,this.s,t)}recoverPublicKey(t){let{r:n,s:i,recovery:o}=this,s=v((0,a.ql)("msgHash",t));if(null==o||![0,1,2,3].includes(o))throw Error("recovery id invalid");let u=2===o||3===o?n+e.n:n;if(u>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let l=(1&o)==0?"02":"03",f=c.fromHex(l+numToNByteStr(u)),d=invN(u),p=modN(-s*d),m=modN(i*d
1),y=c.BASE.multiplyAndAddUnsafe(f,p,m);if(!y)throw Error("point at infinify");return y.assertValidity(),y}hasHighS(){return isBiggerThanHalfOrder(this.s)}normalizeS(){return this.hasHighS()?new Signature(this.r,modN(-this.s),this.recovery):this}toDERRawBytes(){return a.hexToBytes(this.toDERHex())}toDERHex(){return f.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return a.hexToBytes(this.toCompactHex())}toCompactHex(){return numToNByteStr(this.r)+numToNByteStr(this.s)}};function isProbPub(t){let e=a._t(t),r="string"==typeof t,n=(e||r)&&t.length;return e?n===o||n===s:r?n===2*o||n===2*s:t instanceof c}let b=e.bits2int||function(t){let r=a.bytesToNumberBE(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},v=e.bits2int_modN||function(t){return modN(b(t))},w=a.dQ(e.nBitLength);function int2octets(t){if("bigint"!=typeof t)throw Error("bigint expected");if(!(d<=t&&t<w))throw Error(`bigint expected < 2^${e.nBitLength}`);return a.tL(t,e.nByteLength)}let x={lowS:e.lowS,prehash:!1},E={lowS:e.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return c.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(isProbPub(t))throw Error("first arg must be private key");if(!isProbPub(e))throw Error("second arg must be public key");let n=c.fromHex(e);return n.multiply(l(t)).toRawBytes(r)},sign:function(t,n,i=x){let{seed:o,k2sig:s}=function(t,n,i=x){if(["recovered","canonical"].some(t=>t in i))throw Error("sign() legacy options not supported");let{hash:o,randomBytes:s}=e,{lowS:u,prehash:f,extraEntropy:m}=i;null==u&&(u=!0),t=(0,a.ql)("msgHash",t),f&&(t=(0,a.ql)("prehashed msgHash",o(t)));let y=v(t),w=l(n),E=[int2octets(w),int2octets(y)];if(null!=m&&!1!==m){let t=!0===m?s(r.BYTES):m;E.push((0,a.ql)("extraEntropy",t))}let B=a.eV(...E);return{seed:B,k2sig:function(t){let e=b(t);if(!g(e))return;let r=invN(e),n=c.BASE.multiply(e).toAffine(),i=modN(n.x);if(i===d)return;let o=modN(r*modN(y+i*w));if(o===d)return;let s=(n.x===i?0:2)|Number(n.y&p),a=o;return u&&isBiggerThanHalfOrder(o)&&(a=isBiggerThanHalfOrder(o)?modN(-o):o,s^=1),new Signature(i,a,s)}}}(t,n,i),u=a.n$(e.hash.outputLen,e.nByteLength,e.hmac);return u(o,s)},verify:function(t,r,n,i=E){let o,s;if(r=(0,a.ql)("msgHash",r),n=(0,a.ql)("publicKey",n),"strict"in i)throw Error("options.strict was renamed to lowS");let{lowS:u,prehash:l}=i;try{if("string"==typeof t||a._t(t))try{s=Signature.fromDER(t)}catch(e){if(!(e instanceof f.Err))throw e;s=Signature.fromCompact(t)}else if("object"==typeof t&&"bigint"==typeof t.r&&"bigint"==typeof t.s){let{r:e,s:r}=t;s=new Signature(e,r)}else throw Error("PARSE");o=c.fromHex(n)}catch(t){if("PARSE"===t.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&s.hasHighS())return!1;l&&(r=e.hash(r));let{r:d,s:p}=s,m=v(r),y=invN(p),g=modN(m*y),b=modN(d*y),w=c.BASE.multiplyAndAddUnsafe(o,g,b)?.toAffine();if(!w)return!1;let x=modN(w.x);return x===d},ProjectivePoint:c,Signature,utils:{isValidPrivateKey(t){try{return l(t),!0}catch(t){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{let t=i.PS(e.n);return i.Us(e.randomBytes(t),e.n)},precompute:(t=8,e=c.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}})({...t,hash:e,hmac:(t,...r)=>hmac(e,t,(0,s.eV)(...r)),randomBytes:s.O6});return Object.freeze({...create(e),create})}({a:BigInt(0),b:BigInt(7),Fp:w,n:g,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-b*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=BigInt("0x100000000000000000000000000000000"),s=divNearest(e*t,g),a=divNearest(-r*t,g),u=(0,i.wQ)(t-s*e-a*n,g),c=(0,i.wQ)(-s*r-a*e,g),l=u>o,f=c>o;if(l&&(u=g-u),f&&(c=g-c),u>o||c>o)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:l,k1:u,k2neg:f,k2:c}}}},n.J);BigInt(0),x.ProjectivePoint},53471:function(t,e,r){"use strict";r.d(e,{AG:function(){return nullable},G0:function(){return union},IM:function(){return record},IX:function(){return array},O7:function(){return boolean},Rx:function(){return number},Ue:function(){return create},Yj:function(){return any},Z_:function(){return string},_4:function(){return unknown},bc:function(){return tuple},dt:function(){return type},eE:function(){return instance},hu:function(){return assert},i0:function(){return literal},jt:function(){return optional},oQ:function(){return coerce}});let StructError=class StructError extends TypeError{constructor(t,e){let r;let{message:n,...i}=t,{path:o}=t,s=0===o.length?n:"At path: "+o.join(".")+" -- "+n;super(s),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>{var n;return null!=(n=r)?n:r=[t,...e()]}}};function isObject(t){return"object"==typeof t&&null!=t}function print(t){return"string"==typeof t?JSON.stringify(t):""+t}function*toFailures(t,e,r,n){var i;for(let o of(isObject(i=t)&&"function"==typeof i[Symbol.iterator]||(t=[t]),t)){let t=function(t,e,r,n){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});let{path:i,branch:o}=e,{type:s}=r,{refinement:a,message:u="Expected a value of type `"+s+"`"+(a?" with refinement `"+a+"`":"")+", but received: `"+print(n)+"`"}=t;return{value:n,type:s,refinement:a,key:i[i.length-1],path:i,branch:o,...t,message:u}}(o,e,r,n);t&&(yield t)}}function*run(t,e,r={}){let{path:n=[],branch:i=[t],coerce:o=!1,mask:s=!1}=r,a={path:n,branch:i};if(o&&(t=e.coercer(t,a),s&&"type"!==e.type&&isObject(e.schema)&&isObject(t)&&!Array.isArray(t)))for(let r in t)void 0===e.schema[r]&&delete t[r];let u=!0;for(let r of e.validator(t,a))u=!1,yield[r,void 0];for(let[r,c,l]of e.entries(t,a)){let e=run(c,l,{path:void 0===r?n:[...n,r],branch:void 0===r?i:[...i,c],coerce:o,mask:s});for(let n of e)n[0]?(u=!1,yield[n[0],void 0]):o&&(c=n[1],void 0===r?t=c:t instanceof Map?t.set(r,c):t instanceof Set?t.add(c):isObject(t)&&(t[r]=c))}if(u)for(let r of e.refiner(t,a))u=!1,yield[r,void 0];u&&(yield[void 0,t])}let Struct=class Struct{constructor(t){let{type:e,schema:r,validator:n,refiner:i,coercer:o=t=>t,entries:s=function*(){}}=t;this.type=e,this.schema=r,this.entries=s,this.coercer=o,n?this.validator=(t,e)=>{let r=n(t,e);return toFailures(r,e,this,t)}:this.validator=()=>[],i?this.refiner=(t,e)=>{let r=i(t,e);return toFailures(r,e,this,t)}:this.refiner=()=>[]}assert(t){return assert(t,this)}create(t){return create(t,this)}is(t){return is(t,this)}mask(t){return function(t,e){let r=validate(t,e,{coerce:!0,mask:!0});if(!r[0])return r[1];throw r[0]}(t,this)}validate(t,e={}){return validate(t,this,e)}};function assert(t,e){let r=validate(t,e);if(r[0])throw r[0]}function create(t,e){let r=validate(t,e,{coerce:!0});if(!r[0])return r[1];throw r[0]}function is(t,e){let r=validate(t,e);return!r[0]}function validate(t,e,r={}){let n=run(t,e,r),i=function(t){let{done:e,value:r}=t.next();return e?void 0:r}(n);if(i[0]){let t=new StructError(i[0],function*(){for(let t of n)t[0]&&(yield t[0])});return[t,void 0]}{let t=i[1];return[void 0,t]}}function define(t,e){return new Struct({type:t,schema:null,validator:e})}function any(){return define("any",()=>!0)}function array(t){return new Struct({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(let[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||"Expected an array value, but received: "+print(t)})}function boolean(){return define("boolean",t=>"boolean"==typeof t)}function instance(t){return define("instance",e=>
1e instanceof t||"Expected a `"+t.name+"` instance, but received: "+print(e))}function literal(t){let e=print(t),r=typeof t;return new Struct({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?t:null,validator:r=>r===t||"Expected the literal `"+e+"`, but received: "+print(r)})}function nullable(t){return new Struct({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}function number(){return define("number",t=>"number"==typeof t&&!isNaN(t)||"Expected a number, but received: "+print(t))}function optional(t){return new Struct({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function record(t,e){return new Struct({type:"record",schema:null,*entries(r){if(isObject(r))for(let n in r){let i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>isObject(t)||"Expected an object, but received: "+print(t)})}function string(){return define("string",t=>"string"==typeof t||"Expected a string, but received: "+print(t))}function tuple(t){let e=define("never",()=>!1);return new Struct({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator:t=>Array.isArray(t)||"Expected an array, but received: "+print(t)})}function type(t){let e=Object.keys(t);return new Struct({type:"type",schema:t,*entries(r){if(isObject(r))for(let n of e)yield[n,r[n],t[n]]},validator:t=>isObject(t)||"Expected an object, but received: "+print(t)})}function union(t){let e=t.map(t=>t.type).join(" | ");return new Struct({type:"union",schema:null,validator(r,n){let i=[];for(let e of t){let[...t]=run(r,e,n),[o]=t;if(!o[0])return[];for(let[e]of t)e&&i.push(e)}return["Expected the value to satisfy a union of `"+e+"`, but received: "+print(r),...i]}})}function unknown(){return define("unknown",()=>!0)}function coerce(t,e,r){return new Struct({...t,coercer:(n,i)=>is(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}},21127:function(t,e,r){"use strict";function inRange(t,e,r){return e<=t&&t<=r}function ToDictionary(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function Stream(t){this.tokens=[].slice.call(t)}function decoderError(t,e){if(t)throw TypeError("Decoder error");return e||65533}r.r(e),r.d(e,{TextDecoder:function(){return TextDecoder},TextEncoder:function(){return TextEncoder}}),Stream.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(t){if(Array.isArray(t))for(;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(;t.length;)this.tokens.push(t.shift());else this.tokens.push(t)}};var n="utf-8";function TextDecoder(t,e){if(!(this instanceof TextDecoder))return new TextDecoder(t,e);if((t=void 0!==t?String(t).toLowerCase():n)!==n)throw Error("Encoding not supported. Only utf-8 is supported");e=ToDictionary(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function TextEncoder(t,e){if(!(this instanceof TextEncoder))return new TextEncoder(t,e);if((t=void 0!==t?String(t).toLowerCase():n)!==n)throw Error("Encoding not supported. Only utf-8 is supported");e=ToDictionary(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function UTF8Decoder(t){var e=t.fatal,r=0,n=0,i=0,o=128,s=191;this.handler=function(t,a){if(-1===a&&0!==i)return i=0,decoderError(e);
vendor: 2,632 bytes, lines 1-2
1if(-1===a)return -1;if(0===i){if(inRange(a,0,127))return a;if(inRange(a,194,223))i=1,r=a-192;else if(inRange(a,224,239))224===a&&(o=160),237===a&&(s=159),i=2,r=a-224;else{if(!inRange(a,240,244))return decoderError(e);240===a&&(o=144),244===a&&(s=143),i=3,r=a-240}return r<<=6*i,null}if(!inRange(a,o,s))return r=i=n=0,o=128,s=191,t.prepend(a),decoderError(e);if(o=128,s=191,n+=1,r+=a-128<<6*(i-n),n!==i)return null;var u=r;return r=i=n=0,u}}function UTF8Encoder(t){t.fatal,this.handler=function(t,e){if(-1===e)return -1;if(inRange(e,0,127))return e;inRange(e,128,2047)?(r=1,n=192):inRange(e,2048,65535)?(r=2,n=224):inRange(e,65536,1114111)&&(r=3,n=240);for(var r,n,i=[(e>>6*r)+n];r>0;){var o=e>>6*(r-1);i.push(128|63&o),r-=1}return i}}TextDecoder.prototype={decode:function(t,e){r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=ToDictionary(e),this._streaming||(this._decoder=new UTF8Decoder({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!e.stream;for(var r,n,i=new Stream(r),o=[];!i.endOfStream()&&-1!==(n=this._decoder.handler(i,i.read()));)null!==n&&(Array.isArray(n)?o.push.apply(o,n):o.push(n));if(!this._streaming){do{if(-1===(n=this._decoder.handler(i,i.read())))break;if(null===n)continue;Array.isArray(n)?o.push.apply(o,n):o.push(n)}while(!i.endOfStream());this._decoder=null}return!o.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===o[0]?(this._BOMseen=!0,o.shift()):this._BOMseen=!0),function(t){for(var e="",r=0;r<t.length;++r){var n=t[r];n<=65535?e+=String.fromCharCode(n):(n-=65536,e+=String.fromCharCode((n>>10)+55296,(1023&n)+56320))}return e}(o)}},TextEncoder.prototype={encode:function(t,e){t=t?String(t):"",e=ToDictionary(e),this._streaming||(this._encoder=new UTF8Encoder(this._options)),this._streaming=!!e.stream;for(var r,n=[],i=new Stream(function(t){for(var e=String(t),r=e.length,n=0,i=[];n<r;){var o=e.charCodeAt(n);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319){if(n===r-1)i.push(65533);else{var s=t.charCodeAt(n+1);if(56320<=s&&s<=57343){var a=1023&o,u=1023&s;i.push(65536+(a<<10)+u),n+=1}else i.push(65533)}}n+=1}return i}(t));!i.endOfStream()&&-1!==(r=this._encoder.handler(i,i.read()));)Array.isArray(r)?n.push.apply(n,r):n.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(i,i.read()));)Array.isArray(r)?n.push.apply(n,r):n.push(r);this._encoder=null}return new Uint8Array(n)}}}}]); 2//# sourceMappingURL=9409-23e2588aee5e7c3b.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.