@eluvio/elv-client-js 4.0.1 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ElvClient-min.js +9 -9
- package/dist/ElvClient-node-min.js +9 -9
- package/dist/ElvFrameClient-min.js +10 -10
- package/dist/ElvPermissionsClient-min.js +8 -8
- package/dist/ElvWalletClient-min.js +7 -7
- package/dist/ElvWalletClient-node-min.js +10 -10
- package/dist/src/ElvClient.js +31 -10
- package/dist/src/HttpClient.js +6 -7
- package/dist/src/client/ContentManagement.js +8 -11
- package/package.json +1 -1
- package/src/ElvClient.js +27 -9
- package/src/FrameClient.js +1 -1
- package/src/HttpClient.js +5 -7
- package/src/client/ContentManagement.js +1 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=35)}([function(t,e,r){"use strict";r.d(e,"k",(function(){return a})),r.d(e,"j",(function(){return u})),r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return f})),r.d(e,"o",(function(){return l})),r.d(e,"p",(function(){return h})),r.d(e,"l",(function(){return p})),r.d(e,"i",(function(){return d})),r.d(e,"d",(function(){return m})),r.d(e,"e",(function(){return v})),r.d(e,"c",(function(){return g})),r.d(e,"g",(function(){return y})),r.d(e,"f",(function(){return b})),r.d(e,"h",(function(){return w})),r.d(e,"n",(function(){return k})),r.d(e,"m",(function(){return _}));var n=new(r(1).b)("bytes/5.7.0");function o(t){return!!t.toHexString}function i(t){return t.slice||(t.slice=function(){var e=Array.prototype.slice.call(arguments);return i(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function a(t){return p(t)&&!(t.length%2)||u(t)}function s(t){return"number"==typeof t&&t==t&&t%1==0}function u(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t)return!1;if(!s(t.length)||t.length<0)return!1;for(var e=0;e<t.length;e++){var r=t[e];if(!s(r)||r<0||r>=256)return!1}return!0}function c(t,e){if(e||(e={}),"number"==typeof t){n.checkSafeUint53(t,"invalid arrayify value");for(var r=[];t;)r.unshift(255&t),t=parseInt(String(t/256));return 0===r.length&&r.push(0),i(new Uint8Array(r))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),o(t)&&(t=t.toHexString()),p(t)){var a=t.substring(2);a.length%2&&("left"===e.hexPad?a="0"+a:"right"===e.hexPad?a+="0":n.throwArgumentError("hex data is odd-length","value",t));for(var s=[],c=0;c<a.length;c+=2)s.push(parseInt(a.substring(c,c+2),16));return i(new Uint8Array(s))}return u(t)?i(new Uint8Array(t)):n.throwArgumentError("invalid arrayify value","value",t)}function f(t){var e=t.map((function(t){return c(t)})),r=e.reduce((function(t,e){return t+e.length}),0),n=new Uint8Array(r);return e.reduce((function(t,e){return n.set(e,t),t+e.length}),0),i(n)}function l(t){var e=c(t);if(0===e.length)return e;for(var r=0;r<e.length&&0===e[r];)r++;return r&&(e=e.slice(r)),e}function h(t,e){(t=c(t)).length>e&&n.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(e);return r.set(t,e-t.length),i(r)}function p(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}function d(t,e){if(e||(e={}),"number"==typeof t){n.checkSafeUint53(t,"invalid hexlify value");for(var r="";t;)r="0123456789abcdef"[15&t]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),o(t))return t.toHexString();if(p(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":n.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(u(t)){for(var i="0x",a=0;a<t.length;a++){var s=t[a];i+="0123456789abcdef"[(240&s)>>4]+"0123456789abcdef"[15&s]}return i}return n.throwArgumentError("invalid hexlify value","value",t)}function m(t){if("string"!=typeof t)t=d(t);else if(!p(t)||t.length%2)return null;return(t.length-2)/2}function v(t,e,r){return"string"!=typeof t?t=d(t):(!p(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function g(t){var e="0x";return t.forEach((function(t){e+=d(t).substring(2)})),e}function y(t){var e=b(d(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function b(t){"string"!=typeof t&&(t=d(t)),p(t)||n.throwArgumentError("invalid hex string","value",t),t=t.substring(2);for(var e=0;e<t.length&&"0"===t[e];)e++;return"0x"+t.substring(e)}function w(t,e){for("string"!=typeof t?t=d(t):p(t)||n.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function k(t){var e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(t)){var r=c(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=d(r.slice(0,32)),e.s=d(r.slice(32,64))):65===r.length?(e.r=d(r.slice(0,32)),e.s=d(r.slice(32,64)),e.v=r[64]):n.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:n.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=d(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){var o=h(c(e._vs),32);e._vs=d(o);var i=o[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),o[0]&=127;var s=d(o);null==e.s?e.s=s:e.s!==s&&n.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?n.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{var u=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==u&&n.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&p(e.r)?e.r=w(e.r,32):n.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&p(e.s)?e.s=w(e.s,32):n.throwArgumentError("signature missing or invalid s","signature",t);var f=c(e.s);f[0]>=128&&n.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(f[0]|=128);var l=d(f);e._vs&&(p(e._vs)||n.throwArgumentError("signature invalid _vs","signature",t),e._vs=w(e._vs,32)),null==e._vs?e._vs=l:e._vs!==l&&n.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function _(t){return d(f([(t=k(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},function(t,e,r){"use strict";r.d(e,"a",(function(){return f})),r.d(e,"b",(function(){return p}));function n(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)}}var o=!1,i=!1,a={debug:1,default:2,info:2,warning:3,error:4,off:5},s=a.default,u=null;var c,f,l=function(){try{var t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(e){try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(f||(f={}));var h="0123456789abcdef",p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}var e,r,c;return e=t,c=[{key:"globalLogger",value:function(){return u||(u=new t("logger/5.7.0")),u}},{key:"setCensorship",value:function(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!e)return;this.globalLogger().throwError("error censorship permanent",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,o=!!r}},{key:"setLogLevel",value:function(e){var r=a[e.toLowerCase()];null!=r?s=r:t.globalLogger().warn("invalid log level - "+e)}},{key:"from",value:function(e){return new t(e)}}],(r=[{key:"_log",value:function(t,e){var r=t.toLowerCase();null==a[r]&&this.throwArgumentError("invalid log level name","logLevel",t),s>a[r]||console.log.apply(console,e)}},{key:"debug",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];this._log(t.levels.DEBUG,r)}},{key:"info",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];this._log(t.levels.INFO,r)}},{key:"warn",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];this._log(t.levels.WARNING,r)}},{key:"makeError",value:function(e,r,n){if(i)return this.makeError("censored error",r,{});r||(r=t.errors.UNKNOWN_ERROR),n||(n={});var o=[];Object.keys(n).forEach((function(t){var e=n[t];try{if(e instanceof Uint8Array){for(var r="",i=0;i<e.length;i++)r+=h[e[i]>>4],r+=h[15&e[i]];o.push(t+"=Uint8Array(0x"+r+")")}else o.push(t+"="+JSON.stringify(e))}catch(e){o.push(t+"="+JSON.stringify(n[t].toString()))}})),o.push("code=".concat(r)),o.push("version=".concat(this.version));var a=e,s="";switch(r){case f.NUMERIC_FAULT:s="NUMERIC_FAULT";var u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":s+="-"+u;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case f.CALL_EXCEPTION:case f.INSUFFICIENT_FUNDS:case f.MISSING_NEW:case f.NONCE_EXPIRED:case f.REPLACEMENT_UNDERPRICED:case f.TRANSACTION_REPLACED:case f.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),o.length&&(e+=" ("+o.join(", ")+")");var c=new Error(e);return c.reason=a,c.code=r,Object.keys(n).forEach((function(t){c[t]=n[t]})),c}},{key:"throwError",value:function(t,e,r){throw this.makeError(t,e,r)}},{key:"throwArgumentError",value:function(e,r,n){return this.throwError(e,t.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(t,e,r,n){t||this.throwError(e,r,n)}},{key:"assertArgument",value:function(t,e,r,n){t||this.throwArgumentError(e,r,n)}},{key:"checkNormalize",value:function(e){null==e&&(e="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",t.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}},{key:"checkSafeUint53",value:function(e,r){"number"==typeof e&&(null==r&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}},{key:"checkArgumentCount",value:function(e,r,n){n=n?": "+n:"",e<r&&this.throwError("missing argument"+n,t.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+n,t.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}},{key:"checkNew",value:function(e,r){e!==Object&&null!=e||this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",t.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})}}])&&n(e.prototype,r),c&&n(e,c),Object.defineProperty(e,"prototype",{writable:!1}),t}();p.errors=f,p.levels=c},function(t,e,r){(function(t){function e(t){return(e="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(t,n){"use strict";function o(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===e(t)?t.exports=a:n.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(65).Buffer}catch(t){}function u(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 o(!1,"Invalid character in "+t)}function c(t,e,r){var n=u(t,r);return r-1>=e&&(n|=u(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,a=0,s=Math.min(t.length,r),u=e;u<s;u++){var c=t.charCodeAt(u)-48;i*=n,a=c>=49?c-49+10:c>=17?c-17+10:c,o(c>=0&&a<n,"Invalid character"),i+=a}return i}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(a.isBN=function(t){return t instanceof a||null!==t&&"object"===e(t)&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,r,n){if("number"==typeof t)return this._initNumber(t,r,n);if("object"===e(t))return this._initArray(t,r,n);"hex"===r&&(r=16),o(r===(0|r)&&r>=2&&r<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===r?this._parseHex(t,i,n):(this._parseBase(t,r,i),"le"===n&&this._initArray(this.toArray(),r,n)))},a.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):(o(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(o("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a,s=0;if("be"===r)for(n=t.length-1,i=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(n=0,i=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,i=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)o=c(t,e,n)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)o=c(t,e,n)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this._strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,o=1;o<=67108863;o*=e)n++;n--,o=o/e|0;for(var i=t.length-r,a=i%n,s=Math.min(i,i-a)+r,u=0,c=r;c<s;c+=n)u=f(t,c,c+n,e),this.imuln(o),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=f(t,c,t.length,e),c=0;c<a;c++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype._move=function(t){l(t,this)},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){a.prototype.inspect=h}else a.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var p=["","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"],d=[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],m=[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];a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,i=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<n|i)).toString(16);i=s>>>24-n&16777215,(n+=2)>=26&&(n-=26,a--),r=0!==i||a!==this.length-1?p[6-u.length]+u+r:u+r}for(0!==i&&(r=i.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 c=d[t],f=m[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var h=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?h+r:p[c-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}o(!1,"Base should be between 2 and 36")},a.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&&o(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function v(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var o=0|t.words[0],i=0|e.words[0],a=o*i,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=h;p++){var d=c-p|0;f+=(a=(o=0|t.words[d])*(i=0|e.words[p])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}a.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),i=r||Math.max(1,n);o(n<=i,"byte array longer than desired length"),o(i>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,i);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,n),a},a.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|n;t[r++]=255&a,r<t.length&&(t[r++]=a>>8&255),r<t.length&&(t[r++]=a>>16&255),6===i?(r<t.length&&(t[r++]=a>>24&255),n=0,i=0):(n=a>>>24,i+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},a.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|n;t[r--]=255&a,r>=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===i?(r>=0&&(t[r--]=a>>24&255),n=0,i=0):(n=a>>>24,i+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.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},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.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},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.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()},a.prototype.ior=function(t){return o(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.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()},a.prototype.iand=function(t){return o(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},a.prototype.ixor=function(t){return o(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){o("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()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){o("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},a.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var o=0,i=0;i<n.length;i++)e=(0|r.words[i])+(0|n.words[i])+o,this.words[i]=67108863&e,o=e>>>26;for(;0!==o&&i<r.length;i++)e=(0|r.words[i])+o,this.words[i]=67108863&e,o=e>>>26;if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;i<r.length;i++)this.words[i]=r.words[i];return this},a.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)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,o=this.cmp(t);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a<n.length;a++)i=(e=(0|r.words[a])-(0|n.words[a])+i)>>26,this.words[a]=67108863&e;for(;0!==i&&a<r.length;a++)i=(e=(0|r.words[a])+i)>>26,this.words[a]=67108863&e;if(0===i&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,o,i,a=t.words,s=e.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,p=0|a[1],d=8191&p,m=p>>>13,v=0|a[2],g=8191&v,y=v>>>13,b=0|a[3],w=8191&b,k=b>>>13,_=0|a[4],A=8191&_,E=_>>>13,x=0|a[5],O=8191&x,S=x>>>13,P=0|a[6],R=8191&P,T=P>>>13,j=0|a[7],I=8191&j,N=j>>>13,C=0|a[8],M=8191&C,B=C>>>13,F=0|a[9],D=8191&F,U=F>>>13,L=0|s[0],z=8191&L,q=L>>>13,H=0|s[1],G=8191&H,K=H>>>13,W=0|s[2],Q=8191&W,V=W>>>13,J=0|s[3],Y=8191&J,Z=J>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,ot=0|s[6],it=8191&ot,at=ot>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,pt=0|s[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(l,z))|0)+((8191&(o=(o=Math.imul(l,q))+Math.imul(h,z)|0))<<13)|0;c=((i=Math.imul(h,q))+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(d,z),o=(o=Math.imul(d,q))+Math.imul(m,z)|0,i=Math.imul(m,q);var gt=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(o=(o=o+Math.imul(l,K)|0)+Math.imul(h,G)|0))<<13)|0;c=((i=i+Math.imul(h,K)|0)+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,z),o=(o=Math.imul(g,q))+Math.imul(y,z)|0,i=Math.imul(y,q),n=n+Math.imul(d,G)|0,o=(o=o+Math.imul(d,K)|0)+Math.imul(m,G)|0,i=i+Math.imul(m,K)|0;var yt=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(o=(o=o+Math.imul(l,V)|0)+Math.imul(h,Q)|0))<<13)|0;c=((i=i+Math.imul(h,V)|0)+(o>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(w,z),o=(o=Math.imul(w,q))+Math.imul(k,z)|0,i=Math.imul(k,q),n=n+Math.imul(g,G)|0,o=(o=o+Math.imul(g,K)|0)+Math.imul(y,G)|0,i=i+Math.imul(y,K)|0,n=n+Math.imul(d,Q)|0,o=(o=o+Math.imul(d,V)|0)+Math.imul(m,Q)|0,i=i+Math.imul(m,V)|0;var bt=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(o=(o=o+Math.imul(l,Z)|0)+Math.imul(h,Y)|0))<<13)|0;c=((i=i+Math.imul(h,Z)|0)+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,z),o=(o=Math.imul(A,q))+Math.imul(E,z)|0,i=Math.imul(E,q),n=n+Math.imul(w,G)|0,o=(o=o+Math.imul(w,K)|0)+Math.imul(k,G)|0,i=i+Math.imul(k,K)|0,n=n+Math.imul(g,Q)|0,o=(o=o+Math.imul(g,V)|0)+Math.imul(y,Q)|0,i=i+Math.imul(y,V)|0,n=n+Math.imul(d,Y)|0,o=(o=o+Math.imul(d,Z)|0)+Math.imul(m,Y)|0,i=i+Math.imul(m,Z)|0;var wt=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((i=i+Math.imul(h,tt)|0)+(o>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,z),o=(o=Math.imul(O,q))+Math.imul(S,z)|0,i=Math.imul(S,q),n=n+Math.imul(A,G)|0,o=(o=o+Math.imul(A,K)|0)+Math.imul(E,G)|0,i=i+Math.imul(E,K)|0,n=n+Math.imul(w,Q)|0,o=(o=o+Math.imul(w,V)|0)+Math.imul(k,Q)|0,i=i+Math.imul(k,V)|0,n=n+Math.imul(g,Y)|0,o=(o=o+Math.imul(g,Z)|0)+Math.imul(y,Y)|0,i=i+Math.imul(y,Z)|0,n=n+Math.imul(d,$)|0,o=(o=o+Math.imul(d,tt)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,tt)|0;var kt=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(o=(o=o+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((i=i+Math.imul(h,nt)|0)+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(R,z),o=(o=Math.imul(R,q))+Math.imul(T,z)|0,i=Math.imul(T,q),n=n+Math.imul(O,G)|0,o=(o=o+Math.imul(O,K)|0)+Math.imul(S,G)|0,i=i+Math.imul(S,K)|0,n=n+Math.imul(A,Q)|0,o=(o=o+Math.imul(A,V)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,V)|0,n=n+Math.imul(w,Y)|0,o=(o=o+Math.imul(w,Z)|0)+Math.imul(k,Y)|0,i=i+Math.imul(k,Z)|0,n=n+Math.imul(g,$)|0,o=(o=o+Math.imul(g,tt)|0)+Math.imul(y,$)|0,i=i+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,o=(o=o+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,i=i+Math.imul(m,nt)|0;var _t=(c+(n=n+Math.imul(l,it)|0)|0)+((8191&(o=(o=o+Math.imul(l,at)|0)+Math.imul(h,it)|0))<<13)|0;c=((i=i+Math.imul(h,at)|0)+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,z),o=(o=Math.imul(I,q))+Math.imul(N,z)|0,i=Math.imul(N,q),n=n+Math.imul(R,G)|0,o=(o=o+Math.imul(R,K)|0)+Math.imul(T,G)|0,i=i+Math.imul(T,K)|0,n=n+Math.imul(O,Q)|0,o=(o=o+Math.imul(O,V)|0)+Math.imul(S,Q)|0,i=i+Math.imul(S,V)|0,n=n+Math.imul(A,Y)|0,o=(o=o+Math.imul(A,Z)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,o=(o=o+Math.imul(w,tt)|0)+Math.imul(k,$)|0,i=i+Math.imul(k,tt)|0,n=n+Math.imul(g,rt)|0,o=(o=o+Math.imul(g,nt)|0)+Math.imul(y,rt)|0,i=i+Math.imul(y,nt)|0,n=n+Math.imul(d,it)|0,o=(o=o+Math.imul(d,at)|0)+Math.imul(m,it)|0,i=i+Math.imul(m,at)|0;var At=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(o=(o=o+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((i=i+Math.imul(h,ct)|0)+(o>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,z),o=(o=Math.imul(M,q))+Math.imul(B,z)|0,i=Math.imul(B,q),n=n+Math.imul(I,G)|0,o=(o=o+Math.imul(I,K)|0)+Math.imul(N,G)|0,i=i+Math.imul(N,K)|0,n=n+Math.imul(R,Q)|0,o=(o=o+Math.imul(R,V)|0)+Math.imul(T,Q)|0,i=i+Math.imul(T,V)|0,n=n+Math.imul(O,Y)|0,o=(o=o+Math.imul(O,Z)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,tt)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,o=(o=o+Math.imul(w,nt)|0)+Math.imul(k,rt)|0,i=i+Math.imul(k,nt)|0,n=n+Math.imul(g,it)|0,o=(o=o+Math.imul(g,at)|0)+Math.imul(y,it)|0,i=i+Math.imul(y,at)|0,n=n+Math.imul(d,ut)|0,o=(o=o+Math.imul(d,ct)|0)+Math.imul(m,ut)|0,i=i+Math.imul(m,ct)|0;var Et=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(o=(o=o+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((i=i+Math.imul(h,ht)|0)+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(D,z),o=(o=Math.imul(D,q))+Math.imul(U,z)|0,i=Math.imul(U,q),n=n+Math.imul(M,G)|0,o=(o=o+Math.imul(M,K)|0)+Math.imul(B,G)|0,i=i+Math.imul(B,K)|0,n=n+Math.imul(I,Q)|0,o=(o=o+Math.imul(I,V)|0)+Math.imul(N,Q)|0,i=i+Math.imul(N,V)|0,n=n+Math.imul(R,Y)|0,o=(o=o+Math.imul(R,Z)|0)+Math.imul(T,Y)|0,i=i+Math.imul(T,Z)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,tt)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,tt)|0,n=n+Math.imul(A,rt)|0,o=(o=o+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,i=i+Math.imul(E,nt)|0,n=n+Math.imul(w,it)|0,o=(o=o+Math.imul(w,at)|0)+Math.imul(k,it)|0,i=i+Math.imul(k,at)|0,n=n+Math.imul(g,ut)|0,o=(o=o+Math.imul(g,ct)|0)+Math.imul(y,ut)|0,i=i+Math.imul(y,ct)|0,n=n+Math.imul(d,lt)|0,o=(o=o+Math.imul(d,ht)|0)+Math.imul(m,lt)|0,i=i+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(l,dt)|0)|0)+((8191&(o=(o=o+Math.imul(l,mt)|0)+Math.imul(h,dt)|0))<<13)|0;c=((i=i+Math.imul(h,mt)|0)+(o>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,G),o=(o=Math.imul(D,K))+Math.imul(U,G)|0,i=Math.imul(U,K),n=n+Math.imul(M,Q)|0,o=(o=o+Math.imul(M,V)|0)+Math.imul(B,Q)|0,i=i+Math.imul(B,V)|0,n=n+Math.imul(I,Y)|0,o=(o=o+Math.imul(I,Z)|0)+Math.imul(N,Y)|0,i=i+Math.imul(N,Z)|0,n=n+Math.imul(R,$)|0,o=(o=o+Math.imul(R,tt)|0)+Math.imul(T,$)|0,i=i+Math.imul(T,tt)|0,n=n+Math.imul(O,rt)|0,o=(o=o+Math.imul(O,nt)|0)+Math.imul(S,rt)|0,i=i+Math.imul(S,nt)|0,n=n+Math.imul(A,it)|0,o=(o=o+Math.imul(A,at)|0)+Math.imul(E,it)|0,i=i+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,o=(o=o+Math.imul(w,ct)|0)+Math.imul(k,ut)|0,i=i+Math.imul(k,ct)|0,n=n+Math.imul(g,lt)|0,o=(o=o+Math.imul(g,ht)|0)+Math.imul(y,lt)|0,i=i+Math.imul(y,ht)|0;var Ot=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(o=(o=o+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;c=((i=i+Math.imul(m,mt)|0)+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,Q),o=(o=Math.imul(D,V))+Math.imul(U,Q)|0,i=Math.imul(U,V),n=n+Math.imul(M,Y)|0,o=(o=o+Math.imul(M,Z)|0)+Math.imul(B,Y)|0,i=i+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,o=(o=o+Math.imul(I,tt)|0)+Math.imul(N,$)|0,i=i+Math.imul(N,tt)|0,n=n+Math.imul(R,rt)|0,o=(o=o+Math.imul(R,nt)|0)+Math.imul(T,rt)|0,i=i+Math.imul(T,nt)|0,n=n+Math.imul(O,it)|0,o=(o=o+Math.imul(O,at)|0)+Math.imul(S,it)|0,i=i+Math.imul(S,at)|0,n=n+Math.imul(A,ut)|0,o=(o=o+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,i=i+Math.imul(E,ct)|0,n=n+Math.imul(w,lt)|0,o=(o=o+Math.imul(w,ht)|0)+Math.imul(k,lt)|0,i=i+Math.imul(k,ht)|0;var St=(c+(n=n+Math.imul(g,dt)|0)|0)+((8191&(o=(o=o+Math.imul(g,mt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((i=i+Math.imul(y,mt)|0)+(o>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(D,Y),o=(o=Math.imul(D,Z))+Math.imul(U,Y)|0,i=Math.imul(U,Z),n=n+Math.imul(M,$)|0,o=(o=o+Math.imul(M,tt)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,tt)|0,n=n+Math.imul(I,rt)|0,o=(o=o+Math.imul(I,nt)|0)+Math.imul(N,rt)|0,i=i+Math.imul(N,nt)|0,n=n+Math.imul(R,it)|0,o=(o=o+Math.imul(R,at)|0)+Math.imul(T,it)|0,i=i+Math.imul(T,at)|0,n=n+Math.imul(O,ut)|0,o=(o=o+Math.imul(O,ct)|0)+Math.imul(S,ut)|0,i=i+Math.imul(S,ct)|0,n=n+Math.imul(A,lt)|0,o=(o=o+Math.imul(A,ht)|0)+Math.imul(E,lt)|0,i=i+Math.imul(E,ht)|0;var Pt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(o=(o=o+Math.imul(w,mt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((i=i+Math.imul(k,mt)|0)+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(D,$),o=(o=Math.imul(D,tt))+Math.imul(U,$)|0,i=Math.imul(U,tt),n=n+Math.imul(M,rt)|0,o=(o=o+Math.imul(M,nt)|0)+Math.imul(B,rt)|0,i=i+Math.imul(B,nt)|0,n=n+Math.imul(I,it)|0,o=(o=o+Math.imul(I,at)|0)+Math.imul(N,it)|0,i=i+Math.imul(N,at)|0,n=n+Math.imul(R,ut)|0,o=(o=o+Math.imul(R,ct)|0)+Math.imul(T,ut)|0,i=i+Math.imul(T,ct)|0,n=n+Math.imul(O,lt)|0,o=(o=o+Math.imul(O,ht)|0)+Math.imul(S,lt)|0,i=i+Math.imul(S,ht)|0;var Rt=(c+(n=n+Math.imul(A,dt)|0)|0)+((8191&(o=(o=o+Math.imul(A,mt)|0)+Math.imul(E,dt)|0))<<13)|0;c=((i=i+Math.imul(E,mt)|0)+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,rt),o=(o=Math.imul(D,nt))+Math.imul(U,rt)|0,i=Math.imul(U,nt),n=n+Math.imul(M,it)|0,o=(o=o+Math.imul(M,at)|0)+Math.imul(B,it)|0,i=i+Math.imul(B,at)|0,n=n+Math.imul(I,ut)|0,o=(o=o+Math.imul(I,ct)|0)+Math.imul(N,ut)|0,i=i+Math.imul(N,ct)|0,n=n+Math.imul(R,lt)|0,o=(o=o+Math.imul(R,ht)|0)+Math.imul(T,lt)|0,i=i+Math.imul(T,ht)|0;var Tt=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(o=(o=o+Math.imul(O,mt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((i=i+Math.imul(S,mt)|0)+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,it),o=(o=Math.imul(D,at))+Math.imul(U,it)|0,i=Math.imul(U,at),n=n+Math.imul(M,ut)|0,o=(o=o+Math.imul(M,ct)|0)+Math.imul(B,ut)|0,i=i+Math.imul(B,ct)|0,n=n+Math.imul(I,lt)|0,o=(o=o+Math.imul(I,ht)|0)+Math.imul(N,lt)|0,i=i+Math.imul(N,ht)|0;var jt=(c+(n=n+Math.imul(R,dt)|0)|0)+((8191&(o=(o=o+Math.imul(R,mt)|0)+Math.imul(T,dt)|0))<<13)|0;c=((i=i+Math.imul(T,mt)|0)+(o>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(D,ut),o=(o=Math.imul(D,ct))+Math.imul(U,ut)|0,i=Math.imul(U,ct),n=n+Math.imul(M,lt)|0,o=(o=o+Math.imul(M,ht)|0)+Math.imul(B,lt)|0,i=i+Math.imul(B,ht)|0;var It=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(o=(o=o+Math.imul(I,mt)|0)+Math.imul(N,dt)|0))<<13)|0;c=((i=i+Math.imul(N,mt)|0)+(o>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,lt),o=(o=Math.imul(D,ht))+Math.imul(U,lt)|0,i=Math.imul(U,ht);var Nt=(c+(n=n+Math.imul(M,dt)|0)|0)+((8191&(o=(o=o+Math.imul(M,mt)|0)+Math.imul(B,dt)|0))<<13)|0;c=((i=i+Math.imul(B,mt)|0)+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var Ct=(c+(n=Math.imul(D,dt))|0)+((8191&(o=(o=Math.imul(D,mt))+Math.imul(U,dt)|0))<<13)|0;return c=((i=Math.imul(U,mt))+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,u[0]=vt,u[1]=gt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=kt,u[6]=_t,u[7]=At,u[8]=Et,u[9]=xt,u[10]=Ot,u[11]=St,u[12]=Pt,u[13]=Rt,u[14]=Tt,u[15]=jt,u[16]=It,u[17]=Nt,u[18]=Ct,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,o=0,i=0;i<r.length-1;i++){var a=o;o=0;for(var s=67108863&n,u=Math.min(i,e.length-1),c=Math.max(0,i-t.length+1);c<=u;c++){var f=i-c,l=(0|t.words[f])*(0|e.words[c]),h=67108863&l;s=67108863&(h=h+s|0),o+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[i]=s,n=a,a=o}return 0!==n?r.words[i]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function w(t,e){this.x=t,this.y=e}Math.imul||(g=v),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?v(this,t,e):r<1024?y(this,t,e):b(this,t,e)},w.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},w.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,o=0;o<e;o++)n|=(1&t)<<e-o-1,t>>=1;return n},w.prototype.permute=function(t,e,r,n,o,i){for(var a=0;a<i;a++)n[a]=e[t[a]],o[a]=r[t[a]]},w.prototype.transform=function(t,e,r,n,o,i){this.permute(i,t,e,r,n,o);for(var a=1;a<o;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<o;f+=s)for(var l=u,h=c,p=0;p<a;p++){var d=r[f+p],m=n[f+p],v=r[f+p+a],g=n[f+p+a],y=l*v-h*g;g=l*g+h*v,v=y,r[f+p]=d+v,n[f+p]=m+g,r[f+p+a]=d-v,n[f+p+a]=m-g,p!==s&&(y=u*l-c*h,h=u*h+c*l,l=y)}},w.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,o=0;for(r=r/2|0;r;r>>>=1)o++;return 1<<o+1+n},w.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var o=t[n];t[n]=t[r-n-1],t[r-n-1]=o,o=e[n],e[n]=-e[r-n-1],e[r-n-1]=-o}},w.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var o=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&o,r=o<67108864?0:o/67108864|0}return t},w.prototype.convert13b=function(t,e,r,n){for(var i=0,a=0;a<e;a++)i+=0|t[a],r[2*a]=8191&i,i>>>=13,r[2*a+1]=8191&i,i>>>=13;for(a=2*e;a<n;++a)r[a]=0;o(0===i),o(0==(-8192&i))},w.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},w.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),o=this.makeRBT(n),i=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,c,n),this.transform(a,i,s,u,n,o),this.transform(c,i,f,l,n,o);for(var p=0;p<n;p++){var d=s[p]*f[p]-u[p]*l[p];u[p]=s[p]*l[p]+u[p]*f[p],s[p]=d}return this.conjugate(s,u,n),this.transform(s,u,h,i,n,o),this.conjugate(h,i,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),b(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){var e=t<0;e&&(t=-t),o("number"==typeof t),o(t<67108864);for(var r=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,a=(67108863&i)+(67108863&r);r>>=26,r+=i/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,o=r%26;e[r]=t.words[n]>>>o&1}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var o=r.sqr();n<e.length;n++,o=o.sqr())0!==e[n]&&(r=r.mul(o));return r},a.prototype.iushln=function(t){o("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&i,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>26-r}a&&(this.words[e]=a,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()},a.prototype.ishln=function(t){return o(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;o("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var i=t%26,a=Math.min((t-i)/26,this.length),s=67108863^67108863>>>i<<i,u=r;if(n-=a,n=Math.max(0,n),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=n);c--){var l=0|this.words[c];this.words[c]=f<<26-i|l>>>i,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,r){return o(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){o("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r)&&!!(this.words[r]&n)},a.prototype.imaskn=function(t){o("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(o(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return o("number"==typeof t),o(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.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},a.prototype.isubn=function(t){if(o("number"==typeof t),o(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()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,i,a=t.length+r;this._expand(a);var s=0;for(n=0;n<t.length;n++){i=(0|this.words[n+r])+s;var u=(0|t.words[n])*e;s=((i-=67108863&u)>>26)-(u/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(o(-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()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),o=t,i=0|o.words[o.length-1];0!==(r=26-this._countBits(i))&&(o=o.ushln(r),n.iushln(r),i=0|o.words[o.length-1]);var s,u=n.length-o.length;if("mod"!==e){(s=new a(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(o,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[o.length+l])+(0|n.words[o.length+l-1]);for(h=Math.min(h/i|0,67108863),n._ishlnsubmul(o,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(o,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return o(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(i=s.mod.neg(),r&&0!==i.negative&&i.iadd(t)),{div:n,mod:i}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(i=s.mod.neg(),r&&0!==i.negative&&i.isub(t)),{div:s.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,i,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.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),o=t.andln(1),i=r.cmp(n);return i<0||1===o&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),o(t<=67108863);for(var r=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(r*n+(0|this.words[i]))%t;return e?-n:n},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),o(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},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){o(0===t.negative),o(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),i=new a(0),s=new a(0),u=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(f),i.isub(l)),n.iushrn(1),i.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),i.isub(u)):(r.isub(e),s.isub(n),u.isub(i))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(t){o(0===t.negative),o(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,i=new a(1),s=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(u),i.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s)):(r.isub(e),s.isub(i))}return(n=0===e.cmpn(1)?i:s).cmpn(0)<0&&n.iadd(t),n},a.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 o=e.cmp(r);if(o<0){var i=e;e=r,r=i}else if(0===o||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){o("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,a=r;0!==i&&a<this.length;a++){var s=0|this.words[a];i=(s+=i)>>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.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),o(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},a.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},a.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],o=0|t.words[r];if(n!==o){n<o?e=-1:n>o&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return o(!this.red,"Already a number in reduction context"),o(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return o(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return o(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var k={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else o(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function P(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}_.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.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},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(A,_),A.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)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=4194303&o,n=10;n<t.length;n++){var i=0|t.words[n];t.words[n-10]=(4194303&i)<<4|o>>>22,o=i}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.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},i(E,_),i(x,_),i(O,_),O.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,o=67108863&n;n>>>=26,t.words[r]=o,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(k[t])return k[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new E;else if("p192"===t)e=new x;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new O}return k[t]=e,e},S.prototype._verify1=function(t){o(0===t.negative,"red works only with positives"),o(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){o(0==(t.negative|e.negative),"red works only with positives"),o(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.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)},S.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},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(o(e%2==1),3===e){var r=this.m.add(new a(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);o(!n.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,n),h=this.pow(t,n.addn(1).iushrn(1)),p=this.pow(t,n),d=i;0!==p.cmp(s);){for(var m=p,v=0;0!==m.cmp(s);v++)m=m.redSqr();o(v<d);var g=this.pow(l,new a(1).iushln(d-v-1));h=h.redMul(g),l=g.redSqr(),p=p.redMul(l),d=v}return h},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var o=r[0],i=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===n&&0===f)&&(o=this.mul(o,r[i]),s=0,i=0)):s=0}u=26}return o},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new P(t)},i(P,S),P.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},P.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},P.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),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},P.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},P.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(8)(t))},,function(t,e,r){var n=e;n.utils=r(7),n.common=r(13),n.sha=r(67),n.ripemd=r(71),n.hmac=r(72),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},,function(t,e,r){"use strict";!function(e){function r(t){return parseInt(t)===t}function n(t){if(!r(t.length))return!1;for(var e=0;e<t.length;e++)if(!r(t[e])||t[e]<0||t[e]>255)return!1;return!0}function o(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!n(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&n(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function i(t){return new Uint8Array(t)}function a(t,e,r,n,o){null==n&&null==o||(t=t.slice?t.slice(n,o):Array.prototype.slice.call(t,n,o)),e.set(t,r)}var s,u={toBytes:function(t){var e=[],r=0;for(t=encodeURI(t);r<t.length;){var n=t.charCodeAt(r++);37===n?(e.push(parseInt(t.substr(r,2),16)),r+=2):e.push(n)}return o(e)},fromBytes:function(t){for(var e=[],r=0;r<t.length;){var n=t[r];n<128?(e.push(String.fromCharCode(n)),r++):n>191&&n<224?(e.push(String.fromCharCode((31&n)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&n)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}},c=(s="0123456789abcdef",{toBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},fromBytes:function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(s[(240&n)>>4]+s[15&n])}return e.join("")}}),f={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],d=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],m=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],v=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],y=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],b=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],k=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],_=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],x=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function O(t){for(var e=[],r=0;r<t.length;r+=4)e.push(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]);return e}var S=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:o(e,!0)}),this._prepare()};S.prototype._prepare=function(){var t=f[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var e=0;e<=t;e++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var r,n=4*(t+1),o=this.key.length/4,i=O(this.key);for(e=0;e<o;e++)r=e>>2,this._Ke[r][e%4]=i[e],this._Kd[t-r][e%4]=i[e];for(var a,s=0,u=o;u<n;){if(a=i[o-1],i[0]^=h[a>>16&255]<<24^h[a>>8&255]<<16^h[255&a]<<8^h[a>>24&255]^l[s]<<24,s+=1,8!=o)for(e=1;e<o;e++)i[e]^=i[e-1];else{for(e=1;e<o/2;e++)i[e]^=i[e-1];a=i[o/2-1],i[o/2]^=h[255&a]^h[a>>8&255]<<8^h[a>>16&255]<<16^h[a>>24&255]<<24;for(e=o/2+1;e<o;e++)i[e]^=i[e-1]}for(e=0;e<o&&u<n;)c=u>>2,p=u%4,this._Ke[c][p]=i[e],this._Kd[t-c][p]=i[e++],u++}for(var c=1;c<t;c++)for(var p=0;p<4;p++)a=this._Kd[c][p],this._Kd[c][p]=_[a>>24&255]^A[a>>16&255]^E[a>>8&255]^x[255&a]},S.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],n=O(t),o=0;o<4;o++)n[o]^=this._Ke[0][o];for(var a=1;a<e;a++){for(o=0;o<4;o++)r[o]=d[n[o]>>24&255]^m[n[(o+1)%4]>>16&255]^v[n[(o+2)%4]>>8&255]^g[255&n[(o+3)%4]]^this._Ke[a][o];n=r.slice()}var s,u=i(16);for(o=0;o<4;o++)s=this._Ke[e][o],u[4*o]=255&(h[n[o]>>24&255]^s>>24),u[4*o+1]=255&(h[n[(o+1)%4]>>16&255]^s>>16),u[4*o+2]=255&(h[n[(o+2)%4]>>8&255]^s>>8),u[4*o+3]=255&(h[255&n[(o+3)%4]]^s);return u},S.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],n=O(t),o=0;o<4;o++)n[o]^=this._Kd[0][o];for(var a=1;a<e;a++){for(o=0;o<4;o++)r[o]=y[n[o]>>24&255]^b[n[(o+3)%4]>>16&255]^w[n[(o+2)%4]>>8&255]^k[255&n[(o+1)%4]]^this._Kd[a][o];n=r.slice()}var s,u=i(16);for(o=0;o<4;o++)s=this._Kd[e][o],u[4*o]=255&(p[n[o]>>24&255]^s>>24),u[4*o+1]=255&(p[n[(o+3)%4]>>16&255]^s>>16),u[4*o+2]=255&(p[n[(o+2)%4]>>8&255]^s>>8),u[4*o+3]=255&(p[255&n[(o+1)%4]]^s);return u};var P=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(e)};P.prototype.encrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=i(t.length),r=i(16),n=0;n<t.length;n+=16)a(t,r,0,n,n+16),a(r=this._aes.encrypt(r),e,n);return e},P.prototype.decrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=i(t.length),r=i(16),n=0;n<t.length;n+=16)a(t,r,0,n,n+16),a(r=this._aes.decrypt(r),e,n);return e};var R=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=i(16);this._lastCipherblock=o(r,!0),this._aes=new S(e)};R.prototype.encrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=i(t.length),r=i(16),n=0;n<t.length;n+=16){a(t,r,0,n,n+16);for(var s=0;s<16;s++)r[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(r),a(this._lastCipherblock,e,n)}return e},R.prototype.decrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=i(t.length),r=i(16),n=0;n<t.length;n+=16){a(t,r,0,n,n+16),r=this._aes.decrypt(r);for(var s=0;s<16;s++)e[n+s]=r[s]^this._lastCipherblock[s];a(t,this._lastCipherblock,0,n,n+16)}return e};var T=function t(e,r,n){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 size)")}else r=i(16);n||(n=1),this.segmentSize=n,this._shiftRegister=o(r,!0),this._aes=new S(e)};T.prototype.encrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var e,r=o(t,!0),n=0;n<r.length;n+=this.segmentSize){e=this._aes.encrypt(this._shiftRegister);for(var i=0;i<this.segmentSize;i++)r[n+i]^=e[i];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(r,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r},T.prototype.decrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var e,r=o(t,!0),n=0;n<r.length;n+=this.segmentSize){e=this._aes.encrypt(this._shiftRegister);for(var i=0;i<this.segmentSize;i++)r[n+i]^=e[i];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(t,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r};var j=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=i(16);this._lastPrecipher=o(r,!0),this._lastPrecipherIndex=16,this._aes=new S(e)};j.prototype.encrypt=function(t){for(var e=o(t,!0),r=0;r<e.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),e[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return e},j.prototype.decrypt=j.prototype.encrypt;var I=function t(e){if(!(this instanceof t))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=i(16),this.setValue(e)):this.setBytes(e)};I.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");for(var e=15;e>=0;--e)this._counter[e]=t%256,t>>=8},I.prototype.setBytes=function(t){if(16!=(t=o(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},I.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var N=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",r instanceof I||(r=new I(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(e)};N.prototype.encrypt=function(t){for(var e=o(t,!0),r=0;r<e.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),e[r]^=this._remainingCounter[this._remainingCounterIndex++];return e},N.prototype.decrypt=N.prototype.encrypt;var C={AES:S,Counter:I,ModeOfOperation:{ecb:P,cbc:R,cfb:T,ofb:j,ctr:N},utils:{hex:c,utf8:u},padding:{pkcs7:{pad:function(t){var e=16-(t=o(t,!0)).length%16,r=i(t.length+e);a(t,r);for(var n=t.length;n<r.length;n++)r[n]=e;return r},strip:function(t){if((t=o(t,!0)).length<16)throw new Error("PKCS#7 invalid length");var e=t[t.length-1];if(e>16)throw new Error("PKCS#7 padding byte out of range");for(var r=t.length-e,n=0;n<e;n++)if(t[r+n]!==e)throw new Error("PKCS#7 invalid padding byte");var s=i(r);return a(t,s,0,0,r),s}}},_arrayTest:{coerceArray:o,createArray:i,copyArray:a}};t.exports=C}()},function(t,e,r){"use strict";var n=r(12),o=r(66);function i(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=o,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),o=0;o<t.length;o+=2)r.push(parseInt(t[o]+t[o+1],16))}else for(var n=0,o=0;o<t.length;o++){var a=t.charCodeAt(o);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):i(t,o)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++o)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(o=0;o<t.length;o++)r[o]=0|t[o];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=s(t[r].toString(16));return e},e.htonl=a,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var o=t[n];"little"===e&&(o=a(o)),r+=u(o.toString(16))}return r},e.zero2=s,e.zero8=u,e.join32=function(t,e,r,o){var i=r-e;n(i%4==0);for(var a=new Array(i/4),s=0,u=e;s<a.length;s++,u+=4){var c;c="big"===o?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],a[s]=c>>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,o=0;n<t.length;n++,o+=4){var i=t[n];"big"===e?(r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=255&i):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=255&i)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,o){return t+e+r+n+o>>>0},e.sum64=function(t,e,r,n){var o=t[e],i=n+t[e+1]>>>0,a=(i<n?1:0)+r+o;t[e]=a>>>0,t[e+1]=i},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,o,i,a,s){var u=0,c=e;return u+=(c=c+n>>>0)<e?1:0,u+=(c=c+i>>>0)<i?1:0,t+r+o+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,o,i,a,s){return e+n+i+s>>>0},e.sum64_5_hi=function(t,e,r,n,o,i,a,s,u,c){var f=0,l=e;return f+=(l=l+n>>>0)<e?1:0,f+=(l=l+i>>>0)<i?1:0,f+=(l=l+s>>>0)<s?1:0,t+r+o+a+u+(f+=(l=l+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,o,i,a,s,u,c){return e+n+i+s+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":r(window))&&(n=window)}t.exports=n},,,function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){"use strict";var n=r(7),o=r(12);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=i,i.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var o=0;o<t.length;o+=this._delta32)this._update(t,o,o+this._delta32)}return this},i.prototype.digest=function(t){return this.update(this._pad()),o(null===this.pending),this._digest(t)},i.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var o=1;o<r;o++)n[o]=0;if(t<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=t>>>24&255,n[o++]=t>>>16&255,n[o++]=t>>>8&255,n[o++]=255&t}else for(n[o++]=255&t,n[o++]=t>>>8&255,n[o++]=t>>>16&255,n[o++]=t>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,i=8;i<this.padLength;i++)n[o++]=0;return n}},function(t,e,r){"use strict";(function(e){!function(r){function n(t){var e=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]),r=1779033703,n=3144134277,o=1013904242,i=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225,f=new Uint32Array(64);function l(t){for(var l=0,h=t.length;h>=64;){var p=r,d=n,m=o,v=i,g=a,y=s,b=u,w=c,k=void 0,_=void 0,A=void 0,E=void 0,x=void 0;for(_=0;_<16;_++)A=l+4*_,f[_]=(255&t[A])<<24|(255&t[A+1])<<16|(255&t[A+2])<<8|255&t[A+3];for(_=16;_<64;_++)E=((k=f[_-2])>>>17|k<<15)^(k>>>19|k<<13)^k>>>10,x=((k=f[_-15])>>>7|k<<25)^(k>>>18|k<<14)^k>>>3,f[_]=(E+f[_-7]|0)+(x+f[_-16]|0)|0;for(_=0;_<64;_++)E=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&b)|0)+(w+(e[_]+f[_]|0)|0)|0,x=((p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10))+(p&d^p&m^d&m)|0,w=b,b=y,y=g,g=v+E|0,v=m,m=d,d=p,p=E+x|0;r=r+p|0,n=n+d|0,o=o+m|0,i=i+v|0,a=a+g|0,s=s+y|0,u=u+b|0,c=c+w|0,l+=64,h-=64}}l(t);var h,p=t.length%64,d=t.length/536870912|0,m=t.length<<3,v=p<56?56:120,g=t.slice(t.length-p,t.length);for(g.push(128),h=p+1;h<v;h++)g.push(0);return g.push(d>>>24&255),g.push(d>>>16&255),g.push(d>>>8&255),g.push(d>>>0&255),g.push(m>>>24&255),g.push(m>>>16&255),g.push(m>>>8&255),g.push(m>>>0&255),l(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function o(t,e,r){t=t.length<=64?t:n(t);var o,i=64+e.length+4,a=new Array(i),s=new Array(64),u=[];for(o=0;o<64;o++)a[o]=54;for(o=0;o<t.length;o++)a[o]^=t[o];for(o=0;o<e.length;o++)a[64+o]=e[o];for(o=i-4;o<i;o++)a[o]=0;for(o=0;o<64;o++)s[o]=92;for(o=0;o<t.length;o++)s[o]^=t[o];function c(){for(var t=i-1;t>=i-4;t--){if(a[t]++,a[t]<=255)return;a[t]=0}}for(;r>=32;)c(),u=u.concat(n(s.concat(n(a)))),r-=32;return r>0&&(c(),u=u.concat(n(s.concat(n(a))).slice(0,r))),u}function i(t,e,r,n,o){var i;for(c(t,16*(2*r-1),o,0,16),i=0;i<2*r;i++)u(t,16*i,o,16),s(o,n),c(o,0,t,e+16*i,16);for(i=0;i<r;i++)c(t,e+2*i*16,t,16*i,16);for(i=0;i<r;i++)c(t,e+16*(2*i+1),t,16*(i+r),16)}function a(t,e){return t<<e|t>>>32-e}function s(t,e){c(t,0,e,0,16);for(var r=8;r>0;r-=2)e[4]^=a(e[0]+e[12],7),e[8]^=a(e[4]+e[0],9),e[12]^=a(e[8]+e[4],13),e[0]^=a(e[12]+e[8],18),e[9]^=a(e[5]+e[1],7),e[13]^=a(e[9]+e[5],9),e[1]^=a(e[13]+e[9],13),e[5]^=a(e[1]+e[13],18),e[14]^=a(e[10]+e[6],7),e[2]^=a(e[14]+e[10],9),e[6]^=a(e[2]+e[14],13),e[10]^=a(e[6]+e[2],18),e[3]^=a(e[15]+e[11],7),e[7]^=a(e[3]+e[15],9),e[11]^=a(e[7]+e[3],13),e[15]^=a(e[11]+e[7],18),e[1]^=a(e[0]+e[3],7),e[2]^=a(e[1]+e[0],9),e[3]^=a(e[2]+e[1],13),e[0]^=a(e[3]+e[2],18),e[6]^=a(e[5]+e[4],7),e[7]^=a(e[6]+e[5],9),e[4]^=a(e[7]+e[6],13),e[5]^=a(e[4]+e[7],18),e[11]^=a(e[10]+e[9],7),e[8]^=a(e[11]+e[10],9),e[9]^=a(e[8]+e[11],13),e[10]^=a(e[9]+e[8],18),e[12]^=a(e[15]+e[14],7),e[13]^=a(e[12]+e[15],9),e[14]^=a(e[13]+e[12],13),e[15]^=a(e[14]+e[13],18);for(var n=0;n<16;++n)t[n]+=e[n]}function u(t,e,r,n){for(var o=0;o<n;o++)r[o]^=t[e+o]}function c(t,e,r,n,o){for(;o--;)r[n++]=t[e++]}function f(t){if(!t||"number"!=typeof t.length)return!1;for(var e=0;e<t.length;e++){var r=t[e];if("number"!=typeof r||r%1||r<0||r>=256)return!1}return!0}function l(t,e){if("number"!=typeof t||t%1)throw new Error("invalid "+e);return t}function h(t,r,n,a,s,h,p){if(n=l(n,"N"),a=l(a,"r"),s=l(s,"p"),h=l(h,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>2147483647/128/a)throw new Error("N too large");if(a>2147483647/128/s)throw new Error("r too large");if(!f(t))throw new Error("password must be an array or buffer");if(t=Array.prototype.slice.call(t),!f(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var d=o(t,r,128*s*a),m=new Uint32Array(32*s*a),v=0;v<m.length;v++){var g=4*v;m[v]=(255&d[g+3])<<24|(255&d[g+2])<<16|(255&d[g+1])<<8|(255&d[g+0])<<0}var y,b,w=new Uint32Array(64*a),k=new Uint32Array(32*a*n),_=32*a,A=new Uint32Array(16),E=new Uint32Array(16),x=s*n*2,O=0,S=null,P=!1,R=0,T=0,j=p?parseInt(1e3/a):4294967295,I=void 0!==e?e:setTimeout,N=function e(){if(P)return p(new Error("cancelled"),O/x);var r;switch(R){case 0:c(m,b=32*T*a,w,0,_),R=1,y=0;case 1:(r=n-y)>j&&(r=j);for(var f=0;f<r;f++)c(w,0,k,(y+f)*_,_),i(w,_,a,A,E);if(y+=r,O+=r,p){var l=parseInt(1e3*O/x);if(l!==S){if(P=p(null,O/x))break;S=l}}if(y<n)break;y=0,R=2;case 2:(r=n-y)>j&&(r=j);for(var v=0;v<r;v++){var g=w[16*(2*a-1)]&n-1;u(k,g*_,w,_),i(w,_,a,A,E)}if(y+=r,O+=r,p){var N=parseInt(1e3*O/x);if(N!==S){if(P=p(null,O/x))break;S=N}}if(y<n)break;if(c(w,0,m,b,_),++T<s){R=0;break}d=[];for(var C=0;C<m.length;C++)d.push(m[C]>>0&255),d.push(m[C]>>8&255),d.push(m[C]>>16&255),d.push(m[C]>>24&255);var M=o(t,d,h);return p&&p(null,1,M),M}p&&I(e)};if(!p)for(;;){var C=N();if(null!=C)return C}N()}var p={scrypt:function(t,e,r,n,o,i,a){return new Promise((function(s,u){var c=0;a&&a(0),h(t,e,r,n,o,i,(function(t,e,r){if(t)u(t);else if(r)a&&1!==c&&a(1),s(new Uint8Array(r));else if(a&&e!==c)return c=e,a(e)}))}))},syncScrypt:function(t,e,r,n,o,i){return new Uint8Array(h(t,e,r,n,o,i))}};t.exports=p}()}).call(this,r(73).setImmediate)},,function(t,e,r){"use strict";(function(t){
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=35)}([function(t,e,r){"use strict";r.d(e,"k",(function(){return a})),r.d(e,"j",(function(){return u})),r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return f})),r.d(e,"o",(function(){return l})),r.d(e,"p",(function(){return h})),r.d(e,"l",(function(){return p})),r.d(e,"i",(function(){return d})),r.d(e,"d",(function(){return m})),r.d(e,"e",(function(){return y})),r.d(e,"c",(function(){return v})),r.d(e,"g",(function(){return g})),r.d(e,"f",(function(){return b})),r.d(e,"h",(function(){return w})),r.d(e,"n",(function(){return _})),r.d(e,"m",(function(){return k}));var n=new(r(1).b)("bytes/5.7.0");function o(t){return!!t.toHexString}function i(t){return t.slice||(t.slice=function(){var e=Array.prototype.slice.call(arguments);return i(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function a(t){return p(t)&&!(t.length%2)||u(t)}function s(t){return"number"==typeof t&&t==t&&t%1==0}function u(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t)return!1;if(!s(t.length)||t.length<0)return!1;for(var e=0;e<t.length;e++){var r=t[e];if(!s(r)||r<0||r>=256)return!1}return!0}function c(t,e){if(e||(e={}),"number"==typeof t){n.checkSafeUint53(t,"invalid arrayify value");for(var r=[];t;)r.unshift(255&t),t=parseInt(String(t/256));return 0===r.length&&r.push(0),i(new Uint8Array(r))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),o(t)&&(t=t.toHexString()),p(t)){var a=t.substring(2);a.length%2&&("left"===e.hexPad?a="0"+a:"right"===e.hexPad?a+="0":n.throwArgumentError("hex data is odd-length","value",t));for(var s=[],c=0;c<a.length;c+=2)s.push(parseInt(a.substring(c,c+2),16));return i(new Uint8Array(s))}return u(t)?i(new Uint8Array(t)):n.throwArgumentError("invalid arrayify value","value",t)}function f(t){var e=t.map((function(t){return c(t)})),r=e.reduce((function(t,e){return t+e.length}),0),n=new Uint8Array(r);return e.reduce((function(t,e){return n.set(e,t),t+e.length}),0),i(n)}function l(t){var e=c(t);if(0===e.length)return e;for(var r=0;r<e.length&&0===e[r];)r++;return r&&(e=e.slice(r)),e}function h(t,e){(t=c(t)).length>e&&n.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(e);return r.set(t,e-t.length),i(r)}function p(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}function d(t,e){if(e||(e={}),"number"==typeof t){n.checkSafeUint53(t,"invalid hexlify value");for(var r="";t;)r="0123456789abcdef"[15&t]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),o(t))return t.toHexString();if(p(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":n.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(u(t)){for(var i="0x",a=0;a<t.length;a++){var s=t[a];i+="0123456789abcdef"[(240&s)>>4]+"0123456789abcdef"[15&s]}return i}return n.throwArgumentError("invalid hexlify value","value",t)}function m(t){if("string"!=typeof t)t=d(t);else if(!p(t)||t.length%2)return null;return(t.length-2)/2}function y(t,e,r){return"string"!=typeof t?t=d(t):(!p(t)||t.length%2)&&n.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function v(t){var e="0x";return t.forEach((function(t){e+=d(t).substring(2)})),e}function g(t){var e=b(d(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function b(t){"string"!=typeof t&&(t=d(t)),p(t)||n.throwArgumentError("invalid hex string","value",t),t=t.substring(2);for(var e=0;e<t.length&&"0"===t[e];)e++;return"0x"+t.substring(e)}function w(t,e){for("string"!=typeof t?t=d(t):p(t)||n.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&n.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function _(t){var e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(t)){var r=c(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=d(r.slice(0,32)),e.s=d(r.slice(32,64))):65===r.length?(e.r=d(r.slice(0,32)),e.s=d(r.slice(32,64)),e.v=r[64]):n.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:n.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=d(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){var o=h(c(e._vs),32);e._vs=d(o);var i=o[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),o[0]&=127;var s=d(o);null==e.s?e.s=s:e.s!==s&&n.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?n.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{var u=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==u&&n.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&p(e.r)?e.r=w(e.r,32):n.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&p(e.s)?e.s=w(e.s,32):n.throwArgumentError("signature missing or invalid s","signature",t);var f=c(e.s);f[0]>=128&&n.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(f[0]|=128);var l=d(f);e._vs&&(p(e._vs)||n.throwArgumentError("signature invalid _vs","signature",t),e._vs=w(e._vs,32)),null==e._vs?e._vs=l:e._vs!==l&&n.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function k(t){return d(f([(t=_(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},function(t,e,r){"use strict";r.d(e,"a",(function(){return f})),r.d(e,"b",(function(){return p}));function n(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)}}var o=!1,i=!1,a={debug:1,default:2,info:2,warning:3,error:4,off:5},s=a.default,u=null;var c,f,l=function(){try{var t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(e){try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(c||(c={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(f||(f={}));var h="0123456789abcdef",p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}var e,r,c;return e=t,c=[{key:"globalLogger",value:function(){return u||(u=new t("logger/5.7.0")),u}},{key:"setCensorship",value:function(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!e)return;this.globalLogger().throwError("error censorship permanent",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,o=!!r}},{key:"setLogLevel",value:function(e){var r=a[e.toLowerCase()];null!=r?s=r:t.globalLogger().warn("invalid log level - "+e)}},{key:"from",value:function(e){return new t(e)}}],(r=[{key:"_log",value:function(t,e){var r=t.toLowerCase();null==a[r]&&this.throwArgumentError("invalid log level name","logLevel",t),s>a[r]||console.log.apply(console,e)}},{key:"debug",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];this._log(t.levels.DEBUG,r)}},{key:"info",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];this._log(t.levels.INFO,r)}},{key:"warn",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];this._log(t.levels.WARNING,r)}},{key:"makeError",value:function(e,r,n){if(i)return this.makeError("censored error",r,{});r||(r=t.errors.UNKNOWN_ERROR),n||(n={});var o=[];Object.keys(n).forEach((function(t){var e=n[t];try{if(e instanceof Uint8Array){for(var r="",i=0;i<e.length;i++)r+=h[e[i]>>4],r+=h[15&e[i]];o.push(t+"=Uint8Array(0x"+r+")")}else o.push(t+"="+JSON.stringify(e))}catch(e){o.push(t+"="+JSON.stringify(n[t].toString()))}})),o.push("code=".concat(r)),o.push("version=".concat(this.version));var a=e,s="";switch(r){case f.NUMERIC_FAULT:s="NUMERIC_FAULT";var u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":s+="-"+u;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case f.CALL_EXCEPTION:case f.INSUFFICIENT_FUNDS:case f.MISSING_NEW:case f.NONCE_EXPIRED:case f.REPLACEMENT_UNDERPRICED:case f.TRANSACTION_REPLACED:case f.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),o.length&&(e+=" ("+o.join(", ")+")");var c=new Error(e);return c.reason=a,c.code=r,Object.keys(n).forEach((function(t){c[t]=n[t]})),c}},{key:"throwError",value:function(t,e,r){throw this.makeError(t,e,r)}},{key:"throwArgumentError",value:function(e,r,n){return this.throwError(e,t.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(t,e,r,n){t||this.throwError(e,r,n)}},{key:"assertArgument",value:function(t,e,r,n){t||this.throwArgumentError(e,r,n)}},{key:"checkNormalize",value:function(e){null==e&&(e="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",t.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}},{key:"checkSafeUint53",value:function(e,r){"number"==typeof e&&(null==r&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}},{key:"checkArgumentCount",value:function(e,r,n){n=n?": "+n:"",e<r&&this.throwError("missing argument"+n,t.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+n,t.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}},{key:"checkNew",value:function(e,r){e!==Object&&null!=e||this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",t.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})}}])&&n(e.prototype,r),c&&n(e,c),Object.defineProperty(e,"prototype",{writable:!1}),t}();p.errors=f,p.levels=c},function(t,e,r){(function(t){function e(t){return(e="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(t,n){"use strict";function o(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===e(t)?t.exports=a:n.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(64).Buffer}catch(t){}function u(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 o(!1,"Invalid character in "+t)}function c(t,e,r){var n=u(t,r);return r-1>=e&&(n|=u(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,a=0,s=Math.min(t.length,r),u=e;u<s;u++){var c=t.charCodeAt(u)-48;i*=n,a=c>=49?c-49+10:c>=17?c-17+10:c,o(c>=0&&a<n,"Invalid character"),i+=a}return i}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(a.isBN=function(t){return t instanceof a||null!==t&&"object"===e(t)&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,r,n){if("number"==typeof t)return this._initNumber(t,r,n);if("object"===e(t))return this._initArray(t,r,n);"hex"===r&&(r=16),o(r===(0|r)&&r>=2&&r<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===r?this._parseHex(t,i,n):(this._parseBase(t,r,i),"le"===n&&this._initArray(this.toArray(),r,n)))},a.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):(o(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(o("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a,s=0;if("be"===r)for(n=t.length-1,i=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(n=0,i=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,i=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)o=c(t,e,n)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)o=c(t,e,n)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this._strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,o=1;o<=67108863;o*=e)n++;n--,o=o/e|0;for(var i=t.length-r,a=i%n,s=Math.min(i,i-a)+r,u=0,c=r;c<s;c+=n)u=f(t,c,c+n,e),this.imuln(o),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=f(t,c,t.length,e),c=0;c<a;c++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype._move=function(t){l(t,this)},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){a.prototype.inspect=h}else a.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var p=["","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"],d=[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],m=[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];a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,i=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<n|i)).toString(16);i=s>>>24-n&16777215,(n+=2)>=26&&(n-=26,a--),r=0!==i||a!==this.length-1?p[6-u.length]+u+r:u+r}for(0!==i&&(r=i.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 c=d[t],f=m[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var h=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?h+r:p[c-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}o(!1,"Base should be between 2 and 36")},a.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&&o(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function y(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var o=0|t.words[0],i=0|e.words[0],a=o*i,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=h;p++){var d=c-p|0;f+=(a=(o=0|t.words[d])*(i=0|e.words[p])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}a.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),i=r||Math.max(1,n);o(n<=i,"byte array longer than desired length"),o(i>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,i);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,n),a},a.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|n;t[r++]=255&a,r<t.length&&(t[r++]=a>>8&255),r<t.length&&(t[r++]=a>>16&255),6===i?(r<t.length&&(t[r++]=a>>24&255),n=0,i=0):(n=a>>>24,i+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},a.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|n;t[r--]=255&a,r>=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===i?(r>=0&&(t[r--]=a>>24&255),n=0,i=0):(n=a>>>24,i+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.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},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.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},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.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()},a.prototype.ior=function(t){return o(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.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()},a.prototype.iand=function(t){return o(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},a.prototype.ixor=function(t){return o(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){o("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()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){o("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},a.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var o=0,i=0;i<n.length;i++)e=(0|r.words[i])+(0|n.words[i])+o,this.words[i]=67108863&e,o=e>>>26;for(;0!==o&&i<r.length;i++)e=(0|r.words[i])+o,this.words[i]=67108863&e,o=e>>>26;if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;i<r.length;i++)this.words[i]=r.words[i];return this},a.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)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,o=this.cmp(t);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a<n.length;a++)i=(e=(0|r.words[a])-(0|n.words[a])+i)>>26,this.words[a]=67108863&e;for(;0!==i&&a<r.length;a++)i=(e=(0|r.words[a])+i)>>26,this.words[a]=67108863&e;if(0===i&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var v=function(t,e,r){var n,o,i,a=t.words,s=e.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,p=0|a[1],d=8191&p,m=p>>>13,y=0|a[2],v=8191&y,g=y>>>13,b=0|a[3],w=8191&b,_=b>>>13,k=0|a[4],A=8191&k,E=k>>>13,x=0|a[5],O=8191&x,S=x>>>13,P=0|a[6],R=8191&P,j=P>>>13,T=0|a[7],I=8191&T,N=T>>>13,C=0|a[8],M=8191&C,B=C>>>13,F=0|a[9],D=8191&F,U=F>>>13,L=0|s[0],z=8191&L,G=L>>>13,H=0|s[1],q=8191&H,K=H>>>13,V=0|s[2],W=8191&V,Q=V>>>13,J=0|s[3],Y=8191&J,Z=J>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,ot=0|s[6],it=8191&ot,at=ot>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,pt=0|s[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(l,z))|0)+((8191&(o=(o=Math.imul(l,G))+Math.imul(h,z)|0))<<13)|0;c=((i=Math.imul(h,G))+(o>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,z),o=(o=Math.imul(d,G))+Math.imul(m,z)|0,i=Math.imul(m,G);var vt=(c+(n=n+Math.imul(l,q)|0)|0)+((8191&(o=(o=o+Math.imul(l,K)|0)+Math.imul(h,q)|0))<<13)|0;c=((i=i+Math.imul(h,K)|0)+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,z),o=(o=Math.imul(v,G))+Math.imul(g,z)|0,i=Math.imul(g,G),n=n+Math.imul(d,q)|0,o=(o=o+Math.imul(d,K)|0)+Math.imul(m,q)|0,i=i+Math.imul(m,K)|0;var gt=(c+(n=n+Math.imul(l,W)|0)|0)+((8191&(o=(o=o+Math.imul(l,Q)|0)+Math.imul(h,W)|0))<<13)|0;c=((i=i+Math.imul(h,Q)|0)+(o>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,z),o=(o=Math.imul(w,G))+Math.imul(_,z)|0,i=Math.imul(_,G),n=n+Math.imul(v,q)|0,o=(o=o+Math.imul(v,K)|0)+Math.imul(g,q)|0,i=i+Math.imul(g,K)|0,n=n+Math.imul(d,W)|0,o=(o=o+Math.imul(d,Q)|0)+Math.imul(m,W)|0,i=i+Math.imul(m,Q)|0;var bt=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(o=(o=o+Math.imul(l,Z)|0)+Math.imul(h,Y)|0))<<13)|0;c=((i=i+Math.imul(h,Z)|0)+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,z),o=(o=Math.imul(A,G))+Math.imul(E,z)|0,i=Math.imul(E,G),n=n+Math.imul(w,q)|0,o=(o=o+Math.imul(w,K)|0)+Math.imul(_,q)|0,i=i+Math.imul(_,K)|0,n=n+Math.imul(v,W)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(g,W)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(d,Y)|0,o=(o=o+Math.imul(d,Z)|0)+Math.imul(m,Y)|0,i=i+Math.imul(m,Z)|0;var wt=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(o=(o=o+Math.imul(l,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((i=i+Math.imul(h,tt)|0)+(o>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,z),o=(o=Math.imul(O,G))+Math.imul(S,z)|0,i=Math.imul(S,G),n=n+Math.imul(A,q)|0,o=(o=o+Math.imul(A,K)|0)+Math.imul(E,q)|0,i=i+Math.imul(E,K)|0,n=n+Math.imul(w,W)|0,o=(o=o+Math.imul(w,Q)|0)+Math.imul(_,W)|0,i=i+Math.imul(_,Q)|0,n=n+Math.imul(v,Y)|0,o=(o=o+Math.imul(v,Z)|0)+Math.imul(g,Y)|0,i=i+Math.imul(g,Z)|0,n=n+Math.imul(d,$)|0,o=(o=o+Math.imul(d,tt)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(o=(o=o+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((i=i+Math.imul(h,nt)|0)+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(R,z),o=(o=Math.imul(R,G))+Math.imul(j,z)|0,i=Math.imul(j,G),n=n+Math.imul(O,q)|0,o=(o=o+Math.imul(O,K)|0)+Math.imul(S,q)|0,i=i+Math.imul(S,K)|0,n=n+Math.imul(A,W)|0,o=(o=o+Math.imul(A,Q)|0)+Math.imul(E,W)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(w,Y)|0,o=(o=o+Math.imul(w,Z)|0)+Math.imul(_,Y)|0,i=i+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,o=(o=o+Math.imul(v,tt)|0)+Math.imul(g,$)|0,i=i+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,o=(o=o+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,i=i+Math.imul(m,nt)|0;var kt=(c+(n=n+Math.imul(l,it)|0)|0)+((8191&(o=(o=o+Math.imul(l,at)|0)+Math.imul(h,it)|0))<<13)|0;c=((i=i+Math.imul(h,at)|0)+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(I,z),o=(o=Math.imul(I,G))+Math.imul(N,z)|0,i=Math.imul(N,G),n=n+Math.imul(R,q)|0,o=(o=o+Math.imul(R,K)|0)+Math.imul(j,q)|0,i=i+Math.imul(j,K)|0,n=n+Math.imul(O,W)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(S,W)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(A,Y)|0,o=(o=o+Math.imul(A,Z)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,o=(o=o+Math.imul(w,tt)|0)+Math.imul(_,$)|0,i=i+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,o=(o=o+Math.imul(v,nt)|0)+Math.imul(g,rt)|0,i=i+Math.imul(g,nt)|0,n=n+Math.imul(d,it)|0,o=(o=o+Math.imul(d,at)|0)+Math.imul(m,it)|0,i=i+Math.imul(m,at)|0;var At=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(o=(o=o+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((i=i+Math.imul(h,ct)|0)+(o>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(M,z),o=(o=Math.imul(M,G))+Math.imul(B,z)|0,i=Math.imul(B,G),n=n+Math.imul(I,q)|0,o=(o=o+Math.imul(I,K)|0)+Math.imul(N,q)|0,i=i+Math.imul(N,K)|0,n=n+Math.imul(R,W)|0,o=(o=o+Math.imul(R,Q)|0)+Math.imul(j,W)|0,i=i+Math.imul(j,Q)|0,n=n+Math.imul(O,Y)|0,o=(o=o+Math.imul(O,Z)|0)+Math.imul(S,Y)|0,i=i+Math.imul(S,Z)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,tt)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,o=(o=o+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,i=i+Math.imul(_,nt)|0,n=n+Math.imul(v,it)|0,o=(o=o+Math.imul(v,at)|0)+Math.imul(g,it)|0,i=i+Math.imul(g,at)|0,n=n+Math.imul(d,ut)|0,o=(o=o+Math.imul(d,ct)|0)+Math.imul(m,ut)|0,i=i+Math.imul(m,ct)|0;var Et=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(o=(o=o+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((i=i+Math.imul(h,ht)|0)+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(D,z),o=(o=Math.imul(D,G))+Math.imul(U,z)|0,i=Math.imul(U,G),n=n+Math.imul(M,q)|0,o=(o=o+Math.imul(M,K)|0)+Math.imul(B,q)|0,i=i+Math.imul(B,K)|0,n=n+Math.imul(I,W)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(N,W)|0,i=i+Math.imul(N,Q)|0,n=n+Math.imul(R,Y)|0,o=(o=o+Math.imul(R,Z)|0)+Math.imul(j,Y)|0,i=i+Math.imul(j,Z)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,tt)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,tt)|0,n=n+Math.imul(A,rt)|0,o=(o=o+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,i=i+Math.imul(E,nt)|0,n=n+Math.imul(w,it)|0,o=(o=o+Math.imul(w,at)|0)+Math.imul(_,it)|0,i=i+Math.imul(_,at)|0,n=n+Math.imul(v,ut)|0,o=(o=o+Math.imul(v,ct)|0)+Math.imul(g,ut)|0,i=i+Math.imul(g,ct)|0,n=n+Math.imul(d,lt)|0,o=(o=o+Math.imul(d,ht)|0)+Math.imul(m,lt)|0,i=i+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(l,dt)|0)|0)+((8191&(o=(o=o+Math.imul(l,mt)|0)+Math.imul(h,dt)|0))<<13)|0;c=((i=i+Math.imul(h,mt)|0)+(o>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,q),o=(o=Math.imul(D,K))+Math.imul(U,q)|0,i=Math.imul(U,K),n=n+Math.imul(M,W)|0,o=(o=o+Math.imul(M,Q)|0)+Math.imul(B,W)|0,i=i+Math.imul(B,Q)|0,n=n+Math.imul(I,Y)|0,o=(o=o+Math.imul(I,Z)|0)+Math.imul(N,Y)|0,i=i+Math.imul(N,Z)|0,n=n+Math.imul(R,$)|0,o=(o=o+Math.imul(R,tt)|0)+Math.imul(j,$)|0,i=i+Math.imul(j,tt)|0,n=n+Math.imul(O,rt)|0,o=(o=o+Math.imul(O,nt)|0)+Math.imul(S,rt)|0,i=i+Math.imul(S,nt)|0,n=n+Math.imul(A,it)|0,o=(o=o+Math.imul(A,at)|0)+Math.imul(E,it)|0,i=i+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,o=(o=o+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,i=i+Math.imul(_,ct)|0,n=n+Math.imul(v,lt)|0,o=(o=o+Math.imul(v,ht)|0)+Math.imul(g,lt)|0,i=i+Math.imul(g,ht)|0;var Ot=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(o=(o=o+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;c=((i=i+Math.imul(m,mt)|0)+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,W),o=(o=Math.imul(D,Q))+Math.imul(U,W)|0,i=Math.imul(U,Q),n=n+Math.imul(M,Y)|0,o=(o=o+Math.imul(M,Z)|0)+Math.imul(B,Y)|0,i=i+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,o=(o=o+Math.imul(I,tt)|0)+Math.imul(N,$)|0,i=i+Math.imul(N,tt)|0,n=n+Math.imul(R,rt)|0,o=(o=o+Math.imul(R,nt)|0)+Math.imul(j,rt)|0,i=i+Math.imul(j,nt)|0,n=n+Math.imul(O,it)|0,o=(o=o+Math.imul(O,at)|0)+Math.imul(S,it)|0,i=i+Math.imul(S,at)|0,n=n+Math.imul(A,ut)|0,o=(o=o+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,i=i+Math.imul(E,ct)|0,n=n+Math.imul(w,lt)|0,o=(o=o+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,i=i+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(v,dt)|0)|0)+((8191&(o=(o=o+Math.imul(v,mt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((i=i+Math.imul(g,mt)|0)+(o>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(D,Y),o=(o=Math.imul(D,Z))+Math.imul(U,Y)|0,i=Math.imul(U,Z),n=n+Math.imul(M,$)|0,o=(o=o+Math.imul(M,tt)|0)+Math.imul(B,$)|0,i=i+Math.imul(B,tt)|0,n=n+Math.imul(I,rt)|0,o=(o=o+Math.imul(I,nt)|0)+Math.imul(N,rt)|0,i=i+Math.imul(N,nt)|0,n=n+Math.imul(R,it)|0,o=(o=o+Math.imul(R,at)|0)+Math.imul(j,it)|0,i=i+Math.imul(j,at)|0,n=n+Math.imul(O,ut)|0,o=(o=o+Math.imul(O,ct)|0)+Math.imul(S,ut)|0,i=i+Math.imul(S,ct)|0,n=n+Math.imul(A,lt)|0,o=(o=o+Math.imul(A,ht)|0)+Math.imul(E,lt)|0,i=i+Math.imul(E,ht)|0;var Pt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(o=(o=o+Math.imul(w,mt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((i=i+Math.imul(_,mt)|0)+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(D,$),o=(o=Math.imul(D,tt))+Math.imul(U,$)|0,i=Math.imul(U,tt),n=n+Math.imul(M,rt)|0,o=(o=o+Math.imul(M,nt)|0)+Math.imul(B,rt)|0,i=i+Math.imul(B,nt)|0,n=n+Math.imul(I,it)|0,o=(o=o+Math.imul(I,at)|0)+Math.imul(N,it)|0,i=i+Math.imul(N,at)|0,n=n+Math.imul(R,ut)|0,o=(o=o+Math.imul(R,ct)|0)+Math.imul(j,ut)|0,i=i+Math.imul(j,ct)|0,n=n+Math.imul(O,lt)|0,o=(o=o+Math.imul(O,ht)|0)+Math.imul(S,lt)|0,i=i+Math.imul(S,ht)|0;var Rt=(c+(n=n+Math.imul(A,dt)|0)|0)+((8191&(o=(o=o+Math.imul(A,mt)|0)+Math.imul(E,dt)|0))<<13)|0;c=((i=i+Math.imul(E,mt)|0)+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,rt),o=(o=Math.imul(D,nt))+Math.imul(U,rt)|0,i=Math.imul(U,nt),n=n+Math.imul(M,it)|0,o=(o=o+Math.imul(M,at)|0)+Math.imul(B,it)|0,i=i+Math.imul(B,at)|0,n=n+Math.imul(I,ut)|0,o=(o=o+Math.imul(I,ct)|0)+Math.imul(N,ut)|0,i=i+Math.imul(N,ct)|0,n=n+Math.imul(R,lt)|0,o=(o=o+Math.imul(R,ht)|0)+Math.imul(j,lt)|0,i=i+Math.imul(j,ht)|0;var jt=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(o=(o=o+Math.imul(O,mt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((i=i+Math.imul(S,mt)|0)+(o>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(D,it),o=(o=Math.imul(D,at))+Math.imul(U,it)|0,i=Math.imul(U,at),n=n+Math.imul(M,ut)|0,o=(o=o+Math.imul(M,ct)|0)+Math.imul(B,ut)|0,i=i+Math.imul(B,ct)|0,n=n+Math.imul(I,lt)|0,o=(o=o+Math.imul(I,ht)|0)+Math.imul(N,lt)|0,i=i+Math.imul(N,ht)|0;var Tt=(c+(n=n+Math.imul(R,dt)|0)|0)+((8191&(o=(o=o+Math.imul(R,mt)|0)+Math.imul(j,dt)|0))<<13)|0;c=((i=i+Math.imul(j,mt)|0)+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,ut),o=(o=Math.imul(D,ct))+Math.imul(U,ut)|0,i=Math.imul(U,ct),n=n+Math.imul(M,lt)|0,o=(o=o+Math.imul(M,ht)|0)+Math.imul(B,lt)|0,i=i+Math.imul(B,ht)|0;var It=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(o=(o=o+Math.imul(I,mt)|0)+Math.imul(N,dt)|0))<<13)|0;c=((i=i+Math.imul(N,mt)|0)+(o>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,lt),o=(o=Math.imul(D,ht))+Math.imul(U,lt)|0,i=Math.imul(U,ht);var Nt=(c+(n=n+Math.imul(M,dt)|0)|0)+((8191&(o=(o=o+Math.imul(M,mt)|0)+Math.imul(B,dt)|0))<<13)|0;c=((i=i+Math.imul(B,mt)|0)+(o>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var Ct=(c+(n=Math.imul(D,dt))|0)+((8191&(o=(o=Math.imul(D,mt))+Math.imul(U,dt)|0))<<13)|0;return c=((i=Math.imul(U,mt))+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,u[0]=yt,u[1]=vt,u[2]=gt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=kt,u[7]=At,u[8]=Et,u[9]=xt,u[10]=Ot,u[11]=St,u[12]=Pt,u[13]=Rt,u[14]=jt,u[15]=Tt,u[16]=It,u[17]=Nt,u[18]=Ct,0!==c&&(u[19]=c,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,o=0,i=0;i<r.length-1;i++){var a=o;o=0;for(var s=67108863&n,u=Math.min(i,e.length-1),c=Math.max(0,i-t.length+1);c<=u;c++){var f=i-c,l=(0|t.words[f])*(0|e.words[c]),h=67108863&l;s=67108863&(h=h+s|0),o+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[i]=s,n=a,a=o}return 0!==n?r.words[i]=n:r.length--,r._strip()}function b(t,e,r){return g(t,e,r)}function w(t,e){this.x=t,this.y=e}Math.imul||(v=y),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,e):r<63?y(this,t,e):r<1024?g(this,t,e):b(this,t,e)},w.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},w.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,o=0;o<e;o++)n|=(1&t)<<e-o-1,t>>=1;return n},w.prototype.permute=function(t,e,r,n,o,i){for(var a=0;a<i;a++)n[a]=e[t[a]],o[a]=r[t[a]]},w.prototype.transform=function(t,e,r,n,o,i){this.permute(i,t,e,r,n,o);for(var a=1;a<o;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<o;f+=s)for(var l=u,h=c,p=0;p<a;p++){var d=r[f+p],m=n[f+p],y=r[f+p+a],v=n[f+p+a],g=l*y-h*v;v=l*v+h*y,y=g,r[f+p]=d+y,n[f+p]=m+v,r[f+p+a]=d-y,n[f+p+a]=m-v,p!==s&&(g=u*l-c*h,h=u*h+c*l,l=g)}},w.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,o=0;for(r=r/2|0;r;r>>>=1)o++;return 1<<o+1+n},w.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var o=t[n];t[n]=t[r-n-1],t[r-n-1]=o,o=e[n],e[n]=-e[r-n-1],e[r-n-1]=-o}},w.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var o=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&o,r=o<67108864?0:o/67108864|0}return t},w.prototype.convert13b=function(t,e,r,n){for(var i=0,a=0;a<e;a++)i+=0|t[a],r[2*a]=8191&i,i>>>=13,r[2*a+1]=8191&i,i>>>=13;for(a=2*e;a<n;++a)r[a]=0;o(0===i),o(0==(-8192&i))},w.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},w.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),o=this.makeRBT(n),i=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,c,n),this.transform(a,i,s,u,n,o),this.transform(c,i,f,l,n,o);for(var p=0;p<n;p++){var d=s[p]*f[p]-u[p]*l[p];u[p]=s[p]*l[p]+u[p]*f[p],s[p]=d}return this.conjugate(s,u,n),this.transform(s,u,h,i,n,o),this.conjugate(h,i,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),b(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){var e=t<0;e&&(t=-t),o("number"==typeof t),o(t<67108864);for(var r=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,a=(67108863&i)+(67108863&r);r>>=26,r+=i/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,o=r%26;e[r]=t.words[n]>>>o&1}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var o=r.sqr();n<e.length;n++,o=o.sqr())0!==e[n]&&(r=r.mul(o));return r},a.prototype.iushln=function(t){o("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&i,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>26-r}a&&(this.words[e]=a,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()},a.prototype.ishln=function(t){return o(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;o("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var i=t%26,a=Math.min((t-i)/26,this.length),s=67108863^67108863>>>i<<i,u=r;if(n-=a,n=Math.max(0,n),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=n);c--){var l=0|this.words[c];this.words[c]=f<<26-i|l>>>i,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,r){return o(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){o("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r)&&!!(this.words[r]&n)},a.prototype.imaskn=function(t){o("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(o(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return o("number"==typeof t),o(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.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},a.prototype.isubn=function(t){if(o("number"==typeof t),o(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()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,i,a=t.length+r;this._expand(a);var s=0;for(n=0;n<t.length;n++){i=(0|this.words[n+r])+s;var u=(0|t.words[n])*e;s=((i-=67108863&u)>>26)-(u/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(o(-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()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),o=t,i=0|o.words[o.length-1];0!==(r=26-this._countBits(i))&&(o=o.ushln(r),n.iushln(r),i=0|o.words[o.length-1]);var s,u=n.length-o.length;if("mod"!==e){(s=new a(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(o,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[o.length+l])+(0|n.words[o.length+l-1]);for(h=Math.min(h/i|0,67108863),n._ishlnsubmul(o,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(o,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return o(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(i=s.mod.neg(),r&&0!==i.negative&&i.iadd(t)),{div:n,mod:i}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(i=s.mod.neg(),r&&0!==i.negative&&i.isub(t)),{div:s.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,i,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.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),o=t.andln(1),i=r.cmp(n);return i<0||1===o&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),o(t<=67108863);for(var r=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(r*n+(0|this.words[i]))%t;return e?-n:n},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),o(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},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){o(0===t.negative),o(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),i=new a(0),s=new a(0),u=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(f),i.isub(l)),n.iushrn(1),i.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),i.isub(u)):(r.isub(e),s.isub(n),u.isub(i))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(t){o(0===t.negative),o(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,i=new a(1),s=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(u),i.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s)):(r.isub(e),s.isub(i))}return(n=0===e.cmpn(1)?i:s).cmpn(0)<0&&n.iadd(t),n},a.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 o=e.cmp(r);if(o<0){var i=e;e=r,r=i}else if(0===o||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){o("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,a=r;0!==i&&a<this.length;a++){var s=0|this.words[a];i=(s+=i)>>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.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),o(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},a.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},a.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],o=0|t.words[r];if(n!==o){n<o?e=-1:n>o&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return o(!this.red,"Already a number in reduction context"),o(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return o(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return o(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function k(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else o(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function P(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}k.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},k.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},k.prototype.split=function(t,e){t.iushrn(this.n,0,e)},k.prototype.imulK=function(t){return t.imul(this.k)},i(A,k),A.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)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=4194303&o,n=10;n<t.length;n++){var i=0|t.words[n];t.words[n-10]=(4194303&i)<<4|o>>>22,o=i}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.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},i(E,k),i(x,k),i(O,k),O.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,o=67108863&n;n>>>=26,t.words[r]=o,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new E;else if("p192"===t)e=new x;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new O}return _[t]=e,e},S.prototype._verify1=function(t){o(0===t.negative,"red works only with positives"),o(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){o(0==(t.negative|e.negative),"red works only with positives"),o(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.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)},S.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},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(o(e%2==1),3===e){var r=this.m.add(new a(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);o(!n.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,n),h=this.pow(t,n.addn(1).iushrn(1)),p=this.pow(t,n),d=i;0!==p.cmp(s);){for(var m=p,y=0;0!==m.cmp(s);y++)m=m.redSqr();o(y<d);var v=this.pow(l,new a(1).iushln(d-y-1));h=h.redMul(v),l=v.redSqr(),p=p.redMul(l),d=y}return h},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var o=r[0],i=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==i?(i<<=1,i|=l,(4===++s||0===n&&0===f)&&(o=this.mul(o,r[i]),s=0,i=0)):s=0}u=26}return o},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new P(t)},i(P,S),P.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},P.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},P.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),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},P.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},P.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(8)(t))},,function(t,e,r){var n=e;n.utils=r(7),n.common=r(13),n.sha=r(66),n.ripemd=r(70),n.hmac=r(71),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},,function(t,e,r){"use strict";!function(e){function r(t){return parseInt(t)===t}function n(t){if(!r(t.length))return!1;for(var e=0;e<t.length;e++)if(!r(t[e])||t[e]<0||t[e]>255)return!1;return!0}function o(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!n(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&n(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function i(t){return new Uint8Array(t)}function a(t,e,r,n,o){null==n&&null==o||(t=t.slice?t.slice(n,o):Array.prototype.slice.call(t,n,o)),e.set(t,r)}var s,u={toBytes:function(t){var e=[],r=0;for(t=encodeURI(t);r<t.length;){var n=t.charCodeAt(r++);37===n?(e.push(parseInt(t.substr(r,2),16)),r+=2):e.push(n)}return o(e)},fromBytes:function(t){for(var e=[],r=0;r<t.length;){var n=t[r];n<128?(e.push(String.fromCharCode(n)),r++):n>191&&n<224?(e.push(String.fromCharCode((31&n)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&n)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}},c=(s="0123456789abcdef",{toBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},fromBytes:function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(s[(240&n)>>4]+s[15&n])}return e.join("")}}),f={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],d=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],m=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],y=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],b=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],_=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],k=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],x=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function O(t){for(var e=[],r=0;r<t.length;r+=4)e.push(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]);return e}var S=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:o(e,!0)}),this._prepare()};S.prototype._prepare=function(){var t=f[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var e=0;e<=t;e++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var r,n=4*(t+1),o=this.key.length/4,i=O(this.key);for(e=0;e<o;e++)r=e>>2,this._Ke[r][e%4]=i[e],this._Kd[t-r][e%4]=i[e];for(var a,s=0,u=o;u<n;){if(a=i[o-1],i[0]^=h[a>>16&255]<<24^h[a>>8&255]<<16^h[255&a]<<8^h[a>>24&255]^l[s]<<24,s+=1,8!=o)for(e=1;e<o;e++)i[e]^=i[e-1];else{for(e=1;e<o/2;e++)i[e]^=i[e-1];a=i[o/2-1],i[o/2]^=h[255&a]^h[a>>8&255]<<8^h[a>>16&255]<<16^h[a>>24&255]<<24;for(e=o/2+1;e<o;e++)i[e]^=i[e-1]}for(e=0;e<o&&u<n;)c=u>>2,p=u%4,this._Ke[c][p]=i[e],this._Kd[t-c][p]=i[e++],u++}for(var c=1;c<t;c++)for(var p=0;p<4;p++)a=this._Kd[c][p],this._Kd[c][p]=k[a>>24&255]^A[a>>16&255]^E[a>>8&255]^x[255&a]},S.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],n=O(t),o=0;o<4;o++)n[o]^=this._Ke[0][o];for(var a=1;a<e;a++){for(o=0;o<4;o++)r[o]=d[n[o]>>24&255]^m[n[(o+1)%4]>>16&255]^y[n[(o+2)%4]>>8&255]^v[255&n[(o+3)%4]]^this._Ke[a][o];n=r.slice()}var s,u=i(16);for(o=0;o<4;o++)s=this._Ke[e][o],u[4*o]=255&(h[n[o]>>24&255]^s>>24),u[4*o+1]=255&(h[n[(o+1)%4]>>16&255]^s>>16),u[4*o+2]=255&(h[n[(o+2)%4]>>8&255]^s>>8),u[4*o+3]=255&(h[255&n[(o+3)%4]]^s);return u},S.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],n=O(t),o=0;o<4;o++)n[o]^=this._Kd[0][o];for(var a=1;a<e;a++){for(o=0;o<4;o++)r[o]=g[n[o]>>24&255]^b[n[(o+3)%4]>>16&255]^w[n[(o+2)%4]>>8&255]^_[255&n[(o+1)%4]]^this._Kd[a][o];n=r.slice()}var s,u=i(16);for(o=0;o<4;o++)s=this._Kd[e][o],u[4*o]=255&(p[n[o]>>24&255]^s>>24),u[4*o+1]=255&(p[n[(o+3)%4]>>16&255]^s>>16),u[4*o+2]=255&(p[n[(o+2)%4]>>8&255]^s>>8),u[4*o+3]=255&(p[255&n[(o+1)%4]]^s);return u};var P=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(e)};P.prototype.encrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=i(t.length),r=i(16),n=0;n<t.length;n+=16)a(t,r,0,n,n+16),a(r=this._aes.encrypt(r),e,n);return e},P.prototype.decrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=i(t.length),r=i(16),n=0;n<t.length;n+=16)a(t,r,0,n,n+16),a(r=this._aes.decrypt(r),e,n);return e};var R=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=i(16);this._lastCipherblock=o(r,!0),this._aes=new S(e)};R.prototype.encrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=i(t.length),r=i(16),n=0;n<t.length;n+=16){a(t,r,0,n,n+16);for(var s=0;s<16;s++)r[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(r),a(this._lastCipherblock,e,n)}return e},R.prototype.decrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=i(t.length),r=i(16),n=0;n<t.length;n+=16){a(t,r,0,n,n+16),r=this._aes.decrypt(r);for(var s=0;s<16;s++)e[n+s]=r[s]^this._lastCipherblock[s];a(t,this._lastCipherblock,0,n,n+16)}return e};var j=function t(e,r,n){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 size)")}else r=i(16);n||(n=1),this.segmentSize=n,this._shiftRegister=o(r,!0),this._aes=new S(e)};j.prototype.encrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var e,r=o(t,!0),n=0;n<r.length;n+=this.segmentSize){e=this._aes.encrypt(this._shiftRegister);for(var i=0;i<this.segmentSize;i++)r[n+i]^=e[i];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(r,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r},j.prototype.decrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var e,r=o(t,!0),n=0;n<r.length;n+=this.segmentSize){e=this._aes.encrypt(this._shiftRegister);for(var i=0;i<this.segmentSize;i++)r[n+i]^=e[i];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(t,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r};var T=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=i(16);this._lastPrecipher=o(r,!0),this._lastPrecipherIndex=16,this._aes=new S(e)};T.prototype.encrypt=function(t){for(var e=o(t,!0),r=0;r<e.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),e[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return e},T.prototype.decrypt=T.prototype.encrypt;var I=function t(e){if(!(this instanceof t))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=i(16),this.setValue(e)):this.setBytes(e)};I.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");for(var e=15;e>=0;--e)this._counter[e]=t%256,t>>=8},I.prototype.setBytes=function(t){if(16!=(t=o(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},I.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var N=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",r instanceof I||(r=new I(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(e)};N.prototype.encrypt=function(t){for(var e=o(t,!0),r=0;r<e.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),e[r]^=this._remainingCounter[this._remainingCounterIndex++];return e},N.prototype.decrypt=N.prototype.encrypt;var C={AES:S,Counter:I,ModeOfOperation:{ecb:P,cbc:R,cfb:j,ofb:T,ctr:N},utils:{hex:c,utf8:u},padding:{pkcs7:{pad:function(t){var e=16-(t=o(t,!0)).length%16,r=i(t.length+e);a(t,r);for(var n=t.length;n<r.length;n++)r[n]=e;return r},strip:function(t){if((t=o(t,!0)).length<16)throw new Error("PKCS#7 invalid length");var e=t[t.length-1];if(e>16)throw new Error("PKCS#7 padding byte out of range");for(var r=t.length-e,n=0;n<e;n++)if(t[r+n]!==e)throw new Error("PKCS#7 invalid padding byte");var s=i(r);return a(t,s,0,0,r),s}}},_arrayTest:{coerceArray:o,createArray:i,copyArray:a}};t.exports=C}()},function(t,e,r){"use strict";var n=r(12),o=r(65);function i(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=o,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),o=0;o<t.length;o+=2)r.push(parseInt(t[o]+t[o+1],16))}else for(var n=0,o=0;o<t.length;o++){var a=t.charCodeAt(o);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):i(t,o)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++o)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(o=0;o<t.length;o++)r[o]=0|t[o];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=s(t[r].toString(16));return e},e.htonl=a,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var o=t[n];"little"===e&&(o=a(o)),r+=u(o.toString(16))}return r},e.zero2=s,e.zero8=u,e.join32=function(t,e,r,o){var i=r-e;n(i%4==0);for(var a=new Array(i/4),s=0,u=e;s<a.length;s++,u+=4){var c;c="big"===o?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],a[s]=c>>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,o=0;n<t.length;n++,o+=4){var i=t[n];"big"===e?(r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=255&i):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=255&i)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,o){return t+e+r+n+o>>>0},e.sum64=function(t,e,r,n){var o=t[e],i=n+t[e+1]>>>0,a=(i<n?1:0)+r+o;t[e]=a>>>0,t[e+1]=i},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,o,i,a,s){var u=0,c=e;return u+=(c=c+n>>>0)<e?1:0,u+=(c=c+i>>>0)<i?1:0,t+r+o+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,o,i,a,s){return e+n+i+s>>>0},e.sum64_5_hi=function(t,e,r,n,o,i,a,s,u,c){var f=0,l=e;return f+=(l=l+n>>>0)<e?1:0,f+=(l=l+i>>>0)<i?1:0,f+=(l=l+s>>>0)<s?1:0,t+r+o+a+u+(f+=(l=l+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,o,i,a,s,u,c){return e+n+i+s+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":r(window))&&(n=window)}t.exports=n},,,function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){"use strict";var n=r(7),o=r(12);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=i,i.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var o=0;o<t.length;o+=this._delta32)this._update(t,o,o+this._delta32)}return this},i.prototype.digest=function(t){return this.update(this._pad()),o(null===this.pending),this._digest(t)},i.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var o=1;o<r;o++)n[o]=0;if(t<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=t>>>24&255,n[o++]=t>>>16&255,n[o++]=t>>>8&255,n[o++]=255&t}else for(n[o++]=255&t,n[o++]=t>>>8&255,n[o++]=t>>>16&255,n[o++]=t>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,i=8;i<this.padLength;i++)n[o++]=0;return n}},function(t,e,r){"use strict";(function(e){!function(r){function n(t){var e=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]),r=1779033703,n=3144134277,o=1013904242,i=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225,f=new Uint32Array(64);function l(t){for(var l=0,h=t.length;h>=64;){var p=r,d=n,m=o,y=i,v=a,g=s,b=u,w=c,_=void 0,k=void 0,A=void 0,E=void 0,x=void 0;for(k=0;k<16;k++)A=l+4*k,f[k]=(255&t[A])<<24|(255&t[A+1])<<16|(255&t[A+2])<<8|255&t[A+3];for(k=16;k<64;k++)E=((_=f[k-2])>>>17|_<<15)^(_>>>19|_<<13)^_>>>10,x=((_=f[k-15])>>>7|_<<25)^(_>>>18|_<<14)^_>>>3,f[k]=(E+f[k-7]|0)+(x+f[k-16]|0)|0;for(k=0;k<64;k++)E=(((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&g^~v&b)|0)+(w+(e[k]+f[k]|0)|0)|0,x=((p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10))+(p&d^p&m^d&m)|0,w=b,b=g,g=v,v=y+E|0,y=m,m=d,d=p,p=E+x|0;r=r+p|0,n=n+d|0,o=o+m|0,i=i+y|0,a=a+v|0,s=s+g|0,u=u+b|0,c=c+w|0,l+=64,h-=64}}l(t);var h,p=t.length%64,d=t.length/536870912|0,m=t.length<<3,y=p<56?56:120,v=t.slice(t.length-p,t.length);for(v.push(128),h=p+1;h<y;h++)v.push(0);return v.push(d>>>24&255),v.push(d>>>16&255),v.push(d>>>8&255),v.push(d>>>0&255),v.push(m>>>24&255),v.push(m>>>16&255),v.push(m>>>8&255),v.push(m>>>0&255),l(v),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function o(t,e,r){t=t.length<=64?t:n(t);var o,i=64+e.length+4,a=new Array(i),s=new Array(64),u=[];for(o=0;o<64;o++)a[o]=54;for(o=0;o<t.length;o++)a[o]^=t[o];for(o=0;o<e.length;o++)a[64+o]=e[o];for(o=i-4;o<i;o++)a[o]=0;for(o=0;o<64;o++)s[o]=92;for(o=0;o<t.length;o++)s[o]^=t[o];function c(){for(var t=i-1;t>=i-4;t--){if(a[t]++,a[t]<=255)return;a[t]=0}}for(;r>=32;)c(),u=u.concat(n(s.concat(n(a)))),r-=32;return r>0&&(c(),u=u.concat(n(s.concat(n(a))).slice(0,r))),u}function i(t,e,r,n,o){var i;for(c(t,16*(2*r-1),o,0,16),i=0;i<2*r;i++)u(t,16*i,o,16),s(o,n),c(o,0,t,e+16*i,16);for(i=0;i<r;i++)c(t,e+2*i*16,t,16*i,16);for(i=0;i<r;i++)c(t,e+16*(2*i+1),t,16*(i+r),16)}function a(t,e){return t<<e|t>>>32-e}function s(t,e){c(t,0,e,0,16);for(var r=8;r>0;r-=2)e[4]^=a(e[0]+e[12],7),e[8]^=a(e[4]+e[0],9),e[12]^=a(e[8]+e[4],13),e[0]^=a(e[12]+e[8],18),e[9]^=a(e[5]+e[1],7),e[13]^=a(e[9]+e[5],9),e[1]^=a(e[13]+e[9],13),e[5]^=a(e[1]+e[13],18),e[14]^=a(e[10]+e[6],7),e[2]^=a(e[14]+e[10],9),e[6]^=a(e[2]+e[14],13),e[10]^=a(e[6]+e[2],18),e[3]^=a(e[15]+e[11],7),e[7]^=a(e[3]+e[15],9),e[11]^=a(e[7]+e[3],13),e[15]^=a(e[11]+e[7],18),e[1]^=a(e[0]+e[3],7),e[2]^=a(e[1]+e[0],9),e[3]^=a(e[2]+e[1],13),e[0]^=a(e[3]+e[2],18),e[6]^=a(e[5]+e[4],7),e[7]^=a(e[6]+e[5],9),e[4]^=a(e[7]+e[6],13),e[5]^=a(e[4]+e[7],18),e[11]^=a(e[10]+e[9],7),e[8]^=a(e[11]+e[10],9),e[9]^=a(e[8]+e[11],13),e[10]^=a(e[9]+e[8],18),e[12]^=a(e[15]+e[14],7),e[13]^=a(e[12]+e[15],9),e[14]^=a(e[13]+e[12],13),e[15]^=a(e[14]+e[13],18);for(var n=0;n<16;++n)t[n]+=e[n]}function u(t,e,r,n){for(var o=0;o<n;o++)r[o]^=t[e+o]}function c(t,e,r,n,o){for(;o--;)r[n++]=t[e++]}function f(t){if(!t||"number"!=typeof t.length)return!1;for(var e=0;e<t.length;e++){var r=t[e];if("number"!=typeof r||r%1||r<0||r>=256)return!1}return!0}function l(t,e){if("number"!=typeof t||t%1)throw new Error("invalid "+e);return t}function h(t,r,n,a,s,h,p){if(n=l(n,"N"),a=l(a,"r"),s=l(s,"p"),h=l(h,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>2147483647/128/a)throw new Error("N too large");if(a>2147483647/128/s)throw new Error("r too large");if(!f(t))throw new Error("password must be an array or buffer");if(t=Array.prototype.slice.call(t),!f(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var d=o(t,r,128*s*a),m=new Uint32Array(32*s*a),y=0;y<m.length;y++){var v=4*y;m[y]=(255&d[v+3])<<24|(255&d[v+2])<<16|(255&d[v+1])<<8|(255&d[v+0])<<0}var g,b,w=new Uint32Array(64*a),_=new Uint32Array(32*a*n),k=32*a,A=new Uint32Array(16),E=new Uint32Array(16),x=s*n*2,O=0,S=null,P=!1,R=0,j=0,T=p?parseInt(1e3/a):4294967295,I=void 0!==e?e:setTimeout,N=function e(){if(P)return p(new Error("cancelled"),O/x);var r;switch(R){case 0:c(m,b=32*j*a,w,0,k),R=1,g=0;case 1:(r=n-g)>T&&(r=T);for(var f=0;f<r;f++)c(w,0,_,(g+f)*k,k),i(w,k,a,A,E);if(g+=r,O+=r,p){var l=parseInt(1e3*O/x);if(l!==S){if(P=p(null,O/x))break;S=l}}if(g<n)break;g=0,R=2;case 2:(r=n-g)>T&&(r=T);for(var y=0;y<r;y++){var v=w[16*(2*a-1)]&n-1;u(_,v*k,w,k),i(w,k,a,A,E)}if(g+=r,O+=r,p){var N=parseInt(1e3*O/x);if(N!==S){if(P=p(null,O/x))break;S=N}}if(g<n)break;if(c(w,0,m,b,k),++j<s){R=0;break}d=[];for(var C=0;C<m.length;C++)d.push(m[C]>>0&255),d.push(m[C]>>8&255),d.push(m[C]>>16&255),d.push(m[C]>>24&255);var M=o(t,d,h);return p&&p(null,1,M),M}p&&I(e)};if(!p)for(;;){var C=N();if(null!=C)return C}N()}var p={scrypt:function(t,e,r,n,o,i,a){return new Promise((function(s,u){var c=0;a&&a(0),h(t,e,r,n,o,i,(function(t,e,r){if(t)u(t);else if(r)a&&1!==c&&a(1),s(new Uint8Array(r));else if(a&&e!==c)return c=e,a(e)}))}))},syncScrypt:function(t,e,r,n,o,i){return new Uint8Array(h(t,e,r,n,o,i))}};t.exports=p}()}).call(this,r(72).setImmediate)},,function(t,e,r){"use strict";(function(t){
|
|
2
2
|
/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
5
5
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
var n=r(44),o=r(45),i=r(46);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),o=(t=s(t,n)).write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=s(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):h(t,e);if("Buffer"===e.type&&i(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|p(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return L(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return S(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=r;i<s;i++)if(c(t,i)===c(e,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===u)return f*a}else-1!==f&&(i-=i-f),f=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var l=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){l=!1;break}if(l)return i}return-1}function b(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function w(t,e,r,n){return q(L(e,t.length-r),t,r,n)}function k(t,e,r,n){return q(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function _(t,e,r,n){return k(t,e,r,n)}function A(t,e,r,n){return q(z(e),t,r,n)}function E(t,e,r,n){return q(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,u,c=t[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(f=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var a=t[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,o),o+=a.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):m.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),c=this.slice(n,o),f=t.slice(e,r),l=0;l<s;++l)if(c[l]!==f[l]){i=c[l],a=f[l];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return k(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function P(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=U(t[i]);return o}function T(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function j(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function N(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function C(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function M(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,i){return i||M(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,i){return i||M(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var o=e-t;r=new u(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||j(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||j(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||j(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||j(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||j(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||j(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||j(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):C(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):C(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=u.isBuffer(t)?t:L(new u(t,n).toString()),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,r(9))},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=s(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||f||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,r){"use strict";function n(t){return(n="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)}for(var o="qpzry9x8gf2tvdw0s3jn54khce6mua7l",i={},a=0;a<o.length;a++){var s=o.charAt(a);if(void 0!==i[s])throw new TypeError(s+" is ambiguous");i[s]=a}function u(t){var e=t>>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function c(t){for(var e=1,r=0;r<t.length;++r){var n=t.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+t+")";e=u(e)^n>>5}for(e=u(e),r=0;r<t.length;++r){var o=t.charCodeAt(r);e=u(e)^31&o}return e}function f(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;var o=(t=r).lastIndexOf("1");if(-1===o)return"No separator character for "+t;if(0===o)return"Missing prefix for "+t;var a=t.slice(0,o),s=t.slice(o+1);if(s.length<6)return"Data too short";var f=c(a);if("string"==typeof f)return f;for(var l=[],h=0;h<s.length;++h){var p=s.charAt(h),d=i[p];if(void 0===d)return"Unknown character "+p;f=u(f)^d,h+6>=s.length||l.push(d)}return 1!==f?"Invalid checksum for "+t:{prefix:a,words:l}}function l(t,e,r,n){for(var o=0,i=0,a=(1<<r)-1,s=[],u=0;u<t.length;++u)for(o=o<<e|t[u],i+=e;i>=r;)i-=r,s.push(o>>i&a);if(n)i>0&&s.push(o<<r-i&a);else{if(i>=e)return"Excess padding";if(o<<r-i&a)return"Non-zero padding"}return s}t.exports={decodeUnsafe:function(){var t=f.apply(null,arguments);if("object"===n(t))return t},decode:function(t){var e=f.apply(null,arguments);if("object"===n(e))return e;throw new Error(e)},encode:function(t,e,r){if(r=r||90,t.length+7+e.length>r)throw new TypeError("Exceeds length limit");var n=c(t=t.toLowerCase());if("string"==typeof n)throw new Error(n);for(var i=t+"1",a=0;a<e.length;++a){var s=e[a];if(s>>5!=0)throw new Error("Non 5-bit word");n=u(n)^s,i+=o.charAt(s)}for(a=0;a<6;++a)n=u(n);for(n^=1,a=0;a<6;++a){i+=o.charAt(n>>5*(5-a)&31)}return i},toWordsUnsafe:function(t){var e=l(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=l(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=l(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=l(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},,function(t,e,r){t.exports=r(38)},function(t,e){function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(24);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){(function(t,n){var o;function i(t){return(i="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)}
|
|
9
|
-
/*! https://mths.be/punycode v1.4.0 by @mathias */!function(a){var s="object"==i(e)&&e&&!e.nodeType&&e,u="object"==i(t)&&t&&!t.nodeType&&t,c="object"==(void 0===n?"undefined":i(n))&&n;c.global!==c&&c.window!==c&&c.self!==c||(a=c);var f,l,h=2147483647,p=/^xn--/,d=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,
|
|
8
|
+
var n=r(43),o=r(44),i=r(45);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),o=(t=s(t,n)).write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=s(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):h(t,e);if("Buffer"===e.type&&i(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|p(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return L(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return S(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=r;i<s;i++)if(c(t,i)===c(e,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===u)return f*a}else-1!==f&&(i-=i-f),f=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var l=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){l=!1;break}if(l)return i}return-1}function b(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function w(t,e,r,n){return G(L(e,t.length-r),t,r,n)}function _(t,e,r,n){return G(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function k(t,e,r,n){return _(t,e,r,n)}function A(t,e,r,n){return G(z(e),t,r,n)}function E(t,e,r,n){return G(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,u,c=t[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(f=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var a=t[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,o),o+=a.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):m.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),c=this.slice(n,o),f=t.slice(e,r),l=0;l<s;++l)if(c[l]!==f[l]){i=c[l],a=f[l];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function P(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=U(t[i]);return o}function j(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function T(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function N(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function C(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function M(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,i){return i||M(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,i){return i||M(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var o=e-t;r=new u(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):C(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):C(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=u.isBuffer(t)?t:L(new u(t,n).toString()),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,r(9))},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=s(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||f||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,r){"use strict";function n(t){return(n="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)}for(var o="qpzry9x8gf2tvdw0s3jn54khce6mua7l",i={},a=0;a<o.length;a++){var s=o.charAt(a);if(void 0!==i[s])throw new TypeError(s+" is ambiguous");i[s]=a}function u(t){var e=t>>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function c(t){for(var e=1,r=0;r<t.length;++r){var n=t.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+t+")";e=u(e)^n>>5}for(e=u(e),r=0;r<t.length;++r){var o=t.charCodeAt(r);e=u(e)^31&o}return e}function f(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;var o=(t=r).lastIndexOf("1");if(-1===o)return"No separator character for "+t;if(0===o)return"Missing prefix for "+t;var a=t.slice(0,o),s=t.slice(o+1);if(s.length<6)return"Data too short";var f=c(a);if("string"==typeof f)return f;for(var l=[],h=0;h<s.length;++h){var p=s.charAt(h),d=i[p];if(void 0===d)return"Unknown character "+p;f=u(f)^d,h+6>=s.length||l.push(d)}return 1!==f?"Invalid checksum for "+t:{prefix:a,words:l}}function l(t,e,r,n){for(var o=0,i=0,a=(1<<r)-1,s=[],u=0;u<t.length;++u)for(o=o<<e|t[u],i+=e;i>=r;)i-=r,s.push(o>>i&a);if(n)i>0&&s.push(o<<r-i&a);else{if(i>=e)return"Excess padding";if(o<<r-i&a)return"Non-zero padding"}return s}t.exports={decodeUnsafe:function(){var t=f.apply(null,arguments);if("object"===n(t))return t},decode:function(t){var e=f.apply(null,arguments);if("object"===n(e))return e;throw new Error(e)},encode:function(t,e,r){if(r=r||90,t.length+7+e.length>r)throw new TypeError("Exceeds length limit");var n=c(t=t.toLowerCase());if("string"==typeof n)throw new Error(n);for(var i=t+"1",a=0;a<e.length;++a){var s=e[a];if(s>>5!=0)throw new Error("Non 5-bit word");n=u(n)^s,i+=o.charAt(s)}for(a=0;a<6;++a)n=u(n);for(n^=1,a=0;a<6;++a){i+=o.charAt(n>>5*(5-a)&31)}return i},toWordsUnsafe:function(t){var e=l(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=l(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=l(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=l(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},,function(t,e,r){t.exports=r(37)},function(t,e){function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(24);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){(function(t,n){var o;function i(t){return(i="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)}
|
|
9
|
+
/*! https://mths.be/punycode v1.4.0 by @mathias */!function(a){var s="object"==i(e)&&e&&!e.nodeType&&e,u="object"==i(t)&&t&&!t.nodeType&&t,c="object"==(void 0===n?"undefined":i(n))&&n;c.global!==c&&c.window!==c&&c.self!==c||(a=c);var f,l,h=2147483647,p=/^xn--/,d=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=Math.floor,g=String.fromCharCode;function b(t){throw new RangeError(y[t])}function w(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function _(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+w((t=t.replace(m,".")).split("."),e).join(".")}function k(t){for(var e,r,n=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(r=t.charCodeAt(o++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--):n.push(e);return n}function A(t){return w(t,(function(t){var e="";return t>65535&&(e+=g((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=g(t)})).join("")}function E(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,r){var n=0;for(t=r?v(t/700):t>>1,t+=v(t/e);t>455;n+=36)t=v(t/35);return v(n+36*t/(t+38))}function O(t){var e,r,n,o,i,a,s,u,c,f,l,p=[],d=t.length,m=0,y=128,g=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&b("not-basic"),p.push(t.charCodeAt(n));for(o=r>0?r+1:0;o<d;){for(i=m,a=1,s=36;o>=d&&b("invalid-input"),((u=(l=t.charCodeAt(o++))-48<10?l-22:l-65<26?l-65:l-97<26?l-97:36)>=36||u>v((h-m)/a))&&b("overflow"),m+=u*a,!(u<(c=s<=g?1:s>=g+26?26:s-g));s+=36)a>v(h/(f=36-c))&&b("overflow"),a*=f;g=x(m-i,e=p.length+1,0==i),v(m/e)>h-y&&b("overflow"),y+=v(m/e),m%=e,p.splice(m++,0,y)}return A(p)}function S(t){var e,r,n,o,i,a,s,u,c,f,l,p,d,m,y,w=[];for(p=(t=k(t)).length,e=128,r=0,i=72,a=0;a<p;++a)(l=t[a])<128&&w.push(g(l));for(n=o=w.length,o&&w.push("-");n<p;){for(s=h,a=0;a<p;++a)(l=t[a])>=e&&l<s&&(s=l);for(s-e>v((h-r)/(d=n+1))&&b("overflow"),r+=(s-e)*d,e=s,a=0;a<p;++a)if((l=t[a])<e&&++r>h&&b("overflow"),l==e){for(u=r,c=36;!(u<(f=c<=i?1:c>=i+26?26:c-i));c+=36)y=u-f,m=36-f,w.push(g(E(f+y%m,0))),u=v(y/m);w.push(g(E(u,0))),i=x(r,d,n==o),r=0,++n}++r,++e}return w.join("")}if(f={version:"1.3.2",ucs2:{decode:k,encode:A},decode:O,encode:S,toASCII:function(t){return _(t,(function(t){return d.test(t)?"xn--"+S(t):t}))},toUnicode:function(t){return _(t,(function(t){return p.test(t)?O(t.slice(4).toLowerCase()):t}))}},"object"==i(r(18))&&r(18))void 0===(o=function(){return f}.call(e,r,e,t))||(t.exports=o);else if(s&&u)if(t.exports==s)u.exports=f;else for(l in f)f.hasOwnProperty(l)&&(s[l]=f[l]);else a.punycode=f}(this)}).call(this,r(8)(t),r(9))},function(t,e,r){(function(t){var n,o;function i(t){return(i="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)}
|
|
10
10
|
/*!
|
|
11
11
|
* URI.js - Mutating URLs
|
|
12
12
|
* IPv6 Support
|
|
@@ -32,7 +32,7 @@ var n=r(44),o=r(45),i=r(46);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647
|
|
|
32
32
|
* Licensed under
|
|
33
33
|
* MIT License http://www.opensource.org/licenses/mit-license
|
|
34
34
|
*
|
|
35
|
-
*/!function(a,s){"use strict";"object"===i(t)&&t.exports?t.exports=s():void 0===(o="function"==typeof(n=s)?n.call(e,r,e,t):n)||(t.exports=o)}(0,(function(t){"use strict";var e=t&&t.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return!1;var o=r.list[t.slice(e+1)];return!!o&&o.indexOf(" "+t.slice(n+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var n=r.list[t.slice(e+1)];return!!n&&n.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return null;var o=r.list[t.slice(e+1)];return o?o.indexOf(" "+t.slice(n+1,e)+" ")<0?null:t.slice(n+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return r}))}).call(this,r(8)(t))},function(t,e,r){"use strict";var n=r(7).rotr32;function o(t,e,r){return t&e^~t&r}function i(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?o(e,r,n):1===t||3===t?a(e,r,n):2===t?i(e,r,n):void 0},e.ch32=o,e.maj32=i,e.p32=a,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,e,r){"use strict";var n=r(7),o=r(13),i=r(29),a=r(12),s=n.sum32,u=n.sum32_4,c=n.sum32_5,f=i.ch32,l=i.maj32,h=i.s0_256,p=i.s1_256,d=i.g0_256,m=i.g1_256,v=o.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(y,v),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],d(r[n-15]),r[n-16]);var o=this.h[0],i=this.h[1],v=this.h[2],g=this.h[3],y=this.h[4],b=this.h[5],w=this.h[6],k=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var _=c(k,p(y),f(y,b,w),this.k[n],r[n]),A=s(h(o),l(o,i,v));k=w,w=b,b=y,y=s(g,_),g=v,v=i,i=o,o=s(_,A)}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],v),this.h[3]=s(this.h[3],g),this.h[4]=s(this.h[4],y),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],k)},y.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(7),o=r(13),i=r(12),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,l=n.sum64_hi,h=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,m=n.sum64_5_hi,v=n.sum64_5_lo,g=o.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function w(t,e,r,n,o){var i=t&r^~t&o;return i<0&&(i+=4294967296),i}function k(t,e,r,n,o,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function _(t,e,r,n,o){var i=t&r^t&o^r&o;return i<0&&(i+=4294967296),i}function A(t,e,r,n,o,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function E(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function x(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function O(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function S(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function P(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function R(t,e){var r=s(t,e,1)^s(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function T(t,e){var r=a(t,e,19)^a(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function j(t,e){var r=s(t,e,19)^s(e,t,29)^c(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(b,g),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var o=T(r[n-4],r[n-3]),i=j(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],u=P(r[n-30],r[n-29]),c=R(r[n-30],r[n-29]),f=r[n-32],l=r[n-31];r[n]=p(o,i,a,s,u,c,f,l),r[n+1]=d(o,i,a,s,u,c,f,l)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],p=this.h[6],d=this.h[7],g=this.h[8],y=this.h[9],b=this.h[10],P=this.h[11],R=this.h[12],T=this.h[13],j=this.h[14],I=this.h[15];i(this.k.length===r.length);for(var N=0;N<r.length;N+=2){var C=j,M=I,B=O(g,y),F=S(g,y),D=w(g,y,b,P,R),U=k(g,y,b,P,R,T),L=this.k[N],z=this.k[N+1],q=r[N],H=r[N+1],G=m(C,M,B,F,D,U,L,z,q,H),K=v(C,M,B,F,D,U,L,z,q,H);C=E(n,o),M=x(n,o),B=_(n,o,a,s,u),F=A(n,o,a,s,u,c);var W=l(C,M,B,F),Q=h(C,M,B,F);j=R,I=T,R=b,T=P,b=g,P=y,g=l(p,d,G,K),y=h(d,d,G,K),p=u,d=c,u=a,c=s,a=n,s=o,n=l(G,K,W,Q),o=h(G,K,W,Q)}f(this.h,0,n,o),f(this.h,2,a,s),f(this.h,4,u,c),f(this.h,6,p,d),f(this.h,8,g,y),f(this.h,10,b,P),f(this.h,12,R,T),f(this.h,14,j,I)},b.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return H}));var n=r(2),o=r.n(n),i=r(4),a=r.n(i);function s(t){return(s="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)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t||"undefined"!=typeof self&&self;function u(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var c=f;function f(t,e){if(!t)throw new Error(e||"Assertion failed")}f.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var l=u((function(t,e){var r=e;function n(t){return 1===t.length?"0"+t:t}function o(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var o=t.charCodeAt(n),i=o>>8,a=255&o;i?r.push(i,a):r.push(a)}return r},r.zero2=n,r.toHex=o,r.encode=function(t,e){return"hex"===e?o(t):t}})),h=u((function(t,e){var r=e;r.assert=c,r.toArray=l.toArray,r.zero2=l.zero2,r.toHex=l.toHex,r.encode=l.encode,r.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var o=1<<e+1,i=t.clone(),a=0;a<n.length;a++){var s,u=i.andln(o-1);i.isOdd()?(s=u>(o>>1)-1?(o>>1)-u:u,i.isubn(s)):s=0,n[a]=s,i.iushrn(1)}return n},r.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,o=0,i=0;t.cmpn(-o)>0||e.cmpn(-i)>0;){var a,s,u=t.andln(3)+o&3,c=e.andln(3)+i&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0==(1&c)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*o===a+1&&(o=1-o),2*i===s+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},r.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new o.a(t,"hex","le")}})),p=h.getNAF,d=h.getJSF,m=h.assert;function v(t,e){this.type=t,this.p=new o.a(e.p,16),this.red=e.prime?o.a.red(e.prime):o.a.mont(this.p),this.zero=new o.a(0).toRed(this.red),this.one=new o.a(1).toRed(this.red),this.two=new o.a(2).toRed(this.red),this.n=e.n&&new o.a(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var g=v;function y(t,e){this.curve=t,this.type=e,this.precomputed=null}v.prototype.point=function(){throw new Error("Not implemented")},v.prototype.validate=function(){throw new Error("Not implemented")},v.prototype._fixedNafMul=function(t,e){m(t.precomputed);var r=t._getDoubles(),n=p(e,1,this._bitLength),o=(1<<r.step+1)-(r.step%2==0?2:1);o/=3;var i,a,s=[];for(i=0;i<n.length;i+=r.step){a=0;for(var u=i+r.step-1;u>=i;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=o;l>0;l--){for(i=0;i<s.length;i++)(a=s[i])===l?f=f.mixedAdd(r.points[i]):a===-l&&(f=f.mixedAdd(r.points[i].neg()));c=c.add(f)}return c.toP()},v.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var o=n.points,i=p(e,r,this._bitLength),a=this.jpoint(null,null,null),s=i.length-1;s>=0;s--){for(var u=0;s>=0&&0===i[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=i[s];m(0!==c),a="affine"===t.type?c>0?a.mixedAdd(o[c-1>>1]):a.mixedAdd(o[-c-1>>1].neg()):c>0?a.add(o[c-1>>1]):a.add(o[-c-1>>1].neg())}return"affine"===t.type?a.toP():a},v.prototype._wnafMulAdd=function(t,e,r,n,o){var i,a,s,u=this._wnafT1,c=this._wnafT2,f=this._wnafT3,l=0;for(i=0;i<n;i++){var h=(s=e[i])._getNAFPoints(t);u[i]=h.wnd,c[i]=h.points}for(i=n-1;i>=1;i-=2){var m=i-1,v=i;if(1===u[m]&&1===u[v]){var g=[e[m],null,null,e[v]];0===e[m].y.cmp(e[v].y)?(g[1]=e[m].add(e[v]),g[2]=e[m].toJ().mixedAdd(e[v].neg())):0===e[m].y.cmp(e[v].y.redNeg())?(g[1]=e[m].toJ().mixedAdd(e[v]),g[2]=e[m].add(e[v].neg())):(g[1]=e[m].toJ().mixedAdd(e[v]),g[2]=e[m].toJ().mixedAdd(e[v].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=d(r[m],r[v]);for(l=Math.max(b[0].length,l),f[m]=new Array(l),f[v]=new Array(l),a=0;a<l;a++){var w=0|b[0][a],k=0|b[1][a];f[m][a]=y[3*(w+1)+(k+1)],f[v][a]=0,c[m]=g}}else f[m]=p(r[m],u[m],this._bitLength),f[v]=p(r[v],u[v],this._bitLength),l=Math.max(f[m].length,l),l=Math.max(f[v].length,l)}var _=this.jpoint(null,null,null),A=this._wnafT4;for(i=l;i>=0;i--){for(var E=0;i>=0;){var x=!0;for(a=0;a<n;a++)A[a]=0|f[a][i],0!==A[a]&&(x=!1);if(!x)break;E++,i--}if(i>=0&&E++,_=_.dblp(E),i<0)break;for(a=0;a<n;a++){var O=A[a];0!==O&&(O>0?s=c[a][O-1>>1]:O<0&&(s=c[a][-O-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(i=0;i<n;i++)c[i]=null;return o?_:_.toP()},v.BasePoint=y,y.prototype.eq=function(){throw new Error("Not implemented")},y.prototype.validate=function(){return this.curve.validate(this)},v.prototype.decodePoint=function(t,e){t=h.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?m(t[t.length-1]%2==0):7===t[0]&&m(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},y.prototype.encodeCompressed=function(t){return this.encode(t,!0)},y.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},y.prototype.encode=function(t,e){return h.encode(this._encode(e),t)},y.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},y.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},y.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,o=0;o<e;o+=t){for(var i=0;i<t;i++)n=n.dbl();r.push(n)}return{step:t,points:r}},y.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),o=1;o<r;o++)e[o]=e[o-1].add(n);return{wnd:t,points:e}},y.prototype._getBeta=function(){return null},y.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e};var b=u((function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}})),w=h.assert;function k(t){g.call(this,"short",t),this.a=new o.a(t.a,16).toRed(this.red),this.b=new o.a(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}b(k,g);var _=k;function A(t,e,r,n){g.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o.a(e,16),this.y=new o.a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function E(t,e,r,n){g.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o.a(0)):(this.x=new o.a(e,16),this.y=new o.a(r,16),this.z=new o.a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}k.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new o.a(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new o.a(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],w(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new o.a(t.a,16),b:new o.a(t.b,16)}})):this._getEndoBasis(r)}}},k.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:o.a.mont(t),r=new o.a(2).toRed(e).redInvm(),n=r.redNeg(),i=new o.a(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},k.prototype._getEndoBasis=function(t){for(var e,r,n,i,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,p=this.n.clone(),d=new o.a(1),m=new o.a(0),v=new o.a(0),g=new o.a(1),y=0;0!==h.cmpn(0);){var b=p.div(h);c=p.sub(b.mul(h)),f=v.sub(b.mul(d));var w=g.sub(b.mul(m));if(!n&&c.cmp(l)<0)e=u.neg(),r=d,n=c.neg(),i=f;else if(n&&2==++y)break;u=c,p=h,h=c,v=d,d=f,g=m,m=w}a=c.neg(),s=f;var k=n.sqr().add(i.sqr());return a.sqr().add(s.sqr()).cmp(k)>=0&&(a=e,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},k.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],o=n.b.mul(t).divRound(this.n),i=r.b.neg().mul(t).divRound(this.n),a=o.mul(r.a),s=i.mul(n.a),u=o.mul(r.b),c=i.mul(n.b);return{k1:t.sub(a).sub(s),k2:u.add(c).neg()}},k.prototype.pointFromX=function(t,e){(t=new o.a(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},k.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),o=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},k.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,i=0;i<t.length;i++){var a=this._endoSplit(e[i]),s=t[i],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*i]=s,n[2*i+1]=u,o[2*i]=a.k1,o[2*i+1]=a.k2}for(var c=this._wnafMulAdd(1,n,o,2*i,r),f=0;f<2*i;f++)n[f]=null,o[f]=null;return c},b(A,g.BasePoint),k.prototype.point=function(t,e,r){return new A(this,t,e,r)},k.prototype.pointFromJSON=function(t,e){return A.fromJSON(this,t,e)},A.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},A.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},A.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function o(e){return t.point(e[0],e[1],r)}var i=e[2];return n.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[n].concat(i.doubles.points.map(o))},naf:i.naf&&{wnd:i.naf.wnd,points:[n].concat(i.naf.points.map(o))}},n},A.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},A.prototype.isInfinity=function(){return this.inf},A.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},A.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),i=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,a)},A.prototype.getX=function(){return this.x.fromRed()},A.prototype.getY=function(){return this.y.fromRed()},A.prototype.mul=function(t){return t=new o.a(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},A.prototype.mulAdd=function(t,e,r){var n=[this,e],o=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2)},A.prototype.jmulAdd=function(t,e,r){var n=[this,e],o=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0)},A.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},A.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},A.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},b(E,g.BasePoint),k.prototype.jpoint=function(t,e,r){return new E(this,t,e,r)},E.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),o=t.x.redMul(r),i=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(o),u=i.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),p=u.redMul(l.redISub(h)).redISub(i.redMul(f)),d=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(h,p,d)},E.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),o=this.y,i=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=o.redSub(i);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(a);return this.curve.jpoint(l,h,p)},E.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,o=this.curve.tinv,i=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(e=0;e<t;e++){var f=i.redSqr(),l=c.redSqr(),h=l.redSqr(),p=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),d=i.redMul(l),m=p.redSqr().redISub(d.redAdd(d)),v=d.redISub(m),g=p.redMul(v);g=g.redIAdd(g).redISub(h);var y=c.redMul(s);e+1<t&&(u=u.redMul(h)),i=m,s=y,c=g}return this.curve.jpoint(i,c.redMul(o),s)},E.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},E.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(n).redISub(i);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),p=this.x.redAdd(l).redSqr().redISub(f).redISub(h);p=p.redIAdd(p);var d=f.redAdd(f).redIAdd(f),m=d.redSqr(),v=h.redIAdd(h);v=(v=v.redIAdd(v)).redIAdd(v),t=m.redISub(p).redISub(p),e=d.redMul(p.redISub(t)).redISub(v),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},E.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(n).redISub(i);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);t=u;var c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),p=this.x.redSub(f).redMul(this.x.redAdd(f));p=p.redAdd(p).redIAdd(p);var d=h.redIAdd(h),m=(d=d.redIAdd(d)).redAdd(d);t=p.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var v=l.redSqr();v=(v=(v=v.redIAdd(v)).redIAdd(v)).redIAdd(v),e=p.redMul(d.redISub(t)).redISub(v)}return this.curve.jpoint(t,e,r)},E.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,o=n.redSqr().redSqr(),i=e.redSqr(),a=r.redSqr(),s=i.redAdd(i).redIAdd(i).redIAdd(t.redMul(o)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),l=c.redISub(f),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var p=s.redMul(l).redISub(h),d=r.redAdd(r).redMul(n);return this.curve.jpoint(f,p,d)},E.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),o=t.redAdd(t).redIAdd(t),i=o.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(i)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=o.redIAdd(a).redSqr().redISub(i).redISub(s).redISub(u),f=e.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var p=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(l,h,p)},E.prototype.mul=function(t,e){return t=new o.a(t,e),this.curve._wnafMul(this,t)},E.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),o=r.redMul(t.z);return 0===this.y.redMul(o).redISub(t.y.redMul(n)).cmpn(0)},E.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),o=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0}},E.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var x=u((function(t,e){var r=e;r.base=g,r.short=_,r.mont=null,r.edwards=null})),O=u((function(t,e){var r,n=e,o=h.assert;function i(t){"short"===t.type?this.curve=new x.short(t):"edwards"===t.type?this.curve=new x.edwards(t):this.curve=new x.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new i(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(t){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function S(t){if(!(this instanceof S))return new S(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=l.toArray(t.entropy,t.entropyEnc||"hex"),r=l.toArray(t.nonce,t.nonceEnc||"hex"),n=l.toArray(t.pers,t.persEnc||"hex");c(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var P=S;S.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},S.prototype._hmac=function(){return new a.a.hmac(this.hash,this.K)},S.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},S.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=l.toArray(t,e),r=l.toArray(r,n),c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},S.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=l.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var i=o.slice(0,t);return this._update(r),this._reseed++,l.encode(i,e)};var R=h.assert;function T(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var j=T;T.fromPublic=function(t,e,r){return e instanceof T?e:new T(t,{pub:e,pubEnc:r})},T.fromPrivate=function(t,e,r){return e instanceof T?e:new T(t,{priv:e,privEnc:r})},T.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},T.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},T.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},T.prototype._importPrivate=function(t,e){this.priv=new o.a(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},T.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?R(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||R(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},T.prototype.derive=function(t){return t.validate()||R(t.validate(),"public point not validated"),t.mul(this.priv).getX()},T.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},T.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},T.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var I=h.assert;function N(t,e){if(t instanceof N)return t;this._importDER(t,e)||(I(t.r&&t.s,"Signature without r or s"),this.r=new o.a(t.r,16),this.s=new o.a(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var C=N;function M(){this.place=0}function B(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var o=0,i=0,a=e.place;i<n;i++,a++)o<<=8,o|=t[a],o>>>=0;return!(o<=127)&&(e.place=a,o)}function F(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function D(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}N.prototype._importDER=function(t,e){t=h.toArray(t,e);var r=new M;if(48!==t[r.place++])return!1;var n=B(t,r);if(!1===n)return!1;if(n+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var i=B(t,r);if(!1===i)return!1;var a=t.slice(r.place,i+r.place);if(r.place+=i,2!==t[r.place++])return!1;var s=B(t,r);if(!1===s)return!1;if(t.length!==s+r.place)return!1;var u=t.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new o.a(a),this.s=new o.a(u),this.recoveryParam=null,!0},N.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=F(e),r=F(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];D(n,e.length),(n=n.concat(e)).push(2),D(n,r.length);var o=n.concat(r),i=[48];return D(i,o.length),i=i.concat(o),h.encode(i,t)};var U=function(){throw new Error("unsupported")},L=h.assert;function z(t){if(!(this instanceof z))return new z(t);"string"==typeof t&&(L(Object.prototype.hasOwnProperty.call(O,t),"Unknown curve "+t),t=O[t]),t instanceof O.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var q=z;z.prototype.keyPair=function(t){return new j(this,t)},z.prototype.keyFromPrivate=function(t,e){return j.fromPrivate(this,t,e)},z.prototype.keyFromPublic=function(t,e){return j.fromPublic(this,t,e)},z.prototype.genKeyPair=function(t){t||(t={});for(var e=new P({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||U(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new o.a(2));;){var i=new o.a(e.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},z.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},z.prototype.sign=function(t,e,r,n){"object"===s(r)&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new o.a(t,16));for(var i=this.n.byteLength(),a=e.getPrivate().toArray("be",i),u=t.toArray("be",i),c=new P({hash:this.hash,entropy:a,nonce:u,pers:n.pers,persEnc:n.persEnc||"utf8"}),f=this.n.sub(new o.a(1)),l=0;;l++){var h=n.k?n.k(l):new o.a(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(f)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var d=p.getX(),m=d.umod(this.n);if(0!==m.cmpn(0)){var v=h.invm(this.n).mul(m.mul(e.getPrivate()).iadd(t));if(0!==(v=v.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==d.cmp(m)?2:0);return n.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),g^=1),new C({r:m,s:v,recoveryParam:g})}}}}}},z.prototype.verify=function(t,e,r,n){t=this._truncateToN(new o.a(t,16)),r=this.keyFromPublic(r,n);var i=(e=new C(e,"hex")).r,a=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(t).umod(this.n),f=u.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},z.prototype.recoverPubKey=function(t,e,r,n){L((3&r)===r,"The recovery param is more than two bits"),e=new C(e,n);var i=this.n,a=new o.a(t),s=e.r,u=e.s,c=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var l=e.r.invm(i),h=i.sub(a).mul(l).umod(i),p=u.mul(l).umod(i);return this.g.mulAdd(h,s,p)},z.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new C(e,n)).recoveryParam)return e.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(t,e,o)}catch(t){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var H=u((function(t,e){var r=e;r.version="6.5.4",r.utils=h,r.rand=function(){throw new Error("unsupported")},r.curve=x,r.curves=O,r.ec=q,r.eddsa=null})).ec}).call(this,r(9))},function(t,e,r){(function(t,n,o){var i;function a(t){return(a="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)}
|
|
35
|
+
*/!function(a,s){"use strict";"object"===i(t)&&t.exports?t.exports=s():void 0===(o="function"==typeof(n=s)?n.call(e,r,e,t):n)||(t.exports=o)}(0,(function(t){"use strict";var e=t&&t.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return!1;var o=r.list[t.slice(e+1)];return!!o&&o.indexOf(" "+t.slice(n+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var n=r.list[t.slice(e+1)];return!!n&&n.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return null;var o=r.list[t.slice(e+1)];return o?o.indexOf(" "+t.slice(n+1,e)+" ")<0?null:t.slice(n+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return r}))}).call(this,r(8)(t))},function(t,e,r){"use strict";var n=r(7).rotr32;function o(t,e,r){return t&e^~t&r}function i(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?o(e,r,n):1===t||3===t?a(e,r,n):2===t?i(e,r,n):void 0},e.ch32=o,e.maj32=i,e.p32=a,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,e,r){"use strict";var n=r(7),o=r(13),i=r(29),a=r(12),s=n.sum32,u=n.sum32_4,c=n.sum32_5,f=i.ch32,l=i.maj32,h=i.s0_256,p=i.s1_256,d=i.g0_256,m=i.g1_256,y=o.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(g,y),t.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],d(r[n-15]),r[n-16]);var o=this.h[0],i=this.h[1],y=this.h[2],v=this.h[3],g=this.h[4],b=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var k=c(_,p(g),f(g,b,w),this.k[n],r[n]),A=s(h(o),l(o,i,y));_=w,w=b,b=g,g=s(v,k),v=y,y=i,i=o,o=s(k,A)}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],y),this.h[3]=s(this.h[3],v),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],_)},g.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(7),o=r(13),i=r(12),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,l=n.sum64_hi,h=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,m=n.sum64_5_hi,y=n.sum64_5_lo,v=o.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(t,e,r,n,o){var i=t&r^~t&o;return i<0&&(i+=4294967296),i}function _(t,e,r,n,o,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function k(t,e,r,n,o){var i=t&r^t&o^r&o;return i<0&&(i+=4294967296),i}function A(t,e,r,n,o,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function E(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function x(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function O(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function S(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function P(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function R(t,e){var r=s(t,e,1)^s(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function j(t,e){var r=a(t,e,19)^a(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,19)^s(e,t,29)^c(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(b,v),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var o=j(r[n-4],r[n-3]),i=T(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],u=P(r[n-30],r[n-29]),c=R(r[n-30],r[n-29]),f=r[n-32],l=r[n-31];r[n]=p(o,i,a,s,u,c,f,l),r[n+1]=d(o,i,a,s,u,c,f,l)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],p=this.h[6],d=this.h[7],v=this.h[8],g=this.h[9],b=this.h[10],P=this.h[11],R=this.h[12],j=this.h[13],T=this.h[14],I=this.h[15];i(this.k.length===r.length);for(var N=0;N<r.length;N+=2){var C=T,M=I,B=O(v,g),F=S(v,g),D=w(v,g,b,P,R),U=_(v,g,b,P,R,j),L=this.k[N],z=this.k[N+1],G=r[N],H=r[N+1],q=m(C,M,B,F,D,U,L,z,G,H),K=y(C,M,B,F,D,U,L,z,G,H);C=E(n,o),M=x(n,o),B=k(n,o,a,s,u),F=A(n,o,a,s,u,c);var V=l(C,M,B,F),W=h(C,M,B,F);T=R,I=j,R=b,j=P,b=v,P=g,v=l(p,d,q,K),g=h(d,d,q,K),p=u,d=c,u=a,c=s,a=n,s=o,n=l(q,K,V,W),o=h(q,K,V,W)}f(this.h,0,n,o),f(this.h,2,a,s),f(this.h,4,u,c),f(this.h,6,p,d),f(this.h,8,v,g),f(this.h,10,b,P),f(this.h,12,R,j),f(this.h,14,T,I)},b.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return H}));var n=r(2),o=r.n(n),i=r(4),a=r.n(i);function s(t){return(s="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)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t||"undefined"!=typeof self&&self;function u(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var c=f;function f(t,e){if(!t)throw new Error(e||"Assertion failed")}f.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var l=u((function(t,e){var r=e;function n(t){return 1===t.length?"0"+t:t}function o(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var o=t.charCodeAt(n),i=o>>8,a=255&o;i?r.push(i,a):r.push(a)}return r},r.zero2=n,r.toHex=o,r.encode=function(t,e){return"hex"===e?o(t):t}})),h=u((function(t,e){var r=e;r.assert=c,r.toArray=l.toArray,r.zero2=l.zero2,r.toHex=l.toHex,r.encode=l.encode,r.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var o=1<<e+1,i=t.clone(),a=0;a<n.length;a++){var s,u=i.andln(o-1);i.isOdd()?(s=u>(o>>1)-1?(o>>1)-u:u,i.isubn(s)):s=0,n[a]=s,i.iushrn(1)}return n},r.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,o=0,i=0;t.cmpn(-o)>0||e.cmpn(-i)>0;){var a,s,u=t.andln(3)+o&3,c=e.andln(3)+i&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0==(1&c)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*o===a+1&&(o=1-o),2*i===s+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},r.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new o.a(t,"hex","le")}})),p=h.getNAF,d=h.getJSF,m=h.assert;function y(t,e){this.type=t,this.p=new o.a(e.p,16),this.red=e.prime?o.a.red(e.prime):o.a.mont(this.p),this.zero=new o.a(0).toRed(this.red),this.one=new o.a(1).toRed(this.red),this.two=new o.a(2).toRed(this.red),this.n=e.n&&new o.a(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var v=y;function g(t,e){this.curve=t,this.type=e,this.precomputed=null}y.prototype.point=function(){throw new Error("Not implemented")},y.prototype.validate=function(){throw new Error("Not implemented")},y.prototype._fixedNafMul=function(t,e){m(t.precomputed);var r=t._getDoubles(),n=p(e,1,this._bitLength),o=(1<<r.step+1)-(r.step%2==0?2:1);o/=3;var i,a,s=[];for(i=0;i<n.length;i+=r.step){a=0;for(var u=i+r.step-1;u>=i;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=o;l>0;l--){for(i=0;i<s.length;i++)(a=s[i])===l?f=f.mixedAdd(r.points[i]):a===-l&&(f=f.mixedAdd(r.points[i].neg()));c=c.add(f)}return c.toP()},y.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var o=n.points,i=p(e,r,this._bitLength),a=this.jpoint(null,null,null),s=i.length-1;s>=0;s--){for(var u=0;s>=0&&0===i[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=i[s];m(0!==c),a="affine"===t.type?c>0?a.mixedAdd(o[c-1>>1]):a.mixedAdd(o[-c-1>>1].neg()):c>0?a.add(o[c-1>>1]):a.add(o[-c-1>>1].neg())}return"affine"===t.type?a.toP():a},y.prototype._wnafMulAdd=function(t,e,r,n,o){var i,a,s,u=this._wnafT1,c=this._wnafT2,f=this._wnafT3,l=0;for(i=0;i<n;i++){var h=(s=e[i])._getNAFPoints(t);u[i]=h.wnd,c[i]=h.points}for(i=n-1;i>=1;i-=2){var m=i-1,y=i;if(1===u[m]&&1===u[y]){var v=[e[m],null,null,e[y]];0===e[m].y.cmp(e[y].y)?(v[1]=e[m].add(e[y]),v[2]=e[m].toJ().mixedAdd(e[y].neg())):0===e[m].y.cmp(e[y].y.redNeg())?(v[1]=e[m].toJ().mixedAdd(e[y]),v[2]=e[m].add(e[y].neg())):(v[1]=e[m].toJ().mixedAdd(e[y]),v[2]=e[m].toJ().mixedAdd(e[y].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=d(r[m],r[y]);for(l=Math.max(b[0].length,l),f[m]=new Array(l),f[y]=new Array(l),a=0;a<l;a++){var w=0|b[0][a],_=0|b[1][a];f[m][a]=g[3*(w+1)+(_+1)],f[y][a]=0,c[m]=v}}else f[m]=p(r[m],u[m],this._bitLength),f[y]=p(r[y],u[y],this._bitLength),l=Math.max(f[m].length,l),l=Math.max(f[y].length,l)}var k=this.jpoint(null,null,null),A=this._wnafT4;for(i=l;i>=0;i--){for(var E=0;i>=0;){var x=!0;for(a=0;a<n;a++)A[a]=0|f[a][i],0!==A[a]&&(x=!1);if(!x)break;E++,i--}if(i>=0&&E++,k=k.dblp(E),i<0)break;for(a=0;a<n;a++){var O=A[a];0!==O&&(O>0?s=c[a][O-1>>1]:O<0&&(s=c[a][-O-1>>1].neg()),k="affine"===s.type?k.mixedAdd(s):k.add(s))}}for(i=0;i<n;i++)c[i]=null;return o?k:k.toP()},y.BasePoint=g,g.prototype.eq=function(){throw new Error("Not implemented")},g.prototype.validate=function(){return this.curve.validate(this)},y.prototype.decodePoint=function(t,e){t=h.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?m(t[t.length-1]%2==0):7===t[0]&&m(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},g.prototype.encodeCompressed=function(t){return this.encode(t,!0)},g.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},g.prototype.encode=function(t,e){return h.encode(this._encode(e),t)},g.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},g.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},g.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,o=0;o<e;o+=t){for(var i=0;i<t;i++)n=n.dbl();r.push(n)}return{step:t,points:r}},g.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),o=1;o<r;o++)e[o]=e[o-1].add(n);return{wnd:t,points:e}},g.prototype._getBeta=function(){return null},g.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e};var b=u((function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}})),w=h.assert;function _(t){v.call(this,"short",t),this.a=new o.a(t.a,16).toRed(this.red),this.b=new o.a(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}b(_,v);var k=_;function A(t,e,r,n){v.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o.a(e,16),this.y=new o.a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function E(t,e,r,n){v.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o.a(0)):(this.x=new o.a(e,16),this.y=new o.a(r,16),this.z=new o.a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}_.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new o.a(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new o.a(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],w(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new o.a(t.a,16),b:new o.a(t.b,16)}})):this._getEndoBasis(r)}}},_.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:o.a.mont(t),r=new o.a(2).toRed(e).redInvm(),n=r.redNeg(),i=new o.a(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},_.prototype._getEndoBasis=function(t){for(var e,r,n,i,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,p=this.n.clone(),d=new o.a(1),m=new o.a(0),y=new o.a(0),v=new o.a(1),g=0;0!==h.cmpn(0);){var b=p.div(h);c=p.sub(b.mul(h)),f=y.sub(b.mul(d));var w=v.sub(b.mul(m));if(!n&&c.cmp(l)<0)e=u.neg(),r=d,n=c.neg(),i=f;else if(n&&2==++g)break;u=c,p=h,h=c,y=d,d=f,v=m,m=w}a=c.neg(),s=f;var _=n.sqr().add(i.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=e,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},_.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],o=n.b.mul(t).divRound(this.n),i=r.b.neg().mul(t).divRound(this.n),a=o.mul(r.a),s=i.mul(n.a),u=o.mul(r.b),c=i.mul(n.b);return{k1:t.sub(a).sub(s),k2:u.add(c).neg()}},_.prototype.pointFromX=function(t,e){(t=new o.a(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},_.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),o=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},_.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,i=0;i<t.length;i++){var a=this._endoSplit(e[i]),s=t[i],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*i]=s,n[2*i+1]=u,o[2*i]=a.k1,o[2*i+1]=a.k2}for(var c=this._wnafMulAdd(1,n,o,2*i,r),f=0;f<2*i;f++)n[f]=null,o[f]=null;return c},b(A,v.BasePoint),_.prototype.point=function(t,e,r){return new A(this,t,e,r)},_.prototype.pointFromJSON=function(t,e){return A.fromJSON(this,t,e)},A.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},A.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},A.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function o(e){return t.point(e[0],e[1],r)}var i=e[2];return n.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[n].concat(i.doubles.points.map(o))},naf:i.naf&&{wnd:i.naf.wnd,points:[n].concat(i.naf.points.map(o))}},n},A.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},A.prototype.isInfinity=function(){return this.inf},A.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},A.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),i=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,a)},A.prototype.getX=function(){return this.x.fromRed()},A.prototype.getY=function(){return this.y.fromRed()},A.prototype.mul=function(t){return t=new o.a(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},A.prototype.mulAdd=function(t,e,r){var n=[this,e],o=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2)},A.prototype.jmulAdd=function(t,e,r){var n=[this,e],o=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0)},A.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},A.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},A.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},b(E,v.BasePoint),_.prototype.jpoint=function(t,e,r){return new E(this,t,e,r)},E.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),o=t.x.redMul(r),i=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(o),u=i.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),p=u.redMul(l.redISub(h)).redISub(i.redMul(f)),d=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(h,p,d)},E.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),o=this.y,i=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=o.redSub(i);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(a);return this.curve.jpoint(l,h,p)},E.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,o=this.curve.tinv,i=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(e=0;e<t;e++){var f=i.redSqr(),l=c.redSqr(),h=l.redSqr(),p=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),d=i.redMul(l),m=p.redSqr().redISub(d.redAdd(d)),y=d.redISub(m),v=p.redMul(y);v=v.redIAdd(v).redISub(h);var g=c.redMul(s);e+1<t&&(u=u.redMul(h)),i=m,s=g,c=v}return this.curve.jpoint(i,c.redMul(o),s)},E.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},E.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(n).redISub(i);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),p=this.x.redAdd(l).redSqr().redISub(f).redISub(h);p=p.redIAdd(p);var d=f.redAdd(f).redIAdd(f),m=d.redSqr(),y=h.redIAdd(h);y=(y=y.redIAdd(y)).redIAdd(y),t=m.redISub(p).redISub(p),e=d.redMul(p.redISub(t)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},E.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(n).redISub(i);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);t=u;var c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),p=this.x.redSub(f).redMul(this.x.redAdd(f));p=p.redAdd(p).redIAdd(p);var d=h.redIAdd(h),m=(d=d.redIAdd(d)).redAdd(d);t=p.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var y=l.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),e=p.redMul(d.redISub(t)).redISub(y)}return this.curve.jpoint(t,e,r)},E.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,o=n.redSqr().redSqr(),i=e.redSqr(),a=r.redSqr(),s=i.redAdd(i).redIAdd(i).redIAdd(t.redMul(o)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),l=c.redISub(f),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var p=s.redMul(l).redISub(h),d=r.redAdd(r).redMul(n);return this.curve.jpoint(f,p,d)},E.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),o=t.redAdd(t).redIAdd(t),i=o.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(i)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=o.redIAdd(a).redSqr().redISub(i).redISub(s).redISub(u),f=e.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var p=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(l,h,p)},E.prototype.mul=function(t,e){return t=new o.a(t,e),this.curve._wnafMul(this,t)},E.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),o=r.redMul(t.z);return 0===this.y.redMul(o).redISub(t.y.redMul(n)).cmpn(0)},E.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),o=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0}},E.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var x=u((function(t,e){var r=e;r.base=v,r.short=k,r.mont=null,r.edwards=null})),O=u((function(t,e){var r,n=e,o=h.assert;function i(t){"short"===t.type?this.curve=new x.short(t):"edwards"===t.type?this.curve=new x.edwards(t):this.curve=new x.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new i(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(t){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function S(t){if(!(this instanceof S))return new S(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=l.toArray(t.entropy,t.entropyEnc||"hex"),r=l.toArray(t.nonce,t.nonceEnc||"hex"),n=l.toArray(t.pers,t.persEnc||"hex");c(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var P=S;S.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},S.prototype._hmac=function(){return new a.a.hmac(this.hash,this.K)},S.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},S.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=l.toArray(t,e),r=l.toArray(r,n),c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},S.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=l.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var i=o.slice(0,t);return this._update(r),this._reseed++,l.encode(i,e)};var R=h.assert;function j(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var T=j;j.fromPublic=function(t,e,r){return e instanceof j?e:new j(t,{pub:e,pubEnc:r})},j.fromPrivate=function(t,e,r){return e instanceof j?e:new j(t,{priv:e,privEnc:r})},j.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},j.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},j.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},j.prototype._importPrivate=function(t,e){this.priv=new o.a(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},j.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?R(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||R(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},j.prototype.derive=function(t){return t.validate()||R(t.validate(),"public point not validated"),t.mul(this.priv).getX()},j.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},j.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},j.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var I=h.assert;function N(t,e){if(t instanceof N)return t;this._importDER(t,e)||(I(t.r&&t.s,"Signature without r or s"),this.r=new o.a(t.r,16),this.s=new o.a(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var C=N;function M(){this.place=0}function B(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var o=0,i=0,a=e.place;i<n;i++,a++)o<<=8,o|=t[a],o>>>=0;return!(o<=127)&&(e.place=a,o)}function F(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function D(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}N.prototype._importDER=function(t,e){t=h.toArray(t,e);var r=new M;if(48!==t[r.place++])return!1;var n=B(t,r);if(!1===n)return!1;if(n+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var i=B(t,r);if(!1===i)return!1;var a=t.slice(r.place,i+r.place);if(r.place+=i,2!==t[r.place++])return!1;var s=B(t,r);if(!1===s)return!1;if(t.length!==s+r.place)return!1;var u=t.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new o.a(a),this.s=new o.a(u),this.recoveryParam=null,!0},N.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=F(e),r=F(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];D(n,e.length),(n=n.concat(e)).push(2),D(n,r.length);var o=n.concat(r),i=[48];return D(i,o.length),i=i.concat(o),h.encode(i,t)};var U=function(){throw new Error("unsupported")},L=h.assert;function z(t){if(!(this instanceof z))return new z(t);"string"==typeof t&&(L(Object.prototype.hasOwnProperty.call(O,t),"Unknown curve "+t),t=O[t]),t instanceof O.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var G=z;z.prototype.keyPair=function(t){return new T(this,t)},z.prototype.keyFromPrivate=function(t,e){return T.fromPrivate(this,t,e)},z.prototype.keyFromPublic=function(t,e){return T.fromPublic(this,t,e)},z.prototype.genKeyPair=function(t){t||(t={});for(var e=new P({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||U(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new o.a(2));;){var i=new o.a(e.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},z.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},z.prototype.sign=function(t,e,r,n){"object"===s(r)&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new o.a(t,16));for(var i=this.n.byteLength(),a=e.getPrivate().toArray("be",i),u=t.toArray("be",i),c=new P({hash:this.hash,entropy:a,nonce:u,pers:n.pers,persEnc:n.persEnc||"utf8"}),f=this.n.sub(new o.a(1)),l=0;;l++){var h=n.k?n.k(l):new o.a(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(f)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var d=p.getX(),m=d.umod(this.n);if(0!==m.cmpn(0)){var y=h.invm(this.n).mul(m.mul(e.getPrivate()).iadd(t));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==d.cmp(m)?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new C({r:m,s:y,recoveryParam:v})}}}}}},z.prototype.verify=function(t,e,r,n){t=this._truncateToN(new o.a(t,16)),r=this.keyFromPublic(r,n);var i=(e=new C(e,"hex")).r,a=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(t).umod(this.n),f=u.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},z.prototype.recoverPubKey=function(t,e,r,n){L((3&r)===r,"The recovery param is more than two bits"),e=new C(e,n);var i=this.n,a=new o.a(t),s=e.r,u=e.s,c=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var l=e.r.invm(i),h=i.sub(a).mul(l).umod(i),p=u.mul(l).umod(i);return this.g.mulAdd(h,s,p)},z.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new C(e,n)).recoveryParam)return e.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(t,e,o)}catch(t){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var H=u((function(t,e){var r=e;r.version="6.5.4",r.utils=h,r.rand=function(){throw new Error("unsupported")},r.curve=x,r.curves=O,r.ec=G,r.eddsa=null})).ec}).call(this,r(9))},function(t,e,r){(function(t,n,o){var i;function a(t){return(a="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)}
|
|
36
36
|
/**
|
|
37
37
|
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
38
38
|
*
|
|
@@ -40,11 +40,11 @@ var n=r(44),o=r(45),i=r(46);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647
|
|
|
40
40
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
41
41
|
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
42
42
|
* @license MIT
|
|
43
|
-
*/!function(){"use strict";var s="input is invalid type",u="object"===("undefined"==typeof window?"undefined":a(window)),c=u?window:{};c.JS_SHA3_NO_WINDOW&&(u=!1);var f=!u&&"object"===("undefined"==typeof self?"undefined":a(self));!c.JS_SHA3_NO_NODE_JS&&"object"===(void 0===t?"undefined":a(t))&&t.versions&&t.versions.node?c=n:f&&(c=self);var l=!c.JS_SHA3_NO_COMMON_JS&&"object"===a(o)&&o.exports,h=r(18),p=!c.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),m=[4,1024,262144,67108864],v=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],y=[224,256,384,512],b=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],k={128:168,256:136};!c.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!p||!c.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"===a(t)&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var _=function(t,e,r){return function(n){return new F(t,e,t).update(n)[r]()}},A=function(t,e,r){return function(n,o){return new F(t,e,o).update(n)[r]()}},E=function(t,e,r){return function(e,n,o,i){return R["cshake"+t].update(e,n,o,i)[r]()}},x=function(t,e,r){return function(e,n,o,i){return R["kmac"+t].update(e,n,o,i)[r]()}},O=function(t,e,r,n){for(var o=0;o<w.length;++o){var i=w[o];t[i]=e(r,n,i)}return t},S=function(t,e){var r=_(t,e,"hex");return r.create=function(){return new F(t,e,t)},r.update=function(t){return r.create().update(t)},O(r,_,t,e)},P=[{name:"keccak",padding:[1,256,65536,16777216],bits:y,createMethod:S},{name:"sha3",padding:[6,1536,393216,100663296],bits:y,createMethod:S},{name:"shake",padding:[31,7936,2031616,520093696],bits:b,createMethod:function(t,e){var r=A(t,e,"hex");return r.create=function(r){return new F(t,e,r)},r.update=function(t,e){return r.create(e).update(t)},O(r,A,t,e)}},{name:"cshake",padding:m,bits:b,createMethod:function(t,e){var r=k[t],n=E(t,0,"hex");return n.create=function(n,o,i){return o||i?new F(t,e,n).bytepad([o,i],r):R["shake"+t].create(n)},n.update=function(t,e,r,o){return n.create(e,r,o).update(t)},O(n,E,t,e)}},{name:"kmac",padding:m,bits:b,createMethod:function(t,e){var r=k[t],n=x(t,0,"hex");return n.create=function(n,o,i){return new D(t,e,o).bytepad(["KMAC",i],r).bytepad([n],r)},n.update=function(t,e,r,o){return n.create(t,r,o).update(e)},O(n,x,t,e)}}],R={},T=[],j=0;j<P.length;++j)for(var I=P[j],N=I.bits,C=0;C<N.length;++C){var M=I.name+"_"+N[C];if(T.push(M),R[M]=I.createMethod(N[C],I.padding),"sha3"!==I.name){var B=I.name+N[C];T.push(B),R[B]=R[M]}}function F(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function D(t,e,r){F.call(this,t,e,r)}F.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,r=a(t);if("string"!==r){if("object"!==r)throw new Error(s);if(null===t)throw new Error(s);if(p&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||p&&ArrayBuffer.isView(t)))throw new Error(s);e=!0}for(var n,o,i=this.blocks,u=this.byteCount,c=t.length,f=this.blockCount,l=0,h=this.s;l<c;){if(this.reset)for(this.reset=!1,i[0]=this.block,n=1;n<f+1;++n)i[n]=0;if(e)for(n=this.start;l<c&&n<u;++l)i[n>>2]|=t[l]<<v[3&n++];else for(n=this.start;l<c&&n<u;++l)(o=t.charCodeAt(l))<128?i[n>>2]|=o<<v[3&n++]:o<2048?(i[n>>2]|=(192|o>>6)<<v[3&n++],i[n>>2]|=(128|63&o)<<v[3&n++]):o<55296||o>=57344?(i[n>>2]|=(224|o>>12)<<v[3&n++],i[n>>2]|=(128|o>>6&63)<<v[3&n++],i[n>>2]|=(128|63&o)<<v[3&n++]):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++l)),i[n>>2]|=(240|o>>18)<<v[3&n++],i[n>>2]|=(128|o>>12&63)<<v[3&n++],i[n>>2]|=(128|o>>6&63)<<v[3&n++],i[n>>2]|=(128|63&o)<<v[3&n++]);if(this.lastByteIndex=n,n>=u){for(this.start=n-u,this.block=i[f],n=0;n<f;++n)h[n]^=i[n];U(h),this.reset=!0}else this.start=n}return this},F.prototype.encode=function(t,e){var r=255&t,n=1,o=[r];for(r=255&(t>>=8);r>0;)o.unshift(r),r=255&(t>>=8),++n;return e?o.push(n):o.unshift(n),this.update(o),o.length},F.prototype.encodeString=function(t){var e,r=a(t);if("string"!==r){if("object"!==r)throw new Error(s);if(null===t)throw new Error(s);if(p&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||p&&ArrayBuffer.isView(t)))throw new Error(s);e=!0}var n=0,o=t.length;if(e)n=o;else for(var i=0;i<t.length;++i){var u=t.charCodeAt(i);u<128?n+=1:u<2048?n+=2:u<55296||u>=57344?n+=3:(u=65536+((1023&u)<<10|1023&t.charCodeAt(++i)),n+=4)}return n+=this.encode(8*n),this.update(t),n},F.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n<t.length;++n)r+=this.encodeString(t[n]);var o=e-r%e,i=[];return i.length=o,this.update(i),this},F.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,n=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)n[e]^=t[e];U(n)}},F.prototype.toString=F.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,a=0,s="";a<n;){for(i=0;i<e&&a<n;++i,++a)t=r[i],s+=d[t>>4&15]+d[15&t]+d[t>>12&15]+d[t>>8&15]+d[t>>20&15]+d[t>>16&15]+d[t>>28&15]+d[t>>24&15];a%e==0&&(U(r),i=0)}return o&&(t=r[i],s+=d[t>>4&15]+d[15&t],o>1&&(s+=d[t>>12&15]+d[t>>8&15]),o>2&&(s+=d[t>>20&15]+d[t>>16&15])),s},F.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,a=0,s=this.outputBits>>3;t=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(t);a<n;){for(i=0;i<e&&a<n;++i,++a)u[a]=r[i];a%e==0&&U(r)}return o&&(u[i]=r[i],t=t.slice(0,s)),t},F.prototype.buffer=F.prototype.arrayBuffer,F.prototype.digest=F.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,o=this.outputBlocks,i=this.extraBytes,a=0,s=0,u=[];s<o;){for(a=0;a<r&&s<o;++a,++s)t=s<<2,e=n[a],u[t]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;s%r==0&&U(n)}return i&&(t=s<<2,e=n[a],u[t]=255&e,i>1&&(u[t+1]=e>>8&255),i>2&&(u[t+2]=e>>16&255)),u},D.prototype=new F,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),F.prototype.finalize.call(this)};var U=function(t){var e,r,n,o,i,a,s,u,c,f,l,h,p,d,m,v,y,b,w,k,_,A,E,x,O,S,P,R,T,j,I,N,C,M,B,F,D,U,L,z,q,H,G,K,W,Q,V,J,Y,Z,X,$,tt,et,rt,nt,ot,it,at,st,ut,ct,ft;for(n=0;n<48;n+=2)o=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],a=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],e=(h=t[8]^t[18]^t[28]^t[38]^t[48])^(a<<1|s>>>31),r=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(s<<1|a>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=o^(u<<1|c>>>31),r=i^(c<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=a^(f<<1|l>>>31),r=s^(l<<1|f>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=f^(o<<1|i>>>31),r=l^(i<<1|o>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,d=t[0],m=t[1],Q=t[11]<<4|t[10]>>>28,V=t[10]<<4|t[11]>>>28,R=t[20]<<3|t[21]>>>29,T=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,G=t[41]<<18|t[40]>>>14,M=t[2]<<1|t[3]>>>31,B=t[3]<<1|t[2]>>>31,v=t[13]<<12|t[12]>>>20,y=t[12]<<12|t[13]>>>20,J=t[22]<<10|t[23]>>>22,Y=t[23]<<10|t[22]>>>22,j=t[33]<<13|t[32]>>>19,I=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ft=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,F=t[14]<<6|t[15]>>>26,D=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,Z=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,N=t[45]<<29|t[44]>>>3,C=t[44]<<29|t[45]>>>3,x=t[6]<<28|t[7]>>>4,O=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,ot=t[16]<<23|t[17]>>>9,U=t[26]<<25|t[27]>>>7,L=t[27]<<25|t[26]>>>7,k=t[36]<<21|t[37]>>>11,_=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,K=t[8]<<27|t[9]>>>5,W=t[9]<<27|t[8]>>>5,S=t[18]<<20|t[19]>>>12,P=t[19]<<20|t[18]>>>12,it=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,z=t[38]<<8|t[39]>>>24,q=t[39]<<8|t[38]>>>24,A=t[48]<<14|t[49]>>>18,E=t[49]<<14|t[48]>>>18,t[0]=d^~v&b,t[1]=m^~y&w,t[10]=x^~S&R,t[11]=O^~P&T,t[20]=M^~F&U,t[21]=B^~D&L,t[30]=K^~Q&J,t[31]=W^~V&Y,t[40]=et^~nt&it,t[41]=rt^~ot&at,t[2]=v^~b&k,t[3]=y^~w&_,t[12]=S^~R&j,t[13]=P^~T&I,t[22]=F^~U&z,t[23]=D^~L&q,t[32]=Q^~J&Z,t[33]=V^~Y&X,t[42]=nt^~it&st,t[43]=ot^~at&ut,t[4]=b^~k&A,t[5]=w^~_&E,t[14]=R^~j&N,t[15]=T^~I&C,t[24]=U^~z&H,t[25]=L^~q&G,t[34]=J^~Z&$,t[35]=Y^~X&tt,t[44]=it^~st&ct,t[45]=at^~ut&ft,t[6]=k^~A&d,t[7]=_^~E&m,t[16]=j^~N&x,t[17]=I^~C&O,t[26]=z^~H&M,t[27]=q^~G&B,t[36]=Z^~$&K,t[37]=X^~tt&W,t[46]=st^~ct&et,t[47]=ut^~ft&rt,t[8]=A^~d&v,t[9]=E^~m&y,t[18]=N^~x&S,t[19]=C^~O&P,t[28]=H^~M&F,t[29]=G^~B&D,t[38]=$^~K&Q,t[39]=tt^~W&V,t[48]=ct^~et&nt,t[49]=ft^~rt&ot,t[0]^=g[n],t[1]^=g[n+1]};if(l)o.exports=R;else{for(j=0;j<T.length;++j)c[T[j]]=R[T[j]];h&&(void 0===(i=function(){return R}.call(e,r,e,o))||(o.exports=i))}}()}).call(this,r(17),r(9),r(8)(t))},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n="random/5.7.0"},function(t,e,r){var n=r(21),o=r(22),i=r(23),a=r(39),s=r(40);function u(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 c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f=r(41),l=r(42),h=l.ValidatePresence,p=l.ValidatePermission,d=function(){"use strict";function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{offline:!1};a(this,t),this.client=e,this.subjectNames={},this.drafts={},this.offline=r.offline}var e,r,i,u,l,d,m,v,g,y,b,w,k,_,A;return s(t,[{key:"FormatDate",value:function(t){if(t){if(isNaN(new Date(t)))throw Error("Invalid start time: ".concat(t));return new Date(t).toISOString()}}},{key:"FormatProfile",value:function(t){var e=this;p(t.default_permission);var r={};return t.start&&(r.start=this.FormatDate(t.start)),t.end&&(r.end=this.FormatDate(t.end)),["assets","offerings"].forEach((function(n){var o=t[n]||{};r[n]={default_permission:o.default_permission||o.default_permissions||"no-access"},o.custom_permissions&&(r[n].custom_permissions={},Object.keys(o.custom_permissions).forEach((function(t){var i=o.custom_permissions[t],a={permission:p(i.permission)};i.start&&(a.start=e.FormatDate(i.start)),i.end&&(a.end=e.FormatDate(i.end)),r[n].custom_permissions[t]=c(c({},i),a)})))})),r}},{key:"FormatPermission",value:(A=o(n.mark((function t(e){var r,o,i,a,s,u,c,l,h,p,d,m;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.policyId,o=e.policyWriteToken,i=e.permission,a=i.subject.type.startsWith("oauth")?"oauth":"fabric",t.t0=i.subject.type,t.next="otp"===t.t0?5:"otp_subject"===t.t0?8:"group"===t.t0||"oauth_group"===t.t0?13:"user"===t.t0||"oauth_user"===t.t0?16:19;break;case 5:return s="ntp",u=i.subject.id,t.abrupt("break",20);case 8:return s="ntp_subject",u=i.subject.id,c=u,l=i.subject.otp_id,t.abrupt("break",20);case 13:return s="group",u="oauth"===a?i.subject.oauth_id:this.client.utils.HashToAddress(i.subject.id),t.abrupt("break",20);case 16:return s="user",u="oauth"===a?i.subject.oauth_id:this.client.utils.HashToAddress(i.subject.id),t.abrupt("break",20);case 19:throw Error("Unknown subject type: "+i.subject.type);case 20:if(h=i.subject.oauth_id||i.subject.id,p=this.subjectNames[h],c=c||p||i.subject.id,p||"fabric"!==a){t.next=74;break}if("group"!==s){t.next=36;break}return t.next=27,this.client.ContentSpaceId();case 27:return d=t.sent.replace("ispc","ilib"),t.next=30,this.client.ContentObjectMetadata({libraryId:d,objectId:this.client.utils.AddressToObjectId(u),metadataSubtree:f("public","name")});case 30:if(t.t1=t.sent,t.t1){t.next=33;break}t.t1=u;case 33:c=t.t1,t.next=74;break;case 36:if("user"!==s){t.next=56;break}return t.t4=this.client,t.next=40,this.client.ContentObjectLibraryId({objectId:r});case 40:return t.t5=t.sent,t.t6=r,t.t7=o,t.t8=f("auth_policy_settings","fabric_users",u),t.t9={libraryId:t.t5,objectId:t.t6,writeToken:t.t7,metadataSubtree:t.t8},t.next=47,t.t4.ContentObjectMetadata.call(t.t4,t.t9);case 47:if(t.t3=t.sent,t.t3){t.next=50;break}t.t3={};case 50:if(t.t2=t.t3.name,t.t2){t.next=53;break}t.t2=u;case 53:c=t.t2,t.next=74;break;case 56:if("ntp"!==s){t.next=74;break}return t.t12=this.client,t.next=60,this.client.ContentObjectLibraryId({objectId:r});case 60:return t.t13=t.sent,t.t14=r,t.t15=o,t.t16=f("auth_policy_settings","ntp_instances",u),t.t17={libraryId:t.t13,objectId:t.t14,writeToken:t.t15,metadataSubtree:t.t16},t.next=67,t.t12.ContentObjectMetadata.call(t.t12,t.t17);case 67:if(t.t11=t.sent,t.t11){t.next=70;break}t.t11={};case 70:if(t.t10=t.t11.name,t.t10){t.next=73;break}t.t10=u;case 73:c=t.t10;case 74:return this.subjectNames[h]=c,m={profileName:i.profile,subjectSource:a,subjectType:s,subjectId:u,subjectName:c},l&&(m.subjectNTPId=l),i.start&&(m.start=i.start),i.end&&(m.end=i.end),t.abrupt("return",m);case 80:case"end":return t.stop()}}),t,this)}))),function(t){return A.apply(this,arguments)})},{key:"OpenOfflineDraft",value:(_=o(n.mark((function t(e){var r,o,i,a;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.policyId,o=e.policyLibraryId,i=e.policyWriteToken,null!=o){t.next=5;break}return t.next=4,this.client.ContentObjectLibraryId({objectId:r});case 4:o=t.sent;case 5:return t.next=7,this.client.ContentObjectMetadata({libraryId:o,objectId:r,writeToken:i});case 7:a=t.sent,this.drafts[r]={meta:a,policyLibraryId:o,policyWriteToken:i};case 9:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)})},{key:"CloseOfflineDraft",value:(k=o(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.policyId,null!=this.drafts[r]){t.next=3;break}throw Error("No draft open for policyId: "+r);case 3:return t.next=5,this.client.ReplaceMetadata({libraryId:this.drafts[r].policyLibraryId,objectId:r,writeToken:this.drafts[r].policyWriteToken,metadata:this.drafts[r].meta});case 5:this.drafts[r]=null;case 6:case"end":return t.stop()}}),t,this)}))),function(t){return k.apply(this,arguments)})},{key:"PolicyItems",value:(w=o(n.mark((function t(e){var r,o;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,t.t1=this.client,t.next=4,this.client.ContentObjectLibraryId({objectId:r});case 4:return t.t2=t.sent,t.t3=r,t.t4=o,t.t5=["*/display_title"],t.t6={libraryId:t.t2,objectId:t.t3,writeToken:t.t4,metadataSubtree:"auth_policy_spec",select:t.t5},t.next=11,t.t1.ContentObjectMetadata.call(t.t1,t.t6);case 11:if(t.t0=t.sent,t.t0){t.next=14;break}t.t0={};case 14:return t.abrupt("return",t.t0);case 15:case"end":return t.stop()}}),t,this)}))),function(t){return w.apply(this,arguments)})},{key:"ItemPolicy",value:(b=o(n.mark((function t(e){var r,o,i,a,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,t.next=3,this.ItemProfiles({policyId:r,policyWriteToken:o,itemId:i});case 3:return a=t.sent,t.next=6,this.ItemPermissions({policyId:r,policyWriteToken:o,itemId:i});case 6:if(s=t.sent,a&&s){t.next=9;break}return t.abrupt("return");case 9:return t.abrupt("return",{profiles:a,permissions:s});case 10:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"CreateItemPolicy",value:(y=o(n.mark((function t(e){var r,o,i,a,s,u,c,l,p,d=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.profiles,s=void 0===a?{}:a,h("policyId",r),h("policyWriteToken",o),h("itemId",i),h("profiles",s),t.t1=this.client,t.next=8,this.client.ContentObjectLibraryId({objectId:i});case 8:return t.t2=t.sent,t.t3=i,t.t4=["public/name","public/asset_metadata/title","public/asset_metadata/display_title"],t.t5={libraryId:t.t2,objectId:t.t3,select:t.t4},t.next=14,t.t1.ContentObjectMetadata.call(t.t1,t.t5);case 14:if(t.t0=t.sent,t.t0){t.next=17;break}t.t0={};case 17:return u=t.t0,c=(u.public||{}).asset_metadata||{},l=c.display_title||c.title||(u.public||{}).name,p={display_title:l,permissions:[],profiles:{}},Object.keys(s).forEach((function(t){p.profiles[t]=d.FormatProfile(s[t])})),t.t6=this.client,t.next=25,this.client.ContentObjectLibraryId({objectId:r});case 25:return t.t7=t.sent,t.t8=r,t.t9=o,t.t10=f("auth_policy_spec",i),t.t11=p,t.t12={libraryId:t.t7,objectId:t.t8,writeToken:t.t9,metadataSubtree:t.t10,metadata:t.t11},t.next=33,t.t6.ReplaceMetadata.call(t.t6,t.t12);case 33:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"RemoveItemPolicy",value:(g=o(n.mark((function t(e){var r,o,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,h("policyId",r),h("policyWriteToken",o),h("itemId",i),t.t0=this.client,t.next=7,this.client.ContentObjectLibraryId({objectId:r});case 7:return t.t1=t.sent,t.t2=r,t.t3=o,t.t4=f("auth_policy_spec",i),t.t5={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4},t.next=14,t.t0.DeleteMetadata.call(t.t0,t.t5);case 14:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"ItemProfiles",value:(v=o(n.mark((function t(e){var r,o,i,a;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.profileName,t.t0=this.client,t.next=4,this.client.ContentObjectLibraryId({objectId:r});case 4:return t.t1=t.sent,t.t2=r,t.t3=o,t.t4=f("auth_policy_spec",i,"profiles",a||""),t.t5={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4},t.next=11,t.t0.ContentObjectMetadata.call(t.t0,t.t5);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"SetProfile",value:(m=o(n.mark((function t(e){var r,o,i,a,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.profileName,s=e.profileSpec,h("policyId",r),h("policyWriteToken",o),h("itemId",i),h("profileName",a),h("profileSpec",s),t.t0=this.client,t.next=9,this.client.ContentObjectLibraryId({objectId:r});case 9:return t.t1=t.sent,t.t2=r,t.t3=o,t.t4=f("auth_policy_spec",i,"profiles",a),t.t5=this.FormatProfile(s),t.t6={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4,metadata:t.t5},t.next=17,t.t0.ReplaceMetadata.call(t.t0,t.t6);case 17:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"RemoveProfile",value:(d=o(n.mark((function t(e){var r,o,i,a;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.profileName,h("policyId",r),h("policyWriteToken",o),h("itemId",i),h("profileName",a),t.t0=this.client,t.next=8,this.client.ContentObjectLibraryId({objectId:r});case 8:return t.t1=t.sent,t.t2=r,t.t3=o,t.t4=f("auth_policy_spec",i,"profiles",a),t.t5={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4},t.next=15,t.t0.DeleteMetadata.call(t.t0,t.t5);case 15:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"ItemPermissions",value:(l=o(n.mark((function t(e){var r,i,a,s,u,c=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,i=e.policyWriteToken,a=e.itemId,t.next=3,this.client.ContentObjectLibraryId({objectId:r});case 3:return s=t.sent,t.next=6,this.client.ContentObjectMetadata({libraryId:s,objectId:r,writeToken:i,metadataSubtree:f("auth_policy_spec",a,"permissions")});case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0=[];case 9:return u=t.t0,t.next=12,Promise.all(u.map(function(){var t=o(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.FormatPermission({policyId:r,policyWriteToken:i,permission:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 12:return t.abrupt("return",t.sent);case 13:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"SetPermission",value:(u=o(n.mark((function t(e){var r,o,i,a,s,u,c,l,p,d,m,v,g,y,b,w,k,_,A,E,x;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.subjectSource,s=void 0===a?"fabric":a,u=e.subjectType,c=void 0===u?"group":u,l=e.subjectName,p=e.subjectId,d=e.subjectNTPId,m=e.profileName,v=e.start,g=e.end,h("policyId",r),h("policyWriteToken",o),h("itemId",i),h("subjectType",c),h("subjectSource",s),h("subjectId",p),h("profileName",m),v=this.FormatDate(v),g=this.FormatDate(g),y=this.offline&&null!=this.drafts[r],b=null,y){t.next=16;break}return t.next=15,this.client.ContentObjectLibraryId({objectId:r});case 15:b=t.sent;case 16:if("fabric"===s&&("group"===c?p.startsWith("igrp")||(p="igrp".concat(this.client.utils.AddressToHash(p))):"user"===c&&(p.startsWith("iusr")||(p="iusr".concat(this.client.utils.AddressToHash(p))))),!y){t.next=21;break}w=this.drafts[r].meta.auth_policy_spec[i],t.next=24;break;case 21:return t.next=23,this.client.ContentObjectMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_spec",i)});case 23:w=t.sent;case 24:if(w){t.next=26;break}throw Error("Unable to add permissions to uninitialized item");case 26:if(w.profiles[m]){t.next=28;break}throw Error("Profile '".concat(m,"' does not exist"));case 28:if((k=w.permissions.findIndex((function(t){return"fabric"===s?t.subject.id===p:t.subject.oauth_id===p})))<0&&(k=w.permissions.length),_={profile:m},v&&(_.start=v),g&&(_.end=g),"fabric"!==s){t.next=53;break}if("group"!==c){t.next=38;break}A={id:p,type:"group"},t.next=51;break;case 38:if("user"!==c){t.next=42;break}A={id:p,type:"user"},t.next=51;break;case 42:if("ntp"!==c){t.next=46;break}A={id:p,type:"otp"},t.next=51;break;case 46:if("ntp_subject"!==c){t.next=50;break}A={id:p,otp_id:d,type:"otp_subject"},t.next=51;break;case 50:throw Error("Invalid subject type: ".concat(c));case 51:t.next=66;break;case 53:if("oauth"!==s){t.next=65;break}if("group"!==c){t.next=58;break}A={id:l,oauth_id:p,type:"oauth_group"},t.next=63;break;case 58:if("user"!==c){t.next=62;break}A={id:l,oauth_id:p,type:"oauth_user"},t.next=63;break;case 62:throw Error("Invalid subject type: ".concat(c));case 63:t.next=66;break;case 65:throw Error("Invalid subject source: ".concat(s));case 66:if(_.subject=A,w.permissions[k]=_,y){t.next=71;break}return t.next=71,this.client.ReplaceMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_spec",i,"permissions"),metadata:w.permissions});case 71:if("fabric"!==s||"user"!==c){t.next=85;break}if(E={address:this.client.utils.HashToAddress(p),name:l},!y){t.next=77;break}this.drafts[r].meta.auth_policy_settings.fabric_users[this.client.utils.HashToAddress(p)]=E,t.next=83;break;case 77:return t.next=79,this.client.ContentObjectMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_settings","fabric_users",this.client.utils.HashToAddress(p))});case 79:if(t.sent){t.next=83;break}return t.next=83,this.client.ReplaceMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_settings","fabric_users",this.client.utils.HashToAddress(p)),metadata:E});case 83:t.next=97;break;case 85:if("fabric"!==s||"ntp"!==c){t.next=97;break}if(x={address:p,ntpId:p,name:l,type:"ntpInstance"},!y){t.next=91;break}this.drafts[r].meta.auth_policy_settings.ntp_instances[p]=x,t.next=97;break;case 91:return t.next=93,this.client.ContentObjectMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_settings","ntp_instances",p)});case 93:if(t.sent){t.next=97;break}return t.next=97,this.client.ReplaceMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_settings","ntp_instances",p),metadata:x});case 97:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"RemovePermission",value:(i=o(n.mark((function t(e){var r,i,a,s,u,c,l,p=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,i=e.policyWriteToken,a=e.itemId,s=e.subjectId,h("policyId",r),h("policyWriteToken",i),h("itemId",a),h("subjectId",s),t.next=7,this.client.ContentObjectLibraryId({objectId:r});case 7:return u=t.sent,t.next=10,this.client.ContentObjectMetadata({libraryId:u,objectId:r,writeToken:i,metadataSubtree:f("auth_policy_spec",a,"permissions")});case 10:if(c=t.sent){t.next=13;break}return t.abrupt("return");case 13:if(!s.startsWith("0x")){t.next=23;break}return l=this.client.utils.AddressToObjectId(s),t.next=17,this.client.AccessType({id:l});case 17:if(t.t0=t.sent,"group"!==t.t0){t.next=22;break}s="igrp".concat(this.client.utils.AddressToHash(s)),t.next=23;break;case 22:s="iusr".concat(this.client.utils.AddressToHash(s));case 23:return t.next=25,Promise.all(c.map(function(){var t=o(n.mark((function t(e,o){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.subject.id!==s&&e.subject.oauth_id!==s){t.next=3;break}return t.next=3,p.client.DeleteMetadata({libraryId:u,objectId:r,writeToken:i,metadataSubtree:f("auth_policy_spec",a,"permissions",o.toString())});case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()));case 25:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"SubjectPermissions",value:(r=o(n.mark((function t(e){var r,i,a,s,u,l,p,d,m,v,g,y,b=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.policyId,i=e.policyWriteToken,a=e.subjectId,h("policyId",r),h("subjectId",a),!a.startsWith("0x")){t.next=13;break}return s=this.client.utils.AddressToObjectId(a),t.next=7,this.client.AccessType({id:s});case 7:if(t.t0=t.sent,"group"!==t.t0){t.next=12;break}a="igrp".concat(this.client.utils.AddressToHash(a)),t.next=13;break;case 12:a="iusr".concat(this.client.utils.AddressToHash(a));case 13:return t.next=15,this.client.ContentObjectLibraryId({objectId:r});case 15:return u=t.sent,t.next=18,this.client.ContentObjectMetadata({libraryId:u,objectId:r,writeToken:i,metadataSubtree:f("auth_policy_spec")});case 18:l=t.sent,p={},d=0,m=Object.keys(l);case 21:if(!(d<m.length)){t.next=31;break}return v=m[d],g=l[v].permissions||[],t.next=26,Promise.all(g.filter((function(t){return(t.subject||{}).oauth_id===a||(t.subject||{}).id===a})).map(function(){var t=o(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b.FormatPermission({policyId:r,policyWriteToken:i,permission:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 26:(y=t.sent).length>0&&(p[v]=c(c({},l[v]),{},{permissions:y}));case 28:d++,t.next=21;break;case 31:return t.abrupt("return",p);case 32:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"RemoveSubjectPermissions",value:(e=o(n.mark((function t(e){var r,i,a,s,u=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,i=e.policyWriteToken,a=e.subjectId,h("policyId",r),h("policyWriteToken",i),h("subjectId",a),t.next=6,this.SubjectPermissions({policyId:r,policyWriteToken:i,subjectId:a});case 6:return s=t.sent,t.next=9,this.client.utils.LimitedMap(5,Object.keys(s),function(){var t=o(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.RemovePermission({policyId:r,policyWriteToken:i,subjectId:a,itemId:e});case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 9:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),t}();t.exports=d},,,function(t,e,r){(function(t){function e(t){return(e="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)}var r=function(t){"use strict";var r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=k(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(x([])));g&&g!==r&&n.call(g,i)&&(m=g);var y=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,r){var o;this._invoke=function(i,a){function s(){return new r((function(o,s){!function o(i,a,s,u){var c=f(t[i],t,a);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"===e(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){o("next",t,s,u)}),(function(t){o("throw",t,s,u)})):r.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return o("throw",t,s,u)}))}u(c.arg)}(i,a,o,s)}))}return o=o?o.then(s,s):s()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function _(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 A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=d,u(y,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),u(y,s,"Generator"),u(y,i,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,E.prototype={constructor:E,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.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},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),l},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),A(r),l}},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 o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=r}catch(t){"object"===("undefined"==typeof globalThis?"undefined":e(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}).call(this,r(8)(t))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(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,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n,o,i;function a(t){return(a="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)}i=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var r=t.shift();t[0]=r+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<t.length;n++){var o=t[n];if("string"!=typeof o)throw new TypeError("Url must be a string. Received "+o);""!==o&&(n>0&&(o=o.replace(/^[\/]+/,"")),o=n<t.length-1?o.replace(/[\/]+$/,""):o.replace(/[\/]+$/,"/"),e.push(o))}var i=e.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return i=a.shift()+(a.length>0?"?":"")+a.join("&")}return function(){return t("object"===a(arguments[0])?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=i():void 0===(o="function"==typeof(n=i)?n.call(e,r,e,t):n)||(t.exports=o)},function(t,e,r){var n=r(43);e.ValidatePresence=function(t,e){if(!e)throw Error("".concat(t," not specified"))},e.ValidateLibrary=function(t){if(!t)throw Error("Library ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid library ID: ".concat(t))},e.ValidateObject=function(t){if(!t)throw Error("Object ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid object ID: ".concat(t))},e.ValidateVersion=function(t){if(!t)throw Error("Version hash not specified");if(!t.toString().startsWith("h"))throw Error("Invalid version hash: ".concat(t))},e.ValidateWriteToken=function(t){if(!t)throw Error("Write token not specified");if(!t.toString().startsWith("t"))throw Error("Invalid write token: ".concat(t))},e.ValidatePartHash=function(t){if(!t)throw Error("Part hash not specified");if(!t.toString().startsWith("hqp_")&&!t.toString().startsWith("hqpe"))throw Error("Invalid part hash: ".concat(t))},e.ValidateParameters=function(t){var r=t.libraryId,n=t.objectId,o=t.versionHash;o?e.ValidateVersion(o):(e.ValidateLibrary(r),e.ValidateObject(n))},e.ValidateAddress=function(t){if(!t)throw Error("Address not specified");if(!/^(0x)?[0-9a-f]{40}$/i.test(t.toLowerCase()))throw Error("Invalid address: ".concat(t));return n.FormatAddress(t)},e.ValidatePermission=function(t){if(t&&"full-access"!==t&&"no-access"!==t)throw Error("Invalid profile permission: ".concat(t));return t},e.ValidateDate=function(t){if(t){if(isNaN(new Date(t)))throw Error("Invalid date: ".concat(t));return new Date(t).getTime()}}},function(t,e,r){(function(e,n){var o=r(47),i=r(21),a=r(22),s=r(23),u=r(51);function c(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 f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}void 0===e&&(e=r(16).Buffer);var l,h,p,d=r(55),m=r(58).default,v=r(59),g=r(63),y=r(64),b=r(75).utils,w=b.keccak256,k=b.getAddress,_={name:"Utils",nullAddress:"0x0000000000000000000000000000000000000000",weiPerEther:new m("1000000000000000000"),ToBigNumber:function(t){return new m(t)},WeiToEther:function(t){return _.ToBigNumber(t).div(_.weiPerEther)},EtherToWei:function(t){return _.ToBigNumber(t).times(_.weiPerEther)},FormatAddress:function(t){return t&&"string"==typeof t?((t=t.trim()).startsWith("0x")||(t="0x"+t),t.toLowerCase()):""},FormatSignature:function(t){return t=t.replace("0x",""),"ES256K_"+d.encode(e.from(t,"hex"))},DecodeVersionHash:function(t){if(!t.startsWith("hq__")&&!t.startsWith("tq__"))throw new Error('Invalid version hash: "'.concat(t,'"'));t=t.slice(4);var r=_.FromB58(t),n=r.slice(0,32),o=n.toString("hex");r=r.slice(32);for(var i=0;r[i]>=128;)i++;i++;var a=r.slice(0,i),s=v.decode(a);return r=r.slice(i),{digest:o,size:s,objectId:"iq__"+_.B58(r),partHash:"hqp_"+_.B58(e.concat([n,a]))}},DecodeSignedToken:function(t){var r=_.FromB58(t.slice(6)),n="0x".concat(r.slice(0,65).toString("hex")),o=JSON.parse(e.from(y.inflateRaw(r.slice(65))).toString("utf-8"));return o.adr=_.FormatAddress("0x".concat(e.from(o.adr,"base64").toString("hex"))),{payload:o,signature:n}},DecodeWriteToken:function(t){if(t.length<4)throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'));var e;if(t.startsWith("tqw__")?(e="tq__",t=t.slice(5)):(e=t.slice(0,4),t=t.slice(4)),0===t.length)throw new Error('Invalid write token: ["'.concat(t,'"] (too short)'));switch(e){case"tqw_":case"tq__":case"tqpw":case"tqp_":case"tlro":break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}var r,n,o,i,a,s=_.FromB58(t);function u(t,e){var r,n,o=v.decode(s,0),i=v.decode.bytes;return n=t?0===(r=s.slice(i+1,o+i)).length?"":e+_.B58(r):"0x"+(r=s.slice(i,o+i)).toString("hex"),s=s.slice(o+i),n}switch(e){case"tqw_":case"tqpw":r="0x"+s.toString("hex");break;case"tlro":case"tq__":n=u(!0,"iq__"),o=u(!0,"inod"),r=u(!1,"");break;case"tqp_":if(s.length<3)throw new Error('Invalid write token: ["'.concat(t,'"] (token truncated)'));i=s[0],a=s[1],s=s.slice(2),r=u(!1,"");break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}return{tokenType:e,tokenId:r,objectId:n,nodeId:o,scheme:i,flags:a}},AddressToHash:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=t.replace(r?"0x04":"0x",""),d.encode(e.from(t,"hex"))},AddressToSpaceId:function(t){return"ispc"+_.AddressToHash(t)},AddressToLibraryId:function(t){return"ilib"+_.AddressToHash(t)},AddressToObjectId:function(t){return"iq__"+_.AddressToHash(t)},HashToAddress:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e?t:t.substr(4),_.FormatAddress((e?"0x04":"0x")+d.decode(t).toString("hex"))},EqualAddress:function(t,e){return!(!t||!e)&&_.FormatAddress(t)===_.FormatAddress(e)},EqualHash:function(t,e){return!(!t||!e)&&(!(t.length<=4||e.length<=4)&&_.HashToAddress(t)===_.HashToAddress(e))},ValidAddress:function(t){try{return k(t),!0}catch(t){return!1}},ValidHash:function(t){return _.ValidAddress(_.HashToAddress(t))},ToBytes32:function(t){return"0x"+t.split("").map((function(t){return t.charCodeAt(0).toString(16)})).join("").slice(0,64).padEnd(64,"0")},BufferToArrayBuffer:function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)},B64:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8";return e.from(t,r).toString("base64")},FromB64:function(t){return e.from(t,"base64").toString("utf-8")},FromB64URL:function(t){var e=(t=t.replace(/-/g,"+").replace(/_/g,"/")).length%4;if(e){if(1===e)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");t+=new Array(5-e).join("=")}return _.FromB64(t)},B58:function(t){return d.encode(e.from(t))},FromB58:function(t){return d.decode(t)},FromB58ToStr:function(t){return(new TextDecoder).decode(_.FromB58(t))},DecodeAuthorizationToken:function(t){var e=(t=decodeURIComponent(t)).split("."),r=u(e,2),n=r[0],o=r[1];return f(f({},n=JSON.parse(_.FromB64(n))),{},{signature:o})},LimitedMap:(p=a(i.mark((function t(e,r,n){var s,u,c,f,l;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=0,u=!1,c=function(){var t=a(i.mark((function t(){var e;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!u){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,10)}));case 3:t.next=0;break;case 5:return u=!0,e=s,s+=1,u=!1,t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),f=[],l=0,t.abrupt("return",new Promise((function(t,s){o(Array(e||1)).forEach(a(i.mark((function e(){var o;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l+=1,e.next=3,c();case 3:o=e.sent;case 4:if(!(o<r.length)){e.next=19;break}return e.prev=5,e.next=8,n(r[o],o);case 8:f[o]=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),s(e.t0);case 14:return e.next=16,c();case 16:o=e.sent,e.next=4;break;case 19:0==(l-=1)&&t(f);case 21:case"end":return e.stop()}}),e,null,[[5,11]])}))))})));case 6:case"end":return t.stop()}}),t)}))),function(t,e,r){return p.apply(this,arguments)}),ResponseToJson:(h=a(i.mark((function t(e){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",_.ResponseToFormat("json",e));case 1:case"end":return t.stop()}}),t)}))),function(t){return h.apply(this,arguments)}),ResponseToFormat:(l=a(i.mark((function t(e,r){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r;case 2:r=t.sent,t.t0=e.toLowerCase(),t.next="json"===t.t0?6:"text"===t.t0?9:"blob"===t.t0?12:"arraybuffer"===t.t0?15:"formdata"===t.t0?18:"buffer"===t.t0?21:24;break;case 6:return t.next=8,r.json();case 8:return t.abrupt("return",t.sent);case 9:return t.next=11,r.text();case 11:return t.abrupt("return",t.sent);case 12:return t.next=14,r.blob();case 14:return t.abrupt("return",t.sent);case 15:return t.next=17,r.arrayBuffer();case 17:return t.abrupt("return",t.sent);case 18:return t.next=20,r.formData();case 20:return t.abrupt("return",t.sent);case 21:return t.next=23,r.buffer();case 23:return t.abrupt("return",t.sent);case 24:return t.abrupt("return",r);case 25:case"end":return t.stop()}}),t)}))),function(t,e){return l.apply(this,arguments)}),ResizeImage:function(t){var e=t.imageUrl,r=t.height;return!e||e&&!e.startsWith("http")?e:(e=g(e).removeSearch("height").removeSearch("header-x_image_height"),r&&!isNaN(parseInt(r))&&e.addSearch("height",parseInt(r)),e.toString())},SafeTraverse:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(!t)return t;1===r.length&&Array.isArray(r[0])&&(r=r[0]);for(var o=t,i=0;i<r.length;i++)if(void 0===(o=o[r[i]]))return;return o},IsCloneable:function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(e){return _.IsCloneable(t[e])}));case"Map":return o(t.keys()).every(_.IsCloneable)&&o(t.values()).every(_.IsCloneable);case"Set":return o(t.keys()).every(_.IsCloneable);default:return!1}},MakeClonable:function(t){if(_.IsCloneable(t))return t;if(e.isBuffer(t))return _.BufferToArrayBuffer(t);switch({}.toString.call(t).slice(8,-1)){case"Response":case"Function":return;case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return t;case"Array":return t.map((function(t){return _.MakeClonable(t)}));case"Set":return new Set(Array.from(t.keys()).map((function(t){return _.MakeClonable(t)})));case"Map":var r=new Map;return Array.from(t.keys()).forEach((function(e){var n=_.MakeClonable(t.get(e));n&&r.set(e,n)})),r;case"Error":return t.message;case"Object":var n={};return Object.keys(t).map((function(e){var r=_.MakeClonable(t[e]);r&&(n[e]=r)})),n;default:return JSON.parse(JSON.stringify(t))}},PublicKeyToAddress:function(t){var r=new Uint8Array(e.from(t.replace("0x04",""),"hex")),n="0x"+w(r).slice(26);return _.FormatAddress(n)},PLATFORM_NODE:"node",PLATFORM_WEB:"web",PLATFORM_REACT_NATIVE:"react-native",Platform:function(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product?_.PLATFORM_REACT_NATIVE:void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node?_.PLATFORM_NODE:_.PLATFORM_WEB}};t.exports=_}).call(this,r(16).Buffer,r(17))},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=c(t),a=n[0],s=n[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)e=o[t.charCodeAt(r)]<<18|o[t.charCodeAt(r+1)]<<12|o[t.charCodeAt(r+2)]<<6|o[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===s&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===s&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],a=0,s=r-o;a<s;a+=16383)i.push(f(t,a,a+16383>s?s:a+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],o[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var o,i,a=[],s=e;s<r;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){
|
|
43
|
+
*/!function(){"use strict";var s="input is invalid type",u="object"===("undefined"==typeof window?"undefined":a(window)),c=u?window:{};c.JS_SHA3_NO_WINDOW&&(u=!1);var f=!u&&"object"===("undefined"==typeof self?"undefined":a(self));!c.JS_SHA3_NO_NODE_JS&&"object"===(void 0===t?"undefined":a(t))&&t.versions&&t.versions.node?c=n:f&&(c=self);var l=!c.JS_SHA3_NO_COMMON_JS&&"object"===a(o)&&o.exports,h=r(18),p=!c.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),m=[4,1024,262144,67108864],y=[0,8,16,24],v=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],b=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};!c.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!p||!c.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"===a(t)&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var k=function(t,e,r){return function(n){return new F(t,e,t).update(n)[r]()}},A=function(t,e,r){return function(n,o){return new F(t,e,o).update(n)[r]()}},E=function(t,e,r){return function(e,n,o,i){return R["cshake"+t].update(e,n,o,i)[r]()}},x=function(t,e,r){return function(e,n,o,i){return R["kmac"+t].update(e,n,o,i)[r]()}},O=function(t,e,r,n){for(var o=0;o<w.length;++o){var i=w[o];t[i]=e(r,n,i)}return t},S=function(t,e){var r=k(t,e,"hex");return r.create=function(){return new F(t,e,t)},r.update=function(t){return r.create().update(t)},O(r,k,t,e)},P=[{name:"keccak",padding:[1,256,65536,16777216],bits:g,createMethod:S},{name:"sha3",padding:[6,1536,393216,100663296],bits:g,createMethod:S},{name:"shake",padding:[31,7936,2031616,520093696],bits:b,createMethod:function(t,e){var r=A(t,e,"hex");return r.create=function(r){return new F(t,e,r)},r.update=function(t,e){return r.create(e).update(t)},O(r,A,t,e)}},{name:"cshake",padding:m,bits:b,createMethod:function(t,e){var r=_[t],n=E(t,0,"hex");return n.create=function(n,o,i){return o||i?new F(t,e,n).bytepad([o,i],r):R["shake"+t].create(n)},n.update=function(t,e,r,o){return n.create(e,r,o).update(t)},O(n,E,t,e)}},{name:"kmac",padding:m,bits:b,createMethod:function(t,e){var r=_[t],n=x(t,0,"hex");return n.create=function(n,o,i){return new D(t,e,o).bytepad(["KMAC",i],r).bytepad([n],r)},n.update=function(t,e,r,o){return n.create(t,r,o).update(e)},O(n,x,t,e)}}],R={},j=[],T=0;T<P.length;++T)for(var I=P[T],N=I.bits,C=0;C<N.length;++C){var M=I.name+"_"+N[C];if(j.push(M),R[M]=I.createMethod(N[C],I.padding),"sha3"!==I.name){var B=I.name+N[C];j.push(B),R[B]=R[M]}}function F(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function D(t,e,r){F.call(this,t,e,r)}F.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,r=a(t);if("string"!==r){if("object"!==r)throw new Error(s);if(null===t)throw new Error(s);if(p&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||p&&ArrayBuffer.isView(t)))throw new Error(s);e=!0}for(var n,o,i=this.blocks,u=this.byteCount,c=t.length,f=this.blockCount,l=0,h=this.s;l<c;){if(this.reset)for(this.reset=!1,i[0]=this.block,n=1;n<f+1;++n)i[n]=0;if(e)for(n=this.start;l<c&&n<u;++l)i[n>>2]|=t[l]<<y[3&n++];else for(n=this.start;l<c&&n<u;++l)(o=t.charCodeAt(l))<128?i[n>>2]|=o<<y[3&n++]:o<2048?(i[n>>2]|=(192|o>>6)<<y[3&n++],i[n>>2]|=(128|63&o)<<y[3&n++]):o<55296||o>=57344?(i[n>>2]|=(224|o>>12)<<y[3&n++],i[n>>2]|=(128|o>>6&63)<<y[3&n++],i[n>>2]|=(128|63&o)<<y[3&n++]):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++l)),i[n>>2]|=(240|o>>18)<<y[3&n++],i[n>>2]|=(128|o>>12&63)<<y[3&n++],i[n>>2]|=(128|o>>6&63)<<y[3&n++],i[n>>2]|=(128|63&o)<<y[3&n++]);if(this.lastByteIndex=n,n>=u){for(this.start=n-u,this.block=i[f],n=0;n<f;++n)h[n]^=i[n];U(h),this.reset=!0}else this.start=n}return this},F.prototype.encode=function(t,e){var r=255&t,n=1,o=[r];for(r=255&(t>>=8);r>0;)o.unshift(r),r=255&(t>>=8),++n;return e?o.push(n):o.unshift(n),this.update(o),o.length},F.prototype.encodeString=function(t){var e,r=a(t);if("string"!==r){if("object"!==r)throw new Error(s);if(null===t)throw new Error(s);if(p&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||p&&ArrayBuffer.isView(t)))throw new Error(s);e=!0}var n=0,o=t.length;if(e)n=o;else for(var i=0;i<t.length;++i){var u=t.charCodeAt(i);u<128?n+=1:u<2048?n+=2:u<55296||u>=57344?n+=3:(u=65536+((1023&u)<<10|1023&t.charCodeAt(++i)),n+=4)}return n+=this.encode(8*n),this.update(t),n},F.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n<t.length;++n)r+=this.encodeString(t[n]);var o=e-r%e,i=[];return i.length=o,this.update(i),this},F.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,n=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)n[e]^=t[e];U(n)}},F.prototype.toString=F.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,a=0,s="";a<n;){for(i=0;i<e&&a<n;++i,++a)t=r[i],s+=d[t>>4&15]+d[15&t]+d[t>>12&15]+d[t>>8&15]+d[t>>20&15]+d[t>>16&15]+d[t>>28&15]+d[t>>24&15];a%e==0&&(U(r),i=0)}return o&&(t=r[i],s+=d[t>>4&15]+d[15&t],o>1&&(s+=d[t>>12&15]+d[t>>8&15]),o>2&&(s+=d[t>>20&15]+d[t>>16&15])),s},F.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,a=0,s=this.outputBits>>3;t=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(t);a<n;){for(i=0;i<e&&a<n;++i,++a)u[a]=r[i];a%e==0&&U(r)}return o&&(u[i]=r[i],t=t.slice(0,s)),t},F.prototype.buffer=F.prototype.arrayBuffer,F.prototype.digest=F.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,o=this.outputBlocks,i=this.extraBytes,a=0,s=0,u=[];s<o;){for(a=0;a<r&&s<o;++a,++s)t=s<<2,e=n[a],u[t]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;s%r==0&&U(n)}return i&&(t=s<<2,e=n[a],u[t]=255&e,i>1&&(u[t+1]=e>>8&255),i>2&&(u[t+2]=e>>16&255)),u},D.prototype=new F,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),F.prototype.finalize.call(this)};var U=function(t){var e,r,n,o,i,a,s,u,c,f,l,h,p,d,m,y,g,b,w,_,k,A,E,x,O,S,P,R,j,T,I,N,C,M,B,F,D,U,L,z,G,H,q,K,V,W,Q,J,Y,Z,X,$,tt,et,rt,nt,ot,it,at,st,ut,ct,ft;for(n=0;n<48;n+=2)o=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],a=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],e=(h=t[8]^t[18]^t[28]^t[38]^t[48])^(a<<1|s>>>31),r=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(s<<1|a>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=o^(u<<1|c>>>31),r=i^(c<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=a^(f<<1|l>>>31),r=s^(l<<1|f>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=f^(o<<1|i>>>31),r=l^(i<<1|o>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,d=t[0],m=t[1],W=t[11]<<4|t[10]>>>28,Q=t[10]<<4|t[11]>>>28,R=t[20]<<3|t[21]>>>29,j=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,q=t[41]<<18|t[40]>>>14,M=t[2]<<1|t[3]>>>31,B=t[3]<<1|t[2]>>>31,y=t[13]<<12|t[12]>>>20,g=t[12]<<12|t[13]>>>20,J=t[22]<<10|t[23]>>>22,Y=t[23]<<10|t[22]>>>22,T=t[33]<<13|t[32]>>>19,I=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ft=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,F=t[14]<<6|t[15]>>>26,D=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,Z=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,N=t[45]<<29|t[44]>>>3,C=t[44]<<29|t[45]>>>3,x=t[6]<<28|t[7]>>>4,O=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,ot=t[16]<<23|t[17]>>>9,U=t[26]<<25|t[27]>>>7,L=t[27]<<25|t[26]>>>7,_=t[36]<<21|t[37]>>>11,k=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,K=t[8]<<27|t[9]>>>5,V=t[9]<<27|t[8]>>>5,S=t[18]<<20|t[19]>>>12,P=t[19]<<20|t[18]>>>12,it=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,z=t[38]<<8|t[39]>>>24,G=t[39]<<8|t[38]>>>24,A=t[48]<<14|t[49]>>>18,E=t[49]<<14|t[48]>>>18,t[0]=d^~y&b,t[1]=m^~g&w,t[10]=x^~S&R,t[11]=O^~P&j,t[20]=M^~F&U,t[21]=B^~D&L,t[30]=K^~W&J,t[31]=V^~Q&Y,t[40]=et^~nt&it,t[41]=rt^~ot&at,t[2]=y^~b&_,t[3]=g^~w&k,t[12]=S^~R&T,t[13]=P^~j&I,t[22]=F^~U&z,t[23]=D^~L&G,t[32]=W^~J&Z,t[33]=Q^~Y&X,t[42]=nt^~it&st,t[43]=ot^~at&ut,t[4]=b^~_&A,t[5]=w^~k&E,t[14]=R^~T&N,t[15]=j^~I&C,t[24]=U^~z&H,t[25]=L^~G&q,t[34]=J^~Z&$,t[35]=Y^~X&tt,t[44]=it^~st&ct,t[45]=at^~ut&ft,t[6]=_^~A&d,t[7]=k^~E&m,t[16]=T^~N&x,t[17]=I^~C&O,t[26]=z^~H&M,t[27]=G^~q&B,t[36]=Z^~$&K,t[37]=X^~tt&V,t[46]=st^~ct&et,t[47]=ut^~ft&rt,t[8]=A^~d&y,t[9]=E^~m&g,t[18]=N^~x&S,t[19]=C^~O&P,t[28]=H^~M&F,t[29]=q^~B&D,t[38]=$^~K&W,t[39]=tt^~V&Q,t[48]=ct^~et&nt,t[49]=ft^~rt&ot,t[0]^=v[n],t[1]^=v[n+1]};if(l)o.exports=R;else{for(T=0;T<j.length;++T)c[j[T]]=R[j[T]];h&&(void 0===(i=function(){return R}.call(e,r,e,o))||(o.exports=i))}}()}).call(this,r(17),r(9),r(8)(t))},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n="random/5.7.0"},function(t,e,r){var n=r(21),o=r(22),i=r(23),a=r(38),s=r(39);function u(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 c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f=r(40),l=r(41),h=l.ValidatePresence,p=l.ValidatePermission,d=function(){"use strict";function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{offline:!1};a(this,t),this.client=e,this.subjectNames={},this.drafts={},this.offline=r.offline}var e,r,i,u,l,d,m,y,v,g,b,w,_,k,A;return s(t,[{key:"FormatDate",value:function(t){if(t){if(isNaN(new Date(t)))throw Error("Invalid start time: ".concat(t));return new Date(t).toISOString()}}},{key:"FormatProfile",value:function(t){var e=this;p(t.default_permission);var r={};return t.start&&(r.start=this.FormatDate(t.start)),t.end&&(r.end=this.FormatDate(t.end)),["assets","offerings"].forEach((function(n){var o=t[n]||{};r[n]={default_permission:o.default_permission||o.default_permissions||"no-access"},o.custom_permissions&&(r[n].custom_permissions={},Object.keys(o.custom_permissions).forEach((function(t){var i=o.custom_permissions[t],a={permission:p(i.permission)};i.start&&(a.start=e.FormatDate(i.start)),i.end&&(a.end=e.FormatDate(i.end)),r[n].custom_permissions[t]=c(c({},i),a)})))})),r}},{key:"FormatPermission",value:(A=o(n.mark((function t(e){var r,o,i,a,s,u,c,l,h,p,d,m;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.policyId,o=e.policyWriteToken,i=e.permission,a=i.subject.type.startsWith("oauth")?"oauth":"fabric",t.t0=i.subject.type,t.next="otp"===t.t0?5:"otp_subject"===t.t0?8:"group"===t.t0||"oauth_group"===t.t0?13:"user"===t.t0||"oauth_user"===t.t0?16:19;break;case 5:return s="ntp",u=i.subject.id,t.abrupt("break",20);case 8:return s="ntp_subject",u=i.subject.id,c=u,l=i.subject.otp_id,t.abrupt("break",20);case 13:return s="group",u="oauth"===a?i.subject.oauth_id:this.client.utils.HashToAddress(i.subject.id),t.abrupt("break",20);case 16:return s="user",u="oauth"===a?i.subject.oauth_id:this.client.utils.HashToAddress(i.subject.id),t.abrupt("break",20);case 19:throw Error("Unknown subject type: "+i.subject.type);case 20:if(h=i.subject.oauth_id||i.subject.id,p=this.subjectNames[h],c=c||p||i.subject.id,p||"fabric"!==a){t.next=74;break}if("group"!==s){t.next=36;break}return t.next=27,this.client.ContentSpaceId();case 27:return d=t.sent.replace("ispc","ilib"),t.next=30,this.client.ContentObjectMetadata({libraryId:d,objectId:this.client.utils.AddressToObjectId(u),metadataSubtree:f("public","name")});case 30:if(t.t1=t.sent,t.t1){t.next=33;break}t.t1=u;case 33:c=t.t1,t.next=74;break;case 36:if("user"!==s){t.next=56;break}return t.t4=this.client,t.next=40,this.client.ContentObjectLibraryId({objectId:r});case 40:return t.t5=t.sent,t.t6=r,t.t7=o,t.t8=f("auth_policy_settings","fabric_users",u),t.t9={libraryId:t.t5,objectId:t.t6,writeToken:t.t7,metadataSubtree:t.t8},t.next=47,t.t4.ContentObjectMetadata.call(t.t4,t.t9);case 47:if(t.t3=t.sent,t.t3){t.next=50;break}t.t3={};case 50:if(t.t2=t.t3.name,t.t2){t.next=53;break}t.t2=u;case 53:c=t.t2,t.next=74;break;case 56:if("ntp"!==s){t.next=74;break}return t.t12=this.client,t.next=60,this.client.ContentObjectLibraryId({objectId:r});case 60:return t.t13=t.sent,t.t14=r,t.t15=o,t.t16=f("auth_policy_settings","ntp_instances",u),t.t17={libraryId:t.t13,objectId:t.t14,writeToken:t.t15,metadataSubtree:t.t16},t.next=67,t.t12.ContentObjectMetadata.call(t.t12,t.t17);case 67:if(t.t11=t.sent,t.t11){t.next=70;break}t.t11={};case 70:if(t.t10=t.t11.name,t.t10){t.next=73;break}t.t10=u;case 73:c=t.t10;case 74:return this.subjectNames[h]=c,m={profileName:i.profile,subjectSource:a,subjectType:s,subjectId:u,subjectName:c},l&&(m.subjectNTPId=l),i.start&&(m.start=i.start),i.end&&(m.end=i.end),t.abrupt("return",m);case 80:case"end":return t.stop()}}),t,this)}))),function(t){return A.apply(this,arguments)})},{key:"OpenOfflineDraft",value:(k=o(n.mark((function t(e){var r,o,i,a;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.policyId,o=e.policyLibraryId,i=e.policyWriteToken,null!=o){t.next=5;break}return t.next=4,this.client.ContentObjectLibraryId({objectId:r});case 4:o=t.sent;case 5:return t.next=7,this.client.ContentObjectMetadata({libraryId:o,objectId:r,writeToken:i});case 7:a=t.sent,this.drafts[r]={meta:a,policyLibraryId:o,policyWriteToken:i};case 9:case"end":return t.stop()}}),t,this)}))),function(t){return k.apply(this,arguments)})},{key:"CloseOfflineDraft",value:(_=o(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.policyId,null!=this.drafts[r]){t.next=3;break}throw Error("No draft open for policyId: "+r);case 3:return t.next=5,this.client.ReplaceMetadata({libraryId:this.drafts[r].policyLibraryId,objectId:r,writeToken:this.drafts[r].policyWriteToken,metadata:this.drafts[r].meta});case 5:this.drafts[r]=null;case 6:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)})},{key:"PolicyItems",value:(w=o(n.mark((function t(e){var r,o;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,t.t1=this.client,t.next=4,this.client.ContentObjectLibraryId({objectId:r});case 4:return t.t2=t.sent,t.t3=r,t.t4=o,t.t5=["*/display_title"],t.t6={libraryId:t.t2,objectId:t.t3,writeToken:t.t4,metadataSubtree:"auth_policy_spec",select:t.t5},t.next=11,t.t1.ContentObjectMetadata.call(t.t1,t.t6);case 11:if(t.t0=t.sent,t.t0){t.next=14;break}t.t0={};case 14:return t.abrupt("return",t.t0);case 15:case"end":return t.stop()}}),t,this)}))),function(t){return w.apply(this,arguments)})},{key:"ItemPolicy",value:(b=o(n.mark((function t(e){var r,o,i,a,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,t.next=3,this.ItemProfiles({policyId:r,policyWriteToken:o,itemId:i});case 3:return a=t.sent,t.next=6,this.ItemPermissions({policyId:r,policyWriteToken:o,itemId:i});case 6:if(s=t.sent,a&&s){t.next=9;break}return t.abrupt("return");case 9:return t.abrupt("return",{profiles:a,permissions:s});case 10:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"CreateItemPolicy",value:(g=o(n.mark((function t(e){var r,o,i,a,s,u,c,l,p,d=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.profiles,s=void 0===a?{}:a,h("policyId",r),h("policyWriteToken",o),h("itemId",i),h("profiles",s),t.t1=this.client,t.next=8,this.client.ContentObjectLibraryId({objectId:i});case 8:return t.t2=t.sent,t.t3=i,t.t4=["public/name","public/asset_metadata/title","public/asset_metadata/display_title"],t.t5={libraryId:t.t2,objectId:t.t3,select:t.t4},t.next=14,t.t1.ContentObjectMetadata.call(t.t1,t.t5);case 14:if(t.t0=t.sent,t.t0){t.next=17;break}t.t0={};case 17:return u=t.t0,c=(u.public||{}).asset_metadata||{},l=c.display_title||c.title||(u.public||{}).name,p={display_title:l,permissions:[],profiles:{}},Object.keys(s).forEach((function(t){p.profiles[t]=d.FormatProfile(s[t])})),t.t6=this.client,t.next=25,this.client.ContentObjectLibraryId({objectId:r});case 25:return t.t7=t.sent,t.t8=r,t.t9=o,t.t10=f("auth_policy_spec",i),t.t11=p,t.t12={libraryId:t.t7,objectId:t.t8,writeToken:t.t9,metadataSubtree:t.t10,metadata:t.t11},t.next=33,t.t6.ReplaceMetadata.call(t.t6,t.t12);case 33:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"RemoveItemPolicy",value:(v=o(n.mark((function t(e){var r,o,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,h("policyId",r),h("policyWriteToken",o),h("itemId",i),t.t0=this.client,t.next=7,this.client.ContentObjectLibraryId({objectId:r});case 7:return t.t1=t.sent,t.t2=r,t.t3=o,t.t4=f("auth_policy_spec",i),t.t5={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4},t.next=14,t.t0.DeleteMetadata.call(t.t0,t.t5);case 14:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"ItemProfiles",value:(y=o(n.mark((function t(e){var r,o,i,a;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.profileName,t.t0=this.client,t.next=4,this.client.ContentObjectLibraryId({objectId:r});case 4:return t.t1=t.sent,t.t2=r,t.t3=o,t.t4=f("auth_policy_spec",i,"profiles",a||""),t.t5={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4},t.next=11,t.t0.ContentObjectMetadata.call(t.t0,t.t5);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"SetProfile",value:(m=o(n.mark((function t(e){var r,o,i,a,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.profileName,s=e.profileSpec,h("policyId",r),h("policyWriteToken",o),h("itemId",i),h("profileName",a),h("profileSpec",s),t.t0=this.client,t.next=9,this.client.ContentObjectLibraryId({objectId:r});case 9:return t.t1=t.sent,t.t2=r,t.t3=o,t.t4=f("auth_policy_spec",i,"profiles",a),t.t5=this.FormatProfile(s),t.t6={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4,metadata:t.t5},t.next=17,t.t0.ReplaceMetadata.call(t.t0,t.t6);case 17:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"RemoveProfile",value:(d=o(n.mark((function t(e){var r,o,i,a;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.profileName,h("policyId",r),h("policyWriteToken",o),h("itemId",i),h("profileName",a),t.t0=this.client,t.next=8,this.client.ContentObjectLibraryId({objectId:r});case 8:return t.t1=t.sent,t.t2=r,t.t3=o,t.t4=f("auth_policy_spec",i,"profiles",a),t.t5={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4},t.next=15,t.t0.DeleteMetadata.call(t.t0,t.t5);case 15:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"ItemPermissions",value:(l=o(n.mark((function t(e){var r,i,a,s,u,c=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,i=e.policyWriteToken,a=e.itemId,t.next=3,this.client.ContentObjectLibraryId({objectId:r});case 3:return s=t.sent,t.next=6,this.client.ContentObjectMetadata({libraryId:s,objectId:r,writeToken:i,metadataSubtree:f("auth_policy_spec",a,"permissions")});case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0=[];case 9:return u=t.t0,t.next=12,Promise.all(u.map(function(){var t=o(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.FormatPermission({policyId:r,policyWriteToken:i,permission:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 12:return t.abrupt("return",t.sent);case 13:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"SetPermission",value:(u=o(n.mark((function t(e){var r,o,i,a,s,u,c,l,p,d,m,y,v,g,b,w,_,k,A,E,x;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.policyId,o=e.policyWriteToken,i=e.itemId,a=e.subjectSource,s=void 0===a?"fabric":a,u=e.subjectType,c=void 0===u?"group":u,l=e.subjectName,p=e.subjectId,d=e.subjectNTPId,m=e.profileName,y=e.start,v=e.end,h("policyId",r),h("policyWriteToken",o),h("itemId",i),h("subjectType",c),h("subjectSource",s),h("subjectId",p),h("profileName",m),y=this.FormatDate(y),v=this.FormatDate(v),g=this.offline&&null!=this.drafts[r],b=null,g){t.next=16;break}return t.next=15,this.client.ContentObjectLibraryId({objectId:r});case 15:b=t.sent;case 16:if("fabric"===s&&("group"===c?p.startsWith("igrp")||(p="igrp".concat(this.client.utils.AddressToHash(p))):"user"===c&&(p.startsWith("iusr")||(p="iusr".concat(this.client.utils.AddressToHash(p))))),!g){t.next=21;break}w=this.drafts[r].meta.auth_policy_spec[i],t.next=24;break;case 21:return t.next=23,this.client.ContentObjectMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_spec",i)});case 23:w=t.sent;case 24:if(w){t.next=26;break}throw Error("Unable to add permissions to uninitialized item");case 26:if(w.profiles[m]){t.next=28;break}throw Error("Profile '".concat(m,"' does not exist"));case 28:if((_=w.permissions.findIndex((function(t){return"fabric"===s?t.subject.id===p:t.subject.oauth_id===p})))<0&&(_=w.permissions.length),k={profile:m},y&&(k.start=y),v&&(k.end=v),"fabric"!==s){t.next=53;break}if("group"!==c){t.next=38;break}A={id:p,type:"group"},t.next=51;break;case 38:if("user"!==c){t.next=42;break}A={id:p,type:"user"},t.next=51;break;case 42:if("ntp"!==c){t.next=46;break}A={id:p,type:"otp"},t.next=51;break;case 46:if("ntp_subject"!==c){t.next=50;break}A={id:p,otp_id:d,type:"otp_subject"},t.next=51;break;case 50:throw Error("Invalid subject type: ".concat(c));case 51:t.next=66;break;case 53:if("oauth"!==s){t.next=65;break}if("group"!==c){t.next=58;break}A={id:l,oauth_id:p,type:"oauth_group"},t.next=63;break;case 58:if("user"!==c){t.next=62;break}A={id:l,oauth_id:p,type:"oauth_user"},t.next=63;break;case 62:throw Error("Invalid subject type: ".concat(c));case 63:t.next=66;break;case 65:throw Error("Invalid subject source: ".concat(s));case 66:if(k.subject=A,w.permissions[_]=k,g){t.next=71;break}return t.next=71,this.client.ReplaceMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_spec",i,"permissions"),metadata:w.permissions});case 71:if("fabric"!==s||"user"!==c){t.next=85;break}if(E={address:this.client.utils.HashToAddress(p),name:l},!g){t.next=77;break}this.drafts[r].meta.auth_policy_settings.fabric_users[this.client.utils.HashToAddress(p)]=E,t.next=83;break;case 77:return t.next=79,this.client.ContentObjectMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_settings","fabric_users",this.client.utils.HashToAddress(p))});case 79:if(t.sent){t.next=83;break}return t.next=83,this.client.ReplaceMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_settings","fabric_users",this.client.utils.HashToAddress(p)),metadata:E});case 83:t.next=97;break;case 85:if("fabric"!==s||"ntp"!==c){t.next=97;break}if(x={address:p,ntpId:p,name:l,type:"ntpInstance"},!g){t.next=91;break}this.drafts[r].meta.auth_policy_settings.ntp_instances[p]=x,t.next=97;break;case 91:return t.next=93,this.client.ContentObjectMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_settings","ntp_instances",p)});case 93:if(t.sent){t.next=97;break}return t.next=97,this.client.ReplaceMetadata({libraryId:b,objectId:r,writeToken:o,metadataSubtree:f("auth_policy_settings","ntp_instances",p),metadata:x});case 97:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"RemovePermission",value:(i=o(n.mark((function t(e){var r,i,a,s,u,c,l,p=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,i=e.policyWriteToken,a=e.itemId,s=e.subjectId,h("policyId",r),h("policyWriteToken",i),h("itemId",a),h("subjectId",s),t.next=7,this.client.ContentObjectLibraryId({objectId:r});case 7:return u=t.sent,t.next=10,this.client.ContentObjectMetadata({libraryId:u,objectId:r,writeToken:i,metadataSubtree:f("auth_policy_spec",a,"permissions")});case 10:if(c=t.sent){t.next=13;break}return t.abrupt("return");case 13:if(!s.startsWith("0x")){t.next=23;break}return l=this.client.utils.AddressToObjectId(s),t.next=17,this.client.AccessType({id:l});case 17:if(t.t0=t.sent,"group"!==t.t0){t.next=22;break}s="igrp".concat(this.client.utils.AddressToHash(s)),t.next=23;break;case 22:s="iusr".concat(this.client.utils.AddressToHash(s));case 23:return t.next=25,Promise.all(c.map(function(){var t=o(n.mark((function t(e,o){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.subject.id!==s&&e.subject.oauth_id!==s){t.next=3;break}return t.next=3,p.client.DeleteMetadata({libraryId:u,objectId:r,writeToken:i,metadataSubtree:f("auth_policy_spec",a,"permissions",o.toString())});case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()));case 25:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"SubjectPermissions",value:(r=o(n.mark((function t(e){var r,i,a,s,u,l,p,d,m,y,v,g,b=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.policyId,i=e.policyWriteToken,a=e.subjectId,h("policyId",r),h("subjectId",a),!a.startsWith("0x")){t.next=13;break}return s=this.client.utils.AddressToObjectId(a),t.next=7,this.client.AccessType({id:s});case 7:if(t.t0=t.sent,"group"!==t.t0){t.next=12;break}a="igrp".concat(this.client.utils.AddressToHash(a)),t.next=13;break;case 12:a="iusr".concat(this.client.utils.AddressToHash(a));case 13:return t.next=15,this.client.ContentObjectLibraryId({objectId:r});case 15:return u=t.sent,t.next=18,this.client.ContentObjectMetadata({libraryId:u,objectId:r,writeToken:i,metadataSubtree:f("auth_policy_spec")});case 18:l=t.sent,p={},d=0,m=Object.keys(l);case 21:if(!(d<m.length)){t.next=31;break}return y=m[d],v=l[y].permissions||[],t.next=26,Promise.all(v.filter((function(t){return(t.subject||{}).oauth_id===a||(t.subject||{}).id===a})).map(function(){var t=o(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b.FormatPermission({policyId:r,policyWriteToken:i,permission:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 26:(g=t.sent).length>0&&(p[y]=c(c({},l[y]),{},{permissions:g}));case 28:d++,t.next=21;break;case 31:return t.abrupt("return",p);case 32:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"RemoveSubjectPermissions",value:(e=o(n.mark((function t(e){var r,i,a,s,u=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.policyId,i=e.policyWriteToken,a=e.subjectId,h("policyId",r),h("policyWriteToken",i),h("subjectId",a),t.next=6,this.SubjectPermissions({policyId:r,policyWriteToken:i,subjectId:a});case 6:return s=t.sent,t.next=9,this.client.utils.LimitedMap(5,Object.keys(s),function(){var t=o(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.RemovePermission({policyId:r,policyWriteToken:i,subjectId:a,itemId:e});case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 9:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),t}();t.exports=d},,function(t,e,r){(function(t){function e(t){return(e="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)}var r=function(t){"use strict";var r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function h(){}function p(){}function d(){}var m={};u(m,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(x([])));v&&v!==r&&n.call(v,i)&&(m=v);var g=d.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,r){var o;this._invoke=function(i,a){function s(){return new r((function(o,s){!function o(i,a,s,u){var c=f(t[i],t,a);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"===e(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){o("next",t,s,u)}),(function(t){o("throw",t,s,u)})):r.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return o("throw",t,s,u)}))}u(c.arg)}(i,a,o,s)}))}return o=o?o.then(s,s):s()}}function _(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function k(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 A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=d,u(g,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),u(g,s,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,E.prototype={constructor:E,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.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},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),l},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),A(r),l}},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 o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=r}catch(t){"object"===("undefined"==typeof globalThis?"undefined":e(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}).call(this,r(8)(t))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(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,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n,o,i;function a(t){return(a="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)}i=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var r=t.shift();t[0]=r+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<t.length;n++){var o=t[n];if("string"!=typeof o)throw new TypeError("Url must be a string. Received "+o);""!==o&&(n>0&&(o=o.replace(/^[\/]+/,"")),o=n<t.length-1?o.replace(/[\/]+$/,""):o.replace(/[\/]+$/,"/"),e.push(o))}var i=e.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return i=a.shift()+(a.length>0?"?":"")+a.join("&")}return function(){return t("object"===a(arguments[0])?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=i():void 0===(o="function"==typeof(n=i)?n.call(e,r,e,t):n)||(t.exports=o)},function(t,e,r){var n=r(42);e.ValidatePresence=function(t,e){if(!e)throw Error("".concat(t," not specified"))},e.ValidateLibrary=function(t){if(!t)throw Error("Library ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid library ID: ".concat(t))},e.ValidateObject=function(t){if(!t)throw Error("Object ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid object ID: ".concat(t))},e.ValidateVersion=function(t){if(!t)throw Error("Version hash not specified");if(!t.toString().startsWith("h"))throw Error("Invalid version hash: ".concat(t))},e.ValidateWriteToken=function(t){if(!t)throw Error("Write token not specified");if(!t.toString().startsWith("t"))throw Error("Invalid write token: ".concat(t))},e.ValidatePartHash=function(t){if(!t)throw Error("Part hash not specified");if(!t.toString().startsWith("hqp_")&&!t.toString().startsWith("hqpe"))throw Error("Invalid part hash: ".concat(t))},e.ValidateParameters=function(t){var r=t.libraryId,n=t.objectId,o=t.versionHash;o?e.ValidateVersion(o):(e.ValidateLibrary(r),e.ValidateObject(n))},e.ValidateAddress=function(t){if(!t)throw Error("Address not specified");if(!/^(0x)?[0-9a-f]{40}$/i.test(t.toLowerCase()))throw Error("Invalid address: ".concat(t));return n.FormatAddress(t)},e.ValidatePermission=function(t){if(t&&"full-access"!==t&&"no-access"!==t)throw Error("Invalid profile permission: ".concat(t));return t},e.ValidateDate=function(t){if(t){if(isNaN(new Date(t)))throw Error("Invalid date: ".concat(t));return new Date(t).getTime()}}},function(t,e,r){(function(e,n){var o=r(46),i=r(21),a=r(22),s=r(23),u=r(50);function c(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 f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}void 0===e&&(e=r(16).Buffer);var l,h,p,d=r(54),m=r(57).default,y=r(58),v=r(62),g=r(63),b=r(74).utils,w=b.keccak256,_=b.getAddress,k={name:"Utils",nullAddress:"0x0000000000000000000000000000000000000000",weiPerEther:new m("1000000000000000000"),ToBigNumber:function(t){return new m(t)},WeiToEther:function(t){return k.ToBigNumber(t).div(k.weiPerEther)},EtherToWei:function(t){return k.ToBigNumber(t).times(k.weiPerEther)},FormatAddress:function(t){return t&&"string"==typeof t?((t=t.trim()).startsWith("0x")||(t="0x"+t),t.toLowerCase()):""},FormatSignature:function(t){return t=t.replace("0x",""),"ES256K_"+d.encode(e.from(t,"hex"))},DecodeVersionHash:function(t){if(!t.startsWith("hq__")&&!t.startsWith("tq__"))throw new Error('Invalid version hash: "'.concat(t,'"'));t=t.slice(4);var r=k.FromB58(t),n=r.slice(0,32),o=n.toString("hex");r=r.slice(32);for(var i=0;r[i]>=128;)i++;i++;var a=r.slice(0,i),s=y.decode(a);return r=r.slice(i),{digest:o,size:s,objectId:"iq__"+k.B58(r),partHash:"hqp_"+k.B58(e.concat([n,a]))}},DecodeSignedToken:function(t){var r=k.FromB58(t.slice(6)),n="0x".concat(r.slice(0,65).toString("hex")),o=JSON.parse(e.from(g.inflateRaw(r.slice(65))).toString("utf-8"));return o.adr=k.FormatAddress("0x".concat(e.from(o.adr,"base64").toString("hex"))),{payload:o,signature:n}},DecodeWriteToken:function(t){if(t.length<4)throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'));var e;if(t.startsWith("tqw__")?(e="tq__",t=t.slice(5)):(e=t.slice(0,4),t=t.slice(4)),0===t.length)throw new Error('Invalid write token: ["'.concat(t,'"] (too short)'));switch(e){case"tqw_":case"tq__":case"tqpw":case"tqp_":case"tlro":break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}var r,n,o,i,a,s=k.FromB58(t);function u(t,e){var r,n,o=y.decode(s,0),i=y.decode.bytes;return n=t?0===(r=s.slice(i+1,o+i)).length?"":e+k.B58(r):"0x"+(r=s.slice(i,o+i)).toString("hex"),s=s.slice(o+i),n}switch(e){case"tqw_":case"tqpw":r="0x"+s.toString("hex");break;case"tlro":case"tq__":n=u(!0,"iq__"),o=u(!0,"inod"),r=u(!1,"");break;case"tqp_":if(s.length<3)throw new Error('Invalid write token: ["'.concat(t,'"] (token truncated)'));i=s[0],a=s[1],s=s.slice(2),r=u(!1,"");break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}return{tokenType:e,tokenId:r,objectId:n,nodeId:o,scheme:i,flags:a}},AddressToHash:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=t.replace(r?"0x04":"0x",""),d.encode(e.from(t,"hex"))},AddressToSpaceId:function(t){return"ispc"+k.AddressToHash(t)},AddressToLibraryId:function(t){return"ilib"+k.AddressToHash(t)},AddressToObjectId:function(t){return"iq__"+k.AddressToHash(t)},HashToAddress:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e?t:t.substr(4),k.FormatAddress((e?"0x04":"0x")+d.decode(t).toString("hex"))},EqualAddress:function(t,e){return!(!t||!e)&&k.FormatAddress(t)===k.FormatAddress(e)},EqualHash:function(t,e){return!(!t||!e)&&(!(t.length<=4||e.length<=4)&&k.HashToAddress(t)===k.HashToAddress(e))},ValidAddress:function(t){try{return _(t),!0}catch(t){return!1}},ValidHash:function(t){return k.ValidAddress(k.HashToAddress(t))},ToBytes32:function(t){return"0x"+t.split("").map((function(t){return t.charCodeAt(0).toString(16)})).join("").slice(0,64).padEnd(64,"0")},BufferToArrayBuffer:function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)},B64:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8";return e.from(t,r).toString("base64")},FromB64:function(t){return e.from(t,"base64").toString("utf-8")},FromB64URL:function(t){var e=(t=t.replace(/-/g,"+").replace(/_/g,"/")).length%4;if(e){if(1===e)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");t+=new Array(5-e).join("=")}return k.FromB64(t)},B58:function(t){return d.encode(e.from(t))},FromB58:function(t){return d.decode(t)},FromB58ToStr:function(t){return(new TextDecoder).decode(k.FromB58(t))},DecodeAuthorizationToken:function(t){var e=(t=decodeURIComponent(t)).split("."),r=u(e,2),n=r[0],o=r[1];return f(f({},n=JSON.parse(k.FromB64(n))),{},{signature:o})},LimitedMap:(p=a(i.mark((function t(e,r,n){var s,u,c,f,l;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=0,u=!1,c=function(){var t=a(i.mark((function t(){var e;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!u){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,10)}));case 3:t.next=0;break;case 5:return u=!0,e=s,s+=1,u=!1,t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),f=[],l=0,t.abrupt("return",new Promise((function(t,s){o(Array(e||1)).forEach(a(i.mark((function e(){var o;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l+=1,e.next=3,c();case 3:o=e.sent;case 4:if(!(o<r.length)){e.next=19;break}return e.prev=5,e.next=8,n(r[o],o);case 8:f[o]=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),s(e.t0);case 14:return e.next=16,c();case 16:o=e.sent,e.next=4;break;case 19:0==(l-=1)&&t(f);case 21:case"end":return e.stop()}}),e,null,[[5,11]])}))))})));case 6:case"end":return t.stop()}}),t)}))),function(t,e,r){return p.apply(this,arguments)}),ResponseToJson:(h=a(i.mark((function t(e){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",k.ResponseToFormat("json",e));case 1:case"end":return t.stop()}}),t)}))),function(t){return h.apply(this,arguments)}),ResponseToFormat:(l=a(i.mark((function t(e,r){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r;case 2:r=t.sent,t.t0=e.toLowerCase(),t.next="json"===t.t0?6:"text"===t.t0?9:"blob"===t.t0?12:"arraybuffer"===t.t0?15:"formdata"===t.t0?18:"buffer"===t.t0?21:24;break;case 6:return t.next=8,r.json();case 8:return t.abrupt("return",t.sent);case 9:return t.next=11,r.text();case 11:return t.abrupt("return",t.sent);case 12:return t.next=14,r.blob();case 14:return t.abrupt("return",t.sent);case 15:return t.next=17,r.arrayBuffer();case 17:return t.abrupt("return",t.sent);case 18:return t.next=20,r.formData();case 20:return t.abrupt("return",t.sent);case 21:return t.next=23,r.buffer();case 23:return t.abrupt("return",t.sent);case 24:return t.abrupt("return",r);case 25:case"end":return t.stop()}}),t)}))),function(t,e){return l.apply(this,arguments)}),ResizeImage:function(t){var e=t.imageUrl,r=t.height;return!e||e&&!e.startsWith("http")?e:(e=v(e).removeSearch("height").removeSearch("header-x_image_height"),r&&!isNaN(parseInt(r))&&e.addSearch("height",parseInt(r)),e.toString())},SafeTraverse:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(!t)return t;1===r.length&&Array.isArray(r[0])&&(r=r[0]);for(var o=t,i=0;i<r.length;i++)if(void 0===(o=o[r[i]]))return;return o},IsCloneable:function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(e){return k.IsCloneable(t[e])}));case"Map":return o(t.keys()).every(k.IsCloneable)&&o(t.values()).every(k.IsCloneable);case"Set":return o(t.keys()).every(k.IsCloneable);default:return!1}},MakeClonable:function(t){if(k.IsCloneable(t))return t;if(e.isBuffer(t))return k.BufferToArrayBuffer(t);switch({}.toString.call(t).slice(8,-1)){case"Response":case"Function":return;case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return t;case"Array":return t.map((function(t){return k.MakeClonable(t)}));case"Set":return new Set(Array.from(t.keys()).map((function(t){return k.MakeClonable(t)})));case"Map":var r=new Map;return Array.from(t.keys()).forEach((function(e){var n=k.MakeClonable(t.get(e));n&&r.set(e,n)})),r;case"Error":return t.message;case"Object":var n={};return Object.keys(t).map((function(e){var r=k.MakeClonable(t[e]);r&&(n[e]=r)})),n;default:return JSON.parse(JSON.stringify(t))}},PublicKeyToAddress:function(t){var r=new Uint8Array(e.from(t.replace("0x04",""),"hex")),n="0x"+w(r).slice(26);return k.FormatAddress(n)},PLATFORM_NODE:"node",PLATFORM_WEB:"web",PLATFORM_REACT_NATIVE:"react-native",Platform:function(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product?k.PLATFORM_REACT_NATIVE:void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node?k.PLATFORM_NODE:k.PLATFORM_WEB}};t.exports=k}).call(this,r(16).Buffer,r(17))},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=c(t),a=n[0],s=n[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)e=o[t.charCodeAt(r)]<<18|o[t.charCodeAt(r+1)]<<12|o[t.charCodeAt(r+2)]<<6|o[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===s&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===s&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],a=0,s=r-o;a<s;a+=16383)i.push(f(t,a,a+16383>s?s:a+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],o[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var o,i,a=[],s=e;s<r;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){
|
|
44
44
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
45
|
-
e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?o-1:0,h=r?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=s;f>0;i=256*i+t[e+l],l+=h,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=c}return(p?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,f=(1<<c)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,o),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+p]=255&a,p+=d,a/=256,c-=8);t[r+p-d]|=128*m}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){var n=r(
|
|
45
|
+
e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?o-1:0,h=r?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=s;f>0;i=256*i+t[e+l],l+=h,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=c}return(p?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,f=(1<<c)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,o),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+p]=255&a,p+=d,a/=256,c-=8);t[r+p-d]|=128*m}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){var n=r(47),o=r(48),i=r(25),a=r(49);t.exports=function(t){return n(t)||o(t)||i(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(24);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(51),o=r(52),i=r(25),a=r(53);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(55);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,r){"use strict";var n=r(56).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var o=0;o<t.length;o++){var i=t.charAt(o),a=i.charCodeAt(0);if(255!==e[a])throw new TypeError(i+" is ambiguous");e[a]=o}var s=t.length,u=t.charAt(0),c=Math.log(s)/Math.log(256),f=Math.log(256)/Math.log(s);function l(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,o=0,i=0;t[r]===u;)o++,r++;for(var a=(t.length-r)*c+1>>>0,f=new Uint8Array(a);t[r];){var l=e[t.charCodeAt(r)];if(255===l)return;for(var h=0,p=a-1;(0!==l||h<i)&&-1!==p;p--,h++)l+=s*f[p]>>>0,f[p]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=h,r++}for(var d=a-i;d!==a&&0===f[d];)d++;var m=n.allocUnsafe(o+(a-d));m.fill(0,0,o);for(var y=o;d!==a;)m[y++]=f[d++];return m}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,o=0,i=0,a=e.length;i!==a&&0===e[i];)i++,r++;for(var c=(a-i)*f+1>>>0,l=new Uint8Array(c);i!==a;){for(var h=e[i],p=0,d=c-1;(0!==h||p<o)&&-1!==d;d--,p++)h+=256*l[d]>>>0,l[d]=h%s>>>0,h=h/s>>>0;if(0!==h)throw new Error("Non-zero carry");o=p,i++}for(var m=c-o;m!==c&&0===l[m];)m++;for(var y=u.repeat(r);m<c;++m)y+=t.charAt(l[m]);return y},decodeUnsafe:l,decode:function(t){var e=l(t);if(e)return e;throw new Error("Non-base"+s+" character")}}}},function(t,e,r){
|
|
46
46
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
47
|
-
var n=r(16),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return o(t,e,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){var n;function o(t){return(o="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(i){"use strict";var a,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u="function"==typeof Symbol&&"symbol"==o(Symbol.iterator),c=Math.ceil,f=Math.floor,l="[BigNumber Error] ",h=l+"Number primitive has more than 15 significant digits: ",p=1e14,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e9;function v(t){var e=0|t;return t>0||t===e?e:e-1}function g(t){for(var e,r,n=1,o=t.length,i=t[0]+"";n<o;){for(r=14-(e=t[n++]+"").length;r--;e="0"+e);i+=e}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function y(t,e){var r,n,o=t.c,i=e.c,a=t.s,s=e.s,u=t.e,c=e.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=o.length)<(c=i.length)?u:c,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function b(t,e,r,n){if(t<e||t>r||t!==f(t))throw Error(l+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return v(t.e/14)==e&&t.c[e]%2!=0}function k(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function _(t,e,r){var n,o;if(e<0){for(o=r+".";++e;o+=r);t=o+t}else if(++e>(n=t.length)){for(o=r,e-=n;--e;o+=r);t+=o}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}(a=function t(e){var r,n,i,a,A,E,x,O,S,P=z.prototype={constructor:z,toString:null,valueOf:null},R=new z(1),T=20,j=4,I=-7,N=21,C=-1e7,M=1e7,B=!1,F=1,D=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},L="0123456789abcdefghijklmnopqrstuvwxyz";function z(t,e){var r,o,a,u,c,l,p,d,m=this;if(!(m instanceof z))return new z(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>M?m.c=m.e=null:t.e<C?m.c=[m.e=0]:(m.e=t.e,m.c=t.c.slice()));if((l="number"==typeof t)&&0*t==0){if(m.s=1/t<0?(t=-t,-1):1,t===~~t){for(u=0,c=t;c>=10;c/=10,u++);return void(u>M?m.c=m.e=null:(m.e=u,m.c=[t]))}d=String(t)}else{if(!s.test(d=String(t)))return i(m,d,l);m.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(u=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(u<0&&(u=c),u+=+d.slice(c+1),d=d.substring(0,c)):u<0&&(u=d.length)}else{if(b(e,2,L.length,"Base"),10==e)return K(m=new z(t),T+m.e+1,j);if(d=String(t),l="number"==typeof t){if(0*t!=0)return i(m,d,l,e);if(m.s=1/t<0?(d=d.slice(1),-1):1,z.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(h+t)}else m.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=L.slice(0,e),u=c=0,p=d.length;c<p;c++)if(r.indexOf(o=d.charAt(c))<0){if("."==o){if(c>u){u=p;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,c=-1,u=0;continue}return i(m,String(t),l,e)}l=!1,(u=(d=n(d,e,10,m.s)).indexOf("."))>-1?d=d.replace(".",""):u=d.length}for(c=0;48===d.charCodeAt(c);c++);for(p=d.length;48===d.charCodeAt(--p););if(d=d.slice(c,++p)){if(p-=c,l&&z.DEBUG&&p>15&&(t>9007199254740991||t!==f(t)))throw Error(h+m.s*t);if((u=u-c-1)>M)m.c=m.e=null;else if(u<C)m.c=[m.e=0];else{if(m.e=u,m.c=[],c=(u+1)%14,u<0&&(c+=14),c<p){for(c&&m.c.push(+d.slice(0,c)),p-=14;c<p;)m.c.push(+d.slice(c,c+=14));c=14-(d=d.slice(c)).length}else c-=p;for(;c--;d+="0");m.c.push(+d)}}else m.c=[m.e=0]}function q(t,e,r,n){var o,i,a,s,u;if(null==r?r=j:b(r,0,8),!t.c)return t.toString();if(o=t.c[0],a=t.e,null==e)u=g(t.c),u=1==n||2==n&&(a<=I||a>=N)?k(u,a):_(u,a,"0");else if(i=(t=K(new z(t),e,r)).e,s=(u=g(t.c)).length,1==n||2==n&&(e<=i||i<=I)){for(;s<e;u+="0",s++);u=k(u,i)}else if(e-=a,u=_(u,i,"0"),i+1>s){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=i-s)>0)for(i+1==s&&(u+=".");e--;u+="0");return t.s<0&&o?"-"+u:u}function H(t,e){for(var r,n=1,o=new z(t[0]);n<t.length;n++){if(!(r=new z(t[n])).s){o=r;break}e.call(o,r)&&(o=r)}return o}function G(t,e,r){for(var n=1,o=e.length;!e[--o];e.pop());for(o=e[0];o>=10;o/=10,n++);return(r=n+14*r-1)>M?t.c=t.e=null:r<C?t.c=[t.e=0]:(t.e=r,t.c=e),t}function K(t,e,r,n){var o,i,a,s,u,l,h,m=t.c,v=d;if(m){t:{for(o=1,s=m[0];s>=10;s/=10,o++);if((i=e-o)<0)i+=14,a=e,h=(u=m[l=0])/v[o-a-1]%10|0;else if((l=c((i+1)/14))>=m.length){if(!n)break t;for(;m.length<=l;m.push(0));u=h=0,o=1,a=(i%=14)-14+1}else{for(u=s=m[l],o=1;s>=10;s/=10,o++);h=(a=(i%=14)-14+o)<0?0:u/v[o-a-1]%10|0}if(n=n||e<0||null!=m[l+1]||(a<0?u:u%v[o-a-1]),n=r<4?(h||n)&&(0==r||r==(t.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(i>0?a>0?u/v[o-a]:0:m[l-1])%10&1||r==(t.s<0?8:7)),e<1||!m[0])return m.length=0,n?(e-=t.e+1,m[0]=v[(14-e%14)%14],t.e=-e||0):m[0]=t.e=0,t;if(0==i?(m.length=l,s=1,l--):(m.length=l+1,s=v[14-i],m[l]=a>0?f(u/v[o-a]%v[a])*s:0),n)for(;;){if(0==l){for(i=1,a=m[0];a>=10;a/=10,i++);for(a=m[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(t.e++,m[0]==p&&(m[0]=1));break}if(m[l]+=s,m[l]!=p)break;m[l--]=0,s=1}for(i=m.length;0===m[--i];m.pop());}t.e>M?t.c=t.e=null:t.e<C&&(t.c=[t.e=0])}return t}function W(t){var e,r=t.e;return null===r?t.toString():(e=g(t.c),e=r<=I||r>=N?k(e,r):_(e,r,"0"),t.s<0?"-"+e:e)}return z.clone=t,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(t){var e,r;if(null!=t){if("object"!=o(t))throw Error(l+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(b(r=t[e],0,m,e),T=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(b(r=t[e],0,8,e),j=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(b(r[0],-m,0,e),b(r[1],0,m,e),I=r[0],N=r[1]):(b(r,-m,m,e),I=-(N=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)b(r[0],-m,-1,e),b(r[1],1,m,e),C=r[0],M=r[1];else{if(b(r,-m,m,e),!r)throw Error(l+e+" cannot be zero: "+r);C=-(M=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(l+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw B=!r,Error(l+"crypto unavailable");B=r}else B=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(b(r=t[e],0,9,e),F=r),t.hasOwnProperty(e="POW_PRECISION")&&(b(r=t[e],0,m,e),D=r),t.hasOwnProperty(e="FORMAT")){if("object"!=o(r=t[e]))throw Error(l+e+" not an object: "+r);U=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(l+e+" invalid: "+r);L=r}}return{DECIMAL_PLACES:T,ROUNDING_MODE:j,EXPONENTIAL_AT:[I,N],RANGE:[C,M],CRYPTO:B,MODULO_MODE:F,POW_PRECISION:D,FORMAT:U,ALPHABET:L}},z.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!z.DEBUG)return!0;var e,r,n=t.c,o=t.e,i=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-m&&o<=m&&o===f(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break t}if((e=(o+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=p||r!==f(r))break t;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(l+"Invalid BigNumber: "+t)},z.maximum=z.max=function(){return H(arguments,P.lt)},z.minimum=z.min=function(){return H(arguments,P.gt)},z.random=(a=9007199254740992*Math.random()&2097151?function(){return f(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,o,i,s=0,u=[],h=new z(R);if(null==t?t=T:b(t,0,m),o=c(t/14),B)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(i=131072*e[s]+(e[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[s]=r[0],e[s+1]=r[1]):(u.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw B=!1,Error(l+"crypto unavailable");for(e=crypto.randomBytes(o*=7);s<o;)(i=281474976710656*(31&e[s])+1099511627776*e[s+1]+4294967296*e[s+2]+16777216*e[s+3]+(e[s+4]<<16)+(e[s+5]<<8)+e[s+6])>=9e15?crypto.randomBytes(7).copy(e,s):(u.push(i%1e14),s+=7);s=o/7}if(!B)for(;s<o;)(i=a())<9e15&&(u[s++]=i%1e14);for(t%=14,(o=u[--s])&&t&&(i=d[14-t],u[s]=f(o/i)*i);0===u[s];u.pop(),s--);if(s<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=14);for(s=1,i=u[0];i>=10;i/=10,s++);s<14&&(n-=14-s)}return h.e=n,h.c=u,h}),z.sum=function(){for(var t=1,e=arguments,r=new z(e[0]);t<e.length;)r=r.plus(e[t++]);return r},n=function(){function t(t,e,r,n){for(var o,i,a=[0],s=0,u=t.length;s<u;){for(i=a.length;i--;a[i]*=e);for(a[0]+=n.indexOf(t.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(e,n,o,i,a){var s,u,c,f,l,h,p,d,m=e.indexOf("."),v=T,y=j;for(m>=0&&(f=D,D=0,e=e.replace(".",""),h=(d=new z(n)).pow(e.length-m),D=f,d.c=t(_(g(h.c),h.e,"0"),10,o,"0123456789"),d.e=d.c.length),c=f=(p=t(e,n,o,a?(s=L,"0123456789"):(s="0123456789",L))).length;0==p[--f];p.pop());if(!p[0])return s.charAt(0);if(m<0?--c:(h.c=p,h.e=c,h.s=i,p=(h=r(h,d,v,y,o)).c,l=h.r,c=h.e),m=p[u=c+v+1],f=o/2,l=l||u<0||null!=p[u+1],l=y<4?(null!=m||l)&&(0==y||y==(h.s<0?3:2)):m>f||m==f&&(4==y||l||6==y&&1&p[u-1]||y==(h.s<0?8:7)),u<1||!p[0])e=l?_(s.charAt(1),-v,s.charAt(0)):s.charAt(0);else{if(p.length=u,l)for(--o;++p[--u]>o;)p[u]=0,u||(++c,p=[1].concat(p));for(f=p.length;!p[--f];);for(m=0,e="";m<=f;e+=s.charAt(p[m++]));e=_(e,c,s.charAt(0))}return e}}(),r=function(){function t(t,e,r){var n,o,i,a,s=0,u=t.length,c=e%1e7,f=e/1e7|0;for(t=t.slice();u--;)s=((o=c*(i=t[u]%1e7)+(n=f*i+(a=t[u]/1e7|0)*c)%1e7*1e7+s)/r|0)+(n/1e7|0)+f*a,t[u]=o%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(t[o]!=e[o]){i=t[o]>e[o]?1:-1;break}return i}function r(t,e,r,n){for(var o=0;r--;)t[r]-=o,o=t[r]<e[r]?1:0,t[r]=o*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,o,i,a,s){var u,c,l,h,d,m,g,y,b,w,k,_,A,E,x,O,S,P=n.s==o.s?1:-1,R=n.c,T=o.c;if(!(R&&R[0]&&T&&T[0]))return new z(n.s&&o.s&&(R?!T||R[0]!=T[0]:T)?R&&0==R[0]||!T?0*P:P/0:NaN);for(b=(y=new z(P)).c=[],P=i+(c=n.e-o.e)+1,s||(s=p,c=v(n.e/14)-v(o.e/14),P=P/14|0),l=0;T[l]==(R[l]||0);l++);if(T[l]>(R[l]||0)&&c--,P<0)b.push(1),h=!0;else{for(E=R.length,O=T.length,l=0,P+=2,(d=f(s/(T[0]+1)))>1&&(T=t(T,d,s),R=t(R,d,s),O=T.length,E=R.length),A=O,k=(w=R.slice(0,O)).length;k<O;w[k++]=0);S=T.slice(),S=[0].concat(S),x=T[0],T[1]>=s/2&&x++;do{if(d=0,(u=e(T,w,O,k))<0){if(_=w[0],O!=k&&(_=_*s+(w[1]||0)),(d=f(_/x))>1)for(d>=s&&(d=s-1),g=(m=t(T,d,s)).length,k=w.length;1==e(m,w,g,k);)d--,r(m,O<g?S:T,g,s),g=m.length,u=1;else 0==d&&(u=d=1),g=(m=T.slice()).length;if(g<k&&(m=[0].concat(m)),r(w,m,k,s),k=w.length,-1==u)for(;e(T,w,O,k)<1;)d++,r(w,O<k?S:T,k,s),k=w.length}else 0===u&&(d++,w=[0]);b[l++]=d,w[0]?w[k++]=R[A]||0:(w=[R[A]],k=1)}while((A++<E||null!=w[0])&&P--);h=null!=w[0],b[0]||b.splice(0,1)}if(s==p){for(l=1,P=b[0];P>=10;P/=10,l++);K(y,i+(y.e=l+14*c-1)+1,a,h)}else y.e=c,y.r=+h;return y}}(),A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,x=/^\.([^.]+)$/,O=/^-?(Infinity|NaN)$/,S=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var o,i=r?e:e.replace(S,"");if(O.test(i))t.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(A,(function(t,e,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?t:e})),n&&(o=n,i=i.replace(E,"$1").replace(x,"0.$1")),e!=i))return new z(i,o);if(z.DEBUG)throw Error(l+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},P.absoluteValue=P.abs=function(){var t=new z(this);return t.s<0&&(t.s=1),t},P.comparedTo=function(t,e){return y(this,new z(t,e))},P.decimalPlaces=P.dp=function(t,e){var r,n,o,i=this;if(null!=t)return b(t,0,m),null==e?e=j:b(e,0,8),K(new z(i),t+i.e+1,e);if(!(r=i.c))return null;if(n=14*((o=r.length-1)-v(this.e/14)),o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(t,e){return r(this,new z(t,e),T,j)},P.dividedToIntegerBy=P.idiv=function(t,e){return r(this,new z(t,e),0,1)},P.exponentiatedBy=P.pow=function(t,e){var r,n,o,i,a,s,u,h,p=this;if((t=new z(t)).c&&!t.isInteger())throw Error(l+"Exponent not an integer: "+W(t));if(null!=e&&(e=new z(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return h=new z(Math.pow(+W(p),a?2-w(t):+W(t))),e?h.mod(e):h;if(s=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new z(NaN);(n=!s&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return i=p.s<0&&w(t)?-0:0,p.e>-1&&(i=1/i),new z(s?1/i:i);D&&(i=c(D/14+2))}for(a?(r=new z(.5),s&&(t.s=1),u=w(t)):u=(o=Math.abs(+W(t)))%2,h=new z(R);;){if(u){if(!(h=h.times(p)).c)break;i?h.c.length>i&&(h.c.length=i):n&&(h=h.mod(e))}if(o){if(0===(o=f(o/2)))break;u=o%2}else if(K(t=t.times(r),t.e+1,1),t.e>14)u=w(t);else{if(0===(o=+W(t)))break;u=o%2}p=p.times(p),i?p.c&&p.c.length>i&&(p.c.length=i):n&&(p=p.mod(e))}return n?h:(s&&(h=R.div(h)),e?h.mod(e):i?K(h,D,j,void 0):h)},P.integerValue=function(t){var e=new z(this);return null==t?t=j:b(t,0,8),K(e,e.e+1,t)},P.isEqualTo=P.eq=function(t,e){return 0===y(this,new z(t,e))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(t,e){return y(this,new z(t,e))>0},P.isGreaterThanOrEqualTo=P.gte=function(t,e){return 1===(e=y(this,new z(t,e)))||0===e},P.isInteger=function(){return!!this.c&&v(this.e/14)>this.c.length-2},P.isLessThan=P.lt=function(t,e){return y(this,new z(t,e))<0},P.isLessThanOrEqualTo=P.lte=function(t,e){return-1===(e=y(this,new z(t,e)))||0===e},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(t,e){var r,n,o,i,a=this,s=a.s;if(e=(t=new z(t,e)).s,!s||!e)return new z(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/14,c=t.e/14,f=a.c,l=t.c;if(!u||!c){if(!f||!l)return f?(t.s=-e,t):new z(l?a:NaN);if(!f[0]||!l[0])return l[0]?(t.s=-e,t):new z(f[0]?a:3==j?-0:0)}if(u=v(u),c=v(c),f=f.slice(),s=u-c){for((i=s<0)?(s=-s,o=f):(c=u,o=l),o.reverse(),e=s;e--;o.push(0));o.reverse()}else for(n=(i=(s=f.length)<(e=l.length))?s:e,s=e=0;e<n;e++)if(f[e]!=l[e]){i=f[e]<l[e];break}if(i&&(o=f,f=l,l=o,t.s=-t.s),(e=(n=l.length)-(r=f.length))>0)for(;e--;f[r++]=0);for(e=p-1;n>s;){if(f[--n]<l[n]){for(r=n;r&&!f[--r];f[r]=e);--f[r],f[n]+=p}f[n]-=l[n]}for(;0==f[0];f.splice(0,1),--c);return f[0]?G(t,f,c):(t.s=3==j?-1:1,t.c=[t.e=0],t)},P.modulo=P.mod=function(t,e){var n,o,i=this;return t=new z(t,e),!i.c||!t.s||t.c&&!t.c[0]?new z(NaN):!t.c||i.c&&!i.c[0]?new z(i):(9==F?(o=t.s,t.s=1,n=r(i,t,0,3),t.s=o,n.s*=o):n=r(i,t,0,F),(t=i.minus(n.times(t))).c[0]||1!=F||(t.s=i.s),t)},P.multipliedBy=P.times=function(t,e){var r,n,o,i,a,s,u,c,f,l,h,d,m,g,y=this,b=y.c,w=(t=new z(t,e)).c;if(!(b&&w&&b[0]&&w[0]))return!y.s||!t.s||b&&!b[0]&&!w||w&&!w[0]&&!b?t.c=t.e=t.s=null:(t.s*=y.s,b&&w?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=v(y.e/14)+v(t.e/14),t.s*=y.s,(u=b.length)<(l=w.length)&&(m=b,b=w,w=m,o=u,u=l,l=o),o=u+l,m=[];o--;m.push(0));for(g=p,1e7,o=l;--o>=0;){for(r=0,h=w[o]%1e7,d=w[o]/1e7|0,i=o+(a=u);i>o;)r=((c=h*(c=b[--a]%1e7)+(s=d*c+(f=b[a]/1e7|0)*h)%1e7*1e7+m[i]+r)/g|0)+(s/1e7|0)+d*f,m[i--]=c%g;m[i]=r}return r?++n:m.splice(0,1),G(t,m,n)},P.negated=function(){var t=new z(this);return t.s=-t.s||null,t},P.plus=function(t,e){var r,n=this,o=n.s;if(e=(t=new z(t,e)).s,!o||!e)return new z(NaN);if(o!=e)return t.s=-e,n.minus(t);var i=n.e/14,a=t.e/14,s=n.c,u=t.c;if(!i||!a){if(!s||!u)return new z(o/0);if(!s[0]||!u[0])return u[0]?t:new z(s[0]?n:0*o)}if(i=v(i),a=v(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=u):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(e=u.length)<0&&(r=u,u=s,s=r,e=o),o=0;e;)o=(s[--e]=s[e]+u[e]+o)/p|0,s[e]=p===s[e]?0:s[e]%p;return o&&(s=[o].concat(s),++a),G(t,s,a)},P.precision=P.sd=function(t,e){var r,n,o,i=this;if(null!=t&&t!==!!t)return b(t,1,m),null==e?e=j:b(e,0,8),K(new z(i),t,e);if(!(r=i.c))return null;if(n=14*(o=r.length-1)+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return t&&i.e+1>n&&(n=i.e+1),n},P.shiftedBy=function(t){return b(t,-9007199254740991,9007199254740991),this.times("1e"+t)},P.squareRoot=P.sqrt=function(){var t,e,n,o,i,a=this,s=a.c,u=a.s,c=a.e,f=T+4,l=new z("0.5");if(1!==u||!s||!s[0])return new z(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+W(a)))||u==1/0?(((e=g(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(+e),c=v((c+1)/2)-(c<0||c%2),n=new z(e=u==1/0?"1e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):n=new z(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(i=n,n=l.times(i.plus(r(a,i,f,1))),g(i.c).slice(0,u)===(e=g(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(e=e.slice(u-3,u+1))&&(o||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(K(n,n.e+T+2,1),t=!n.times(n).eq(a));break}if(!o&&(K(i,i.e+T+2,0),i.times(i).eq(a))){n=i;break}f+=4,u+=4,o=1}return K(n,n.e+T+1,j,t)},P.toExponential=function(t,e){return null!=t&&(b(t,0,m),t++),q(this,t,e,1)},P.toFixed=function(t,e){return null!=t&&(b(t,0,m),t=t+this.e+1),q(this,t,e)},P.toFormat=function(t,e,r){var n,i=this;if(null==r)null!=t&&e&&"object"==o(e)?(r=e,e=null):t&&"object"==o(t)?(r=t,t=e=null):r=U;else if("object"!=o(r))throw Error(l+"Argument not an object: "+r);if(n=i.toFixed(t,e),i.c){var a,s=n.split("."),u=+r.groupSize,c=+r.secondaryGroupSize,f=r.groupSeparator||"",h=s[0],p=s[1],d=i.s<0,m=d?h.slice(1):h,v=m.length;if(c&&(a=u,u=c,c=a,v-=a),u>0&&v>0){for(a=v%u||u,h=m.substr(0,a);a<v;a+=u)h+=f+m.substr(a,u);c>0&&(h+=f+m.slice(a)),d&&(h="-"+h)}n=p?h+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?p.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):h}return(r.prefix||"")+n+(r.suffix||"")},P.toFraction=function(t){var e,n,o,i,a,s,u,c,f,h,p,m,v=this,y=v.c;if(null!=t&&(!(u=new z(t)).isInteger()&&(u.c||1!==u.s)||u.lt(R)))throw Error(l+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+W(u));if(!y)return new z(v);for(e=new z(R),f=n=new z(R),o=c=new z(R),m=g(y),a=e.e=m.length-v.e-1,e.c[0]=d[(s=a%14)<0?14+s:s],t=!t||u.comparedTo(e)>0?a>0?e:f:u,s=M,M=1/0,u=new z(m),c.c[0]=0;h=r(u,e,0,1),1!=(i=n.plus(h.times(o))).comparedTo(t);)n=o,o=i,f=c.plus(h.times(i=f)),c=i,e=u.minus(h.times(i=e)),u=i;return i=r(t.minus(n),o,0,1),c=c.plus(i.times(f)),n=n.plus(i.times(o)),c.s=f.s=v.s,p=r(f,o,a*=2,j).minus(v).abs().comparedTo(r(c,n,a,j).minus(v).abs())<1?[f,o]:[c,n],M=s,p},P.toNumber=function(){return+W(this)},P.toPrecision=function(t,e){return null!=t&&b(t,1,m),q(this,t,e,2)},P.toString=function(t){var e,r=this,o=r.s,i=r.e;return null===i?o?(e="Infinity",o<0&&(e="-"+e)):e="NaN":(null==t?e=i<=I||i>=N?k(g(r.c),i):_(g(r.c),i,"0"):10===t?e=_(g((r=K(new z(r),T+i+1,j)).c),r.e,"0"):(b(t,2,L.length,"Base"),e=n(_(g(r.c),i,"0"),10,t,o,!0)),o<0&&r.c[0]&&(e="-"+e)),e},P.valueOf=P.toJSON=function(){return W(this)},P._isBigNumber=!0,u&&(P[Symbol.toStringTag]="BigNumber",P[Symbol.for("nodejs.util.inspect.custom")]=P.valueOf),null!=e&&z.set(e),z}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()},function(t,e,r){t.exports={encode:r(60),decode:r(61),encodingLength:r(62)}},function(t,e){t.exports=function t(e,n,o){n=n||[];var i=o=o||0;for(;e>=r;)n[o++]=255&e|128,e/=128;for(;-128&e;)n[o++]=255&e|128,e>>>=7;return n[o]=0|e,t.bytes=o-i+1,n};var r=Math.pow(2,31)},function(t,e){t.exports=function t(e,r){var n,o=0,i=0,a=r=r||0,s=e.length;do{if(a>=s)throw t.bytes=0,new RangeError("Could not decode varint");n=e[a++],o+=i<28?(127&n)<<i:(127&n)*Math.pow(2,i),i+=7}while(n>=128);return t.bytes=a-r,o}},function(t,e){var r=Math.pow(2,7),n=Math.pow(2,14),o=Math.pow(2,21),i=Math.pow(2,28),a=Math.pow(2,35),s=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),f=Math.pow(2,63);t.exports=function(t){return t<r?1:t<n?2:t<o?3:t<i?4:t<a?5:t<s?6:t<u?7:t<c?8:t<f?9:10}},function(t,e,r){(function(t){var n,o,i;function a(t){return(a="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)}
|
|
47
|
+
var n=r(16),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return o(t,e,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){var n;function o(t){return(o="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(i){"use strict";var a,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u="function"==typeof Symbol&&"symbol"==o(Symbol.iterator),c=Math.ceil,f=Math.floor,l="[BigNumber Error] ",h=l+"Number primitive has more than 15 significant digits: ",p=1e14,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e9;function y(t){var e=0|t;return t>0||t===e?e:e-1}function v(t){for(var e,r,n=1,o=t.length,i=t[0]+"";n<o;){for(r=14-(e=t[n++]+"").length;r--;e="0"+e);i+=e}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function g(t,e){var r,n,o=t.c,i=e.c,a=t.s,s=e.s,u=t.e,c=e.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=o.length)<(c=i.length)?u:c,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function b(t,e,r,n){if(t<e||t>r||t!==f(t))throw Error(l+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return y(t.e/14)==e&&t.c[e]%2!=0}function _(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function k(t,e,r){var n,o;if(e<0){for(o=r+".";++e;o+=r);t=o+t}else if(++e>(n=t.length)){for(o=r,e-=n;--e;o+=r);t+=o}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}(a=function t(e){var r,n,i,a,A,E,x,O,S,P=z.prototype={constructor:z,toString:null,valueOf:null},R=new z(1),j=20,T=4,I=-7,N=21,C=-1e7,M=1e7,B=!1,F=1,D=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},L="0123456789abcdefghijklmnopqrstuvwxyz";function z(t,e){var r,o,a,u,c,l,p,d,m=this;if(!(m instanceof z))return new z(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>M?m.c=m.e=null:t.e<C?m.c=[m.e=0]:(m.e=t.e,m.c=t.c.slice()));if((l="number"==typeof t)&&0*t==0){if(m.s=1/t<0?(t=-t,-1):1,t===~~t){for(u=0,c=t;c>=10;c/=10,u++);return void(u>M?m.c=m.e=null:(m.e=u,m.c=[t]))}d=String(t)}else{if(!s.test(d=String(t)))return i(m,d,l);m.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(u=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(u<0&&(u=c),u+=+d.slice(c+1),d=d.substring(0,c)):u<0&&(u=d.length)}else{if(b(e,2,L.length,"Base"),10==e)return K(m=new z(t),j+m.e+1,T);if(d=String(t),l="number"==typeof t){if(0*t!=0)return i(m,d,l,e);if(m.s=1/t<0?(d=d.slice(1),-1):1,z.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(h+t)}else m.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=L.slice(0,e),u=c=0,p=d.length;c<p;c++)if(r.indexOf(o=d.charAt(c))<0){if("."==o){if(c>u){u=p;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,c=-1,u=0;continue}return i(m,String(t),l,e)}l=!1,(u=(d=n(d,e,10,m.s)).indexOf("."))>-1?d=d.replace(".",""):u=d.length}for(c=0;48===d.charCodeAt(c);c++);for(p=d.length;48===d.charCodeAt(--p););if(d=d.slice(c,++p)){if(p-=c,l&&z.DEBUG&&p>15&&(t>9007199254740991||t!==f(t)))throw Error(h+m.s*t);if((u=u-c-1)>M)m.c=m.e=null;else if(u<C)m.c=[m.e=0];else{if(m.e=u,m.c=[],c=(u+1)%14,u<0&&(c+=14),c<p){for(c&&m.c.push(+d.slice(0,c)),p-=14;c<p;)m.c.push(+d.slice(c,c+=14));c=14-(d=d.slice(c)).length}else c-=p;for(;c--;d+="0");m.c.push(+d)}}else m.c=[m.e=0]}function G(t,e,r,n){var o,i,a,s,u;if(null==r?r=T:b(r,0,8),!t.c)return t.toString();if(o=t.c[0],a=t.e,null==e)u=v(t.c),u=1==n||2==n&&(a<=I||a>=N)?_(u,a):k(u,a,"0");else if(i=(t=K(new z(t),e,r)).e,s=(u=v(t.c)).length,1==n||2==n&&(e<=i||i<=I)){for(;s<e;u+="0",s++);u=_(u,i)}else if(e-=a,u=k(u,i,"0"),i+1>s){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=i-s)>0)for(i+1==s&&(u+=".");e--;u+="0");return t.s<0&&o?"-"+u:u}function H(t,e){for(var r,n=1,o=new z(t[0]);n<t.length;n++){if(!(r=new z(t[n])).s){o=r;break}e.call(o,r)&&(o=r)}return o}function q(t,e,r){for(var n=1,o=e.length;!e[--o];e.pop());for(o=e[0];o>=10;o/=10,n++);return(r=n+14*r-1)>M?t.c=t.e=null:r<C?t.c=[t.e=0]:(t.e=r,t.c=e),t}function K(t,e,r,n){var o,i,a,s,u,l,h,m=t.c,y=d;if(m){t:{for(o=1,s=m[0];s>=10;s/=10,o++);if((i=e-o)<0)i+=14,a=e,h=(u=m[l=0])/y[o-a-1]%10|0;else if((l=c((i+1)/14))>=m.length){if(!n)break t;for(;m.length<=l;m.push(0));u=h=0,o=1,a=(i%=14)-14+1}else{for(u=s=m[l],o=1;s>=10;s/=10,o++);h=(a=(i%=14)-14+o)<0?0:u/y[o-a-1]%10|0}if(n=n||e<0||null!=m[l+1]||(a<0?u:u%y[o-a-1]),n=r<4?(h||n)&&(0==r||r==(t.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(i>0?a>0?u/y[o-a]:0:m[l-1])%10&1||r==(t.s<0?8:7)),e<1||!m[0])return m.length=0,n?(e-=t.e+1,m[0]=y[(14-e%14)%14],t.e=-e||0):m[0]=t.e=0,t;if(0==i?(m.length=l,s=1,l--):(m.length=l+1,s=y[14-i],m[l]=a>0?f(u/y[o-a]%y[a])*s:0),n)for(;;){if(0==l){for(i=1,a=m[0];a>=10;a/=10,i++);for(a=m[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(t.e++,m[0]==p&&(m[0]=1));break}if(m[l]+=s,m[l]!=p)break;m[l--]=0,s=1}for(i=m.length;0===m[--i];m.pop());}t.e>M?t.c=t.e=null:t.e<C&&(t.c=[t.e=0])}return t}function V(t){var e,r=t.e;return null===r?t.toString():(e=v(t.c),e=r<=I||r>=N?_(e,r):k(e,r,"0"),t.s<0?"-"+e:e)}return z.clone=t,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(t){var e,r;if(null!=t){if("object"!=o(t))throw Error(l+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(b(r=t[e],0,m,e),j=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(b(r=t[e],0,8,e),T=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(b(r[0],-m,0,e),b(r[1],0,m,e),I=r[0],N=r[1]):(b(r,-m,m,e),I=-(N=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)b(r[0],-m,-1,e),b(r[1],1,m,e),C=r[0],M=r[1];else{if(b(r,-m,m,e),!r)throw Error(l+e+" cannot be zero: "+r);C=-(M=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(l+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw B=!r,Error(l+"crypto unavailable");B=r}else B=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(b(r=t[e],0,9,e),F=r),t.hasOwnProperty(e="POW_PRECISION")&&(b(r=t[e],0,m,e),D=r),t.hasOwnProperty(e="FORMAT")){if("object"!=o(r=t[e]))throw Error(l+e+" not an object: "+r);U=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(l+e+" invalid: "+r);L=r}}return{DECIMAL_PLACES:j,ROUNDING_MODE:T,EXPONENTIAL_AT:[I,N],RANGE:[C,M],CRYPTO:B,MODULO_MODE:F,POW_PRECISION:D,FORMAT:U,ALPHABET:L}},z.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!z.DEBUG)return!0;var e,r,n=t.c,o=t.e,i=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-m&&o<=m&&o===f(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break t}if((e=(o+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=p||r!==f(r))break t;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(l+"Invalid BigNumber: "+t)},z.maximum=z.max=function(){return H(arguments,P.lt)},z.minimum=z.min=function(){return H(arguments,P.gt)},z.random=(a=9007199254740992*Math.random()&2097151?function(){return f(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,o,i,s=0,u=[],h=new z(R);if(null==t?t=j:b(t,0,m),o=c(t/14),B)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(i=131072*e[s]+(e[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[s]=r[0],e[s+1]=r[1]):(u.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw B=!1,Error(l+"crypto unavailable");for(e=crypto.randomBytes(o*=7);s<o;)(i=281474976710656*(31&e[s])+1099511627776*e[s+1]+4294967296*e[s+2]+16777216*e[s+3]+(e[s+4]<<16)+(e[s+5]<<8)+e[s+6])>=9e15?crypto.randomBytes(7).copy(e,s):(u.push(i%1e14),s+=7);s=o/7}if(!B)for(;s<o;)(i=a())<9e15&&(u[s++]=i%1e14);for(t%=14,(o=u[--s])&&t&&(i=d[14-t],u[s]=f(o/i)*i);0===u[s];u.pop(),s--);if(s<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=14);for(s=1,i=u[0];i>=10;i/=10,s++);s<14&&(n-=14-s)}return h.e=n,h.c=u,h}),z.sum=function(){for(var t=1,e=arguments,r=new z(e[0]);t<e.length;)r=r.plus(e[t++]);return r},n=function(){function t(t,e,r,n){for(var o,i,a=[0],s=0,u=t.length;s<u;){for(i=a.length;i--;a[i]*=e);for(a[0]+=n.indexOf(t.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(e,n,o,i,a){var s,u,c,f,l,h,p,d,m=e.indexOf("."),y=j,g=T;for(m>=0&&(f=D,D=0,e=e.replace(".",""),h=(d=new z(n)).pow(e.length-m),D=f,d.c=t(k(v(h.c),h.e,"0"),10,o,"0123456789"),d.e=d.c.length),c=f=(p=t(e,n,o,a?(s=L,"0123456789"):(s="0123456789",L))).length;0==p[--f];p.pop());if(!p[0])return s.charAt(0);if(m<0?--c:(h.c=p,h.e=c,h.s=i,p=(h=r(h,d,y,g,o)).c,l=h.r,c=h.e),m=p[u=c+y+1],f=o/2,l=l||u<0||null!=p[u+1],l=g<4?(null!=m||l)&&(0==g||g==(h.s<0?3:2)):m>f||m==f&&(4==g||l||6==g&&1&p[u-1]||g==(h.s<0?8:7)),u<1||!p[0])e=l?k(s.charAt(1),-y,s.charAt(0)):s.charAt(0);else{if(p.length=u,l)for(--o;++p[--u]>o;)p[u]=0,u||(++c,p=[1].concat(p));for(f=p.length;!p[--f];);for(m=0,e="";m<=f;e+=s.charAt(p[m++]));e=k(e,c,s.charAt(0))}return e}}(),r=function(){function t(t,e,r){var n,o,i,a,s=0,u=t.length,c=e%1e7,f=e/1e7|0;for(t=t.slice();u--;)s=((o=c*(i=t[u]%1e7)+(n=f*i+(a=t[u]/1e7|0)*c)%1e7*1e7+s)/r|0)+(n/1e7|0)+f*a,t[u]=o%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(t[o]!=e[o]){i=t[o]>e[o]?1:-1;break}return i}function r(t,e,r,n){for(var o=0;r--;)t[r]-=o,o=t[r]<e[r]?1:0,t[r]=o*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,o,i,a,s){var u,c,l,h,d,m,v,g,b,w,_,k,A,E,x,O,S,P=n.s==o.s?1:-1,R=n.c,j=o.c;if(!(R&&R[0]&&j&&j[0]))return new z(n.s&&o.s&&(R?!j||R[0]!=j[0]:j)?R&&0==R[0]||!j?0*P:P/0:NaN);for(b=(g=new z(P)).c=[],P=i+(c=n.e-o.e)+1,s||(s=p,c=y(n.e/14)-y(o.e/14),P=P/14|0),l=0;j[l]==(R[l]||0);l++);if(j[l]>(R[l]||0)&&c--,P<0)b.push(1),h=!0;else{for(E=R.length,O=j.length,l=0,P+=2,(d=f(s/(j[0]+1)))>1&&(j=t(j,d,s),R=t(R,d,s),O=j.length,E=R.length),A=O,_=(w=R.slice(0,O)).length;_<O;w[_++]=0);S=j.slice(),S=[0].concat(S),x=j[0],j[1]>=s/2&&x++;do{if(d=0,(u=e(j,w,O,_))<0){if(k=w[0],O!=_&&(k=k*s+(w[1]||0)),(d=f(k/x))>1)for(d>=s&&(d=s-1),v=(m=t(j,d,s)).length,_=w.length;1==e(m,w,v,_);)d--,r(m,O<v?S:j,v,s),v=m.length,u=1;else 0==d&&(u=d=1),v=(m=j.slice()).length;if(v<_&&(m=[0].concat(m)),r(w,m,_,s),_=w.length,-1==u)for(;e(j,w,O,_)<1;)d++,r(w,O<_?S:j,_,s),_=w.length}else 0===u&&(d++,w=[0]);b[l++]=d,w[0]?w[_++]=R[A]||0:(w=[R[A]],_=1)}while((A++<E||null!=w[0])&&P--);h=null!=w[0],b[0]||b.splice(0,1)}if(s==p){for(l=1,P=b[0];P>=10;P/=10,l++);K(g,i+(g.e=l+14*c-1)+1,a,h)}else g.e=c,g.r=+h;return g}}(),A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,x=/^\.([^.]+)$/,O=/^-?(Infinity|NaN)$/,S=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var o,i=r?e:e.replace(S,"");if(O.test(i))t.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(A,(function(t,e,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?t:e})),n&&(o=n,i=i.replace(E,"$1").replace(x,"0.$1")),e!=i))return new z(i,o);if(z.DEBUG)throw Error(l+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},P.absoluteValue=P.abs=function(){var t=new z(this);return t.s<0&&(t.s=1),t},P.comparedTo=function(t,e){return g(this,new z(t,e))},P.decimalPlaces=P.dp=function(t,e){var r,n,o,i=this;if(null!=t)return b(t,0,m),null==e?e=T:b(e,0,8),K(new z(i),t+i.e+1,e);if(!(r=i.c))return null;if(n=14*((o=r.length-1)-y(this.e/14)),o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(t,e){return r(this,new z(t,e),j,T)},P.dividedToIntegerBy=P.idiv=function(t,e){return r(this,new z(t,e),0,1)},P.exponentiatedBy=P.pow=function(t,e){var r,n,o,i,a,s,u,h,p=this;if((t=new z(t)).c&&!t.isInteger())throw Error(l+"Exponent not an integer: "+V(t));if(null!=e&&(e=new z(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return h=new z(Math.pow(+V(p),a?2-w(t):+V(t))),e?h.mod(e):h;if(s=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new z(NaN);(n=!s&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return i=p.s<0&&w(t)?-0:0,p.e>-1&&(i=1/i),new z(s?1/i:i);D&&(i=c(D/14+2))}for(a?(r=new z(.5),s&&(t.s=1),u=w(t)):u=(o=Math.abs(+V(t)))%2,h=new z(R);;){if(u){if(!(h=h.times(p)).c)break;i?h.c.length>i&&(h.c.length=i):n&&(h=h.mod(e))}if(o){if(0===(o=f(o/2)))break;u=o%2}else if(K(t=t.times(r),t.e+1,1),t.e>14)u=w(t);else{if(0===(o=+V(t)))break;u=o%2}p=p.times(p),i?p.c&&p.c.length>i&&(p.c.length=i):n&&(p=p.mod(e))}return n?h:(s&&(h=R.div(h)),e?h.mod(e):i?K(h,D,T,void 0):h)},P.integerValue=function(t){var e=new z(this);return null==t?t=T:b(t,0,8),K(e,e.e+1,t)},P.isEqualTo=P.eq=function(t,e){return 0===g(this,new z(t,e))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(t,e){return g(this,new z(t,e))>0},P.isGreaterThanOrEqualTo=P.gte=function(t,e){return 1===(e=g(this,new z(t,e)))||0===e},P.isInteger=function(){return!!this.c&&y(this.e/14)>this.c.length-2},P.isLessThan=P.lt=function(t,e){return g(this,new z(t,e))<0},P.isLessThanOrEqualTo=P.lte=function(t,e){return-1===(e=g(this,new z(t,e)))||0===e},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(t,e){var r,n,o,i,a=this,s=a.s;if(e=(t=new z(t,e)).s,!s||!e)return new z(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/14,c=t.e/14,f=a.c,l=t.c;if(!u||!c){if(!f||!l)return f?(t.s=-e,t):new z(l?a:NaN);if(!f[0]||!l[0])return l[0]?(t.s=-e,t):new z(f[0]?a:3==T?-0:0)}if(u=y(u),c=y(c),f=f.slice(),s=u-c){for((i=s<0)?(s=-s,o=f):(c=u,o=l),o.reverse(),e=s;e--;o.push(0));o.reverse()}else for(n=(i=(s=f.length)<(e=l.length))?s:e,s=e=0;e<n;e++)if(f[e]!=l[e]){i=f[e]<l[e];break}if(i&&(o=f,f=l,l=o,t.s=-t.s),(e=(n=l.length)-(r=f.length))>0)for(;e--;f[r++]=0);for(e=p-1;n>s;){if(f[--n]<l[n]){for(r=n;r&&!f[--r];f[r]=e);--f[r],f[n]+=p}f[n]-=l[n]}for(;0==f[0];f.splice(0,1),--c);return f[0]?q(t,f,c):(t.s=3==T?-1:1,t.c=[t.e=0],t)},P.modulo=P.mod=function(t,e){var n,o,i=this;return t=new z(t,e),!i.c||!t.s||t.c&&!t.c[0]?new z(NaN):!t.c||i.c&&!i.c[0]?new z(i):(9==F?(o=t.s,t.s=1,n=r(i,t,0,3),t.s=o,n.s*=o):n=r(i,t,0,F),(t=i.minus(n.times(t))).c[0]||1!=F||(t.s=i.s),t)},P.multipliedBy=P.times=function(t,e){var r,n,o,i,a,s,u,c,f,l,h,d,m,v,g=this,b=g.c,w=(t=new z(t,e)).c;if(!(b&&w&&b[0]&&w[0]))return!g.s||!t.s||b&&!b[0]&&!w||w&&!w[0]&&!b?t.c=t.e=t.s=null:(t.s*=g.s,b&&w?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=y(g.e/14)+y(t.e/14),t.s*=g.s,(u=b.length)<(l=w.length)&&(m=b,b=w,w=m,o=u,u=l,l=o),o=u+l,m=[];o--;m.push(0));for(v=p,1e7,o=l;--o>=0;){for(r=0,h=w[o]%1e7,d=w[o]/1e7|0,i=o+(a=u);i>o;)r=((c=h*(c=b[--a]%1e7)+(s=d*c+(f=b[a]/1e7|0)*h)%1e7*1e7+m[i]+r)/v|0)+(s/1e7|0)+d*f,m[i--]=c%v;m[i]=r}return r?++n:m.splice(0,1),q(t,m,n)},P.negated=function(){var t=new z(this);return t.s=-t.s||null,t},P.plus=function(t,e){var r,n=this,o=n.s;if(e=(t=new z(t,e)).s,!o||!e)return new z(NaN);if(o!=e)return t.s=-e,n.minus(t);var i=n.e/14,a=t.e/14,s=n.c,u=t.c;if(!i||!a){if(!s||!u)return new z(o/0);if(!s[0]||!u[0])return u[0]?t:new z(s[0]?n:0*o)}if(i=y(i),a=y(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=u):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(e=u.length)<0&&(r=u,u=s,s=r,e=o),o=0;e;)o=(s[--e]=s[e]+u[e]+o)/p|0,s[e]=p===s[e]?0:s[e]%p;return o&&(s=[o].concat(s),++a),q(t,s,a)},P.precision=P.sd=function(t,e){var r,n,o,i=this;if(null!=t&&t!==!!t)return b(t,1,m),null==e?e=T:b(e,0,8),K(new z(i),t,e);if(!(r=i.c))return null;if(n=14*(o=r.length-1)+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return t&&i.e+1>n&&(n=i.e+1),n},P.shiftedBy=function(t){return b(t,-9007199254740991,9007199254740991),this.times("1e"+t)},P.squareRoot=P.sqrt=function(){var t,e,n,o,i,a=this,s=a.c,u=a.s,c=a.e,f=j+4,l=new z("0.5");if(1!==u||!s||!s[0])return new z(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+V(a)))||u==1/0?(((e=v(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(+e),c=y((c+1)/2)-(c<0||c%2),n=new z(e=u==1/0?"1e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):n=new z(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(i=n,n=l.times(i.plus(r(a,i,f,1))),v(i.c).slice(0,u)===(e=v(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(e=e.slice(u-3,u+1))&&(o||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(K(n,n.e+j+2,1),t=!n.times(n).eq(a));break}if(!o&&(K(i,i.e+j+2,0),i.times(i).eq(a))){n=i;break}f+=4,u+=4,o=1}return K(n,n.e+j+1,T,t)},P.toExponential=function(t,e){return null!=t&&(b(t,0,m),t++),G(this,t,e,1)},P.toFixed=function(t,e){return null!=t&&(b(t,0,m),t=t+this.e+1),G(this,t,e)},P.toFormat=function(t,e,r){var n,i=this;if(null==r)null!=t&&e&&"object"==o(e)?(r=e,e=null):t&&"object"==o(t)?(r=t,t=e=null):r=U;else if("object"!=o(r))throw Error(l+"Argument not an object: "+r);if(n=i.toFixed(t,e),i.c){var a,s=n.split("."),u=+r.groupSize,c=+r.secondaryGroupSize,f=r.groupSeparator||"",h=s[0],p=s[1],d=i.s<0,m=d?h.slice(1):h,y=m.length;if(c&&(a=u,u=c,c=a,y-=a),u>0&&y>0){for(a=y%u||u,h=m.substr(0,a);a<y;a+=u)h+=f+m.substr(a,u);c>0&&(h+=f+m.slice(a)),d&&(h="-"+h)}n=p?h+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?p.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):h}return(r.prefix||"")+n+(r.suffix||"")},P.toFraction=function(t){var e,n,o,i,a,s,u,c,f,h,p,m,y=this,g=y.c;if(null!=t&&(!(u=new z(t)).isInteger()&&(u.c||1!==u.s)||u.lt(R)))throw Error(l+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+V(u));if(!g)return new z(y);for(e=new z(R),f=n=new z(R),o=c=new z(R),m=v(g),a=e.e=m.length-y.e-1,e.c[0]=d[(s=a%14)<0?14+s:s],t=!t||u.comparedTo(e)>0?a>0?e:f:u,s=M,M=1/0,u=new z(m),c.c[0]=0;h=r(u,e,0,1),1!=(i=n.plus(h.times(o))).comparedTo(t);)n=o,o=i,f=c.plus(h.times(i=f)),c=i,e=u.minus(h.times(i=e)),u=i;return i=r(t.minus(n),o,0,1),c=c.plus(i.times(f)),n=n.plus(i.times(o)),c.s=f.s=y.s,p=r(f,o,a*=2,T).minus(y).abs().comparedTo(r(c,n,a,T).minus(y).abs())<1?[f,o]:[c,n],M=s,p},P.toNumber=function(){return+V(this)},P.toPrecision=function(t,e){return null!=t&&b(t,1,m),G(this,t,e,2)},P.toString=function(t){var e,r=this,o=r.s,i=r.e;return null===i?o?(e="Infinity",o<0&&(e="-"+e)):e="NaN":(null==t?e=i<=I||i>=N?_(v(r.c),i):k(v(r.c),i,"0"):10===t?e=k(v((r=K(new z(r),j+i+1,T)).c),r.e,"0"):(b(t,2,L.length,"Base"),e=n(k(v(r.c),i,"0"),10,t,o,!0)),o<0&&r.c[0]&&(e="-"+e)),e},P.valueOf=P.toJSON=function(){return V(this)},P._isBigNumber=!0,u&&(P[Symbol.toStringTag]="BigNumber",P[Symbol.for("nodejs.util.inspect.custom")]=P.valueOf),null!=e&&z.set(e),z}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()},function(t,e,r){t.exports={encode:r(59),decode:r(60),encodingLength:r(61)}},function(t,e){t.exports=function t(e,n,o){n=n||[];var i=o=o||0;for(;e>=r;)n[o++]=255&e|128,e/=128;for(;-128&e;)n[o++]=255&e|128,e>>>=7;return n[o]=0|e,t.bytes=o-i+1,n};var r=Math.pow(2,31)},function(t,e){t.exports=function t(e,r){var n,o=0,i=0,a=r=r||0,s=e.length;do{if(a>=s)throw t.bytes=0,new RangeError("Could not decode varint");n=e[a++],o+=i<28?(127&n)<<i:(127&n)*Math.pow(2,i),i+=7}while(n>=128);return t.bytes=a-r,o}},function(t,e){var r=Math.pow(2,7),n=Math.pow(2,14),o=Math.pow(2,21),i=Math.pow(2,28),a=Math.pow(2,35),s=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),f=Math.pow(2,63);t.exports=function(t){return t<r?1:t<n?2:t<o?3:t<i?4:t<a?5:t<s?6:t<u?7:t<c?8:t<f?9:10}},function(t,e,r){(function(t){var n,o,i;function a(t){return(a="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)}
|
|
48
48
|
/*!
|
|
49
49
|
* URI.js - Mutating URLs
|
|
50
50
|
*
|
|
@@ -56,4 +56,4 @@ var n=r(16),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r
|
|
|
56
56
|
* Licensed under
|
|
57
57
|
* MIT License http://www.opensource.org/licenses/mit-license
|
|
58
58
|
*
|
|
59
|
-
*/!function(s,u){"use strict";"object"===a(t)&&t.exports?t.exports=u(r(26),r(27),r(28)):(o=[r(26),r(27),r(28)],void 0===(i="function"==typeof(n=u)?n.apply(e,o):n)||(t.exports=i))}(0,(function(t,e,r,n){"use strict";var o=n&&n.URI;function i(t,e){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof i))return r?n?new i(t,e):new i(t):new i;if(void 0===t){if(r)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&r)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}i.version="1.19.11";var s=i.prototype,u=Object.prototype.hasOwnProperty;function c(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function f(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function l(t){return"Array"===f(t)}function h(t,e){var r,n,o={};if("RegExp"===f(e))o=null;else if(l(e))for(r=0,n=e.length;r<n;r++)o[e[r]]=!0;else o[e]=!0;for(r=0,n=t.length;r<n;r++){(o&&void 0!==o[t[r]]||!o&&e.test(t[r]))&&(t.splice(r,1),n--,r--)}return t}function p(t,e){var r,n;if(l(e)){for(r=0,n=e.length;r<n;r++)if(!p(t,e[r]))return!1;return!0}var o=f(e);for(r=0,n=t.length;r<n;r++)if("RegExp"===o){if("string"==typeof t[r]&&t[r].match(e))return!0}else if(t[r]===e)return!0;return!1}function d(t,e){if(!l(t)||!l(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function m(t){return t.replace(/^\/+|\/+$/g,"")}function v(t){return escape(t)}function g(t){return encodeURIComponent(t).replace(/[!'()*]/g,v).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return i.domAttributes[e]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(t,e){var r=i.encode(t+"");return void 0===e&&(e=i.escapeQuerySpace),e?r.replace(/%20/g,"+"):r},i.decodeQuery=function(t,e){t+="",void 0===e&&(e=i.escapeQuerySpace);try{return i.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var y,b={encode:"encode",decode:"decode"},w=function(t,e){return function(r){try{return i[e](r+"").replace(i.characters[t][e].expression,(function(r){return i.characters[t][e].map[r]}))}catch(t){return r}}};for(y in b)i[y+"PathSegment"]=w("pathname",b[y]),i[y+"UrnPathSegment"]=w("urnpath",b[y]);var k=function(t,e,r){return function(n){var o;o=r?function(t){return i[e](i[r](t))}:i[e];for(var a=(n+"").split(t),s=0,u=a.length;s<u;s++)a[s]=o(a[s]);return a.join(t)}};function _(t){return function(e,r){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!r),this)}}function A(t,e){return function(r,n){return void 0===r?this._parts[t]||"":(null!==r&&(r+="").charAt(0)===e&&(r=r.substring(1)),this._parts[t]=r,this.build(!n),this)}}i.decodePath=k("/","decodePathSegment"),i.decodeUrnPath=k(":","decodeUrnPathSegment"),i.recodePath=k("/","encodePathSegment","decode"),i.recodeUrnPath=k(":","encodeUrnPathSegment","decode"),i.encodeReserved=w("reserved","encode"),i.parse=function(t,e){var r;return e||(e={preventInvalidHostname:i.preventInvalidHostname}),(r=(t=(t=t.replace(i.leading_whitespace_expression,"")).replace(i.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(e.fragment=t.substring(r+1)||null,t=t.substring(0,r)),(r=t.indexOf("?"))>-1&&(e.query=t.substring(r+1)||null,t=t.substring(0,r)),"//"===(t=(t=t.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(e.protocol=null,t=t.substring(2),t=i.parseAuthority(t,e)):(r=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,r)||null,e.protocol&&!e.protocol.match(i.protocol_expression)?e.protocol=void 0:"//"===t.substring(r+1,r+3).replace(/\\/g,"/")?(t=t.substring(r+3),t=i.parseAuthority(t,e)):(t=t.substring(r+1),e.urn=!0)),e.path=t,e},i.parseHost=function(t,e){t||(t="");var r,n,o=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=t.length),"["===t.charAt(0))r=t.indexOf("]"),e.hostname=t.substring(1,r)||null,e.port=t.substring(r+2,o)||null,"/"===e.port&&(e.port=null);else{var a=t.indexOf(":"),s=t.indexOf("/"),u=t.indexOf(":",a+1);-1!==u&&(-1===s||u<s)?(e.hostname=t.substring(0,o)||null,e.port=null):(n=t.substring(0,o).split(":"),e.hostname=n[0]||null,e.port=n[1]||null)}return e.hostname&&"/"!==t.substring(o).charAt(0)&&(o++,t="/"+t),e.preventInvalidHostname&&i.ensureValidHostname(e.hostname,e.protocol),e.port&&i.ensureValidPort(e.port),t.substring(o)||"/"},i.parseAuthority=function(t,e){return t=i.parseUserinfo(t,e),i.parseHost(t,e)},i.parseUserinfo=function(t,e){var r=t;-1!==t.indexOf("\\")&&(t=t.replace(/\\/g,"/"));var n,o=t.indexOf("/"),a=t.lastIndexOf("@",o>-1?o:t.length-1);return a>-1&&(-1===o||a<o)?(n=t.substring(0,a).split(":"),e.username=n[0]?i.decode(n[0]):null,n.shift(),e.password=n[0]?i.decode(n.join(":")):null,t=r.substring(a+1)):(e.username=null,e.password=null),t},i.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,a={},s=t.split("&"),c=s.length,f=0;f<c;f++)r=s[f].split("="),n=i.decodeQuery(r.shift(),e),o=r.length?i.decodeQuery(r.join("="),e):null,"__proto__"!==n&&(u.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(o)):a[n]=o);return a},i.build=function(t){var e="",r=!1;return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//",r=!0),e+=i.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&r&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},i.buildHost=function(t){var e="";return t.hostname?(i.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},i.buildAuthority=function(t){return i.buildUserinfo(t)+i.buildHost(t)},i.buildUserinfo=function(t){var e="";return t.username&&(e+=i.encode(t.username)),t.password&&(e+=":"+i.encode(t.password)),e&&(e+="@"),e},i.buildQuery=function(t,e,r){var n,o,a,s,c="";for(o in t)if("__proto__"!==o&&u.call(t,o))if(l(t[o]))for(n={},a=0,s=t[o].length;a<s;a++)void 0!==t[o][a]&&void 0===n[t[o][a]+""]&&(c+="&"+i.buildQueryParameter(o,t[o][a],r),!0!==e&&(n[t[o][a]+""]=!0));else void 0!==t[o]&&(c+="&"+i.buildQueryParameter(o,t[o],r));return c.substring(1)},i.buildQueryParameter=function(t,e,r){return i.encodeQuery(t,r)+(null!==e?"="+i.encodeQuery(e,r):"")},i.addQuery=function(t,e,r){if("object"===a(e))for(var n in e)u.call(e,n)&&i.addQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=r);"string"==typeof t[e]&&(t[e]=[t[e]]),l(r)||(r=[r]),t[e]=(t[e]||[]).concat(r)}},i.setQuery=function(t,e,r){if("object"===a(e))for(var n in e)u.call(e,n)&&i.setQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");t[e]=void 0===r?null:r}},i.removeQuery=function(t,e,r){var n,o,s;if(l(e))for(n=0,o=e.length;n<o;n++)t[e[n]]=void 0;else if("RegExp"===f(e))for(s in t)e.test(s)&&(t[s]=void 0);else if("object"===a(e))for(s in e)u.call(e,s)&&i.removeQuery(t,s,e[s]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===f(r)?!l(t[e])&&r.test(t[e])?t[e]=void 0:t[e]=h(t[e],r):t[e]!==String(r)||l(r)&&1!==r.length?l(t[e])&&(t[e]=h(t[e],r)):t[e]=void 0:t[e]=void 0}},i.hasQuery=function(t,e,r,n){switch(f(e)){case"String":break;case"RegExp":for(var o in t)if(u.call(t,o)&&e.test(o)&&(void 0===r||i.hasQuery(t,o,r)))return!0;return!1;case"Object":for(var a in e)if(u.call(e,a)&&!i.hasQuery(t,a,e[a]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(f(r)){case"Undefined":return e in t;case"Boolean":return r===Boolean(l(t[e])?t[e].length:t[e]);case"Function":return!!r(t[e],e,t);case"Array":return!!l(t[e])&&(n?p:d)(t[e],r);case"RegExp":return l(t[e])?!!n&&p(t[e],r):Boolean(t[e]&&t[e].match(r));case"Number":r=String(r);case"String":return l(t[e])?!!n&&p(t[e],r):t[e]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var t=[],e=[],r=0,n=0;n<arguments.length;n++){var o=new i(arguments[n]);t.push(o);for(var a=o.segment(),s=0;s<a.length;s++)"string"==typeof a[s]&&e.push(a[s]),a[s]&&r++}if(!e.length||!r)return new i("");var u=new i("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},i.commonPath=function(t,e){var r,n=Math.min(t.length,e.length);for(r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r)){r--;break}return r<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(r)&&"/"===e.charAt(r)||(r=t.substring(0,r).lastIndexOf("/")),t.substring(0,r+1))},i.withinString=function(t,e,r){r||(r={});var n=r.start||i.findUri.start,o=r.end||i.findUri.end,a=r.trim||i.findUri.trim,s=r.parens||i.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var c=n.exec(t);if(!c)break;var f=c.index;if(r.ignoreHtml){var l=t.slice(Math.max(f-3,0),f);if(l&&u.test(l))continue}for(var h=f+t.slice(f).search(o),p=t.slice(f,h),d=-1;;){var m=s.exec(p);if(!m)break;var v=m.index+m[0].length;d=Math.max(d,v)}if(!((p=d>-1?p.slice(0,d)+p.slice(d).replace(a,""):p.replace(a,"")).length<=c[0].length||r.ignore&&r.ignore.test(p))){var g=e(p,f,h=f+p.length,t);void 0!==g?(g=String(g),t=t.slice(0,f)+g+t.slice(h),n.lastIndex=f+g.length):n.lastIndex=h}}return n.lastIndex=0,t},i.ensureValidHostname=function(e,r){var n=!!e,o=!1;if(!!r&&(o=p(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(e&&e.match(i.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},i.noConflict=function(t){if(t){var e={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e}return n.URI===this&&(n.URI=o),this},s.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new i(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=_("protocol"),s.username=_("username"),s.password=_("password"),s.hostname=_("hostname"),s.port=_("port"),s.query=A("query","?"),s.fragment=A("fragment","#"),s.search=function(t,e){var r=this.query(t,e);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(t,e){var r=this.fragment(t,e);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(t,e){if(void 0===t||!0===t){var r=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=t?i.recodeUrnPath(t):"":this._parts.path=t?i.recodePath(t):"/",this.build(!e),this},s.path=s.pathname,s.href=function(t,e){var r;if(void 0===t)return this.toString();this._string="",this._parts=i._parts();var n=t instanceof i,o="object"===a(t)&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[i.getDomAttribute(t)]||"",o=!1);if(!n&&o&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=i.parse(String(t),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var s=n?t._parts:t;for(r in s)"query"!==r&&u.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!e),this},s.is=function(t){var e=!1,n=!1,o=!1,a=!1,s=!1,u=!1,c=!1,f=!this._parts.urn;switch(this._parts.hostname&&(f=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),s=(a=!(e=n||o))&&r&&r.has(this._parts.hostname),u=a&&i.idn_expression.test(this._parts.hostname),c=a&&i.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return f;case"absolute":return!f;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var E=s.protocol,x=s.port,O=s.hostname;s.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,t,e)},s.scheme=s.protocol,s.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),i.ensureValidPort(t))),x.call(this,t,e))},s.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(t,r))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(t,this._parts.protocol)}return O.call(this,t,e)},s.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(t);return this.protocol(n.protocol()).authority(n.authority()).build(!e),this},s.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==t[t.length-1]&&(t+="@"),i.parseUserinfo(t,this._parts),this.build(!e),this},s.resource=function(t,e){var r;return void 0===t?this.path()+this.search()+this.hash():(r=i.parse(t),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!e),this)},s.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),a=new RegExp("^"+c(o));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&i.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,t),this.build(!e),this},s.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(e).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var o=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},s.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==e&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');i=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},s.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return t?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,o),s=new RegExp("^"+c(a));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t),this.build(!e),this},s.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return t?i.decodePathSegment(n):n}var o=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(o=!0);var a=new RegExp(c(this.filename())+"$");return t=i.recodePath(t),this._parts.path=this._parts.path.replace(a,t),o?this.normalizePath(e):this.build(!e),this},s.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),a=o.lastIndexOf(".");return-1===a?"":(r=o.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",t?i.decodePathSegment(n):n)}"."===t.charAt(0)&&(t=t.substring(1));var s,u=this.suffix();if(u)s=t?new RegExp(c(u)+"$"):new RegExp(c("."+u)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return s&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t)),this.build(!e),this},s.segment=function(t,e,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),a=o.split(n);if(void 0!==t&&"number"!=typeof t&&(r=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(i&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(l(e)){a=[];for(var s=0,u=e.length;s<u;s++)(e[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(m(e[s])))}else(e||"string"==typeof e)&&(e=m(e),""===a[a.length-1]?a[a.length-1]=e:a.push(e));else e?a[t]=m(e):a.splice(t,1);return i&&a.unshift(""),this.path(a.join(n),r)},s.segmentCoded=function(t,e,r){var n,o,a;if("number"!=typeof t&&(r=e,e=t,t=void 0),void 0===e){if(l(n=this.segment(t,e,r)))for(o=0,a=n.length;o<a;o++)n[o]=i.decode(n[o]);else n=void 0!==n?i.decode(n):void 0;return n}if(l(e))for(o=0,a=e.length;o<a;o++)e[o]=i.encode(e[o]);else e="string"==typeof e||e instanceof String?i.encode(e):e;return this.segment(t,e,r)};var S=s.query;return s.query=function(t,e){if(!0===t)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=t.call(this,r);return this._parts.query=i.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=i.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):S.call(this,t,e)},s.setQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)n[t]=void 0!==e?e:null;else{if("object"!==a(t))throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in t)u.call(t,o)&&(n[o]=t[o])}return this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},s.addQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(n,t,void 0===e?null:e),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},s.removeQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(n,t,e),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},s.hasQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(n,t,e,r)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},s.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},s.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},s.normalizePath=function(t){var e,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;var n,o,a="";for("/"!==(r=i.recodePath(r)).charAt(0)&&(e=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),e&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r=r.substring(0,o)+r.substring(n+3)):r=r.substring(3);return e&&this.is("relative")&&(r=a+r.substring(1)),this._parts.path=r,this.build(!t),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},s.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var t=i.encode,e=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},s.unicode=function(){var t=i.encode,e=i.decode;i.encode=g,i.decode=unescape;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},s.readable=function(){var e=this.clone();e.username("").password("").normalize();var r="";if(e._parts.protocol&&(r+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(r+=t.toUnicode(e._parts.hostname),e._parts.port&&(r+=":"+e._parts.port)):r+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(r+="/"),r+=e.path(!0),e._parts.query){for(var n="",o=0,a=e._parts.query.split("&"),s=a.length;o<s;o++){var u=(a[o]||"").split("=");n+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(n+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=i.decodeQuery(e.hash(),!0)},s.absoluteTo=function(t){var e,r,n,o=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof i||(t=new i(t)),o._parts.protocol)return o;if(o._parts.protocol=t._parts.protocol,this._parts.hostname)return o;for(r=0;n=a[r];r++)o._parts[n]=t._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(e=(e=t.directory())||(0===t.path().indexOf("/")?"/":""),o._parts.path=(e?e+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=t._parts.path,o._parts.query||(o._parts.query=t._parts.query)),o.build(),o},s.relativeTo=function(t){var e,r,n,o,a,s=this.clone().normalize();if(s._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new i(t).normalize(),e=s._parts,r=t._parts,o=s.path(),a=t.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===r.protocol&&(e.protocol=null),e.username!==r.username||e.password!==r.password)return s.build();if(null!==e.protocol||null!==e.username||null!==e.password)return s.build();if(e.hostname!==r.hostname||e.port!==r.port)return s.build();if(e.hostname=null,e.port=null,o===a)return e.path="",s.build();if(!(n=i.commonPath(o,a)))return s.build();var u=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=u+e.path.substring(n.length)||"./",s.build()},s.equals=function(t){var e,r,n,o,a,s=this.clone(),c=new i(t),f={};if(s.normalize(),c.normalize(),s.toString()===c.toString())return!0;if(n=s.query(),o=c.query(),s.query(""),c.query(""),s.toString()!==c.toString())return!1;if(n.length!==o.length)return!1;for(a in e=i.parseQuery(n,this._parts.escapeQuerySpace),r=i.parseQuery(o,this._parts.escapeQuerySpace),e)if(u.call(e,a)){if(l(e[a])){if(!d(e[a],r[a]))return!1}else if(e[a]!==r[a])return!1;f[a]=!0}for(a in r)if(u.call(r,a)&&!f[a])return!1;return!0},s.preventInvalidHostname=function(t){return this._parts.preventInvalidHostname=!!t,this},s.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},s.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},i}))}).call(this,r(8)(t))},function(t,e,r){"use strict";r.r(e),r.d(e,"Deflate",(function(){return Ve})),r.d(e,"Inflate",(function(){return Xe})),r.d(e,"constants",(function(){return rr})),r.d(e,"default",(function(){return nr})),r.d(e,"deflate",(function(){return Je})),r.d(e,"deflateRaw",(function(){return Ye})),r.d(e,"gzip",(function(){return Ze})),r.d(e,"inflate",(function(){return $e})),r.d(e,"inflateRaw",(function(){return tr})),r.d(e,"ungzip",(function(){return er}));function n(t){let e=t.length;for(;--e>=0;)t[e]=0}const o=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=new Array(576);n(u);const c=new Array(60);n(c);const f=new Array(512);n(f);const l=new Array(256);n(l);const h=new Array(29);n(h);const p=new Array(30);function d(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}let m,v,g;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(p);const b=t=>t<256?f[t]:f[256+(t>>>7)],w=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},k=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},_=(t,e,r)=>{k(t,r[2*e],r[2*e+1])},A=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},E=(t,e,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=15;o++)n[o]=a=a+r[o-1]<<1;for(i=0;i<=e;i++){let e=t[2*i+1];0!==e&&(t[2*i]=A(n[e]++,e))}},x=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},O=t=>{t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=(t,e,r,n)=>{const o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]},P=(t,e,r)=>{const n=t.heap[r];let o=r<<1;for(;o<=t.heap_len&&(o<t.heap_len&&S(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!S(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n},R=(t,e,r)=>{let n,a,s,u,c=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],a=t.pending_buf[t.l_buf+c],c++,0===n?_(t,a,e):(s=l[a],_(t,s+256+1,e),u=o[s],0!==u&&(a-=h[s],k(t,a,u)),n--,s=b(n),_(t,s,r),u=i[s],0!==u&&(n-=p[s],k(t,n,u)))}while(c<t.last_lit);_(t,256,e)},T=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.elems;let a,s,u,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<i;a++)0!==r[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,r[2*u]=1,t.depth[u]=0,t.opt_len--,o&&(t.static_len-=n[2*u+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)P(t,r,a);u=i;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*u]=r[2*a]+r[2*s],t.depth[u]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=u,t.heap[1]=u++,P(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,o=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,f,l,h,p,d,m=0;for(h=0;h<=15;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)f=t.heap[c],h=r[2*r[2*f+1]+1]+1,h>u&&(h=u,m++),r[2*f+1]=h,f>n||(t.bl_count[h]++,p=0,f>=s&&(p=a[f-s]),d=r[2*f],t.opt_len+=d*(h+p),i&&(t.static_len+=d*(o[2*f+1]+p)));if(0!==m){do{for(h=u-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[u]--,m-=2}while(m>0);for(h=u;0!==h;h--)for(f=t.bl_count[h];0!==f;)l=t.heap[--c],l>n||(r[2*l+1]!==h&&(t.opt_len+=(h-r[2*l+1])*r[2*l],r[2*l+1]=h),f--)}})(t,e),E(r,c,t.bl_count)},j=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<u&&o===a||(s<c?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4))},I=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<u&&o===a)){if(s<c)do{_(t,o,t.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(_(t,o,t.bl_tree),s--),_(t,16,t.bl_tree),k(t,s-3,2)):s<=10?(_(t,17,t.bl_tree),k(t,s-3,3)):(_(t,18,t.bl_tree),k(t,s-11,7));s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4)}};let N=!1;const C=(t,e,r,n)=>{k(t,0+(n?1:0),3),((t,e,r,n)=>{O(t),n&&(w(t,r),w(t,~r)),t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r})(t,e,r,!0)};var M={_tr_init:t=>{N||((()=>{let t,e,r,n,s;const y=new Array(16);for(r=0,n=0;n<28;n++)for(h[n]=r,t=0;t<1<<o[n];t++)l[r++]=n;for(l[r-1]=n,s=0,n=0;n<16;n++)for(p[n]=s,t=0;t<1<<i[n];t++)f[s++]=n;for(s>>=7;n<30;n++)for(p[n]=s<<7,t=0;t<1<<i[n]-7;t++)f[256+s++]=n;for(e=0;e<=15;e++)y[e]=0;for(t=0;t<=143;)u[2*t+1]=8,t++,y[8]++;for(;t<=255;)u[2*t+1]=9,t++,y[9]++;for(;t<=279;)u[2*t+1]=7,t++,y[7]++;for(;t<=287;)u[2*t+1]=8,t++,y[8]++;for(E(u,287,y),t=0;t<30;t++)c[2*t+1]=5,c[2*t]=A(t,5);m=new d(u,o,257,286,15),v=new d(c,i,0,30,15),g=new d(new Array(0),a,0,19,7)})(),N=!0),t.l_desc=new y(t.dyn_ltree,m),t.d_desc=new y(t.dyn_dtree,v),t.bl_desc=new y(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,x(t)},_tr_stored_block:C,_tr_flush_block:(t,e,r,n)=>{let o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),T(t,t.l_desc),T(t,t.d_desc),a=(t=>{let e;for(j(t,t.dyn_ltree,t.l_desc.max_code),j(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*s[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?C(t,e,r,n):4===t.strategy||i===o?(k(t,2+(n?1:0),3),R(t,u,c)):(k(t,4+(n?1:0),3),((t,e,r,n)=>{let o;for(k(t,e-257,5),k(t,r-1,5),k(t,n-4,4),o=0;o<n;o++)k(t,t.bl_tree[2*s[o]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),R(t,t.dyn_ltree,t.dyn_dtree)),x(t),n&&O(t)},_tr_tally:(t,e,r)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(l[r]+256+1)]++,t.dyn_dtree[2*b(e)]++),t.last_lit===t.lit_bufsize-1),_tr_align:t=>{k(t,2,3),_(t,256,u),(t=>{16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var B=(t,e,r,n)=>{let o=65535&t|0,i=t>>>16&65535|0,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+e[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16|0};const F=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var D=(t,e,r,n)=>{const o=F,i=n+r;t^=-1;for(let r=n;r<i;r++)t=t>>>8^o[255&(t^e[r])];return-1^t},U={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},L={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:z,_tr_stored_block:q,_tr_flush_block:H,_tr_tally:G,_tr_align:K}=M,{Z_NO_FLUSH:W,Z_PARTIAL_FLUSH:Q,Z_FULL_FLUSH:V,Z_FINISH:J,Z_BLOCK:Y,Z_OK:Z,Z_STREAM_END:X,Z_STREAM_ERROR:$,Z_DATA_ERROR:tt,Z_BUF_ERROR:et,Z_DEFAULT_COMPRESSION:rt,Z_FILTERED:nt,Z_HUFFMAN_ONLY:ot,Z_RLE:it,Z_FIXED:at,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:ut,Z_DEFLATED:ct}=L,ft=(t,e)=>(t.msg=U[e],e),lt=t=>(t<<1)-(t>4?9:0),ht=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let pt=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const dt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},mt=(t,e)=>{H(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,dt(t.strm)},vt=(t,e)=>{t.pending_buf[t.pending++]=e},gt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},yt=(t,e,r,n)=>{let o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,e.set(t.input.subarray(t.next_in,t.next_in+o),r),1===t.state.wrap?t.adler=B(t.adler,e,o,r):2===t.state.wrap&&(t.adler=D(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)},bt=(t,e)=>{let r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,f=t.w_mask,l=t.prev,h=t.strstart+258;let p=c[i+a-1],d=c[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===d&&c[r+a-1]===p&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<h);if(n=258-(h-i),i=h-258,n>a){if(t.match_start=e,a=n,n>=s)break;p=c[i+a-1],d=c[i+a]}}}while((e=l[e&f])>u&&0!=--o);return a<=t.lookahead?a:t.lookahead},wt=t=>{const e=t.w_size;let r,n,o,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do{o=t.head[--r],t.head[r]=o>=e?o-e:0}while(--n);n=e,r=n;do{o=t.prev[--r],t.prev[r]=o>=e?o-e:0}while(--n);i+=e}if(0===t.strm.avail_in)break;if(n=yt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=pt(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=pt(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let r,n;for(;;){if(t.lookahead<262){if(wt(t),t.lookahead<262&&e===W)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=bt(t,r)),t.match_length>=3)if(n=G(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=pt(t,t.ins_h,t.window[t.strstart+1]);else n=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(mt(t,!1),0===t.strm.avail_out)?1:2},_t=(t,e)=>{let r,n,o;for(;;){if(t.lookahead<262){if(wt(t),t.lookahead<262&&e===W)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=bt(t,r),t.match_length<=5&&(t.strategy===nt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=G(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(mt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=G(t,0,t.window[t.strstart-1]),n&&mt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=G(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(mt(t,!1),0===t.strm.avail_out)?1:2};function At(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}const Et=[new At(0,0,0,0,(t,e)=>{let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(wt(t),0===t.lookahead&&e===W)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,mt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(mt(t,!1),t.strm.avail_out),1)}),new At(4,4,8,4,kt),new At(4,5,16,8,kt),new At(4,6,32,32,kt),new At(4,4,16,16,_t),new At(8,16,32,32,_t),new At(8,16,128,128,_t),new At(8,32,128,256,_t),new At(32,128,258,1024,_t),new At(32,258,258,4096,_t)];function xt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),ht(this.dyn_ltree),ht(this.dyn_dtree),ht(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),ht(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),ht(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ot=t=>{if(!t||!t.state)return ft(t,$);t.total_in=t.total_out=0,t.data_type=ut;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=W,z(e),Z},St=t=>{const e=Ot(t);var r;return e===Z&&((r=t.state).window_size=2*r.w_size,ht(r.head),r.max_lazy_match=Et[r.level].max_lazy,r.good_match=Et[r.level].good_length,r.nice_match=Et[r.level].nice_length,r.max_chain_length=Et[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},Pt=(t,e,r,n,o,i)=>{if(!t)return $;let a=1;if(e===rt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==ct||n<8||n>15||e<0||e>9||i<0||i>at)return ft(t,$);8===n&&(n=9);const s=new xt;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=i,s.method=r,St(t)};var Rt={deflateInit:(t,e)=>Pt(t,e,ct,15,8,st),deflateInit2:Pt,deflateReset:St,deflateResetKeep:Ot,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?$:(t.state.gzhead=e,Z):$,deflate:(t,e)=>{let r,n;if(!t||!t.state||e>Y||e<0)return t?ft(t,$):$;const o=t.state;if(!t.output||!t.input&&0!==t.avail_in||666===o.status&&e!==J)return ft(t,0===t.avail_out?et:$);o.strm=t;const i=o.last_flush;if(o.last_flush=e,42===o.status)if(2===o.wrap)t.adler=0,vt(o,31),vt(o,139),vt(o,8),o.gzhead?(vt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),vt(o,255&o.gzhead.time),vt(o,o.gzhead.time>>8&255),vt(o,o.gzhead.time>>16&255),vt(o,o.gzhead.time>>24&255),vt(o,9===o.level?2:o.strategy>=ot||o.level<2?4:0),vt(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(vt(o,255&o.gzhead.extra.length),vt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=D(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(vt(o,0),vt(o,0),vt(o,0),vt(o,0),vt(o,0),vt(o,9===o.level?2:o.strategy>=ot||o.level<2?4:0),vt(o,3),o.status=113);else{let e=ct+(o.w_bits-8<<4)<<8,r=-1;r=o.strategy>=ot||o.level<2?0:o.level<6?1:6===o.level?2:3,e|=r<<6,0!==o.strstart&&(e|=32),e+=31-e%31,o.status=113,gt(o,e),0!==o.strstart&&(gt(o,t.adler>>>16),gt(o,65535&t.adler)),t.adler=1}if(69===o.status)if(o.gzhead.extra){for(r=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),dt(t),r=o.pending,o.pending!==o.pending_buf_size));)vt(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),dt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,vt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),dt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,vt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&dt(t),o.pending+2<=o.pending_buf_size&&(vt(o,255&t.adler),vt(o,t.adler>>8&255),t.adler=0,o.status=113)):o.status=113),0!==o.pending){if(dt(t),0===t.avail_out)return o.last_flush=-1,Z}else if(0===t.avail_in&<(e)<=lt(i)&&e!==J)return ft(t,et);if(666===o.status&&0!==t.avail_in)return ft(t,et);if(0!==t.avail_in||0!==o.lookahead||e!==W&&666!==o.status){let r=o.strategy===ot?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(wt(t),0===t.lookahead)){if(e===W)return 1;break}if(t.match_length=0,r=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(mt(t,!1),0===t.strm.avail_out)?1:2})(o,e):o.strategy===it?((t,e)=>{let r,n,o,i;const a=t.window;for(;;){if(t.lookahead<=258){if(wt(t),t.lookahead<=258&&e===W)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(o=t.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=t.strstart+258;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=258-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=G(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(mt(t,!1),0===t.strm.avail_out)?1:2})(o,e):Et[o.level].func(o,e);if(3!==r&&4!==r||(o.status=666),1===r||3===r)return 0===t.avail_out&&(o.last_flush=-1),Z;if(2===r&&(e===Q?K(o):e!==Y&&(q(o,0,0,!1),e===V&&(ht(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),dt(t),0===t.avail_out))return o.last_flush=-1,Z}return e!==J?Z:o.wrap<=0?X:(2===o.wrap?(vt(o,255&t.adler),vt(o,t.adler>>8&255),vt(o,t.adler>>16&255),vt(o,t.adler>>24&255),vt(o,255&t.total_in),vt(o,t.total_in>>8&255),vt(o,t.total_in>>16&255),vt(o,t.total_in>>24&255)):(gt(o,t.adler>>>16),gt(o,65535&t.adler)),dt(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?Z:X)},deflateEnd:t=>{if(!t||!t.state)return $;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?ft(t,$):(t.state=null,113===e?ft(t,tt):Z)},deflateSetDictionary:(t,e)=>{let r=e.length;if(!t||!t.state)return $;const n=t.state,o=n.wrap;if(2===o||1===o&&42!==n.status||n.lookahead)return $;if(1===o&&(t.adler=B(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===o&&(ht(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const i=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,wt(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=pt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,wt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=i,n.wrap=o,Z},deflateInfo:"pako deflate (from Nodeca project)"};const Tt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var jt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Tt(r,e)&&(t[e]=r[e])}}return t},It=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,o=t.length;e<o;e++){let o=t[e];r.set(o,n),n+=o.length}return r};let Nt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Nt=!1}const Ct=new Uint8Array(256);for(let t=0;t<256;t++)Ct[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ct[254]=Ct[254]=1;var Mt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(s),i=0,o=0;i<s;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e},Bt=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,o;const i=new Array(2*r);for(o=0,n=0;n<r;){let e=t[n++];if(e<128){i[o++]=e;continue}let a=Ct[e];if(a>4)i[o++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n<r;)e=e<<6|63&t[n++],a--;a>1?i[o++]=65533:e<65536?i[o++]=e:(e-=65536,i[o++]=55296|e>>10&1023,i[o++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Nt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(i,o)},Ft=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Ct[t[r]]>e?r:e};var Dt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ut=Object.prototype.toString,{Z_NO_FLUSH:Lt,Z_SYNC_FLUSH:zt,Z_FULL_FLUSH:qt,Z_FINISH:Ht,Z_OK:Gt,Z_STREAM_END:Kt,Z_DEFAULT_COMPRESSION:Wt,Z_DEFAULT_STRATEGY:Qt,Z_DEFLATED:Vt}=L;function Jt(t){this.options=jt({level:Wt,method:Vt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Qt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Dt,this.strm.avail_out=0;let r=Rt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Gt)throw new Error(U[r]);if(e.header&&Rt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Mt(e.dictionary):"[object ArrayBuffer]"===Ut.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=Rt.deflateSetDictionary(this.strm,t),r!==Gt)throw new Error(U[r]);this._dict_set=!0}}function Yt(t,e){const r=new Jt(e);if(r.push(t,!0),r.err)throw r.msg||U[r.err];return r.result}Jt.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=e===~~e?e:!0===e?Ht:Lt,"string"==typeof t?r.input=Mt(t):"[object ArrayBuffer]"===Ut.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===zt||i===qt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=Rt.deflate(r,i),o===Kt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=Rt.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===Gt;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Gt&&(this.result=It(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Zt={Deflate:Jt,deflate:Yt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Yt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Yt(t,e)},constants:L};var Xt=function(t,e){let r,n,o,i,a,s,u,c,f,l,h,p,d,m,v,g,y,b,w,k,_,A,E,x;const O=t.state;r=t.next_in,E=t.input,n=r+(t.avail_in-5),o=t.next_out,x=t.output,i=o-(e-t.avail_out),a=o+(t.avail_out-257),s=O.dmax,u=O.wsize,c=O.whave,f=O.wnext,l=O.window,h=O.hold,p=O.bits,d=O.lencode,m=O.distcode,v=(1<<O.lenbits)-1,g=(1<<O.distbits)-1;t:do{p<15&&(h+=E[r++]<<p,p+=8,h+=E[r++]<<p,p+=8),y=d[h&v];e:for(;;){if(b=y>>>24,h>>>=b,p-=b,b=y>>>16&255,0===b)x[o++]=65535&y;else{if(!(16&b)){if(0==(64&b)){y=d[(65535&y)+(h&(1<<b)-1)];continue e}if(32&b){O.mode=12;break t}t.msg="invalid literal/length code",O.mode=30;break t}w=65535&y,b&=15,b&&(p<b&&(h+=E[r++]<<p,p+=8),w+=h&(1<<b)-1,h>>>=b,p-=b),p<15&&(h+=E[r++]<<p,p+=8,h+=E[r++]<<p,p+=8),y=m[h&g];r:for(;;){if(b=y>>>24,h>>>=b,p-=b,b=y>>>16&255,!(16&b)){if(0==(64&b)){y=m[(65535&y)+(h&(1<<b)-1)];continue r}t.msg="invalid distance code",O.mode=30;break t}if(k=65535&y,b&=15,p<b&&(h+=E[r++]<<p,p+=8,p<b&&(h+=E[r++]<<p,p+=8)),k+=h&(1<<b)-1,k>s){t.msg="invalid distance too far back",O.mode=30;break t}if(h>>>=b,p-=b,b=o-i,k>b){if(b=k-b,b>c&&O.sane){t.msg="invalid distance too far back",O.mode=30;break t}if(_=0,A=l,0===f){if(_+=u-b,b<w){w-=b;do{x[o++]=l[_++]}while(--b);_=o-k,A=x}}else if(f<b){if(_+=u+f-b,b-=f,b<w){w-=b;do{x[o++]=l[_++]}while(--b);if(_=0,f<w){b=f,w-=b;do{x[o++]=l[_++]}while(--b);_=o-k,A=x}}}else if(_+=f-b,b<w){w-=b;do{x[o++]=l[_++]}while(--b);_=o-k,A=x}for(;w>2;)x[o++]=A[_++],x[o++]=A[_++],x[o++]=A[_++],w-=3;w&&(x[o++]=A[_++],w>1&&(x[o++]=A[_++]))}else{_=o-k;do{x[o++]=x[_++],x[o++]=x[_++],x[o++]=x[_++],w-=3}while(w>2);w&&(x[o++]=x[_++],w>1&&(x[o++]=x[_++]))}break}}break}}while(r<n&&o<a);w=p>>3,r-=w,p-=w<<3,h&=(1<<p)-1,t.next_in=r,t.next_out=o,t.avail_in=r<n?n-r+5:5-(r-n),t.avail_out=o<a?a-o+257:257-(o-a),O.hold=h,O.bits=p};const $t=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),te=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ee=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),re=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,r,n,o,i,a,s)=>{const u=s.bits;let c,f,l,h,p,d,m=0,v=0,g=0,y=0,b=0,w=0,k=0,_=0,A=0,E=0,x=null,O=0;const S=new Uint16Array(16),P=new Uint16Array(16);let R,T,j,I=null,N=0;for(m=0;m<=15;m++)S[m]=0;for(v=0;v<n;v++)S[e[r+v]]++;for(b=u,y=15;y>=1&&0===S[y];y--);if(b>y&&(b=y),0===y)return o[i++]=20971520,o[i++]=20971520,s.bits=1,0;for(g=1;g<y&&0===S[g];g++);for(b<g&&(b=g),_=1,m=1;m<=15;m++)if(_<<=1,_-=S[m],_<0)return-1;if(_>0&&(0===t||1!==y))return-1;for(P[1]=0,m=1;m<15;m++)P[m+1]=P[m]+S[m];for(v=0;v<n;v++)0!==e[r+v]&&(a[P[e[r+v]]++]=v);if(0===t?(x=I=a,d=19):1===t?(x=$t,O-=257,I=te,N-=257,d=256):(x=ee,I=re,d=-1),E=0,v=0,m=g,p=i,w=b,k=0,l=-1,A=1<<b,h=A-1,1===t&&A>852||2===t&&A>592)return 1;for(;;){R=m-k,a[v]<d?(T=0,j=a[v]):a[v]>d?(T=I[N+a[v]],j=x[O+a[v]]):(T=96,j=0),c=1<<m-k,f=1<<w,g=f;do{f-=c,o[p+(E>>k)+f]=R<<24|T<<16|j|0}while(0!==f);for(c=1<<m-1;E&c;)c>>=1;if(0!==c?(E&=c-1,E+=c):E=0,v++,0==--S[m]){if(m===y)break;m=e[r+a[v]]}if(m>b&&(E&h)!==l){for(0===k&&(k=b),p+=g,w=m-k,_=1<<w;w+k<y&&(_-=S[w+k],!(_<=0));)w++,_<<=1;if(A+=1<<w,1===t&&A>852||2===t&&A>592)return 1;l=E&h,o[l]=b<<24|w<<16|p-i|0}}return 0!==E&&(o[p+E]=m-k<<24|64<<16|0),s.bits=b,0};const{Z_FINISH:oe,Z_BLOCK:ie,Z_TREES:ae,Z_OK:se,Z_STREAM_END:ue,Z_NEED_DICT:ce,Z_STREAM_ERROR:fe,Z_DATA_ERROR:le,Z_MEM_ERROR:he,Z_BUF_ERROR:pe,Z_DEFLATED:de}=L,me=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ve(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ge=t=>{if(!t||!t.state)return fe;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,se},ye=t=>{if(!t||!t.state)return fe;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ge(t)},be=(t,e)=>{let r;if(!t||!t.state)return fe;const n=t.state;return e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?fe:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,ye(t))},we=(t,e)=>{if(!t)return fe;const r=new ve;t.state=r,r.window=null;const n=be(t,e);return n!==se&&(t.state=null),n};let ke,_e,Ae=!0;const Ee=t=>{if(Ae){ke=new Int32Array(512),_e=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ke,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,_e,0,t.work,{bits:5}),Ae=!1}t.lencode=ke,t.lenbits=9,t.distcode=_e,t.distbits=5},xe=(t,e,r,n)=>{let o;const i=t.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),n>=i.wsize?(i.window.set(e.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>n&&(o=n),i.window.set(e.subarray(r-n,r-n+o),i.wnext),(n-=o)?(i.window.set(e.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0};var Oe={inflateReset:ye,inflateReset2:be,inflateResetKeep:ge,inflateInit:t=>we(t,15),inflateInit2:we,inflate:(t,e)=>{let r,n,o,i,a,s,u,c,f,l,h,p,d,m,v,g,y,b,w,k,_,A,E=0;const x=new Uint8Array(4);let O,S;const P=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return fe;r=t.state,12===r.mode&&(r.mode=13),a=t.next_out,o=t.output,u=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,c=r.hold,f=r.bits,l=s,h=u,A=se;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(2&r.wrap&&35615===c){r.check=0,x[0]=255&c,x[1]=c>>>8&255,r.check=D(r.check,x,2,0),c=0,f=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=30;break}if((15&c)!==de){t.msg="unknown compression method",r.mode=30;break}if(c>>>=4,f-=4,_=8+(15&c),0===r.wbits)r.wbits=_;else if(_>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<r.wbits,t.adler=r.check=1,r.mode=512&c?10:12,c=0,f=0;break;case 2:for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(r.flags=c,(255&r.flags)!==de){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&(x[0]=255&c,x[1]=c>>>8&255,r.check=D(r.check,x,2,0)),c=0,f=0,r.mode=3;case 3:for(;f<32;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.head&&(r.head.time=c),512&r.flags&&(x[0]=255&c,x[1]=c>>>8&255,x[2]=c>>>16&255,x[3]=c>>>24&255,r.check=D(r.check,x,4,0)),c=0,f=0,r.mode=4;case 4:for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&(x[0]=255&c,x[1]=c>>>8&255,r.check=D(r.check,x,2,0)),c=0,f=0,r.mode=5;case 5:if(1024&r.flags){for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&(x[0]=255&c,x[1]=c>>>8&255,r.check=D(r.check,x,2,0)),c=0,f=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p=r.length,p>s&&(p=s),p&&(r.head&&(_=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+p),_)),512&r.flags&&(r.check=D(r.check,n,p,i)),s-=p,i+=p,r.length-=p),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===s)break t;p=0;do{_=n[i+p++],r.head&&_&&r.length<65536&&(r.head.name+=String.fromCharCode(_))}while(_&&p<s);if(512&r.flags&&(r.check=D(r.check,n,p,i)),s-=p,i+=p,_)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===s)break t;p=0;do{_=n[i+p++],r.head&&_&&r.length<65536&&(r.head.comment+=String.fromCharCode(_))}while(_&&p<s);if(512&r.flags&&(r.check=D(r.check,n,p,i)),s-=p,i+=p,_)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(c!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}c=0,f=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;f<32;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}t.adler=r.check=me(c),c=0,f=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=a,t.avail_out=u,t.next_in=i,t.avail_in=s,r.hold=c,r.bits=f,ce;t.adler=r.check=1,r.mode=12;case 12:if(e===ie||e===ae)break t;case 13:if(r.last){c>>>=7&f,f-=7&f,r.mode=27;break}for(;f<3;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}switch(r.last=1&c,c>>>=1,f-=1,3&c){case 0:r.mode=14;break;case 1:if(Ee(r),r.mode=20,e===ae){c>>>=2,f-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}c>>>=2,f-=2;break;case 14:for(c>>>=7&f,f-=7&f;f<32;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if((65535&c)!=(c>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&c,c=0,f=0,r.mode=15,e===ae)break t;case 15:r.mode=16;case 16:if(p=r.length,p){if(p>s&&(p=s),p>u&&(p=u),0===p)break t;o.set(n.subarray(i,i+p),a),s-=p,i+=p,u-=p,a+=p,r.length-=p;break}r.mode=12;break;case 17:for(;f<14;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(r.nlen=257+(31&c),c>>>=5,f-=5,r.ndist=1+(31&c),c>>>=5,f-=5,r.ncode=4+(15&c),c>>>=4,f-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;f<3;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.lens[P[r.have++]]=7&c,c>>>=3,f-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,O={bits:r.lenbits},A=ne(0,r.lens,0,19,r.lencode,0,r.work,O),r.lenbits=O.bits,A){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;E=r.lencode[c&(1<<r.lenbits)-1],v=E>>>24,g=E>>>16&255,y=65535&E,!(v<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(y<16)c>>>=v,f-=v,r.lens[r.have++]=y;else{if(16===y){for(S=v+2;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(c>>>=v,f-=v,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}_=r.lens[r.have-1],p=3+(3&c),c>>>=2,f-=2}else if(17===y){for(S=v+3;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}c>>>=v,f-=v,_=0,p=3+(7&c),c>>>=3,f-=3}else{for(S=v+7;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}c>>>=v,f-=v,_=0,p=11+(127&c),c>>>=7,f-=7}if(r.have+p>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;p--;)r.lens[r.have++]=_}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,O={bits:r.lenbits},A=ne(1,r.lens,0,r.nlen,r.lencode,0,r.work,O),r.lenbits=O.bits,A){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,O={bits:r.distbits},A=ne(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,O),r.distbits=O.bits,A){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,e===ae)break t;case 20:r.mode=21;case 21:if(s>=6&&u>=258){t.next_out=a,t.avail_out=u,t.next_in=i,t.avail_in=s,r.hold=c,r.bits=f,Xt(t,h),a=t.next_out,o=t.output,u=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,c=r.hold,f=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=r.lencode[c&(1<<r.lenbits)-1],v=E>>>24,g=E>>>16&255,y=65535&E,!(v<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(g&&0==(240&g)){for(b=v,w=g,k=y;E=r.lencode[k+((c&(1<<b+w)-1)>>b)],v=E>>>24,g=E>>>16&255,y=65535&E,!(b+v<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}c>>>=b,f-=b,r.back+=b}if(c>>>=v,f-=v,r.back+=v,r.length=y,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(S=r.extra;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,f-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=r.distcode[c&(1<<r.distbits)-1],v=E>>>24,g=E>>>16&255,y=65535&E,!(v<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(0==(240&g)){for(b=v,w=g,k=y;E=r.distcode[k+((c&(1<<b+w)-1)>>b)],v=E>>>24,g=E>>>16&255,y=65535&E,!(b+v<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}c>>>=b,f-=b,r.back+=b}if(c>>>=v,f-=v,r.back+=v,64&g){t.msg="invalid distance code",r.mode=30;break}r.offset=y,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(S=r.extra;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,f-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===u)break t;if(p=h-u,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}p>r.wnext?(p-=r.wnext,d=r.wsize-p):d=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=o,d=a-r.offset,p=r.length;p>u&&(p=u),u-=p,r.length-=p;do{o[a++]=m[d++]}while(--p);0===r.length&&(r.mode=21);break;case 26:if(0===u)break t;o[a++]=r.length,u--,r.mode=21;break;case 27:if(r.wrap){for(;f<32;){if(0===s)break t;s--,c|=n[i++]<<f,f+=8}if(h-=u,t.total_out+=h,r.total+=h,h&&(t.adler=r.check=r.flags?D(r.check,o,h,a-h):B(r.check,o,h,a-h)),h=u,(r.flags?c:me(c))!==r.check){t.msg="incorrect data check",r.mode=30;break}c=0,f=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;f<32;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(c!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}c=0,f=0}r.mode=29;case 29:A=ue;break t;case 30:A=le;break t;case 31:return he;case 32:default:return fe}return t.next_out=a,t.avail_out=u,t.next_in=i,t.avail_in=s,r.hold=c,r.bits=f,(r.wsize||h!==t.avail_out&&r.mode<30&&(r.mode<27||e!==oe))&&xe(t,t.output,t.next_out,h-t.avail_out),l-=t.avail_in,h-=t.avail_out,t.total_in+=l,t.total_out+=h,r.total+=h,r.wrap&&h&&(t.adler=r.check=r.flags?D(r.check,o,h,t.next_out-h):B(r.check,o,h,t.next_out-h)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===l&&0===h||e===oe)&&A===se&&(A=pe),A},inflateEnd:t=>{if(!t||!t.state)return fe;let e=t.state;return e.window&&(e.window=null),t.state=null,se},inflateGetHeader:(t,e)=>{if(!t||!t.state)return fe;const r=t.state;return 0==(2&r.wrap)?fe:(r.head=e,e.done=!1,se)},inflateSetDictionary:(t,e)=>{const r=e.length;let n,o,i;return t&&t.state?(n=t.state,0!==n.wrap&&11!==n.mode?fe:11===n.mode&&(o=1,o=B(o,e,r,0),o!==n.check)?le:(i=xe(t,e,r,r),i?(n.mode=31,he):(n.havedict=1,se))):fe},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Pe=Object.prototype.toString,{Z_NO_FLUSH:Re,Z_FINISH:Te,Z_OK:je,Z_STREAM_END:Ie,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ce,Z_DATA_ERROR:Me,Z_MEM_ERROR:Be}=L;function Fe(t){this.options=jt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Dt,this.strm.avail_out=0;let r=Oe.inflateInit2(this.strm,e.windowBits);if(r!==je)throw new Error(U[r]);if(this.header=new Se,Oe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Mt(e.dictionary):"[object ArrayBuffer]"===Pe.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Oe.inflateSetDictionary(this.strm,e.dictionary),r!==je)))throw new Error(U[r])}function De(t,e){const r=new Fe(e);if(r.push(t),r.err)throw r.msg||U[r.err];return r.result}Fe.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,o=this.options.dictionary;let i,a,s;if(this.ended)return!1;for(a=e===~~e?e:!0===e?Te:Re,"[object ArrayBuffer]"===Pe.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),i=Oe.inflate(r,a),i===Ne&&o&&(i=Oe.inflateSetDictionary(r,o),i===je?i=Oe.inflate(r,a):i===Me&&(i=Ne));r.avail_in>0&&i===Ie&&r.state.wrap>0&&0!==t[r.next_in];)Oe.inflateReset(r),i=Oe.inflate(r,a);switch(i){case Ce:case Me:case Ne:case Be:return this.onEnd(i),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(0===r.avail_out||i===Ie))if("string"===this.options.to){let t=Ft(r.output,r.next_out),e=r.next_out-t,o=Bt(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(o)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(i!==je||0!==s){if(i===Ie)return i=Oe.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Fe.prototype.onData=function(t){this.chunks.push(t)},Fe.prototype.onEnd=function(t){t===je&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=It(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Ue={Inflate:Fe,inflate:De,inflateRaw:function(t,e){return(e=e||{}).raw=!0,De(t,e)},ungzip:De,constants:L};const{Deflate:Le,deflate:ze,deflateRaw:qe,gzip:He}=Zt,{Inflate:Ge,inflate:Ke,inflateRaw:We,ungzip:Qe}=Ue;var Ve=Le,Je=ze,Ye=qe,Ze=He,Xe=Ge,$e=Ke,tr=We,er=Qe,rr=L,nr={Deflate:Le,deflate:ze,deflateRaw:qe,gzip:He,Inflate:Ge,inflate:Ke,inflateRaw:We,ungzip:Qe,constants:L}},function(t,e){},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){"use strict";e.sha1=r(68),e.sha224=r(69),e.sha256=r(30),e.sha384=r(70),e.sha512=r(31)},function(t,e,r){"use strict";var n=r(7),o=r(13),i=r(29),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=i.ft_1,f=o.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,f),t.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var o=this.h[0],i=this.h[1],f=this.h[2],h=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var d=~~(n/20),m=u(a(o,5),c(d,i,f,h),p,r[n],l[d]);p=h,h=f,f=a(i,30),i=o,o=m}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],h),this.h[4]=s(this.h[4],p)},h.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(7),o=r(30);function i(){if(!(this instanceof i))return new i;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(i,o),t.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,e,r){"use strict";var n=r(7),o=r(31);function i(){if(!(this instanceof i))return new i;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(i,o),t.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,e,r){"use strict";var n=r(7),o=r(13),i=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=o.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function h(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(f,c),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],o=this.h[2],c=this.h[3],f=this.h[4],y=r,b=n,w=o,k=c,_=f,A=0;A<80;A++){var E=a(i(u(r,l(A,n,o,c),t[d[A]+e],h(A)),v[A]),f);r=f,f=c,c=i(o,10),o=n,n=E,E=a(i(u(y,l(79-A,b,w,k),t[m[A]+e],p(A)),g[A]),_),y=_,_=k,k=i(w,10),w=b,b=E}E=s(this.h[1],o,k),this.h[1]=s(this.h[2],c,_),this.h[2]=s(this.h[3],f,y),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,w),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],v=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,r){"use strict";var n=r(7),o=r(12);function i(t,e,r){if(!(this instanceof i))return new i(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=i,i.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),o(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},i.prototype.update=function(t,e){return this.inner.update(t,e),this},i.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(74),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(9))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,o,i,a,s,u=1,c={},f=!1,l=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(){var t=p(arguments);return e.nextTick(d(m,t)),t}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){m(t.data)},n=function(){var t=p(arguments);return i.port2.postMessage(t),t}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,n=function(){var t=p(arguments),e=l.createElement("script");return e.onreadystatechange=function(){m(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e),t}):n=function(){var t=p(arguments);return setTimeout(d(m,t),0),t}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&m(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),n=function(){var e=p(arguments);return t.postMessage(a+e,"*"),e}),h.setImmediate=n,h.clearImmediate=v}function p(t){return c[u]=d.apply(void 0,t),u++}function d(t){var e=[].slice.call(arguments,1);return function(){"function"==typeof t?t.apply(void 0,e):new Function(""+t)()}}function m(t){if(f)setTimeout(d(m,t),0);else{var e=c[t];if(e){f=!0;try{e()}finally{v(t),f=!1}}}}function v(t){delete c[t]}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(9),r(17))},function(t,e,r){"use strict";r.r(e),r.d(e,"ethers",(function(){return u})),r.d(e,"Signer",(function(){return Bn})),r.d(e,"Wallet",(function(){return os})),r.d(e,"VoidSigner",(function(){return Fn})),r.d(e,"getDefaultProvider",(function(){return wh})),r.d(e,"providers",(function(){return i})),r.d(e,"BaseContract",(function(){return Do})),r.d(e,"Contract",(function(){return Uo})),r.d(e,"ContractFactory",(function(){return Lo})),r.d(e,"BigNumber",(function(){return y})),r.d(e,"FixedNumber",(function(){return ei})),r.d(e,"constants",(function(){return o})),r.d(e,"errors",(function(){return h.a})),r.d(e,"logger",(function(){return Jh})),r.d(e,"utils",(function(){return s})),r.d(e,"wordlists",(function(){return Wi})),r.d(e,"version",(function(){return Vh})),r.d(e,"Wordlist",(function(){return Bi}));var n={};r.r(n),r.d(n,"encode",(function(){return Z})),r.d(n,"decode",(function(){return tt}));var o={};r.r(o),r.d(o,"AddressZero",(function(){return ss})),r.d(o,"NegativeOne",(function(){return je})),r.d(o,"Zero",(function(){return Ie})),r.d(o,"One",(function(){return Ne})),r.d(o,"Two",(function(){return Ce})),r.d(o,"WeiPerEther",(function(){return Me})),r.d(o,"MaxUint256",(function(){return Be})),r.d(o,"MinInt256",(function(){return Fe})),r.d(o,"MaxInt256",(function(){return De})),r.d(o,"HashZero",(function(){return us})),r.d(o,"EtherSymbol",(function(){return cs}));var i={};r.r(i),r.d(i,"Provider",(function(){return _n})),r.d(i,"BaseProvider",(function(){return Vu})),r.d(i,"Resolver",(function(){return Ku})),r.d(i,"UrlJsonRpcProvider",(function(){return Yc})),r.d(i,"FallbackProvider",(function(){return wl})),r.d(i,"AlchemyProvider",(function(){return lf})),r.d(i,"AlchemyWebSocketProvider",(function(){return ff})),r.d(i,"AnkrProvider",(function(){return _f})),r.d(i,"CloudflareProvider",(function(){return Cf})),r.d(i,"EtherscanProvider",(function(){return Zf})),r.d(i,"InfuraProvider",(function(){return Ml})),r.d(i,"InfuraWebSocketProvider",(function(){return Cl})),r.d(i,"JsonRpcProvider",(function(){return bc})),r.d(i,"JsonRpcBatchProvider",(function(){return Hl})),r.d(i,"NodesmithProvider",(function(){return Xl})),r.d(i,"PocketProvider",(function(){return sh})),r.d(i,"StaticJsonRpcProvider",(function(){return Jc})),r.d(i,"Web3Provider",(function(){return yh})),r.d(i,"WebSocketProvider",(function(){return Cc})),r.d(i,"IpcProvider",(function(){return kl})),r.d(i,"JsonRpcSigner",(function(){return vc})),r.d(i,"getDefaultProvider",(function(){return wh})),r.d(i,"getNetwork",(function(){return gs})),r.d(i,"isCommunityResource",(function(){return pu})),r.d(i,"isCommunityResourcable",(function(){return hu})),r.d(i,"showThrottleMessage",(function(){return mu})),r.d(i,"Formatter",(function(){return lu}));var a={};r.r(a),r.d(a,"decode",(function(){return ys})),r.d(a,"encode",(function(){return bs}));var s={};r.r(s),r.d(s,"AbiCoder",(function(){return Gr})),r.d(s,"defaultAbiCoder",(function(){return Kr})),r.d(s,"Fragment",(function(){return Sr})),r.d(s,"ConstructorFragment",(function(){return Ir})),r.d(s,"ErrorFragment",(function(){return Mr})),r.d(s,"EventFragment",(function(){return Pr})),r.d(s,"FunctionFragment",(function(){return Nr})),r.d(s,"ParamType",(function(){return xr})),r.d(s,"FormatTypes",(function(){return Ar})),r.d(s,"checkResultErrors",(function(){return z})),r.d(s,"Logger",(function(){return h.b})),r.d(s,"RLP",(function(){return n})),r.d(s,"_fetchData",(function(){return ou})),r.d(s,"fetchJson",(function(){return iu})),r.d(s,"poll",(function(){return au})),r.d(s,"checkProperties",(function(){return j})),r.d(s,"deepCopy",(function(){return M})),r.d(s,"defineReadOnly",(function(){return P})),r.d(s,"getStatic",(function(){return R})),r.d(s,"resolveProperties",(function(){return T})),r.d(s,"shallowCopy",(function(){return I})),r.d(s,"arrayify",(function(){return c.a})),r.d(s,"concat",(function(){return c.b})),r.d(s,"stripZeros",(function(){return c.o})),r.d(s,"zeroPad",(function(){return c.p})),r.d(s,"isBytes",(function(){return c.j})),r.d(s,"isBytesLike",(function(){return c.k})),r.d(s,"defaultPath",(function(){return ra})),r.d(s,"HDNode",(function(){return na})),r.d(s,"SigningKey",(function(){return Hn})),r.d(s,"Interface",(function(){return cn})),r.d(s,"LogDescription",(function(){return rn})),r.d(s,"TransactionDescription",(function(){return nn})),r.d(s,"base58",(function(){return xi})),r.d(s,"base64",(function(){return a})),r.d(s,"hexlify",(function(){return c.i})),r.d(s,"isHexString",(function(){return c.l})),r.d(s,"hexConcat",(function(){return c.c})),r.d(s,"hexStripZeros",(function(){return c.f})),r.d(s,"hexValue",(function(){return c.g})),r.d(s,"hexZeroPad",(function(){return c.h})),r.d(s,"hexDataLength",(function(){return c.d})),r.d(s,"hexDataSlice",(function(){return c.e})),r.d(s,"nameprep",(function(){return Dh})),r.d(s,"_toEscapedUtf8String",(function(){return _t})),r.d(s,"toUtf8Bytes",(function(){return wt})),r.d(s,"toUtf8CodePoints",(function(){return xt})),r.d(s,"toUtf8String",(function(){return Et})),r.d(s,"Utf8ErrorFuncs",(function(){return yt})),r.d(s,"formatBytes32String",(function(){return Uh})),r.d(s,"parseBytes32String",(function(){return Lh})),r.d(s,"dnsEncode",(function(){return Ys})),r.d(s,"hashMessage",(function(){return oi})),r.d(s,"namehash",(function(){return Js})),r.d(s,"isValidName",(function(){return Vs})),r.d(s,"id",(function(){return Ot})),r.d(s,"_TypedDataEncoder",(function(){return ki})),r.d(s,"getAddress",(function(){return ct})),r.d(s,"getIcapAddress",(function(){return lt})),r.d(s,"getContractAddress",(function(){return ht})),r.d(s,"getCreate2Address",(function(){return pt})),r.d(s,"isAddress",(function(){return ft})),r.d(s,"formatEther",(function(){return Wh})),r.d(s,"parseEther",(function(){return Qh})),r.d(s,"formatUnits",(function(){return Gh})),r.d(s,"parseUnits",(function(){return Kh})),r.d(s,"commify",(function(){return Hh})),r.d(s,"computeHmac",(function(){return Ii})),r.d(s,"keccak256",(function(){return Q})),r.d(s,"ripemd160",(function(){return Ri})),r.d(s,"sha256",(function(){return Ti})),r.d(s,"sha512",(function(){return ji})),r.d(s,"randomBytes",(function(){return ca.a})),r.d(s,"shuffled",(function(){return Xf})),r.d(s,"solidityPack",(function(){return xh})),r.d(s,"solidityKeccak256",(function(){return Oh})),r.d(s,"soliditySha256",(function(){return Sh})),r.d(s,"splitSignature",(function(){return c.n})),r.d(s,"joinSignature",(function(){return c.m})),r.d(s,"accessListify",(function(){return ro})),r.d(s,"parseTransaction",(function(){return uo})),r.d(s,"serializeTransaction",(function(){return ao})),r.d(s,"TransactionTypes",(function(){return Wn})),r.d(s,"getJsonWalletAddress",(function(){return Wa})),r.d(s,"computeAddress",(function(){return Xn})),r.d(s,"recoverAddress",(function(){return $n})),r.d(s,"computePublicKey",(function(){return Kn})),r.d(s,"recoverPublicKey",(function(){return Gn})),r.d(s,"verifyMessage",(function(){return is})),r.d(s,"verifyTypedData",(function(){return as})),r.d(s,"getAccountPath",(function(){return ua})),r.d(s,"mnemonicToEntropy",(function(){return ia})),r.d(s,"entropyToMnemonic",(function(){return aa})),r.d(s,"isValidMnemonic",(function(){return sa})),r.d(s,"mnemonicToSeed",(function(){return oa})),r.d(s,"SupportedAlgorithm",(function(){return Ai})),r.d(s,"UnicodeNormalizationForm",(function(){return dt})),r.d(s,"Utf8ErrorReason",(function(){return mt})),r.d(s,"Indexed",(function(){return an}));var u={};r.r(u),r.d(u,"Signer",(function(){return Bn})),r.d(u,"Wallet",(function(){return os})),r.d(u,"VoidSigner",(function(){return Fn})),r.d(u,"getDefaultProvider",(function(){return wh})),r.d(u,"providers",(function(){return i})),r.d(u,"BaseContract",(function(){return Do})),r.d(u,"Contract",(function(){return Uo})),r.d(u,"ContractFactory",(function(){return Lo})),r.d(u,"BigNumber",(function(){return y})),r.d(u,"FixedNumber",(function(){return ei})),r.d(u,"constants",(function(){return o})),r.d(u,"errors",(function(){return h.a})),r.d(u,"logger",(function(){return Jh})),r.d(u,"utils",(function(){return s})),r.d(u,"wordlists",(function(){return Wi})),r.d(u,"version",(function(){return Vh})),r.d(u,"Wordlist",(function(){return Bi}));var c=r(0),f=r(2),l=r.n(f),h=r(1);function p(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)}}var d=l.a.BN,m=new h.b("bignumber/5.7.0"),v={};var g=!1,y=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e!==v&&m.throwError("cannot call constructor directly; use BigNumber.from",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}var e,r,n;return e=t,n=[{key:"from",value:function(e){if(e instanceof t)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new t(v,b(e)):e.match(/^-?[0-9]+$/)?new t(v,b(new d(e))):m.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&_("underflow","BigNumber.from",e),(e>=9007199254740991||e<=-9007199254740991)&&_("overflow","BigNumber.from",e),t.from(String(e));var r=e;if("bigint"==typeof r)return t.from(r.toString());if(Object(c.j)(r))return t.from(Object(c.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return t.from(n)}else{var o=r._hex;if(null==o&&"BigNumber"===r.type&&(o=r.hex),"string"==typeof o&&(Object(c.l)(o)||"-"===o[0]&&Object(c.l)(o.substring(1))))return t.from(o)}return m.throwArgumentError("invalid BigNumber value","value",e)}},{key:"isBigNumber",value:function(t){return!(!t||!t._isBigNumber)}}],(r=[{key:"fromTwos",value:function(t){return w(k(this).fromTwos(t))}},{key:"toTwos",value:function(t){return w(k(this).toTwos(t))}},{key:"abs",value:function(){return"-"===this._hex[0]?t.from(this._hex.substring(1)):this}},{key:"add",value:function(t){return w(k(this).add(k(t)))}},{key:"sub",value:function(t){return w(k(this).sub(k(t)))}},{key:"div",value:function(e){return t.from(e).isZero()&&_("division-by-zero","div"),w(k(this).div(k(e)))}},{key:"mul",value:function(t){return w(k(this).mul(k(t)))}},{key:"mod",value:function(t){var e=k(t);return e.isNeg()&&_("division-by-zero","mod"),w(k(this).umod(e))}},{key:"pow",value:function(t){var e=k(t);return e.isNeg()&&_("negative-power","pow"),w(k(this).pow(e))}},{key:"and",value:function(t){var e=k(t);return(this.isNegative()||e.isNeg())&&_("unbound-bitwise-result","and"),w(k(this).and(e))}},{key:"or",value:function(t){var e=k(t);return(this.isNegative()||e.isNeg())&&_("unbound-bitwise-result","or"),w(k(this).or(e))}},{key:"xor",value:function(t){var e=k(t);return(this.isNegative()||e.isNeg())&&_("unbound-bitwise-result","xor"),w(k(this).xor(e))}},{key:"mask",value:function(t){return(this.isNegative()||t<0)&&_("negative-width","mask"),w(k(this).maskn(t))}},{key:"shl",value:function(t){return(this.isNegative()||t<0)&&_("negative-width","shl"),w(k(this).shln(t))}},{key:"shr",value:function(t){return(this.isNegative()||t<0)&&_("negative-width","shr"),w(k(this).shrn(t))}},{key:"eq",value:function(t){return k(this).eq(k(t))}},{key:"lt",value:function(t){return k(this).lt(k(t))}},{key:"lte",value:function(t){return k(this).lte(k(t))}},{key:"gt",value:function(t){return k(this).gt(k(t))}},{key:"gte",value:function(t){return k(this).gte(k(t))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return k(this).isZero()}},{key:"toNumber",value:function(){try{return k(this).toNumber()}catch(t){_("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(t){}return m.throwError("this platform does not support BigInt",h.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?g||(g=!0,m.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?m.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",h.b.errors.UNEXPECTED_ARGUMENT,{}):m.throwError("BigNumber.toString does not accept parameters",h.b.errors.UNEXPECTED_ARGUMENT,{})),k(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(t){return{type:"BigNumber",hex:this.toHexString()}}}])&&p(e.prototype,r),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function b(t){if("string"!=typeof t)return b(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&m.throwArgumentError("invalid hex","value",t),"0x00"===(t=b(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function w(t){return y.from(b(t))}function k(t){var e=y.from(t).toHexString();return"-"===e[0]?new d("-"+e.substring(3),16):new d(e.substring(2),16)}function _(t,e,r){var n={fault:t,operation:e};return null!=r&&(n.value=r),m.throwError(t,h.b.errors.NUMERIC_FAULT,n)}function A(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)}}function E(t,e,r){return e&&A(t.prototype,e),r&&A(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function x(t){return(x="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)}var O=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},S=new h.b("properties/5.7.0");function P(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function R(t,e){for(var r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||"object"!==x(t.prototype))break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function T(t){return O(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object.keys(t).map((function(e){var r=t[e];return Promise.resolve(r).then((function(t){return{key:e,value:t}}))})),e.next=3,Promise.all(r);case 3:return n=e.sent,e.abrupt("return",n.reduce((function(t,e){return t[e.key]=e.value,t}),{}));case 5:case"end":return e.stop()}}),e)})))}function j(t,e){t&&"object"===x(t)||S.throwArgumentError("invalid object","object",t),Object.keys(t).forEach((function(r){e[r]||S.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)}))}function I(t){var e={};for(var r in t)e[r]=t[r];return e}var N={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function C(t){if(function t(e){if(null==e||N[x(e)])return!0;if(Array.isArray(e)||"object"===x(e)){if(!Object.isFrozen(e))return!1;for(var r=Object.keys(e),n=0;n<r.length;n++){var o=null;try{o=e[r[n]]}catch(t){continue}if(!t(o))return!1}return!0}return S.throwArgumentError("Cannot deepCopy ".concat(x(e)),"object",e)}(t))return t;if(Array.isArray(t))return Object.freeze(t.map((function(t){return M(t)})));if("object"===x(t)){var e={};for(var r in t){var n=t[r];void 0!==n&&P(e,r,M(n))}return e}return S.throwArgumentError("Cannot deepCopy ".concat(x(t)),"object",t)}function M(t){return C(t)}var B=E((function t(e){for(var r in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e)this[r]=M(e[r])}));function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function D(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)}}function U(t,e,r){return e&&D(t.prototype,e),r&&D(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var L=new h.b("abi/5.7.0");function z(t){var e=[];return function t(r,n){if(Array.isArray(n))for(var o in n){var i=r.slice();i.push(o);try{t(i,n[o])}catch(t){e.push({path:i,error:t})}}}([],t),e}var q=function(){function t(e,r,n,o){F(this,t),this.name=e,this.type=r,this.localName=n,this.dynamic=o}return U(t,[{key:"_throwError",value:function(t,e){L.throwArgumentError(t,this.localName,e)}}]),t}(),H=function(){function t(e){F(this,t),P(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}return U(t,[{key:"data",get:function(){return Object(c.c)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(t){return this._data.push(t),this._dataLength+=t.length,t.length}},{key:"appendWriter",value:function(t){return this._writeData(Object(c.b)(t._data))}},{key:"writeBytes",value:function(t){var e=Object(c.a)(t),r=e.length%this.wordSize;return r&&(e=Object(c.b)([e,this._padding.slice(r)])),this._writeData(e)}},{key:"_getValue",value:function(t){var e=Object(c.a)(y.from(t));return e.length>this.wordSize&&L.throwError("value out-of-bounds",h.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=Object(c.b)([this._padding.slice(e.length%this.wordSize),e])),e}},{key:"writeValue",value:function(t){return this._writeData(this._getValue(t))}},{key:"writeUpdatableValue",value:function(){var t=this,e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){t._data[e]=t._getValue(r)}}}]),t}(),G=function(){function t(e,r,n,o){F(this,t),P(this,"_data",Object(c.a)(e)),P(this,"wordSize",r||32),P(this,"_coerceFunc",n),P(this,"allowLoose",o),this._offset=0}return U(t,[{key:"data",get:function(){return Object(c.i)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(e,r){return this._coerceFunc?this._coerceFunc(e,r):t.coerce(e,r)}},{key:"_peekBytes",value:function(t,e,r){var n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:L.throwError("data out-of-bounds",h.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(e){return new t(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(t,e){var r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}},{key:"readValue",value:function(){return y.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(t,e){var r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}}]),t}(),K=r(33),W=r.n(K);function Q(t){return"0x"+W.a.keccak_256(Object(c.a)(t))}var V=new h.b("rlp/5.7.0");function J(t){for(var e=[];t;)e.unshift(255&t),t>>=8;return e}function Y(t,e,r){for(var n=0,o=0;o<r;o++)n=256*n+t[e+o];return n}function Z(t){return Object(c.i)(function t(e){if(Array.isArray(e)){var r=[];if(e.forEach((function(e){r=r.concat(t(e))})),r.length<=55)return r.unshift(192+r.length),r;var n=J(r.length);return n.unshift(247+n.length),n.concat(r)}Object(c.k)(e)||V.throwArgumentError("RLP object must be BytesLike","object",e);var o=Array.prototype.slice.call(Object(c.a)(e));if(1===o.length&&o[0]<=127)return o;if(o.length<=55)return o.unshift(128+o.length),o;var i=J(o.length);return i.unshift(183+i.length),i.concat(o)}(t))}function X(t,e,r,n){for(var o=[];r<e+1+n;){var i=$(t,r);o.push(i.result),(r+=i.consumed)>e+1+n&&V.throwError("child data too short",h.b.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function $(t,e){if(0===t.length&&V.throwError("data too short",h.b.errors.BUFFER_OVERRUN,{}),t[e]>=248){var r=t[e]-247;e+1+r>t.length&&V.throwError("data short segment too short",h.b.errors.BUFFER_OVERRUN,{});var n=Y(t,e+1,r);return e+1+r+n>t.length&&V.throwError("data long segment too short",h.b.errors.BUFFER_OVERRUN,{}),X(t,e,e+1+r,r+n)}if(t[e]>=192){var o=t[e]-192;return e+1+o>t.length&&V.throwError("data array too short",h.b.errors.BUFFER_OVERRUN,{}),X(t,e,e+1,o)}if(t[e]>=184){var i=t[e]-183;e+1+i>t.length&&V.throwError("data array too short",h.b.errors.BUFFER_OVERRUN,{});var a=Y(t,e+1,i);return e+1+i+a>t.length&&V.throwError("data array too short",h.b.errors.BUFFER_OVERRUN,{}),{consumed:1+i+a,result:Object(c.i)(t.slice(e+1+i,e+1+i+a))}}if(t[e]>=128){var s=t[e]-128;return e+1+s>t.length&&V.throwError("data too short",h.b.errors.BUFFER_OVERRUN,{}),{consumed:1+s,result:Object(c.i)(t.slice(e+1,e+1+s))}}return{consumed:1,result:Object(c.i)(t[e])}}function tt(t){var e=Object(c.a)(t),r=$(e,0);return r.consumed!==e.length&&V.throwArgumentError("invalid rlp data","data",t),r.result}var et=new h.b("address/5.7.0");function rt(t){Object(c.l)(t,20)||et.throwArgumentError("invalid address","address",t);for(var e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=e[n].charCodeAt(0);for(var o=Object(c.a)(Q(r)),i=0;i<40;i+=2)o[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&o[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}for(var nt={},ot=0;ot<10;ot++)nt[String(ot)]=String(ot);for(var it=0;it<26;it++)nt[String.fromCharCode(65+it)]=String(10+it);var at,st=Math.floor((at=9007199254740991,Math.log10?Math.log10(at):Math.log(at)/Math.LN10));function ut(t){for(var e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((function(t){return nt[t]})).join("");e.length>=st;){var r=e.substring(0,st);e=parseInt(r,10)%97+e.substring(r.length)}for(var n=String(98-parseInt(e,10)%97);n.length<2;)n="0"+n;return n}function ct(t){var e,r=null;if("string"!=typeof t&&et.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),r=rt(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==t&&et.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==ut(t)&&et.throwArgumentError("bad icap checksum","address",t),e=t.substring(4),r=new d(e,36).toString(16);r.length<40;)r="0"+r;r=rt("0x"+r)}else et.throwArgumentError("invalid address","address",t);return r}function ft(t){try{return ct(t),!0}catch(t){}return!1}function lt(t){for(var e,r=(e=ct(t).substring(2),new d(e,16).toString(36)).toUpperCase();r.length<30;)r="0"+r;return"XE"+ut("XE00"+r)+r}function ht(t){var e=null;try{e=ct(t.from)}catch(e){et.throwArgumentError("missing from address","transaction",t)}var r=Object(c.o)(Object(c.a)(y.from(t.nonce).toHexString()));return ct(Object(c.e)(Q(Z([e,r])),12))}function pt(t,e,r){return 32!==Object(c.d)(e)&&et.throwArgumentError("salt must be 32 bytes","salt",e),32!==Object(c.d)(r)&&et.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),ct(Object(c.e)(Q(Object(c.b)(["0xff",ct(t),e,r])),12))}var dt,mt,vt=new h.b("strings/5.7.0");function gt(t,e,r,n,o){if(t===mt.BAD_PREFIX||t===mt.UNEXPECTED_CONTINUE){for(var i=0,a=e+1;a<r.length&&r[a]>>6==2;a++)i++;return i}return t===mt.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(dt||(dt={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(mt||(mt={}));var yt=Object.freeze({error:function(t,e,r,n,o){return vt.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:gt,replace:function(t,e,r,n,o){return t===mt.OVERLONG?(n.push(o),0):(n.push(65533),gt(t,e,r))}});function bt(t,e){null==e&&(e=yt.error),t=Object(c.a)(t);for(var r=[],n=0;n<t.length;){var o=t[n++];if(o>>7!=0){var i=null,a=null;if(192==(224&o))i=1,a=127;else if(224==(240&o))i=2,a=2047;else{if(240!=(248&o)){n+=e(128==(192&o)?mt.UNEXPECTED_CONTINUE:mt.BAD_PREFIX,n-1,t,r);continue}i=3,a=65535}if(n-1+i>=t.length)n+=e(mt.OVERRUN,n-1,t,r);else{for(var s=o&(1<<8-i-1)-1,u=0;u<i;u++){var f=t[n];if(128!=(192&f)){n+=e(mt.MISSING_CONTINUE,n,t,r),s=null;break}s=s<<6|63&f,n++}null!==s&&(s>1114111?n+=e(mt.OUT_OF_RANGE,n-1-i,t,r,s):s>=55296&&s<=57343?n+=e(mt.UTF16_SURROGATE,n-1-i,t,r,s):s<=a?n+=e(mt.OVERLONG,n-1-i,t,r,s):r.push(s))}}else r.push(o)}return r}function wt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dt.current;e!=dt.current&&(vt.checkNormalize(),t=t.normalize(e));for(var r=[],n=0;n<t.length;n++){var o=t.charCodeAt(n);if(o<128)r.push(o);else if(o<2048)r.push(o>>6|192),r.push(63&o|128);else if(55296==(64512&o)){n++;var i=t.charCodeAt(n);if(n>=t.length||56320!=(64512&i))throw new Error("invalid utf-8 string");var a=65536+((1023&o)<<10)+(1023&i);r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)}else r.push(o>>12|224),r.push(o>>6&63|128),r.push(63&o|128)}return Object(c.a)(r)}function kt(t){var e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function _t(t,e){return'"'+bt(t,e).map((function(t){if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?kt(t):kt(55296+((t-=65536)>>10&1023))+kt(56320+(1023&t))})).join("")+'"'}function At(t){return t.map((function(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t)))})).join("")}function Et(t,e){return At(bt(t,e))}function xt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dt.current;return bt(wt(t,e))}function Ot(t){return Q(wt(t))}function St(t){return(St="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 Pt(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)}}function Rt(t,e){return(Rt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Tt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=It(t);if(e){var o=It(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jt(this,r)}}function jt(t,e){if(e&&("object"===St(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function It(t){return(It=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rt(t,e)}(i,t);var e,r,n,o=Tt(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"address","address",t,!1)}return e=i,(r=[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(t,e){try{e=ct(e)}catch(t){this._throwError(t.message,e)}return t.writeValue(e)}},{key:"decode",value:function(t){return ct(Object(c.h)(t.readValue().toHexString(),20))}}])&&Pt(e.prototype,r),n&&Pt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(q);function Ct(t){return(Ct="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 Mt(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)}}function Bt(t,e){return(Bt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ft(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ut(t);if(e){var o=Ut(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Dt(this,r)}}function Dt(t,e){if(e&&("object"===Ct(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ut(t){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Lt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bt(t,e)}(i,t);var e,r,n,o=Ft(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t.name,t.type,void 0,t.dynamic)).coder=t,e}return e=i,(r=[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(t,e){return this.coder.encode(t,e)}},{key:"decode",value:function(t){return this.coder.decode(t)}}])&&Mt(e.prototype,r),n&&Mt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(q);function zt(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)}}function qt(t,e){return(qt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ht(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Kt(t);if(e){var o=Kt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Gt(this,r)}}function Gt(t,e){if(e&&("object"===Wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kt(t){return(Kt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Wt(t){return(Wt="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)}var Qt=new h.b("abi/5.7.0");function Vt(t,e,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===Wt(r)){var o={};n=e.map((function(t){var e=t.localName;return e||Qt.throwError("cannot encode object for signature with missing names",h.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),o[e]&&Qt.throwError("cannot encode object for signature with duplicate names",h.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),o[e]=!0,r[e]}))}else Qt.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Qt.throwArgumentError("types/value length mismatch","tuple",r);var i=new H(t.wordSize),a=new H(t.wordSize),s=[];e.forEach((function(t,e){var r=n[e];if(t.dynamic){var o=a.length;t.encode(a,r);var u=i.writeUpdatableValue();s.push((function(t){u(t+o)}))}else t.encode(i,r)})),s.forEach((function(t){t(i.length)}));var u=t.appendWriter(i);return u+=t.appendWriter(a)}function Jt(t,e){var r=[],n=t.subReader(0);e.forEach((function(e){var o=null;if(e.dynamic){var i=t.readValue(),a=n.subReader(i.toNumber());try{o=e.decode(a)}catch(t){if(t.code===h.b.errors.BUFFER_OVERRUN)throw t;(o=t).baseType=e.name,o.name=e.localName,o.type=e.type}}else try{o=e.decode(t)}catch(t){if(t.code===h.b.errors.BUFFER_OVERRUN)throw t;(o=t).baseType=e.name,o.name=e.localName,o.type=e.type}null!=o&&r.push(o)}));var o=e.reduce((function(t,e){var r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach((function(t,e){var n=t.localName;if(n&&1===o[n]&&("length"===n&&(n="_length"),null==r[n])){var i=r[e];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw i}}):r[n]=i}}));for(var i=function(t){var e=r[t];e instanceof Error&&Object.defineProperty(r,t,{enumerable:!0,get:function(){throw e}})},a=0;a<r.length;a++)i(a);return Object.freeze(r)}var Yt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qt(t,e)}(i,t);var e,r,n,o=Ht(i);function i(t,e,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var a=t.type+"["+(e>=0?e:"")+"]",s=-1===e||t.dynamic;return(n=o.call(this,"array",a,r,s)).coder=t,n.length=e,n}return e=i,(r=[{key:"defaultValue",value:function(){for(var t=this.coder.defaultValue(),e=[],r=0;r<this.length;r++)e.push(t);return e}},{key:"encode",value:function(t,e){Array.isArray(e)||this._throwError("expected array value",e);var r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),Qt.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));for(var n=[],o=0;o<e.length;o++)n.push(this.coder);return Vt(t,n,e)}},{key:"decode",value:function(t){var e=this.length;-1===e&&32*(e=t.readValue().toNumber())>t._data.length&&Qt.throwError("insufficient data length",h.b.errors.BUFFER_OVERRUN,{length:t._data.length,count:e});for(var r=[],n=0;n<e;n++)r.push(new Lt(this.coder));return t.coerce(this.name,Jt(t,r))}}])&&zt(e.prototype,r),n&&zt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(q);function Zt(t){return(Zt="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 Xt(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)}}function $t(t,e){return($t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function te(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=re(t);if(e){var o=re(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ee(this,r)}}function ee(t,e){if(e&&("object"===Zt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function re(t){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ne=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$t(t,e)}(i,t);var e,r,n,o=te(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"bool","bool",t,!1)}return e=i,(r=[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(t,e){return t.writeValue(e?1:0)}},{key:"decode",value:function(t){return t.coerce(this.type,!t.readValue().isZero())}}])&&Xt(e.prototype,r),n&&Xt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(q);function oe(t){return(oe="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 ie(){return(ie="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ae(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function ae(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=de(t)););return t}function se(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ue(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)}}function ce(t,e,r){return e&&ue(t.prototype,e),r&&ue(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function fe(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)}function le(t,e){return(le=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function he(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=de(t);if(e){var o=de(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pe(this,r)}}function pe(t,e){if(e&&("object"===oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function de(t){return(de=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var me=function(t){fe(r,t);var e=he(r);function r(t,n){return se(this,r),e.call(this,t,t,n,!0)}return ce(r,[{key:"defaultValue",value:function(){return"0x"}},{key:"encode",value:function(t,e){e=Object(c.a)(e);var r=t.writeValue(e.length);return r+=t.writeBytes(e)}},{key:"decode",value:function(t){return t.readBytes(t.readValue().toNumber(),!0)}}]),r}(q),ve=function(t){fe(r,t);var e=he(r);function r(t){return se(this,r),e.call(this,"bytes",t)}return ce(r,[{key:"decode",value:function(t){return t.coerce(this.name,Object(c.i)(ie(de(r.prototype),"decode",this).call(this,t)))}}]),r}(me);function ge(t){return(ge="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 ye(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)}}function be(t,e){return(be=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function we(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_e(t);if(e){var o=_e(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ke(this,r)}}function ke(t,e){if(e&&("object"===ge(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _e(t){return(_e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ae=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&be(t,e)}(i,t);var e,r,n,o=we(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n="bytes"+String(t);return(r=o.call(this,n,n,e,!1)).size=t,r}return e=i,(r=[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(t,e){var r=Object(c.a)(e);return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}},{key:"decode",value:function(t){return t.coerce(this.name,Object(c.i)(t.readBytes(this.size)))}}])&&ye(e.prototype,r),n&&ye(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(q);function Ee(t){return(Ee="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 xe(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)}}function Oe(t,e){return(Oe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Se(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Re(t);if(e){var o=Re(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Pe(this,r)}}function Pe(t,e){if(e&&("object"===Ee(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Re(t){return(Re=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Te=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oe(t,e)}(i,t);var e,r,n,o=Se(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"null","",t,!1)}return e=i,(r=[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}},{key:"decode",value:function(t){return t.readBytes(0),t.coerce(this.name,null)}}])&&xe(e.prototype,r),n&&xe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(q),je=y.from(-1),Ie=y.from(0),Ne=y.from(1),Ce=y.from(2),Me=y.from("1000000000000000000"),Be=y.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Fe=y.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),De=y.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Ue(t){return(Ue="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 Le(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)}}function ze(t,e){return(ze=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ge(t);if(e){var o=Ge(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return He(this,r)}}function He(t,e){if(e&&("object"===Ue(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ge(t){return(Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ke=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ze(t,e)}(i,t);var e,r,n,o=qe(i);function i(t,e,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var a=(e?"int":"uint")+8*t;return(n=o.call(this,a,a,r,!1)).size=t,n.signed=e,n}return e=i,(r=[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(t,e){var r=y.from(e),n=Be.mask(8*t.wordSize);if(this.signed){var o=n.mask(8*this.size-1);(r.gt(o)||r.lt(o.add(Ne).mul(je)))&&this._throwError("value out-of-bounds",e)}else(r.lt(Ie)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(r)}},{key:"decode",value:function(t){var e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}])&&Le(e.prototype,r),n&&Le(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(q);function We(t){return(We="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 Qe(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)}}function Ve(){return(Ve="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Je(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Je(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$e(t)););return t}function Ye(t,e){return(Ye=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ze(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=$e(t);if(e){var o=$e(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xe(this,r)}}function Xe(t,e){if(e&&("object"===We(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $e(t){return($e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ye(t,e)}(i,t);var e,r,n,o=Ze(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"string",t)}return e=i,(r=[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(t,e){return Ve($e(i.prototype),"encode",this).call(this,t,wt(e))}},{key:"decode",value:function(t){return Et(Ve($e(i.prototype),"decode",this).call(this,t))}}])&&Qe(e.prototype,r),n&&Qe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(me);function er(t){return(er="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 rr(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)}}function nr(t,e){return(nr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function or(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ar(t);if(e){var o=ar(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ir(this,r)}}function ir(t,e){if(e&&("object"===er(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ar(t){return(ar=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var sr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nr(t,e)}(i,t);var e,r,n,o=or(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n=!1,a=[];t.forEach((function(t){t.dynamic&&(n=!0),a.push(t.type)}));var s="tuple("+a.join(",")+")";return(r=o.call(this,"tuple",s,e,n)).coders=t,r}return e=i,(r=[{key:"defaultValue",value:function(){var t=[];this.coders.forEach((function(e){t.push(e.defaultValue())}));var e=this.coders.reduce((function(t,e){var r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach((function(r,n){var o=r.localName;o&&1===e[o]&&("length"===o&&(o="_length"),null==t[o]&&(t[o]=t[n]))})),Object.freeze(t)}},{key:"encode",value:function(t,e){return Vt(t,this.coders,e)}},{key:"decode",value:function(t){return t.coerce(this.name,Jt(t,this.coders))}}])&&rr(e.prototype,r),n&&rr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(q);function ur(t){return(ur="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 cr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fr(t,e)}function fr(t,e){return(fr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function lr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pr(t);if(e){var o=pr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hr(this,r)}}function hr(t,e){if(e&&("object"===ur(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pr(t){return(pr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mr(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)}}function vr(t,e,r){return e&&mr(t.prototype,e),r&&mr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var gr=new h.b("abi/5.7.0"),yr={},br={calldata:!0,memory:!0,storage:!0},wr={calldata:!0,memory:!0};function kr(t,e){if("bytes"===t||"string"===t){if(br[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&wr[e])return!0;return(br[e]||"payable"===e)&&gr.throwArgumentError("invalid modifier","name",e),!1}function _r(t,e){for(var r in e)P(t,r,e[r])}var Ar=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Er=new RegExp(/^(.*)\[([0-9]*)\]$/),xr=function(){function t(e,r){dr(this,t),e!==yr&&gr.throwError("use fromString",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),_r(this,r);var n=this.type.match(Er);_r(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:t.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return vr(t,[{key:"format",value:function(t){if(t||(t=Ar.sighash),Ar[t]||gr.throwArgumentError("invalid format type","format",t),t===Ar.json){var e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((function(e){return JSON.parse(e.format(t))}))),JSON.stringify(e)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(t),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==Ar.sighash&&(r+=this.type),r+="("+this.components.map((function(e){return e.format(t)})).join(t===Ar.full?", ":",")+")"):r+=this.type,t!==Ar.sighash&&(!0===this.indexed&&(r+=" indexed"),t===Ar.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(e,r){return"string"==typeof e?t.fromString(e,r):t.fromObject(e)}},{key:"fromObject",value:function(e){return t.isParamType(e)?e:new t(yr,{name:e.name||null,type:Br(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(t.fromObject):null})}},{key:"fromString",value:function(e,r){return function(e){return t.fromObject({name:e.name,type:e.type,indexed:e.indexed,components:e.components})}(function(t,e){var r=t;function n(e){gr.throwArgumentError("unexpected character at position ".concat(e),"param",t)}function o(t){var r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},a=i,s=0;s<t.length;s++){var u=t[s];switch(u){case"(":a.state.allowType&&""===a.type?a.type="tuple":a.state.allowParams||n(s),a.state.allowType=!1,a.type=Br(a.type),a.components=[o(a)],a=a.components[0];break;case")":delete a.state,"indexed"===a.name&&(e||n(s),a.indexed=!0,a.name=""),kr(a.type,a.name)&&(a.name=""),a.type=Br(a.type);var c=a;(a=a.parent)||n(s),delete c.parent,a.state.allowParams=!1,a.state.allowName=!0,a.state.allowArray=!0;break;case",":delete a.state,"indexed"===a.name&&(e||n(s),a.indexed=!0,a.name=""),kr(a.type,a.name)&&(a.name=""),a.type=Br(a.type);var f=o(a.parent);a.parent.components.push(f),delete a.parent,a=f;break;case" ":a.state.allowType&&""!==a.type&&(a.type=Br(a.type),delete a.state.allowType,a.state.allowName=!0,a.state.allowParams=!0),a.state.allowName&&""!==a.name&&("indexed"===a.name?(e||n(s),a.indexed&&n(s),a.indexed=!0,a.name=""):kr(a.type,a.name)?a.name="":a.state.allowName=!1);break;case"[":a.state.allowArray||n(s),a.type+=u,a.state.allowArray=!1,a.state.allowName=!1,a.state.readArray=!0;break;case"]":a.state.readArray||n(s),a.type+=u,a.state.readArray=!1,a.state.allowArray=!0,a.state.allowName=!0;break;default:a.state.allowType?(a.type+=u,a.state.allowParams=!0,a.state.allowArray=!0):a.state.allowName?(a.name+=u,delete a.state.allowArray):a.state.readArray?a.type+=u:n(s)}}return a.parent&&gr.throwArgumentError("unexpected eof","param",t),delete i.state,"indexed"===a.name?(e||n(r.length-7),a.indexed&&n(r.length-7),a.indexed=!0,a.name=""):kr(a.type,a.name)&&(a.name=""),i.type=Br(i.type),i}(e,!!r))}},{key:"isParamType",value:function(t){return!(null==t||!t._isParamType)}}]),t}();function Or(t,e){return function(t){t=t.trim();for(var e=[],r="",n=0,o=0;o<t.length;o++){var i=t[o];","===i&&0===n?(e.push(r),r=""):(r+=i,"("===i?n++:")"===i&&-1===--n&&gr.throwArgumentError("unbalanced parenthesis","value",t))}r&&e.push(r);return e}(t).map((function(t){return xr.fromString(t,e)}))}var Sr=function(){function t(e,r){dr(this,t),e!==yr&&gr.throwError("use a static from method",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),_r(this,r),this._isFragment=!0,Object.freeze(this)}return vr(t,null,[{key:"from",value:function(e){return t.isFragment(e)?e:"string"==typeof e?t.fromString(e):t.fromObject(e)}},{key:"fromObject",value:function(e){if(t.isFragment(e))return e;switch(e.type){case"function":return Nr.fromObject(e);case"event":return Pr.fromObject(e);case"constructor":return Ir.fromObject(e);case"error":return Mr.fromObject(e);case"fallback":case"receive":return null}return gr.throwArgumentError("invalid fragment object","value",e)}},{key:"fromString",value:function(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Pr.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?Nr.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?Ir.fromString(t.trim()):"error"===t.split(" ")[0]?Mr.fromString(t.substring(5).trim()):gr.throwArgumentError("unsupported fragment","value",t)}},{key:"isFragment",value:function(t){return!(!t||!t._isFragment)}}]),t}(),Pr=function(t){cr(r,t);var e=lr(r);function r(){return dr(this,r),e.apply(this,arguments)}return vr(r,[{key:"format",value:function(t){if(t||(t=Ar.sighash),Ar[t]||gr.throwArgumentError("invalid format type","format",t),t===Ar.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))}))});var e="";return t!==Ar.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((function(e){return e.format(t)})).join(t===Ar.full?", ":",")+") ",t!==Ar.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isEventFragment(t))return t;"event"!==t.type&&gr.throwArgumentError("invalid event object","value",t);var e={name:Dr(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(xr.fromObject):[],type:"event"};return new r(yr,e)}},{key:"fromString",value:function(t){var e=t.match(Ur);e||gr.throwArgumentError("invalid event string","value",t);var n=!1;return e[3].split(" ").forEach((function(t){switch(t.trim()){case"anonymous":n=!0;break;case"":break;default:gr.warn("unknown modifier: "+t)}})),r.fromObject({name:e[1].trim(),anonymous:n,inputs:Or(e[2],!0),type:"event"})}},{key:"isEventFragment",value:function(t){return t&&t._isFragment&&"event"===t.type}}]),r}(Sr);function Rr(t,e){e.gas=null;var r=t.split("@");return 1!==r.length?(r.length>2&&gr.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||gr.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=y.from(r[1]),r[0]):t}function Tr(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((function(t){switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function jr(t){var e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&gr.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&gr.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||gr.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&gr.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&gr.throwArgumentError("unable to determine stateMutability","value",t),e}var Ir=function(t){cr(r,t);var e=lr(r);function r(){return dr(this,r),e.apply(this,arguments)}return vr(r,[{key:"format",value:function(t){if(t||(t=Ar.sighash),Ar[t]||gr.throwArgumentError("invalid format type","format",t),t===Ar.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))}))});t===Ar.sighash&&gr.throwError("cannot format a constructor for sighash",h.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var e="constructor("+this.inputs.map((function(e){return e.format(t)})).join(t===Ar.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isConstructorFragment(t))return t;"constructor"!==t.type&&gr.throwArgumentError("invalid constructor object","value",t);var e=jr(t);e.constant&&gr.throwArgumentError("constructor cannot be constant","value",t);var n={name:null,type:t.type,inputs:t.inputs?t.inputs.map(xr.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?y.from(t.gas):null};return new r(yr,n)}},{key:"fromString",value:function(t){var e={type:"constructor"},n=(t=Rr(t,e)).match(Ur);return n&&"constructor"===n[1].trim()||gr.throwArgumentError("invalid constructor string","value",t),e.inputs=Or(n[2].trim(),!1),Tr(n[3].trim(),e),r.fromObject(e)}},{key:"isConstructorFragment",value:function(t){return t&&t._isFragment&&"constructor"===t.type}}]),r}(Sr),Nr=function(t){cr(r,t);var e=lr(r);function r(){return dr(this,r),e.apply(this,arguments)}return vr(r,[{key:"format",value:function(t){if(t||(t=Ar.sighash),Ar[t]||gr.throwArgumentError("invalid format type","format",t),t===Ar.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))})),outputs:this.outputs.map((function(e){return JSON.parse(e.format(t))}))});var e="";return t!==Ar.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((function(e){return e.format(t)})).join(t===Ar.full?", ":",")+") ",t!==Ar.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((function(e){return e.format(t)})).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isFunctionFragment(t))return t;"function"!==t.type&&gr.throwArgumentError("invalid function object","value",t);var e=jr(t),n={type:t.type,name:Dr(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(xr.fromObject):[],outputs:t.outputs?t.outputs.map(xr.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?y.from(t.gas):null};return new r(yr,n)}},{key:"fromString",value:function(t){var e={type:"function"},n=(t=Rr(t,e)).split(" returns ");n.length>2&&gr.throwArgumentError("invalid function string","value",t);var o=n[0].match(Ur);if(o||gr.throwArgumentError("invalid function signature","value",t),e.name=o[1].trim(),e.name&&Dr(e.name),e.inputs=Or(o[2],!1),Tr(o[3].trim(),e),n.length>1){var i=n[1].match(Ur);""==i[1].trim()&&""==i[3].trim()||gr.throwArgumentError("unexpected tokens","value",t),e.outputs=Or(i[2],!1)}else e.outputs=[];return r.fromObject(e)}},{key:"isFunctionFragment",value:function(t){return t&&t._isFragment&&"function"===t.type}}]),r}(Ir);function Cr(t){var e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||gr.throwArgumentError("cannot specify user defined ".concat(e," error"),"fragment",t),t}var Mr=function(t){cr(r,t);var e=lr(r);function r(){return dr(this,r),e.apply(this,arguments)}return vr(r,[{key:"format",value:function(t){if(t||(t=Ar.sighash),Ar[t]||gr.throwArgumentError("invalid format type","format",t),t===Ar.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))}))});var e="";return t!==Ar.sighash&&(e+="error "),(e+=this.name+"("+this.inputs.map((function(e){return e.format(t)})).join(t===Ar.full?", ":",")+") ").trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isErrorFragment(t))return t;"error"!==t.type&&gr.throwArgumentError("invalid error object","value",t);var e={type:t.type,name:Dr(t.name),inputs:t.inputs?t.inputs.map(xr.fromObject):[]};return Cr(new r(yr,e))}},{key:"fromString",value:function(t){var e={type:"error"},n=t.match(Ur);return n||gr.throwArgumentError("invalid error signature","value",t),e.name=n[1].trim(),e.name&&Dr(e.name),e.inputs=Or(n[2],!1),Cr(r.fromObject(e))}},{key:"isErrorFragment",value:function(t){return t&&t._isFragment&&"error"===t.type}}]),r}(Sr);function Br(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}var Fr=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Dr(t){return t&&t.match(Fr)||gr.throwArgumentError('invalid identifier "'.concat(t,'"'),"value",t),t}var Ur=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Lr(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)}}var zr=new h.b("abi/5.7.0"),qr=new RegExp(/^bytes([0-9]*)$/),Hr=new RegExp(/^(u?int)([0-9]*)$/),Gr=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"coerceFunc",e||null)}var e,r,n;return e=t,(r=[{key:"_getCoder",value:function(t){var e=this;switch(t.baseType){case"address":return new Nt(t.name);case"bool":return new ne(t.name);case"string":return new tr(t.name);case"bytes":return new ve(t.name);case"array":return new Yt(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new sr((t.components||[]).map((function(t){return e._getCoder(t)})),t.name);case"":return new Te(t.name)}var r=t.type.match(Hr);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!=0)&&zr.throwArgumentError("invalid "+r[1]+" bit length","param",t),new Ke(n/8,"int"===r[1],t.name)}if(r=t.type.match(qr)){var o=parseInt(r[1]);return(0===o||o>32)&&zr.throwArgumentError("invalid bytes length","param",t),new Ae(o,t.name)}return zr.throwArgumentError("invalid type","type",t.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(t,e){return new G(t,this._getWordSize(),this.coerceFunc,e)}},{key:"_getWriter",value:function(){return new H(this._getWordSize())}},{key:"getDefaultValue",value:function(t){var e=this,r=t.map((function(t){return e._getCoder(xr.from(t))}));return new sr(r,"_").defaultValue()}},{key:"encode",value:function(t,e){var r=this;t.length!==e.length&&zr.throwError("types/values length mismatch",h.b.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});var n=t.map((function(t){return r._getCoder(xr.from(t))})),o=new sr(n,"_"),i=this._getWriter();return o.encode(i,e),i.data}},{key:"decode",value:function(t,e,r){var n=this,o=t.map((function(t){return n._getCoder(xr.from(t))}));return new sr(o,"_").decode(this._getReader(Object(c.a)(e),r))}}])&&Lr(e.prototype,r),n&&Lr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Kr=new Gr;function Wr(t){return(Wr="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 Qr(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)}}function Vr(t,e,r){return e&&Qr(t.prototype,e),r&&Qr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Jr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zr(t,e)}function Zr(t,e){return(Zr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=tn(t);if(e){var o=tn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $r(this,r)}}function $r(t,e){if(e&&("object"===Wr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tn(t){return(tn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var en=new h.b("abi/5.7.0"),rn=function(t){Yr(r,t);var e=Xr(r);function r(){return Jr(this,r),e.apply(this,arguments)}return Vr(r)}(B),nn=function(t){Yr(r,t);var e=Xr(r);function r(){return Jr(this,r),e.apply(this,arguments)}return Vr(r)}(B),on=function(t){Yr(r,t);var e=Xr(r);function r(){return Jr(this,r),e.apply(this,arguments)}return Vr(r)}(B),an=function(t){Yr(r,t);var e=Xr(r);function r(){return Jr(this,r),e.apply(this,arguments)}return Vr(r,null,[{key:"isIndexed",value:function(t){return!(!t||!t._isIndexed)}}]),r}(B),sn={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function un(t,e){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(t));return r.error=e,r}var cn=function(){function t(e){var r=this;Jr(this,t);P(this,"fragments",("string"==typeof e?JSON.parse(e):e).map((function(t){return Sr.from(t)})).filter((function(t){return null!=t}))),P(this,"_abiCoder",R(this instanceof t?this.constructor:void 0,"getAbiCoder")()),P(this,"functions",{}),P(this,"errors",{}),P(this,"events",{}),P(this,"structs",{}),this.fragments.forEach((function(t){var e=null;switch(t.type){case"constructor":return r.deploy?void en.warn("duplicate definition - constructor"):void P(r,"deploy",t);case"function":e=r.functions;break;case"event":e=r.events;break;case"error":e=r.errors;break;default:return}var n=t.format();e[n]?en.warn("duplicate definition - "+n):e[n]=t})),this.deploy||P(this,"deploy",Ir.from({payable:!1,type:"constructor"})),P(this,"_isInterface",!0)}return Vr(t,[{key:"format",value:function(t){t||(t=Ar.full),t===Ar.sighash&&en.throwArgumentError("interface does not support formatting sighash","format",t);var e=this.fragments.map((function(e){return e.format(t)}));return t===Ar.json?JSON.stringify(e.map((function(t){return JSON.parse(t)}))):e}},{key:"getFunction",value:function(t){if(Object(c.l)(t)){for(var e in this.functions)if(t===this.getSighash(e))return this.functions[e];en.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){var r=t.trim(),n=Object.keys(this.functions).filter((function(t){return t.split("(")[0]===r}));return 0===n.length?en.throwArgumentError("no matching function","name",r):n.length>1&&en.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var o=this.functions[Nr.fromString(t).format()];return o||en.throwArgumentError("no matching function","signature",t),o}},{key:"getEvent",value:function(t){if(Object(c.l)(t)){var e=t.toLowerCase();for(var r in this.events)if(e===this.getEventTopic(r))return this.events[r];en.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){var n=t.trim(),o=Object.keys(this.events).filter((function(t){return t.split("(")[0]===n}));return 0===o.length?en.throwArgumentError("no matching event","name",n):o.length>1&&en.throwArgumentError("multiple matching events","name",n),this.events[o[0]]}var i=this.events[Pr.fromString(t).format()];return i||en.throwArgumentError("no matching event","signature",t),i}},{key:"getError",value:function(t){if(Object(c.l)(t)){var e=R(this.constructor,"getSighash");for(var r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}en.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){var n=t.trim(),o=Object.keys(this.errors).filter((function(t){return t.split("(")[0]===n}));return 0===o.length?en.throwArgumentError("no matching error","name",n):o.length>1&&en.throwArgumentError("multiple matching errors","name",n),this.errors[o[0]]}var i=this.errors[Nr.fromString(t).format()];return i||en.throwArgumentError("no matching error","signature",t),i}},{key:"getSighash",value:function(t){if("string"==typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(t){throw e}}return R(this.constructor,"getSighash")(t)}},{key:"getEventTopic",value:function(t){return"string"==typeof t&&(t=this.getEvent(t)),R(this.constructor,"getEventTopic")(t)}},{key:"_decodeParams",value:function(t,e){return this._abiCoder.decode(t,e)}},{key:"_encodeParams",value:function(t,e){return this._abiCoder.encode(t,e)}},{key:"encodeDeploy",value:function(t){return this._encodeParams(this.deploy.inputs,t||[])}},{key:"decodeErrorResult",value:function(t,e){"string"==typeof t&&(t=this.getError(t));var r=Object(c.a)(e);return Object(c.i)(r.slice(0,4))!==this.getSighash(t)&&en.throwArgumentError("data signature does not match error ".concat(t.name,"."),"data",Object(c.i)(r)),this._decodeParams(t.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(t,e){return"string"==typeof t&&(t=this.getError(t)),Object(c.i)(Object(c.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}},{key:"decodeFunctionData",value:function(t,e){"string"==typeof t&&(t=this.getFunction(t));var r=Object(c.a)(e);return Object(c.i)(r.slice(0,4))!==this.getSighash(t)&&en.throwArgumentError("data signature does not match function ".concat(t.name,"."),"data",Object(c.i)(r)),this._decodeParams(t.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(t,e){return"string"==typeof t&&(t=this.getFunction(t)),Object(c.i)(Object(c.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}},{key:"decodeFunctionResult",value:function(t,e){"string"==typeof t&&(t=this.getFunction(t));var r=Object(c.a)(e),n=null,o="",i=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(l){}break;case 4:var u=Object(c.i)(r.slice(0,4)),f=sn[u];if(f)i=this._abiCoder.decode(f.inputs,r.slice(4)),a=f.name,s=f.signature,f.reason&&(n=i[0]),"Error"===a?o="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(i[0])):"Panic"===a&&(o="; VM Exception while processing transaction: reverted with panic code ".concat(i[0]));else try{var l=this.getError(u);i=this._abiCoder.decode(l.inputs,r.slice(4)),a=l.name,s=l.format()}catch(l){}}return en.throwError("call revert exception"+o,h.b.errors.CALL_EXCEPTION,{method:t.format(),data:Object(c.i)(e),errorArgs:i,errorName:a,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(t,e){return"string"==typeof t&&(t=this.getFunction(t)),Object(c.i)(this._abiCoder.encode(t.outputs,e||[]))}},{key:"encodeFilterTopics",value:function(t,e){var r=this;"string"==typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&en.throwError("too many arguments for "+t.format(),h.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});var n=[];t.anonymous||n.push(this.getEventTopic(t));var o=function(t,e){return"string"===t.type?Ot(e):"bytes"===t.type?Q(Object(c.i)(e)):("bool"===t.type&&"boolean"==typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=y.from(e).toHexString()),"address"===t.type&&r._abiCoder.encode(["address"],[e]),Object(c.h)(Object(c.i)(e),32))};for(e.forEach((function(e,r){var i=t.inputs[r];i.indexed?null==e?n.push(null):"array"===i.baseType||"tuple"===i.baseType?en.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,e):Array.isArray(e)?n.push(e.map((function(t){return o(i,t)}))):n.push(o(i,e)):null!=e&&en.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,e)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(t,e){var r=this;"string"==typeof t&&(t=this.getEvent(t));var n=[],o=[],i=[];return t.anonymous||n.push(this.getEventTopic(t)),e.length!==t.inputs.length&&en.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach((function(t,a){var s=e[a];if(t.indexed)if("string"===t.type)n.push(Ot(s));else if("bytes"===t.type)n.push(Q(s));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([t.type],[s]))}else o.push(t),i.push(s)})),{data:this._abiCoder.encode(o,i),topics:n}}},{key:"decodeEventLog",value:function(t,e,r){if("string"==typeof t&&(t=this.getEvent(t)),null!=r&&!t.anonymous){var n=this.getEventTopic(t);Object(c.l)(r[0],32)&&r[0].toLowerCase()===n||en.throwError("fragment/topic mismatch",h.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var o=[],i=[],a=[];t.inputs.forEach((function(t,e){t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(o.push(xr.fromObject({type:"bytes32",name:t.name})),a.push(!0)):(o.push(t),a.push(!1)):(i.push(t),a.push(!1))}));var s=null!=r?this._abiCoder.decode(o,Object(c.b)(r)):null,u=this._abiCoder.decode(i,e,!0),f=[],l=0,p=0;t.inputs.forEach((function(t,e){if(t.indexed)if(null==s)f[e]=new an({_isIndexed:!0,hash:null});else if(a[e])f[e]=new an({_isIndexed:!0,hash:s[p++]});else try{f[e]=s[p++]}catch(t){f[e]=t}else try{f[e]=u[l++]}catch(t){f[e]=t}if(t.name&&null==f[t.name]){var r=f[e];r instanceof Error?Object.defineProperty(f,t.name,{enumerable:!0,get:function(){throw un("property ".concat(JSON.stringify(t.name)),r)}}):f[t.name]=r}}));for(var d=function(t){var e=f[t];e instanceof Error&&Object.defineProperty(f,t,{enumerable:!0,get:function(){throw un("index ".concat(t),e)}})},m=0;m<f.length;m++)d(m);return Object.freeze(f)}},{key:"parseTransaction",value:function(t){var e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new nn({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:y.from(t.value||"0")}):null}},{key:"parseLog",value:function(t){var e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new rn({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}},{key:"parseError",value:function(t){var e=Object(c.i)(t),r=this.getError(e.substring(0,10).toLowerCase());return r?new on({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}}],[{key:"getAbiCoder",value:function(){return Kr}},{key:"getAddress",value:function(t){return ct(t)}},{key:"getSighash",value:function(t){return Object(c.e)(Ot(t.format()),0,4)}},{key:"getEventTopic",value:function(t){return Ot(t.format())}},{key:"isInterface",value:function(t){return!(!t||!t._isInterface)}}]),t}();function fn(t){return(fn="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 ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hn(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)}}function pn(t,e,r){return e&&hn(t.prototype,e),r&&hn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function dn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mn(t,e)}function mn(t,e){return(mn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yn(t);if(e){var o=yn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gn(this,r)}}function gn(t,e){if(e&&("object"===fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yn(t){return(yn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var bn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},wn=new h.b("abstract-provider/5.7.0"),kn=function(t){dn(r,t);var e=vn(r);function r(){return ln(this,r),e.apply(this,arguments)}return pn(r,null,[{key:"isForkEvent",value:function(t){return!(!t||!t._isForkEvent)}}]),r}(B),_n=function(){function t(){ln(this,t),wn.checkAbstract(this instanceof t?this.constructor:void 0,t),P(this,"_isProvider",!0)}return pn(t,[{key:"getFeeData",value:function(){return bn(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n,o,i,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((function(t){return null}))});case 2:return e=t.sent,r=e.block,n=e.gasPrice,o=null,i=null,a=null,r&&r.baseFeePerGas&&(o=r.baseFeePerGas,a=y.from("1500000000"),i=r.baseFeePerGas.mul(2).add(a)),t.abrupt("return",{lastBaseFeePerGas:o,maxFeePerGas:i,maxPriorityFeePerGas:a,gasPrice:n});case 8:case"end":return t.stop()}}),t,this)})))}},{key:"addListener",value:function(t,e){return this.on(t,e)}},{key:"removeListener",value:function(t,e){return this.off(t,e)}}],[{key:"isProvider",value:function(t){return!(!t||!t._isProvider)}}]),t}();function An(t){return(An="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 En(t,e){return(En=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pn(t);if(e){var o=Pn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return On(this,r)}}function On(t,e){if(e&&("object"===An(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Sn(t)}function Sn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pn(t){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Rn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tn(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)}}function jn(t,e,r){return e&&Tn(t.prototype,e),r&&Tn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var In=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Nn=new h.b("abstract-signer/5.7.0"),Cn=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Mn=[h.b.errors.INSUFFICIENT_FUNDS,h.b.errors.NONCE_EXPIRED,h.b.errors.REPLACEMENT_UNDERPRICED],Bn=function(){function t(){Rn(this,t),Nn.checkAbstract(this instanceof t?this.constructor:void 0,t),P(this,"_isSigner",!0)}return jn(t,[{key:"getBalance",value:function(t){return In(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getBalance"),e.next=3,this.provider.getBalance(this.getAddress(),t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"getTransactionCount",value:function(t){return In(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getTransactionCount"),e.next=3,this.provider.getTransactionCount(this.getAddress(),t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"estimateGas",value:function(t){return In(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("estimateGas"),e.next=3,T(this.checkTransaction(t));case 3:return r=e.sent,e.next=6,this.provider.estimateGas(r);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"call",value:function(t,e){return In(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this._checkProvider("call"),r.next=3,T(this.checkTransaction(t));case 3:return n=r.sent,r.next=6,this.provider.call(n,e);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"sendTransaction",value:function(t){return In(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("sendTransaction"),e.next=3,this.populateTransaction(t);case 3:return r=e.sent,e.next=6,this.signTransaction(r);case 6:return n=e.sent,e.next=9,this.provider.sendTransaction(n);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getChainId",value:function(){return In(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getChainId"),t.next=3,this.provider.getNetwork();case 3:return e=t.sent,t.abrupt("return",e.chainId);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getGasPrice",value:function(){return In(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getGasPrice"),t.next=3,this.provider.getGasPrice();case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getFeeData",value:function(){return In(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getFeeData"),t.next=3,this.provider.getFeeData();case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"resolveName",value:function(t){return In(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("resolveName"),e.next=3,this.provider.resolveName(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"checkTransaction",value:function(t){for(var e in t)-1===Cn.indexOf(e)&&Nn.throwArgumentError("invalid transaction key: "+e,"transaction",t);var r=I(t);return null==r.from?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then((function(e){return e[0].toLowerCase()!==e[1].toLowerCase()&&Nn.throwArgumentError("from address mismatch","transaction",t),e[0]})),r}},{key:"populateTransaction",value:function(t){return In(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o,i,a=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T(this.checkTransaction(t));case 2:if(null!=(r=e.sent).to&&(r.to=Promise.resolve(r.to).then((function(t){return In(a,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,this.resolveName(t);case 4:return null==(r=e.sent)&&Nn.throwArgumentError("provided ENS name resolves to null","tx.to",t),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})))})),r.to.catch((function(t){}))),n=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas,null==r.gasPrice||2!==r.type&&!n?0!==r.type&&1!==r.type||!n||Nn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t):Nn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas){e.next=10;break}r.type=2,e.next=18;break;case 10:if(0!==r.type&&1!==r.type){e.next=14;break}null==r.gasPrice&&(r.gasPrice=this.getGasPrice()),e.next=18;break;case 14:return e.next=16,this.getFeeData();case 16:o=e.sent,null==r.type?null!=o.maxFeePerGas&&null!=o.maxPriorityFeePerGas?(r.type=2,null!=r.gasPrice?(i=r.gasPrice,delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i):(null==r.maxFeePerGas&&(r.maxFeePerGas=o.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas))):null!=o.gasPrice?(n&&Nn.throwError("network does not support EIP-1559",h.b.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=o.gasPrice),r.type=0):Nn.throwError("failed to get consistent fee data",h.b.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"}):2===r.type&&(null==r.maxFeePerGas&&(r.maxFeePerGas=o.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas));case 18:return null==r.nonce&&(r.nonce=this.getTransactionCount("pending")),null==r.gasLimit&&(r.gasLimit=this.estimateGas(r).catch((function(t){if(Mn.indexOf(t.code)>=0)throw t;return Nn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:r})}))),null==r.chainId?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then((function(e){return 0!==e[1]&&e[0]!==e[1]&&Nn.throwArgumentError("chainId address mismatch","transaction",t),e[0]})),e.next=23,T(r);case 23:return e.abrupt("return",e.sent);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"_checkProvider",value:function(t){this.provider||Nn.throwError("missing provider",h.b.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}}],[{key:"isSigner",value:function(t){return!(!t||!t._isSigner)}}]),t}(),Fn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&En(t,e)}(r,t);var e=xn(r);function r(t,n){var o;return Rn(this,r),P(Sn(o=e.call(this)),"address",t),P(Sn(o),"provider",n||null),o}return jn(r,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(t,e){return Promise.resolve().then((function(){Nn.throwError(t,h.b.errors.UNSUPPORTED_OPERATION,{operation:e})}))}},{key:"signMessage",value:function(t){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(t){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(t,e,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(t){return new r(this.address,t)}}]),r}(Bn),Dn=r(32);function Un(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)}}var Ln=new h.b("signing-key/5.7.0"),zn=null;function qn(){return zn||(zn=new Dn.a("secp256k1")),zn}var Hn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"curve","secp256k1"),P(this,"privateKey",Object(c.i)(e)),32!==Object(c.d)(this.privateKey)&&Ln.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=qn().keyFromPrivate(Object(c.a)(this.privateKey));P(this,"publicKey","0x"+r.getPublic(!1,"hex")),P(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),P(this,"_isSigningKey",!0)}var e,r,n;return e=t,n=[{key:"isSigningKey",value:function(t){return!(!t||!t._isSigningKey)}}],(r=[{key:"_addPoint",value:function(t){var e=qn().keyFromPublic(Object(c.a)(this.publicKey)),r=qn().keyFromPublic(Object(c.a)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(t){var e=qn().keyFromPrivate(Object(c.a)(this.privateKey)),r=Object(c.a)(t);32!==r.length&&Ln.throwArgumentError("bad digest length","digest",t);var n=e.sign(r,{canonical:!0});return Object(c.n)({recoveryParam:n.recoveryParam,r:Object(c.h)("0x"+n.r.toString(16),32),s:Object(c.h)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(t){var e=qn().keyFromPrivate(Object(c.a)(this.privateKey)),r=qn().keyFromPublic(Object(c.a)(Kn(t)));return Object(c.h)("0x"+e.derive(r.getPublic()).toString(16),32)}}])&&Un(e.prototype,r),n&&Un(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Gn(t,e){var r=Object(c.n)(e),n={r:Object(c.a)(r.r),s:Object(c.a)(r.s)};return"0x"+qn().recoverPubKey(Object(c.a)(t),n,r.recoveryParam).encode("hex",!1)}function Kn(t,e){var r=Object(c.a)(t);if(32===r.length){var n=new Hn(r);return e?"0x"+qn().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?e?Object(c.i)(r):"0x"+qn().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+qn().keyFromPublic(r).getPublic(!0,"hex"):Object(c.i)(r):Ln.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Wn,Qn=new h.b("transactions/5.7.0");function Vn(t){return"0x"===t?null:ct(t)}function Jn(t){return"0x"===t?Ie:y.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(Wn||(Wn={}));var Yn=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Zn={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Xn(t){var e=Kn(t);return ct(Object(c.e)(Q(Object(c.e)(e,1)),12))}function $n(t,e){return Xn(Gn(Object(c.a)(t),e))}function to(t,e){var r=Object(c.o)(y.from(t).toHexString());return r.length>32&&Qn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function eo(t,e){return{address:ct(t),storageKeys:(e||[]).map((function(e,r){return 32!==Object(c.d)(e)&&Qn.throwArgumentError("invalid access list storageKey","accessList[".concat(t,":").concat(r,"]"),e),e.toLowerCase()}))}}function ro(t){if(Array.isArray(t))return t.map((function(t,e){return Array.isArray(t)?(t.length>2&&Qn.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(e,"]"),t),eo(t[0],t[1])):eo(t.address,t.storageKeys)}));var e=Object.keys(t).map((function(e){var r=t[e].reduce((function(t,e){return t[e]=!0,t}),{});return eo(e,Object.keys(r).sort())}));return e.sort((function(t,e){return t.address.localeCompare(e.address)})),e}function no(t){return ro(t).map((function(t){return[t.address,t.storageKeys]}))}function oo(t,e){if(null!=t.gasPrice){var r=y.from(t.gasPrice),n=y.from(t.maxFeePerGas||0);r.eq(n)||Qn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var o=[to(t.chainId||0,"chainId"),to(t.nonce||0,"nonce"),to(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),to(t.maxFeePerGas||0,"maxFeePerGas"),to(t.gasLimit||0,"gasLimit"),null!=t.to?ct(t.to):"0x",to(t.value||0,"value"),t.data||"0x",no(t.accessList||[])];if(e){var i=Object(c.n)(e);o.push(to(i.recoveryParam,"recoveryParam")),o.push(Object(c.o)(i.r)),o.push(Object(c.o)(i.s))}return Object(c.c)(["0x02",Z(o)])}function io(t,e){var r=[to(t.chainId||0,"chainId"),to(t.nonce||0,"nonce"),to(t.gasPrice||0,"gasPrice"),to(t.gasLimit||0,"gasLimit"),null!=t.to?ct(t.to):"0x",to(t.value||0,"value"),t.data||"0x",no(t.accessList||[])];if(e){var n=Object(c.n)(e);r.push(to(n.recoveryParam,"recoveryParam")),r.push(Object(c.o)(n.r)),r.push(Object(c.o)(n.s))}return Object(c.c)(["0x01",Z(r)])}function ao(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&Qn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){j(t,Zn);var r=[];Yn.forEach((function(e){var n=t[e.name]||[],o={};e.numeric&&(o.hexPad="left"),n=Object(c.a)(Object(c.i)(n,o)),e.length&&n.length!==e.length&&n.length>0&&Qn.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),e.maxLength&&(n=Object(c.o)(n)).length>e.maxLength&&Qn.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),r.push(Object(c.i)(n))}));var n=0;if(null!=t.chainId?"number"!=typeof(n=t.chainId)&&Qn.throwArgumentError("invalid transaction.chainId","transaction",t):e&&!Object(c.k)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),0!==n&&(r.push(Object(c.i)(n)),r.push("0x"),r.push("0x")),!e)return Z(r);var o=Object(c.n)(e),i=27+o.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),i+=2*n+8,o.v>28&&o.v!==i&&Qn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):o.v!==i&&Qn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Object(c.i)(i)),r.push(Object(c.o)(Object(c.a)(o.r))),r.push(Object(c.o)(Object(c.a)(o.s))),Z(r)}(t,e);switch(t.type){case 1:return io(t,e);case 2:return oo(t,e)}return Qn.throwError("unsupported transaction type: ".concat(t.type),h.b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function so(t,e,r){try{var n=Jn(e[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");t.v=n}catch(t){Qn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Object(c.h)(e[1],32),t.s=Object(c.h)(e[2],32);try{var o=Q(r(t));t.from=$n(o,{r:t.r,s:t.s,recoveryParam:t.v})}catch(t){}}function uo(t){var e=Object(c.a)(t);if(e[0]>127)return function(t){var e=tt(t);9!==e.length&&6!==e.length&&Qn.throwArgumentError("invalid raw transaction","rawTransaction",t);var r={nonce:Jn(e[0]).toNumber(),gasPrice:Jn(e[1]),gasLimit:Jn(e[2]),to:Vn(e[3]),value:Jn(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=y.from(e[6]).toNumber()}catch(t){return r}if(r.r=Object(c.h)(e[7],32),r.s=Object(c.h)(e[8],32),y.from(r.r).isZero()&&y.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,o=e.slice(0,6);0!==r.chainId&&(o.push(Object(c.i)(r.chainId)),o.push("0x"),o.push("0x"),n-=2*r.chainId+8);var i=Q(Z(o));try{r.from=$n(i,{r:Object(c.i)(r.r),s:Object(c.i)(r.s),recoveryParam:n})}catch(t){}r.hash=Q(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){var e=tt(t.slice(1));8!==e.length&&11!==e.length&&Qn.throwArgumentError("invalid component count for transaction type: 1","payload",Object(c.i)(t));var r={type:1,chainId:Jn(e[0]).toNumber(),nonce:Jn(e[1]).toNumber(),gasPrice:Jn(e[2]),gasLimit:Jn(e[3]),to:Vn(e[4]),value:Jn(e[5]),data:e[6],accessList:ro(e[7])};return 8===e.length||(r.hash=Q(t),so(r,e.slice(8),io)),r}(e);case 2:return function(t){var e=tt(t.slice(1));9!==e.length&&12!==e.length&&Qn.throwArgumentError("invalid component count for transaction type: 2","payload",Object(c.i)(t));var r=Jn(e[2]),n=Jn(e[3]),o={type:2,chainId:Jn(e[0]).toNumber(),nonce:Jn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Jn(e[4]),to:Vn(e[5]),value:Jn(e[6]),data:e[7],accessList:ro(e[8])};return 9===e.length||(o.hash=Q(t),so(o,e.slice(9),oo)),o}(e)}return Qn.throwError("unsupported transaction type: ".concat(e[0]),h.b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}function co(t){return function(t){if(Array.isArray(t))return fo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return fo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fo(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lo(){return(lo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ho(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function ho(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=bo(t)););return t}function po(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mo(t,e)}function mo(t,e){return(mo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=bo(t);if(e){var o=bo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return go(this,r)}}function go(t,e){if(e&&("object"===Ao(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return yo(t)}function yo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bo(t){return(bo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function wo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ko(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)}}function _o(t,e,r){return e&&ko(t.prototype,e),r&&ko(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ao(t){return(Ao="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)}var Eo=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},xo=new h.b("contracts/5.7.0"),Oo={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function So(t,e){return Eo(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e;case 2:return"string"!=typeof(n=r.sent)&&xo.throwArgumentError("invalid address or ENS name","name",n),r.prev=4,r.abrupt("return",ct(n));case 8:r.prev=8,r.t0=r.catch(4);case 10:return t||xo.throwError("a provider or signer is needed to resolve ENS names",h.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),r.next=13,t.resolveName(n);case 13:return null==(o=r.sent)&&xo.throwArgumentError("resolver or addr is not configured for ENS name","name",n),r.abrupt("return",o);case 16:case"end":return r.stop()}}),r,null,[[4,8]])})))}function Po(t,e,r){return Eo(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Array.isArray(r)){n.next=4;break}return n.next=3,Promise.all(r.map((function(r,n){return Po(t,Array.isArray(e)?e[n]:e[r.name],r)})));case 3:return n.abrupt("return",n.sent);case 4:if("address"!==r.type){n.next=8;break}return n.next=7,So(t,e);case 7:return n.abrupt("return",n.sent);case 8:if("tuple"!==r.type){n.next=12;break}return n.next=11,Po(t,e,r.components);case 11:return n.abrupt("return",n.sent);case 12:if("array"!==r.baseType){n.next=18;break}if(Array.isArray(e)){n.next=15;break}return n.abrupt("return",Promise.reject(xo.makeError("invalid value for array",h.b.errors.INVALID_ARGUMENT,{argument:"value",value:e})));case 15:return n.next=17,Promise.all(e.map((function(e){return Po(t,e,r.arrayChildren)})));case 17:return n.abrupt("return",n.sent);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),n)})))}function Ro(t,e,r){return Eo(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a,s,u,f,l,p,d,m,v=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o={},r.length===e.inputs.length+1&&"object"===Ao(r[r.length-1])&&(o=I(r.pop())),xo.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?o.from?o.from=T({override:So(t.signer,o.from),signer:t.signer.getAddress()}).then((function(t){return Eo(v,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ct(t.signer)!==t.override&&xo.throwError("Contract with a Signer cannot override from",h.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.abrupt("return",t.override);case 2:case"end":return e.stop()}}),e)})))})):o.from=t.signer.getAddress():o.from&&(o.from=So(t.provider,o.from)),n.next=6,T({args:Po(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:T(o)||{}});case 6:if(i=n.sent,a=t.interface.encodeFunctionData(e,i.args),s={data:a,to:i.address},null!=(u=i.overrides).nonce&&(s.nonce=y.from(u.nonce).toNumber()),null!=u.gasLimit&&(s.gasLimit=y.from(u.gasLimit)),null!=u.gasPrice&&(s.gasPrice=y.from(u.gasPrice)),null!=u.maxFeePerGas&&(s.maxFeePerGas=y.from(u.maxFeePerGas)),null!=u.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=y.from(u.maxPriorityFeePerGas)),null!=u.from&&(s.from=u.from),null!=u.type&&(s.type=u.type),null!=u.accessList&&(s.accessList=ro(u.accessList)),null==s.gasLimit&&null!=e.gas){for(f=21e3,l=Object(c.a)(a),p=0;p<l.length;p++)f+=4,l[p]&&(f+=64);s.gasLimit=y.from(e.gas).add(f)}return u.value&&((d=y.from(u.value)).isZero()||e.payable||xo.throwError("non-payable method cannot override value",h.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:o.value}),s.value=d),u.customData&&(s.customData=I(u.customData)),u.ccipReadEnabled&&(s.ccipReadEnabled=!!u.ccipReadEnabled),delete o.nonce,delete o.gasLimit,delete o.gasPrice,delete o.from,delete o.value,delete o.type,delete o.accessList,delete o.maxFeePerGas,delete o.maxPriorityFeePerGas,delete o.customData,delete o.ccipReadEnabled,(m=Object.keys(o).filter((function(t){return null!=o[t]}))).length&&xo.throwError("cannot override ".concat(m.map((function(t){return JSON.stringify(t)})).join(",")),h.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:m}),n.abrupt("return",s);case 36:case"end":return n.stop()}}),n)})))}function To(t,e){var r=e.wait.bind(e);e.wait=function(e){return r(e).then((function(e){return e.events=e.logs.map((function(r){var n=M(r),o=null;try{o=t.interface.parseLog(r)}catch(t){}return o&&(n.args=o.args,n.decode=function(e,r){return t.interface.decodeEventLog(o.eventFragment,e,r)},n.event=o.name,n.eventSignature=o.signature),n.removeListener=function(){return t.provider},n.getBlock=function(){return t.provider.getBlock(e.blockHash)},n.getTransaction=function(){return t.provider.getTransaction(e.transactionHash)},n.getTransactionReceipt=function(){return Promise.resolve(e)},n})),e}))}}function jo(t,e,r){var n=t.signer||t.provider;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Eo(this,void 0,void 0,regeneratorRuntime.mark((function o(){var a,s,u,c,f;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(a=void 0,i.length!==e.inputs.length+1||"object"!==Ao(i[i.length-1])){o.next=9;break}if(null==(s=I(i.pop())).blockTag){o.next=7;break}return o.next=6,s.blockTag;case 6:a=o.sent;case 7:delete s.blockTag,i.push(s);case 9:if(null==t.deployTransaction){o.next=12;break}return o.next=12,t._deployed(a);case 12:return o.next=14,Ro(t,e,i);case 14:return u=o.sent,o.next=17,n.call(u,a);case 17:return c=o.sent,o.prev=18,f=t.interface.decodeFunctionResult(e,c),r&&1===e.outputs.length&&(f=f[0]),o.abrupt("return",f);case 24:throw o.prev=24,o.t0=o.catch(18),o.t0.code===h.b.errors.CALL_EXCEPTION&&(o.t0.address=t.address,o.t0.args=i,o.t0.transaction=u),o.t0;case 28:case"end":return o.stop()}}),o,null,[[18,24]])})))}}function Io(t,e,r){return e.constant?jo(t,e,r):function(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Eo(this,void 0,void 0,regeneratorRuntime.mark((function r(){var o,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.signer||xo.throwError("sending a transaction requires a signer",h.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null==t.deployTransaction){r.next=4;break}return r.next=4,t._deployed();case 4:return r.next=6,Ro(t,e,n);case 6:return o=r.sent,r.next=9,t.signer.sendTransaction(o);case 9:return i=r.sent,To(t,i),r.abrupt("return",i);case 12:case"end":return r.stop()}}),r)})))}}(t,e)}function No(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.map((function(t){return Array.isArray(t)?t.join("|"):t})).join(":"):""):"*"}var Co=function(){function t(e,r){wo(this,t),P(this,"tag",e),P(this,"filter",r),this._listeners=[]}return _o(t,[{key:"addListener",value:function(t,e){this._listeners.push({listener:t,once:e})}},{key:"removeListener",value:function(t){var e=!1;this._listeners=this._listeners.filter((function(r){return!(!e&&r.listener===t)||(e=!0,!1)}))}},{key:"removeAllListeners",value:function(){this._listeners=[]}},{key:"listeners",value:function(){return this._listeners.map((function(t){return t.listener}))}},{key:"listenerCount",value:function(){return this._listeners.length}},{key:"run",value:function(t){var e=this,r=this.listenerCount();return this._listeners=this._listeners.filter((function(r){var n=t.slice();return setTimeout((function(){r.listener.apply(e,n)}),0),!r.once})),r}},{key:"prepareEvent",value:function(t){}},{key:"getEmit",value:function(t){return[t]}}]),t}(),Mo=function(t){po(r,t);var e=vo(r);function r(){return wo(this,r),e.call(this,"error",null)}return _o(r)}(Co),Bo=function(t){po(r,t);var e=vo(r);function r(t,n,o,i){var a;wo(this,r);var s={address:t},u=n.getEventTopic(o);return i?(u!==i[0]&&xo.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[u],P(yo(a=e.call(this,No(s),s)),"address",t),P(yo(a),"interface",n),P(yo(a),"fragment",o),a}return _o(r,[{key:"prepareEvent",value:function(t){var e=this;lo(bo(r.prototype),"prepareEvent",this).call(this,t),t.event=this.fragment.name,t.eventSignature=this.fragment.format(),t.decode=function(t,r){return e.interface.decodeEventLog(e.fragment,t,r)};try{t.args=this.interface.decodeEventLog(this.fragment,t.data,t.topics)}catch(e){t.args=null,t.decodeError=e}}},{key:"getEmit",value:function(t){var e=z(t.args);if(e.length)throw e[0].error;var r=(t.args||[]).slice();return r.push(t),r}}]),r}(Co),Fo=function(t){po(r,t);var e=vo(r);function r(t,n){var o;return wo(this,r),P(yo(o=e.call(this,"*",{address:t})),"address",t),P(yo(o),"interface",n),o}return _o(r,[{key:"prepareEvent",value:function(t){var e=this;lo(bo(r.prototype),"prepareEvent",this).call(this,t);try{var n=this.interface.parseLog(t);t.event=n.name,t.eventSignature=n.signature,t.decode=function(t,r){return e.interface.decodeEventLog(n.eventFragment,t,r)},t.args=n.args}catch(t){}}}]),r}(Co),Do=function(){function t(e,r,n){var o=this;wo(this,t),P(this,"interface",R(this instanceof t?this.constructor:void 0,"getInterface")(r)),null==n?(P(this,"provider",null),P(this,"signer",null)):Bn.isSigner(n)?(P(this,"provider",n.provider||null),P(this,"signer",n)):_n.isProvider(n)?(P(this,"provider",n),P(this,"signer",null)):xo.throwArgumentError("invalid signer or provider","signerOrProvider",n),P(this,"callStatic",{}),P(this,"estimateGas",{}),P(this,"functions",{}),P(this,"populateTransaction",{}),P(this,"filters",{});var i={};if(Object.keys(this.interface.events).forEach((function(t){var e=o.interface.events[t];P(o.filters,t,(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return{address:o.address,topics:o.interface.encodeFilterTopics(e,r)}})),i[e.name]||(i[e.name]=[]),i[e.name].push(t)})),Object.keys(i).forEach((function(t){var e=i[t];1===e.length?P(o.filters,t,o.filters[e[0]]):xo.warn("Duplicate definition of ".concat(t," (").concat(e.join(", "),")"))})),P(this,"_runningEvents",{}),P(this,"_wrappedEmits",{}),null==e&&xo.throwArgumentError("invalid contract address or ENS name","addressOrName",e),P(this,"address",e),this.provider)P(this,"resolvedAddress",So(this.provider,e));else try{P(this,"resolvedAddress",Promise.resolve(ct(e)))}catch(t){xo.throwError("provider is required to use ENS name as contract address",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((function(t){}));var a={},s={};Object.keys(this.interface.functions).forEach((function(t){var e=o.interface.functions[t];if(s[t])xo.warn("Duplicate ABI entry for ".concat(JSON.stringify(t)));else{s[t]=!0;var r=e.name;a["%".concat(r)]||(a["%".concat(r)]=[]),a["%".concat(r)].push(t),null==o[t]&&P(o,t,Io(o,e,!0)),null==o.functions[t]&&P(o.functions,t,Io(o,e,!1)),null==o.callStatic[t]&&P(o.callStatic,t,jo(o,e,!0)),null==o.populateTransaction[t]&&P(o.populateTransaction,t,function(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Ro(t,e,n)}}(o,e)),null==o.estimateGas[t]&&P(o.estimateGas,t,function(t,e){var r=t.signer||t.provider;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Eo(this,void 0,void 0,regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r||xo.throwError("estimate require a provider or signer",h.b.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"}),n.next=3,Ro(t,e,o);case 3:return i=n.sent,n.next=6,r.estimateGas(i);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n)})))}}(o,e))}})),Object.keys(a).forEach((function(t){var e=a[t];if(!(e.length>1)){t=t.substring(1);var r=e[0];try{null==o[t]&&P(o,t,o[r])}catch(t){}null==o.functions[t]&&P(o.functions,t,o.functions[r]),null==o.callStatic[t]&&P(o.callStatic,t,o.callStatic[r]),null==o.populateTransaction[t]&&P(o.populateTransaction,t,o.populateTransaction[r]),null==o.estimateGas[t]&&P(o.estimateGas,t,o.estimateGas[r])}}))}return _o(t,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(t){var e=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return e})):this._deployedPromise=this.provider.getCode(this.address,t).then((function(t){return"0x"===t&&xo.throwError("contract not deployed",h.b.errors.UNSUPPORTED_OPERATION,{contractAddress:e.address,operation:"getDeployed"}),e}))),this._deployedPromise}},{key:"fallback",value:function(t){var e=this;this.signer||xo.throwError("sending a transactions require a signer",h.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=I(t||{});return["from","to"].forEach((function(t){null!=r[t]&&xo.throwError("cannot override "+t,h.b.errors.UNSUPPORTED_OPERATION,{operation:t})})),r.to=this.resolvedAddress,this.deployed().then((function(){return e.signer.sendTransaction(r)}))}},{key:"connect",value:function(t){"string"==typeof t&&(t=new Fn(t,this.provider));var e=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&P(e,"deployTransaction",this.deployTransaction),e}},{key:"attach",value:function(t){return new this.constructor(t,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t}},{key:"_getRunningEvent",value:function(t){if("string"==typeof t){if("error"===t)return this._normalizeRunningEvent(new Mo);if("event"===t)return this._normalizeRunningEvent(new Co("event",null));if("*"===t)return this._normalizeRunningEvent(new Fo(this.address,this.interface));var e=this.interface.getEvent(t);return this._normalizeRunningEvent(new Bo(this.address,this.interface,e))}if(t.topics&&t.topics.length>0){try{var r=t.topics[0];if("string"!=typeof r)throw new Error("invalid topic");var n=this.interface.getEvent(r);return this._normalizeRunningEvent(new Bo(this.address,this.interface,n,t.topics))}catch(t){}var o={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new Co(No(o),o))}return this._normalizeRunningEvent(new Fo(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(t){if(0===t.listenerCount()){delete this._runningEvents[t.tag];var e=this._wrappedEmits[t.tag];e&&t.filter&&(this.provider.off(t.filter,e),delete this._wrappedEmits[t.tag])}}},{key:"_wrapEvent",value:function(t,e,r){var n=this,o=M(e);return o.removeListener=function(){r&&(t.removeListener(r),n._checkRunningEvents(t))},o.getBlock=function(){return n.provider.getBlock(e.blockHash)},o.getTransaction=function(){return n.provider.getTransaction(e.transactionHash)},o.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(e.transactionHash)},t.prepareEvent(o),o}},{key:"_addEventListener",value:function(t,e,r){var n=this;if(this.provider||xo.throwError("events require a provider or a signer with a provider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(e,r),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){var o=function(r){var o=n._wrapEvent(t,r,e);if(null==o.decodeError)try{var i=t.getEmit(o);n.emit.apply(n,[t.filter].concat(co(i)))}catch(t){o.decodeError=t.error}null!=t.filter&&n.emit("event",o),null!=o.decodeError&&n.emit("error",o.decodeError,o)};this._wrappedEmits[t.tag]=o,null!=t.filter&&this.provider.on(t.filter,o)}}},{key:"queryFilter",value:function(t,e,r){var n=this,o=this._getRunningEvent(t),i=I(o.filter);return"string"==typeof e&&Object(c.l)(e,32)?(null!=r&&xo.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=e):(i.fromBlock=null!=e?e:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((function(t){return t.map((function(t){return n._wrapEvent(o,t,null)}))}))}},{key:"on",value:function(t,e){return this._addEventListener(this._getRunningEvent(t),e,!1),this}},{key:"once",value:function(t,e){return this._addEventListener(this._getRunningEvent(t),e,!0),this}},{key:"emit",value:function(t){if(!this.provider)return!1;for(var e=this._getRunningEvent(t),r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=e.run(n)>0;return this._checkRunningEvents(e),i}},{key:"listenerCount",value:function(t){var e=this;return this.provider?null==t?Object.keys(this._runningEvents).reduce((function(t,r){return t+e._runningEvents[r].listenerCount()}),0):this._getRunningEvent(t).listenerCount():0}},{key:"listeners",value:function(t){var e=this;if(!this.provider)return[];if(null==t){var r=function(){var t=[];for(var r in e._runningEvents)e._runningEvents[r].listeners().forEach((function(e){t.push(e)}));return{v:t}}();if("object"===Ao(r))return r.v}return this._getRunningEvent(t).listeners()}},{key:"removeAllListeners",value:function(t){if(!this.provider)return this;if(null==t){for(var e in this._runningEvents){var r=this._runningEvents[e];r.removeAllListeners(),this._checkRunningEvents(r)}return this}var n=this._getRunningEvent(t);return n.removeAllListeners(),this._checkRunningEvents(n),this}},{key:"off",value:function(t,e){if(!this.provider)return this;var r=this._getRunningEvent(t);return r.removeListener(e),this._checkRunningEvents(r),this}},{key:"removeListener",value:function(t,e){return this.off(t,e)}}],[{key:"getContractAddress",value:function(t){return ht(t)}},{key:"getInterface",value:function(t){return cn.isInterface(t)?t:new cn(t)}},{key:"isIndexed",value:function(t){return an.isIndexed(t)}}]),t}(),Uo=function(t){po(r,t);var e=vo(r);function r(){return wo(this,r),e.apply(this,arguments)}return _o(r)}(Do),Lo=function(){function t(e,r,n){wo(this,t);var o=null;"0x"!==(o="string"==typeof r?r:Object(c.j)(r)?Object(c.i)(r):r&&"string"==typeof r.object?r.object:"!").substring(0,2)&&(o="0x"+o),(!Object(c.l)(o)||o.length%2)&&xo.throwArgumentError("invalid bytecode","bytecode",r),n&&!Bn.isSigner(n)&&xo.throwArgumentError("invalid signer","signer",n),P(this,"bytecode",o),P(this,"interface",R(this instanceof t?this.constructor:void 0,"getInterface")(e)),P(this,"signer",n||null)}return _o(t,[{key:"getDeployTransaction",value:function(){for(var t={},e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(r.length===this.interface.deploy.inputs.length+1&&"object"===Ao(r[r.length-1]))for(var o in t=I(r.pop()))if(!Oo[o])throw new Error("unknown transaction override "+o);if(["data","from","to"].forEach((function(e){null!=t[e]&&xo.throwError("cannot override "+e,h.b.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value){var i=y.from(t.value);i.isZero()||this.interface.deploy.payable||xo.throwError("non-payable constructor cannot override value",h.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return xo.checkArgumentCount(r.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=Object(c.i)(Object(c.b)([this.bytecode,this.interface.encodeDeploy(r)])),t}},{key:"deploy",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Eo(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,n,o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},e.length===this.interface.deploy.inputs.length+1&&(r=e.pop()),xo.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.next=5,Po(this.signer,e,this.interface.deploy.inputs);case 5:return(n=t.sent).push(r),o=this.getDeployTransaction.apply(this,co(n)),t.next=10,this.signer.sendTransaction(o);case 10:return i=t.sent,a=R(this.constructor,"getContractAddress")(i),To(s=R(this.constructor,"getContract")(a,this.interface,this.signer),i),P(s,"deployTransaction",i),t.abrupt("return",s);case 16:case"end":return t.stop()}}),t,this)})))}},{key:"attach",value:function(t){return this.constructor.getContract(t,this.interface,this.signer)}},{key:"connect",value:function(t){return new this.constructor(this.interface,this.bytecode,t)}}],[{key:"fromSolidity",value:function(t,e){null==t&&xo.throwError("missing compiler output",h.b.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof t&&(t=JSON.parse(t));var r=t.abi,n=null;return t.bytecode?n=t.bytecode:t.evm&&t.evm.bytecode&&(n=t.evm.bytecode),new this(r,n,e)}},{key:"getInterface",value:function(t){return Uo.getInterface(t)}},{key:"getContractAddress",value:function(t){return ht(t)}},{key:"getContract",value:function(t,e,r){return new Uo(t,e,r)}}]),t}();function zo(t){return(zo="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 qo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ho(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)}}function Go(t,e,r){return e&&Ho(t.prototype,e),r&&Ho(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var Ko=new h.b("bignumber/5.7.0"),Wo={},Qo=y.from(0),Vo=y.from(-1);function Jo(t,e,r,n){var o={fault:e,operation:r};return void 0!==n&&(o.value=n),Ko.throwError(t,h.b.errors.NUMERIC_FAULT,o)}for(var Yo="0";Yo.length<256;)Yo+=Yo;function Zo(t){if("number"!=typeof t)try{t=y.from(t).toNumber()}catch(t){}return"number"==typeof t&&t>=0&&t<=256&&!(t%1)?"1"+Yo.substring(0,t):Ko.throwArgumentError("invalid decimal size","decimals",t)}function Xo(t,e){null==e&&(e=0);var r=Zo(e),n=(t=y.from(t)).lt(Qo);n&&(t=t.mul(Vo));for(var o=t.mod(r).toString();o.length<r.length-1;)o="0"+o;o=o.match(/^([0-9]*[1-9]|0)(0*)/)[1];var i=t.div(r).toString();return t=1===r.length?i:i+"."+o,n&&(t="-"+t),t}function $o(t,e){null==e&&(e=0);var r=Zo(e);"string"==typeof t&&t.match(/^-?[0-9.]+$/)||Ko.throwArgumentError("invalid decimal value","value",t);var n="-"===t.substring(0,1);n&&(t=t.substring(1)),"."===t&&Ko.throwArgumentError("missing value","value",t);var o=t.split(".");o.length>2&&Ko.throwArgumentError("too many decimal points","value",t);var i=o[0],a=o[1];for(i||(i="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&Jo("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length<r.length-1;)a+="0";var s=y.from(i),u=y.from(a),c=s.mul(r).add(u);return n&&(c=c.mul(Vo)),c}var ti=function(){function t(e,r,n,o){qo(this,t),e!==Wo&&Ko.throwError("cannot use FixedFormat constructor; use FixedFormat.from",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=r,this.width=n,this.decimals=o,this.name=(r?"":"u")+"fixed"+String(n)+"x"+String(o),this._multiplier=Zo(o),Object.freeze(this)}return Go(t,null,[{key:"from",value:function(e){if(e instanceof t)return e;"number"==typeof e&&(e="fixed128x".concat(e));var r=!0,n=128,o=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)r=!1;else{var i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||Ko.throwArgumentError("invalid fixed format","format",e),r="u"!==i[1],n=parseInt(i[2]),o=parseInt(i[3])}else if(e){var a=function(t,r,n){return null==e[t]?n:(zo(e[t])!==r&&Ko.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t])};r=a("signed","boolean",r),n=a("width","number",n),o=a("decimals","number",o)}return n%8&&Ko.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),o>80&&Ko.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new t(Wo,r,n,o)}}]),t}(),ei=function(){function t(e,r,n,o){qo(this,t),e!==Wo&&Ko.throwError("cannot use FixedNumber constructor; use FixedNumber.from",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=o,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return Go(t,[{key:"_checkFormat",value:function(t){this.format.name!==t.format.name&&Ko.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}},{key:"addUnsafe",value:function(e){this._checkFormat(e);var r=$o(this._value,this.format.decimals),n=$o(e._value,e.format.decimals);return t.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(e){this._checkFormat(e);var r=$o(this._value,this.format.decimals),n=$o(e._value,e.format.decimals);return t.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(e){this._checkFormat(e);var r=$o(this._value,this.format.decimals),n=$o(e._value,e.format.decimals);return t.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(e){this._checkFormat(e);var r=$o(this._value,this.format.decimals),n=$o(e._value,e.format.decimals);return t.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var e=this.toString().split(".");1===e.length&&e.push("0");var r=t.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(ri.toFormat(r.format))),r}},{key:"ceiling",value:function(){var e=this.toString().split(".");1===e.length&&e.push("0");var r=t.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(ri.toFormat(r.format))),r}},{key:"round",value:function(e){null==e&&(e=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(e<0||e>80||e%1)&&Ko.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;var n=t.from("1"+Yo.substring(0,e),this.format),o=ni.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(o).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(t){if(null==t)return this._hex;t%8&&Ko.throwArgumentError("invalid byte width","width",t);var e=y.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString();return Object(c.h)(e,t/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(e){return t.fromString(this._value,e)}}],[{key:"fromValue",value:function(e,r,n){return null!=n||null==r||function(t){return null!=t&&(y.isBigNumber(t)||"number"==typeof t&&t%1==0||"string"==typeof t&&!!t.match(/^-?[0-9]+$/)||Object(c.l)(t)||"bigint"==typeof t||Object(c.j)(t))}(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),t.fromString(Xo(e,r),ti.from(n))}},{key:"fromString",value:function(e,r){null==r&&(r="fixed");var n=ti.from(r),o=$o(e,n.decimals);!n.signed&&o.lt(Qo)&&Jo("unsigned value cannot be negative","overflow","value",e);var i=null;n.signed?i=o.toTwos(n.width).toHexString():(i=o.toHexString(),i=Object(c.h)(i,n.width/8));var a=Xo(o,n.decimals);return new t(Wo,i,a,n)}},{key:"fromBytes",value:function(e,r){null==r&&(r="fixed");var n=ti.from(r);if(Object(c.a)(e).length>n.width/8)throw new Error("overflow");var o=y.from(e);n.signed&&(o=o.fromTwos(n.width));var i=o.toTwos((n.signed?0:1)+n.width).toHexString(),a=Xo(o,n.decimals);return new t(Wo,i,a,n)}},{key:"from",value:function(e,r){if("string"==typeof e)return t.fromString(e,r);if(Object(c.j)(e))return t.fromBytes(e,r);try{return t.fromValue(e,0,r)}catch(t){if(t.code!==h.b.errors.INVALID_ARGUMENT)throw t}return Ko.throwArgumentError("invalid FixedNumber value","value",e)}},{key:"isFixedNumber",value:function(t){return!(!t||!t._isFixedNumber)}}]),t}(),ri=ei.from(1),ni=ei.from("0.5");function oi(t){return"string"==typeof t&&(t=wt(t)),Q(Object(c.b)([wt("Ethereum Signed Message:\n"),wt(String(t.length)),t]))}function ii(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)}}var ai=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},si=new h.b("hash/5.7.0"),ui=new Uint8Array(32);ui.fill(0);var ci=y.from(-1),fi=y.from(0),li=y.from(1),hi=y.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var pi=Object(c.h)(li.toHexString(),32),di=Object(c.h)(fi.toHexString(),32),mi={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},vi=["name","version","chainId","verifyingContract","salt"];function gi(t){return function(e){return"string"!=typeof e&&si.throwArgumentError("invalid domain value for ".concat(JSON.stringify(t)),"domain.".concat(t),e),e}}var yi={name:gi("name"),version:gi("version"),chainId:function(t){try{return y.from(t).toString()}catch(t){}return si.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return ct(t).toLowerCase()}catch(t){}return si.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{var e=Object(c.a)(t);if(32!==e.length)throw new Error("bad length");return Object(c.i)(e)}catch(t){}return si.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function bi(t){var e=t.match(/^(u?)int(\d*)$/);if(e){var r=""===e[1],n=parseInt(e[2]||"256");(n%8!=0||n>256||e[2]&&e[2]!==String(n))&&si.throwArgumentError("invalid numeric width","type",t);var o=hi.mask(r?n-1:n),i=r?o.add(li).mul(ci):fi;return function(e){var r=y.from(e);return(r.lt(i)||r.gt(o))&&si.throwArgumentError("value out-of-bounds for ".concat(t),"value",e),Object(c.h)(r.toTwos(256).toHexString(),32)}}var a=t.match(/^bytes(\d+)$/);if(a){var s=parseInt(a[1]);return(0===s||s>32||a[1]!==String(s))&&si.throwArgumentError("invalid bytes width","type",t),function(e){return Object(c.a)(e).length!==s&&si.throwArgumentError("invalid length for ".concat(t),"value",e),function(t){var e=Object(c.a)(t),r=e.length%32;return r?Object(c.c)([e,ui.slice(r)]):Object(c.i)(e)}(e)}}switch(t){case"address":return function(t){return Object(c.h)(ct(t),32)};case"bool":return function(t){return t?pi:di};case"bytes":return function(t){return Q(t)};case"string":return function(t){return Ot(t)}}return null}function wi(t,e){return"".concat(t,"(").concat(e.map((function(t){var e=t.name;return t.type+" "+e})).join(","),")")}var ki=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"types",Object.freeze(M(e))),P(this,"_encoderCache",{}),P(this,"_types",{});var r={},n={},o={};Object.keys(e).forEach((function(t){r[t]={},n[t]=[],o[t]={}}));var i=function(t){var o={};e[t].forEach((function(i){o[i.name]&&si.throwArgumentError("duplicate variable name ".concat(JSON.stringify(i.name)," in ").concat(JSON.stringify(t)),"types",e),o[i.name]=!0;var a=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===t&&si.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",e),bi(a)||(n[a]||si.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",e),n[a].push(t),r[t][a]=!0)}))};for(var a in e)i(a);var s=Object.keys(n).filter((function(t){return 0===n[t].length}));for(var u in 0===s.length?si.throwArgumentError("missing primary type","types",e):s.length>1&&si.throwArgumentError("ambiguous primary types or unused types: ".concat(s.map((function(t){return JSON.stringify(t)})).join(", ")),"types",e),P(this,"primaryType",s[0]),function t(i,a){a[i]&&si.throwArgumentError("circular type reference to ".concat(JSON.stringify(i)),"types",e),a[i]=!0,Object.keys(r[i]).forEach((function(e){n[e]&&(t(e,a),Object.keys(a).forEach((function(t){o[t][e]=!0})))})),delete a[i]}(this.primaryType,{}),o){var c=Object.keys(o[u]);c.sort(),this._types[u]=wi(u,e[u])+c.map((function(t){return wi(t,e[t])})).join("")}}var e,r,n;return e=t,n=[{key:"from",value:function(e){return new t(e)}},{key:"getPrimaryType",value:function(e){return t.from(e).primaryType}},{key:"hashStruct",value:function(e,r,n){return t.from(r).hashStruct(e,n)}},{key:"hashDomain",value:function(e){var r=[];for(var n in e){var o=mi[n];o||si.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",e),r.push({name:n,type:o})}return r.sort((function(t,e){return vi.indexOf(t.name)-vi.indexOf(e.name)})),t.hashStruct("EIP712Domain",{EIP712Domain:r},e)}},{key:"encode",value:function(e,r,n){return Object(c.c)(["0x1901",t.hashDomain(e),t.from(r).hash(n)])}},{key:"hash",value:function(e,r,n){return Q(t.encode(e,r,n))}},{key:"resolveNames",value:function(e,r,n,o){return ai(this,void 0,void 0,regeneratorRuntime.mark((function i(){var a,s,u;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:e=I(e),a={},e.verifyingContract&&!Object(c.l)(e.verifyingContract,20)&&(a[e.verifyingContract]="0x"),(s=t.from(r)).visit(n,(function(t,e){return"address"!==t||Object(c.l)(e,20)||(a[e]="0x"),e})),i.t0=regeneratorRuntime.keys(a);case 6:if((i.t1=i.t0()).done){i.next=13;break}return u=i.t1.value,i.next=10,o(u);case 10:a[u]=i.sent,i.next=6;break;case 13:return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(function(t,e){return"address"===t&&a[e]?a[e]:e})),i.abrupt("return",{domain:e,value:n});case 16:case"end":return i.stop()}}),i)})))}},{key:"getPayload",value:function(e,r,n){t.hashDomain(e);var o={},i=[];vi.forEach((function(t){var r=e[t];null!=r&&(o[t]=yi[t](r),i.push({name:t,type:mi[t]}))}));var a=t.from(r),s=I(r);return s.EIP712Domain?si.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=i,a.encode(n),{types:s,domain:o,primaryType:a.primaryType,message:a.visit(n,(function(t,e){if(t.match(/^bytes(\d*)/))return Object(c.i)(Object(c.a)(e));if(t.match(/^u?int/))return y.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!=typeof e&&si.throwArgumentError("invalid string","value",e),e}return si.throwArgumentError("unsupported type","type",t)}))}}}],(r=[{key:"getEncoder",value:function(t){var e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}},{key:"_getEncoder",value:function(t){var e=this,r=bi(t);if(r)return r;var n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var o=n[1],i=this.getEncoder(o),a=parseInt(n[3]);return function(t){a>=0&&t.length!==a&&si.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);var r=t.map(i);return e._types[o]&&(r=r.map(Q)),Q(Object(c.c)(r))}}var s=this.types[t];if(s){var u=Ot(this._types[t]);return function(t){var r=s.map((function(r){var n=r.name,o=r.type,i=e.getEncoder(o)(t[n]);return e._types[o]?Q(i):i}));return r.unshift(u),Object(c.c)(r)}}return si.throwArgumentError("unknown type: ".concat(t),"type",t)}},{key:"encodeType",value:function(t){var e=this._types[t];return e||si.throwArgumentError("unknown type: ".concat(JSON.stringify(t)),"name",t),e}},{key:"encodeData",value:function(t,e){return this.getEncoder(t)(e)}},{key:"hashStruct",value:function(t,e){return Q(this.encodeData(t,e))}},{key:"encode",value:function(t){return this.encodeData(this.primaryType,t)}},{key:"hash",value:function(t){return this.hashStruct(this.primaryType,t)}},{key:"_visit",value:function(t,e,r){var n=this;if(bi(t))return r(t,e);var o=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(o){var i=o[1],a=parseInt(o[3]);return a>=0&&e.length!==a&&si.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((function(t){return n._visit(i,t,r)}))}var s=this.types[t];return s?s.reduce((function(t,o){var i=o.name,a=o.type;return t[i]=n._visit(a,e[i],r),t}),{}):si.throwArgumentError("unknown type: ".concat(t),"type",t)}},{key:"visit",value:function(t,e){return this._visit(this.primaryType,t,e)}}])&&ii(e.prototype,r),n&&ii(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function _i(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)}}var Ai,Ei=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"alphabet",e),P(this,"base",e.length),P(this,"_alphabetMap",{}),P(this,"_leader",e.charAt(0));for(var r=0;r<e.length;r++)this._alphabetMap[e.charAt(r)]=r}var e,r,n;return e=t,(r=[{key:"encode",value:function(t){var e=Object(c.a)(t);if(0===e.length)return"";for(var r=[0],n=0;n<e.length;++n){for(var o=e[n],i=0;i<r.length;++i)o+=r[i]<<8,r[i]=o%this.base,o=o/this.base|0;for(;o>0;)r.push(o%this.base),o=o/this.base|0}for(var a="",s=0;0===e[s]&&s<e.length-1;++s)a+=this._leader;for(var u=r.length-1;u>=0;--u)a+=this.alphabet[r[u]];return a}},{key:"decode",value:function(t){if("string"!=typeof t)throw new TypeError("Expected String");var e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(var r=0;r<t.length;r++){var n=this._alphabetMap[t[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");for(var o=n,i=0;i<e.length;++i)o+=e[i]*this.base,e[i]=255&o,o>>=8;for(;o>0;)e.push(255&o),o>>=8}for(var a=0;t[a]===this._leader&&a<t.length-1;++a)e.push(0);return Object(c.a)(new Uint8Array(e.reverse()))}}])&&_i(e.prototype,r),n&&_i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),xi=(new Ei("abcdefghijklmnopqrstuvwxyz234567"),new Ei("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),Oi=r(4),Si=r.n(Oi);!function(t){t.sha256="sha256",t.sha512="sha512"}(Ai||(Ai={}));var Pi=new h.b("sha2/5.7.0");function Ri(t){return"0x"+Si.a.ripemd160().update(Object(c.a)(t)).digest("hex")}function Ti(t){return"0x"+Si.a.sha256().update(Object(c.a)(t)).digest("hex")}function ji(t){return"0x"+Si.a.sha512().update(Object(c.a)(t)).digest("hex")}function Ii(t,e,r){return Ai[t]||Pi.throwError("unsupported algorithm "+t,h.b.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),"0x"+Si.a.hmac(Si.a[t],Object(c.a)(e)).update(Object(c.a)(r)).digest("hex")}function Ni(t,e,r,n,o){var i;t=Object(c.a)(t),e=Object(c.a)(e);var a,s,u=1,f=new Uint8Array(n),l=new Uint8Array(e.length+4);l.set(e);for(var h=1;h<=u;h++){l[e.length]=h>>24&255,l[e.length+1]=h>>16&255,l[e.length+2]=h>>8&255,l[e.length+3]=255&h;var p=Object(c.a)(Ii(o,t,l));i||(i=p.length,s=new Uint8Array(i),a=n-((u=Math.ceil(n/i))-1)*i),s.set(p);for(var d=1;d<r;d++){p=Object(c.a)(Ii(o,t,p));for(var m=0;m<i;m++)s[m]^=p[m]}var v=(h-1)*i,g=h===u?a:i;f.set(Object(c.a)(s).slice(0,g),v)}return Object(c.i)(f)}function Ci(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)}}var Mi=new h.b("wordlists/5.7.0"),Bi=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Mi.checkAbstract(this instanceof t?this.constructor:void 0,t),P(this,"locale",e)}var e,r,n;return e=t,n=[{key:"check",value:function(t){for(var e=[],r=0;r<2048;r++){var n=t.getWord(r);if(r!==t.getWordIndex(n))return"0x";e.push(n)}return Ot(e.join("\n")+"\n")}},{key:"register",value:function(t,e){e||(e=t.locale)}}],(r=[{key:"split",value:function(t){return t.toLowerCase().split(/ +/g)}},{key:"join",value:function(t){return t.join(" ")}}])&&Ci(e.prototype,r),n&&Ci(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Fi(t){return(Fi="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 Di(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)}}function Ui(t,e){return(Ui=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Li(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=qi(t);if(e){var o=qi(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zi(this,r)}}function zi(t,e){if(e&&("object"===Fi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function qi(t){return(qi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Hi=null;function Gi(t){if(null==Hi&&(Hi="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==Bi.check(t)))throw Hi=null,new Error("BIP39 Wordlist for en (English) FAILED")}var Ki=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ui(t,e)}(i,t);var e,r,n,o=Li(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"en")}return e=i,(r=[{key:"getWord",value:function(t){return Gi(this),Hi[t]}},{key:"getWordIndex",value:function(t){return Gi(this),Hi.indexOf(t)}}])&&Di(e.prototype,r),n&&Di(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Bi));Bi.register(Ki);var Wi={en:Ki};function Qi(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)}}var Vi=new h.b("hdnode/5.7.0"),Ji=y.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Yi=wt("Bitcoin seed");function Zi(t){return(1<<t)-1<<8-t}function Xi(t){return Object(c.h)(Object(c.i)(t),32)}function $i(t){return xi.encode(Object(c.b)([t,Object(c.e)(Ti(Ti(t)),0,4)]))}function ta(t){if(null==t)return Wi.en;if("string"==typeof t){var e=Wi[t];return null==e&&Vi.throwArgumentError("unknown locale","wordlist",t),e}return t}var ea={},ra="m/44'/60'/0'/0/0",na=function(){function t(e,r,n,o,i,a,s,u){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e!==ea)throw new Error("HDNode constructor cannot be called directly");if(r){var f=new Hn(r);P(this,"privateKey",f.privateKey),P(this,"publicKey",f.compressedPublicKey)}else P(this,"privateKey",null),P(this,"publicKey",Object(c.i)(n));P(this,"parentFingerprint",o),P(this,"fingerprint",Object(c.e)(Ri(Ti(this.publicKey)),0,4)),P(this,"address",Xn(this.publicKey)),P(this,"chainCode",i),P(this,"index",a),P(this,"depth",s),null==u?(P(this,"mnemonic",null),P(this,"path",null)):"string"==typeof u?(P(this,"mnemonic",null),P(this,"path",u)):(P(this,"mnemonic",u),P(this,"path",u.path))}var e,r,n;return e=t,n=[{key:"_fromSeed",value:function(e,r){var n=Object(c.a)(e);if(n.length<16||n.length>64)throw new Error("invalid seed");var o=Object(c.a)(Ii(Ai.sha512,Yi,n));return new t(ea,Xi(o.slice(0,32)),null,"0x00000000",Xi(o.slice(32)),0,0,r)}},{key:"fromMnemonic",value:function(e,r,n){return e=aa(ia(e,n=ta(n)),n),t._fromSeed(oa(e,r),{phrase:e,path:"m",locale:n.locale})}},{key:"fromSeed",value:function(e){return t._fromSeed(e,null)}},{key:"fromExtendedKey",value:function(e){var r=xi.decode(e);82===r.length&&$i(r.slice(0,78))===e||Vi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var n=r[4],o=Object(c.i)(r.slice(5,9)),i=parseInt(Object(c.i)(r.slice(9,13)).substring(2),16),a=Object(c.i)(r.slice(13,45)),s=r.slice(45,78);switch(Object(c.i)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new t(ea,null,Object(c.i)(s),o,a,i,n,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new t(ea,Object(c.i)(s.slice(1)),null,o,a,i,n,null)}return Vi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}],(r=[{key:"extendedKey",get:function(){if(this.depth>=256)throw new Error("Depth too large!");return $i(Object(c.b)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(c.i)(this.depth),this.parentFingerprint,Object(c.h)(Object(c.i)(this.index),4),this.chainCode,null!=this.privateKey?Object(c.b)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new t(ea,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(e){if(e>4294967295)throw new Error("invalid index - "+String(e));var r=this.path;r&&(r+="/"+(2147483647&e));var n=new Uint8Array(37);if(2147483648&e){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Object(c.a)(this.privateKey),1),r&&(r+="'")}else n.set(Object(c.a)(this.publicKey));for(var o=24;o>=0;o-=8)n[33+(o>>3)]=e>>24-o&255;var i=Object(c.a)(Ii(Ai.sha512,this.chainCode,n)),a=i.slice(0,32),s=i.slice(32),u=null,f=null;this.privateKey?u=Xi(y.from(a).add(this.privateKey).mod(Ji)):f=new Hn(Object(c.i)(a))._addPoint(this.publicKey);var l=r,h=this.mnemonic;return h&&(l=Object.freeze({phrase:h.phrase,path:r,locale:h.locale||"en"})),new t(ea,u,f,this.fingerprint,Xi(s),e,this.depth+1,l)}},{key:"derivePath",value:function(t){var e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===e[0]&&e.shift();for(var r=this,n=0;n<e.length;n++){var o=e[n];if(o.match(/^[0-9]+'$/)){var i=parseInt(o.substring(0,o.length-1));if(i>=2147483648)throw new Error("invalid path index - "+o);r=r._derive(2147483648+i)}else{if(!o.match(/^[0-9]+$/))throw new Error("invalid path component - "+o);var a=parseInt(o);if(a>=2147483648)throw new Error("invalid path index - "+o);r=r._derive(a)}}return r}}])&&Qi(e.prototype,r),n&&Qi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function oa(t,e){e||(e="");var r=wt("mnemonic"+e,dt.NFKD);return Ni(wt(t,dt.NFKD),r,2048,64,"sha512")}function ia(t,e){e=ta(e),Vi.checkNormalize();var r=e.split(t);if(r.length%3!=0)throw new Error("invalid mnemonic");for(var n=Object(c.a)(new Uint8Array(Math.ceil(11*r.length/8))),o=0,i=0;i<r.length;i++){var a=e.getWordIndex(r[i].normalize("NFKD"));if(-1===a)throw new Error("invalid mnemonic");for(var s=0;s<11;s++)a&1<<10-s&&(n[o>>3]|=1<<7-o%8),o++}var u=32*r.length/3,f=Zi(r.length/3);if((Object(c.a)(Ti(n.slice(0,u/8)))[0]&f)!==(n[n.length-1]&f))throw new Error("invalid checksum");return Object(c.i)(n.slice(0,u/8))}function aa(t,e){if(e=ta(e),(t=Object(c.a)(t)).length%4!=0||t.length<16||t.length>32)throw new Error("invalid entropy");for(var r=[0],n=11,o=0;o<t.length;o++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&(1<<8-n)-1),n+=3);var i=t.length/4,a=Object(c.a)(Ti(t))[0]&Zi(i);return r[r.length-1]<<=i,r[r.length-1]|=a>>8-i,e.join(r.map((function(t){return e.getWord(t)})))}function sa(t,e){try{return ia(t,e),!0}catch(t){}return!1}function ua(t){return("number"!=typeof t||t<0||t>=2147483648||t%1)&&Vi.throwArgumentError("invalid account index","index",t),"m/44'/60'/".concat(t,"'/0/0")}var ca=r(76),fa=r(6),la=r.n(fa),ha=r(14),pa=r.n(ha);function da(t){return"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),Object(c.a)(t)}function ma(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function va(t){return"string"==typeof t?wt(t,dt.NFKC):Object(c.a)(t)}function ga(t,e){for(var r=t,n=e.toLowerCase().split("/"),o=0;o<n.length;o++){var i=null;for(var a in r)if(a.toLowerCase()===n[o]){i=r[a];break}if(null===i)return null;r=i}return r}function ya(t){var e=Object(c.a)(t);e[6]=15&e[6]|64,e[8]=63&e[8]|128;var r=Object(c.i)(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}function ba(t){return(ba="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 wa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ka(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)}}function _a(t,e){return(_a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Aa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=xa(t);if(e){var o=xa(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ea(this,r)}}function Ea(t,e){if(e&&("object"===ba(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xa(t){return(xa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Oa=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Sa=new h.b("json-wallets/5.7.0");function Pa(t){return null!=t&&t.mnemonic&&t.mnemonic.phrase}var Ra=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_a(t,e)}(i,t);var e,r,n,o=Aa(i);function i(){return wa(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"isKeystoreAccount",value:function(t){return!(!t||!t._isKeystoreAccount)}}])&&ka(e.prototype,r),n&&ka(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(B);function Ta(t,e){var r=da(ga(t,"crypto/ciphertext"));if(Object(c.i)(Q(Object(c.b)([e.slice(16,32),r]))).substring(2)!==ga(t,"crypto/mac").toLowerCase())throw new Error("invalid password");var n=function(t,e,r){if("aes-128-ctr"===ga(t,"crypto/cipher")){var n=da(ga(t,"crypto/cipherparams/iv")),o=new la.a.Counter(n),i=new la.a.ModeOfOperation.ctr(e,o);return Object(c.a)(i.decrypt(r))}return null}(t,e.slice(0,16),r);n||Sa.throwError("unsupported cipher",h.b.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});var o=e.slice(32,64),i=Xn(n);if(t.address){var a=t.address.toLowerCase();if("0x"!==a.substring(0,2)&&(a="0x"+a),ct(a)!==i)throw new Error("address mismatch")}var s={_isKeystoreAccount:!0,address:i,privateKey:Object(c.i)(n)};if("0.1"===ga(t,"x-ethers/version")){var u=da(ga(t,"x-ethers/mnemonicCiphertext")),f=da(ga(t,"x-ethers/mnemonicCounter")),l=new la.a.Counter(f),p=new la.a.ModeOfOperation.ctr(o,l),d=ga(t,"x-ethers/path")||ra,m=ga(t,"x-ethers/locale")||"en",v=Object(c.a)(p.decrypt(u));try{var g=aa(v,m),y=na.fromMnemonic(g,null,m).derivePath(d);if(y.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=y.mnemonic}catch(t){if(t.code!==h.b.errors.INVALID_ARGUMENT||"wordlist"!==t.argument)throw t}}return new Ra(s)}function ja(t,e,r,n,o){return Object(c.a)(Ni(t,e,r,n,o))}function Ia(t,e,r,n,o){return Promise.resolve(ja(t,e,r,n,o))}function Na(t,e,r,n,o){var i=va(e),a=ga(t,"crypto/kdf");if(a&&"string"==typeof a){var s=function(t,e){return Sa.throwArgumentError("invalid key-derivation function parameters",t,e)};if("scrypt"===a.toLowerCase()){var u=da(ga(t,"crypto/kdfparams/salt")),c=parseInt(ga(t,"crypto/kdfparams/n")),f=parseInt(ga(t,"crypto/kdfparams/r")),l=parseInt(ga(t,"crypto/kdfparams/p"));c&&f&&l||s("kdf",a),0!=(c&c-1)&&s("N",c);var h=parseInt(ga(t,"crypto/kdfparams/dklen"));return 32!==h&&s("dklen",h),n(i,u,c,f,l,64,o)}if("pbkdf2"===a.toLowerCase()){var p=da(ga(t,"crypto/kdfparams/salt")),d=null,m=ga(t,"crypto/kdfparams/prf");"hmac-sha256"===m?d="sha256":"hmac-sha512"===m?d="sha512":s("prf",m);var v=parseInt(ga(t,"crypto/kdfparams/c")),g=parseInt(ga(t,"crypto/kdfparams/dklen"));return 32!==g&&s("dklen",g),r(i,p,v,g,d)}}return Sa.throwArgumentError("unsupported key-derivation function","kdf",a)}function Ca(t){return(Ca="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 Ma(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ba(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)}}function Fa(t,e){return(Fa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Da(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=La(t);if(e){var o=La(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ua(this,r)}}function Ua(t,e){if(e&&("object"===Ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function La(t){return(La=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var za=new h.b("json-wallets/5.7.0"),qa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fa(t,e)}(i,t);var e,r,n,o=Da(i);function i(){return Ma(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"isCrowdsaleAccount",value:function(t){return!(!t||!t._isCrowdsaleAccount)}}])&&Ba(e.prototype,r),n&&Ba(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(B);function Ha(t,e){var r=JSON.parse(t);e=va(e);var n=ct(ga(r,"ethaddr")),o=da(ga(r,"encseed"));o&&o.length%16==0||za.throwArgumentError("invalid encseed","json",t);for(var i=Object(c.a)(Ni(e,e,2e3,32,"sha256")).slice(0,16),a=o.slice(0,16),s=o.slice(16),u=new la.a.ModeOfOperation.cbc(i,a),f=la.a.padding.pkcs7.strip(Object(c.a)(u.decrypt(s))),l="",h=0;h<f.length;h++)l+=String.fromCharCode(f[h]);var p=Q(wt(l));return new qa({_isCrowdsaleAccount:!0,address:n,privateKey:p})}function Ga(t){var e=null;try{e=JSON.parse(t)}catch(t){return!1}return e.encseed&&e.ethaddr}function Ka(t){var e=null;try{e=JSON.parse(t)}catch(t){return!1}return!(!e.version||parseInt(e.version)!==e.version||3!==parseInt(e.version))}function Wa(t){if(Ga(t))try{return ct(JSON.parse(t).ethaddr)}catch(t){return null}if(Ka(t))try{return ct(JSON.parse(t).address)}catch(t){return null}return null}function Qa(t,e,r){if(Ga(t)){r&&r(0);var n=Ha(t,e);return r&&r(1),Promise.resolve(n)}return Ka(t)?function(t,e,r){return Oa(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=JSON.parse(t),n.next=3,Na(o,e,Ia,pa.a.scrypt,r);case 3:return i=n.sent,n.abrupt("return",Ta(o,i));case 5:case"end":return n.stop()}}),n)})))}(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function Va(t,e){if(Ga(t))return Ha(t,e);if(Ka(t))return function(t,e){var r=JSON.parse(t);return Ta(r,Na(r,e,ja,pa.a.syncScrypt))}(t,e);throw new Error("invalid JSON wallet")}function Ja(t){return(Ja="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 Ya(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)}}function Za(t,e){return(Za=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=es(t);if(e){var o=es(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $a(this,r)}}function $a(t,e){if(e&&("object"===Ja(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ts(t)}function ts(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function es(t){return(es=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var rs=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},ns=new h.b("wallet/5.7.0");var os=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Za(t,e)}(i,t);var e,r,n,o=Xa(i);function i(t,e){var r,n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),r=o.call(this),null!=(n=t)&&Object(c.l)(n.privateKey,32)&&null!=n.address){var a=new Hn(t.privateKey);if(P(ts(r),"_signingKey",(function(){return a})),P(ts(r),"address",Xn(r.publicKey)),r.address!==ct(t.address)&&ns.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(t){var e=t.mnemonic;return e&&e.phrase}(t)){var s=t.mnemonic;P(ts(r),"_mnemonic",(function(){return{phrase:s.phrase,path:s.path||ra,locale:s.locale||"en"}}));var u=r.mnemonic;Xn(na.fromMnemonic(u.phrase,null,u.locale).derivePath(u.path).privateKey)!==r.address&&ns.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else P(ts(r),"_mnemonic",(function(){return null}))}else{if(Hn.isSigningKey(t))"secp256k1"!==t.curve&&ns.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),P(ts(r),"_signingKey",(function(){return t}));else{"string"==typeof t&&t.match(/^[0-9a-f]*$/i)&&64===t.length&&(t="0x"+t);var f=new Hn(t);P(ts(r),"_signingKey",(function(){return f}))}P(ts(r),"_mnemonic",(function(){return null})),P(ts(r),"address",Xn(r.publicKey))}return e&&!_n.isProvider(e)&&ns.throwArgumentError("invalid provider","provider",e),P(ts(r),"provider",e||null),r}return e=i,n=[{key:"createRandom",value:function(t){var e=Object(ca.a)(16);t||(t={}),t.extraEntropy&&(e=Object(c.a)(Object(c.e)(Q(Object(c.b)([e,t.extraEntropy])),0,16)));var r=aa(e,t.locale);return i.fromMnemonic(r,t.path,t.locale)}},{key:"fromEncryptedJson",value:function(t,e,r){return Qa(t,e,r).then((function(t){return new i(t)}))}},{key:"fromEncryptedJsonSync",value:function(t,e){return new i(Va(t,e))}},{key:"fromMnemonic",value:function(t,e,r){return e||(e=ra),new i(na.fromMnemonic(t,null,r).derivePath(e))}}],(r=[{key:"mnemonic",get:function(){return this._mnemonic()}},{key:"privateKey",get:function(){return this._signingKey().privateKey}},{key:"publicKey",get:function(){return this._signingKey().publicKey}},{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"connect",value:function(t){return new i(this,t)}},{key:"signTransaction",value:function(t){var e=this;return T(t).then((function(r){null!=r.from&&(ct(r.from)!==e.address&&ns.throwArgumentError("transaction from address mismatch","transaction.from",t.from),delete r.from);var n=e._signingKey().signDigest(Q(ao(r)));return ao(r,n)}))}},{key:"signMessage",value:function(t){return rs(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.m)(this._signingKey().signDigest(oi(t))));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"_signTypedData",value:function(t,e,r){return rs(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,ki.resolveNames(t,e,r,(function(t){return null==i.provider&&ns.throwError("cannot resolve ENS names without a provider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:t}),i.provider.resolveName(t)}));case 2:return o=n.sent,n.abrupt("return",Object(c.m)(this._signingKey().signDigest(ki.hash(o.domain,e,o.value))));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"encrypt",value:function(t,e,r){if("function"!=typeof e||r||(r=e,e={}),r&&"function"!=typeof r)throw new Error("invalid callback");return e||(e={}),function(t,e,r,n){try{if(ct(t.address)!==Xn(t.privateKey))throw new Error("address/privateKey mismatch");if(Pa(t)){var o=t.mnemonic;if(na.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path||ra).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(t){return Promise.reject(t)}"function"!=typeof r||n||(n=r,r={}),r||(r={});var i=Object(c.a)(t.privateKey),a=va(e),s=null,u=null,f=null;if(Pa(t)){var l=t.mnemonic;s=Object(c.a)(ia(l.phrase,l.locale||"en")),u=l.path||ra,f=l.locale||"en"}var h=r.client;h||(h="ethers.js");var p=null;p=r.salt?Object(c.a)(r.salt):Object(ca.a)(32);var d=null;if(r.iv){if(16!==(d=Object(c.a)(r.iv)).length)throw new Error("invalid iv")}else d=Object(ca.a)(16);var m=null;if(r.uuid){if(16!==(m=Object(c.a)(r.uuid)).length)throw new Error("invalid uuid")}else m=Object(ca.a)(16);var v=1<<17,g=8,y=1;return r.scrypt&&(r.scrypt.N&&(v=r.scrypt.N),r.scrypt.r&&(g=r.scrypt.r),r.scrypt.p&&(y=r.scrypt.p)),pa.a.scrypt(a,p,v,g,y,64,n).then((function(e){var r=(e=Object(c.a)(e)).slice(0,16),n=e.slice(16,32),o=e.slice(32,64),a=new la.a.Counter(d),l=new la.a.ModeOfOperation.ctr(r,a),b=Object(c.a)(l.encrypt(i)),w=Q(Object(c.b)([n,b])),k={address:t.address.substring(2).toLowerCase(),id:ya(m),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Object(c.i)(d).substring(2)},ciphertext:Object(c.i)(b).substring(2),kdf:"scrypt",kdfparams:{salt:Object(c.i)(p).substring(2),n:v,dklen:32,p:y,r:g},mac:w.substring(2)}};if(s){var _=Object(ca.a)(16),A=new la.a.Counter(_),E=new la.a.ModeOfOperation.ctr(o,A),x=Object(c.a)(E.encrypt(s)),O=new Date,S=O.getUTCFullYear()+"-"+ma(O.getUTCMonth()+1,2)+"-"+ma(O.getUTCDate(),2)+"T"+ma(O.getUTCHours(),2)+"-"+ma(O.getUTCMinutes(),2)+"-"+ma(O.getUTCSeconds(),2)+".0Z";k["x-ethers"]={client:h,gethFilename:"UTC--"+S+"--"+k.address,mnemonicCounter:Object(c.i)(_).substring(2),mnemonicCiphertext:Object(c.i)(x).substring(2),path:u,locale:f,version:"0.1"}}return JSON.stringify(k)}))}(this,t,e,r)}}])&&Ya(e.prototype,r),n&&Ya(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Bn);function is(t,e){return $n(oi(t),e)}function as(t,e,r,n){return $n(ki.hash(t,e,r),n)}var ss="0x0000000000000000000000000000000000000000",us="0x0000000000000000000000000000000000000000000000000000000000000000",cs="Ξ",fs=new h.b("networks/5.7.1");function ls(t){var e=function(e,r){null==r&&(r={});var n=[];if(e.InfuraProvider&&"-"!==r.infura)try{n.push(new e.InfuraProvider(t,r.infura))}catch(t){}if(e.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new e.EtherscanProvider(t,r.etherscan))}catch(t){}if(e.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new e.AlchemyProvider(t,r.alchemy))}catch(t){}if(e.PocketProvider&&"-"!==r.pocket){try{var o=new e.PocketProvider(t,r.pocket);o.network&&-1===["goerli","ropsten","rinkeby","sepolia"].indexOf(o.network.name)&&n.push(o)}catch(t){}}if(e.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new e.CloudflareProvider(t))}catch(t){}if(e.AnkrProvider&&"-"!==r.ankr)try{var i=new e.AnkrProvider(t,r.ankr);i.network&&-1===["ropsten"].indexOf(i.network.name)&&n.push(i)}catch(t){}if(0===n.length)return null;if(e.FallbackProvider){var a=1;return null!=r.quorum?a=r.quorum:"homestead"===t&&(a=2),new e.FallbackProvider(n,a)}return n[0]};return e.renetwork=function(t){return ls(t)},e}function hs(t,e){var r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return r.renetwork=function(e){return hs(t,e)},r}var ps={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ls("homestead")},ds={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ls("ropsten")},ms={chainId:63,name:"classicMordor",_defaultProvider:hs("https://www.ethercluster.com/mordor","classicMordor")},vs={unspecified:{chainId:0,name:"unspecified"},homestead:ps,mainnet:ps,morden:{chainId:2,name:"morden"},ropsten:ds,testnet:ds,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ls("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ls("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ls("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ls("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:hs("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:ms,classicTestnet:ms,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:hs("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ls("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ls("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function gs(t){if(null==t)return null;if("number"==typeof t){for(var e in vs){var r=vs[e];if(r.chainId===t)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){var n=vs[t];return null==n?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}var o=vs[t.name];if(!o)return"number"!=typeof t.chainId&&fs.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==o.chainId&&fs.throwArgumentError("network chainId mismatch","network",t);var i,a=t._defaultProvider||null;return null==a&&o._defaultProvider&&(a=(i=o._defaultProvider)&&"function"==typeof i.renetwork?o._defaultProvider.renetwork(t):o._defaultProvider),{name:t.name,chainId:o.chainId,ensAddress:t.ensAddress||o.ensAddress||null,_defaultProvider:a}}function ys(t){t=atob(t);for(var e=[],r=0;r<t.length;r++)e.push(t.charCodeAt(r));return Object(c.a)(e)}function bs(t){t=Object(c.a)(t);for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function ws(t,e){null==e&&(e=1);var r=[],n=r.forEach;return function t(e,o){n.call(e,(function(e){o>0&&Array.isArray(e)?t(e,o-1):r.push(e)}))}(t,e),r}function ks(t){return function(t){var e=0;return function(){return t[e++]}}(function(t){var e=0;function r(){return t[e++]<<8|t[e++]}for(var n=r(),o=1,i=[0,1],a=1;a<n;a++)i.push(o+=r());var s=r(),u=e;e+=s;var c=0,f=0;function l(){return 0==c&&(f=f<<8|t[e++],c=8),f>>--c&1}for(var h=Math.pow(2,31),p=h>>>1,d=p>>1,m=h-1,v=0,g=0;g<31;g++)v=v<<1|l();for(var y=[],b=0,w=h;;){for(var k=Math.floor(((v-b+1)*o-1)/w),_=0,A=n;A-_>1;){var E=_+A>>>1;k<i[E]?A=E:_=E}if(0==_)break;y.push(_);for(var x=b+Math.floor(w*i[_]/o),O=b+Math.floor(w*i[_+1]/o)-1;0==((x^O)&p);)v=v<<1&m|l(),x=x<<1&m,O=O<<1&m|1;for(;x&~O&d;)v=v&p|v<<1&m>>>1|l(),x=x<<1^p,O=(O^p)<<1|p|1;b=x,w=1+O-x}var S=n-4;return y.map((function(e){switch(e-S){case 3:return S+65792+(t[u++]<<16|t[u++]<<8|t[u++]);case 2:return S+256+(t[u++]<<8|t[u++]);case 1:return S+t[u++];default:return e-1}}))}(t))}function _s(t){return 1&t?~t>>1:t>>1}function As(t,e){for(var r=Array(t),n=0,o=-1;n<t;n++)r[n]=o+=1+e();return r}function Es(t,e){for(var r=Array(t),n=0,o=0;n<t;n++)r[n]=o+=_s(e());return r}function xs(t,e){for(var r=As(t(),t),n=t(),o=As(n,t),i=function(t,e){for(var r=Array(t),n=0;n<t;n++)r[n]=1+e();return r}(n,t),a=0;a<n;a++)for(var s=0;s<i[a];s++)r.push(o[a]+s);return e?r.map((function(t){return e[t]})):r}function Os(t,e,r){for(var n=Array(t).fill(void 0).map((function(){return[]})),o=0;o<e;o++)Es(t,r).forEach((function(t,e){return n[e].push(t)}));return n}function Ss(t,e){var r=1+e(),n=e(),o=function(t){for(var e=[];;){var r=t();if(0==r)break;e.push(r)}return e}(e);return ws(Os(o.length,1+t,e).map((function(t,e){var i=t[0],a=t.slice(1);return Array(o[e]).fill(void 0).map((function(t,e){var o=e*n;return[i+e*r,a.map((function(t){return t+o}))]}))})))}function Ps(t,e){return Os(1+e(),1+t,e).map((function(t){return[t[0],t.slice(1)]}))}function Rs(t){return function(t){if(Array.isArray(t))return js(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ts(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ts(t,e){if(t){if("string"==typeof t)return js(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?js(t,e):void 0}}function js(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Is,Ns,Cs=ks(ys("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),Ms=new Set(xs(Cs)),Bs=new Set(xs(Cs)),Fs=function(t){for(var e=[];;){var r=t();if(0==r)break;e.push(Ss(r,t))}for(;;){var n=t()-1;if(n<0)break;e.push(Ps(n,t))}return function(t){for(var e={},r=0;r<t.length;r++){var n=t[r];e[n[0]]=n[1]}return e}(ws(e))}(Cs),Ds=(Ns=xs(Is=Cs).sort((function(t,e){return t-e})),function t(){for(var e=[];;){var r=xs(Is,Ns);if(0==r.length)break;e.push({set:new Set(r),node:t()})}e.sort((function(t,e){return e.set.size-t.set.size}));var n=Is();return{branches:e,valid:n%3,fe0f:!!(1&(n=n/3|0)),save:1==(n>>=1),check:2==n}}());function Us(t){return xt(t)}function Ls(t){return t.filter((function(t){return 65039!=t}))}function zs(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ts(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(t.split("."));try{for(r.s();!(e=r.n()).done;){var n=e.value,o=Us(n);try{for(var i=o.lastIndexOf(95)-1;i>=0;i--)if(95!==o[i])throw new Error("underscore only allowed at start");if(o.length>=4&&o.every((function(t){return t<128}))&&45===o[2]&&45===o[3])throw new Error("invalid label extension")}catch(t){throw new Error('Invalid label "'.concat(n,'": ').concat(t.message))}}}catch(t){r.e(t)}finally{r.f()}return t}function qs(t){return zs(function(t,e){var r=Us(t).reverse(),n=[];for(;r.length;){var o=Hs(r);if(o)n.push.apply(n,Rs(e(o)));else{var i=r.pop();if(Ms.has(i))n.push(i);else if(!Bs.has(i)){var a=Fs[i];if(!a)throw new Error("Disallowed codepoint: 0x".concat(i.toString(16).toUpperCase()));n.push.apply(n,Rs(a))}}}return zs((s=String.fromCodePoint.apply(String,n),s.normalize("NFC")));var s}(t,Ls))}function Hs(t,e){var r,n,o,i=Ds,a=[],s=t.length;e&&(e.length=0);for(var u=function(){var u=t[--s];if(!(i=null===(r=i.branches.find((function(t){return t.set.has(u)})))||void 0===r?void 0:r.node))return"break";if(i.save)o=u;else if(i.check&&u===o)return"break";a.push(u),i.fe0f&&(a.push(65039),s>0&&65039==t[s-1]&&s--),i.valid&&(n=a.slice(),2==i.valid&&n.splice(1,1),e&&e.push.apply(e,Rs(t.slice(s).reverse())),t.length=s)};s;){if("break"===u())break}return n}var Gs=new h.b("hash/5.7.0"),Ks=new Uint8Array(32);function Ws(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function Qs(t){var e=wt(qs(t)),r=[];if(0===t.length)return r;for(var n=0,o=0;o<e.length;o++){46===e[o]&&(r.push(Ws(e.slice(n,o))),n=o+1)}if(n>=e.length)throw new Error("invalid ENS name; empty component");return r.push(Ws(e.slice(n))),r}function Vs(t){try{return 0!==Qs(t).length}catch(t){}return!1}function Js(t){"string"!=typeof t&&Gs.throwArgumentError("invalid ENS name; not a string","name",t);for(var e=Ks,r=Qs(t);r.length;)e=Q(Object(c.b)([e,Q(r.pop())]));return Object(c.i)(e)}function Ys(t){return Object(c.i)(Object(c.b)(Qs(t).map((function(t){if(t.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var e=new Uint8Array(t.length+1);return e.set(t,1),e[0]=e.length-1,e}))))+"00"}Ks.fill(0);var Zs=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};function Xs(t,e){return Zs(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i,a,s;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==e&&(e={}),n={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0},!0!==e.skipFetchSetup&&(n.mode="cors",n.cache="no-cache",n.credentials="same-origin",n.redirect="follow",n.referrer="client"),null!=e.fetchOptions&&((o=e.fetchOptions).mode&&(n.mode=o.mode),o.cache&&(n.cache=o.cache),o.credentials&&(n.credentials=o.credentials),o.redirect&&(n.redirect=o.redirect),o.referrer&&(n.referrer=o.referrer)),r.next=7,fetch(t,n);case 7:return i=r.sent,r.next=10,i.arrayBuffer();case 10:return a=r.sent,s={},i.headers.forEach?i.headers.forEach((function(t,e){s[e.toLowerCase()]=t})):i.headers.keys().forEach((function(t){s[t.toLowerCase()]=i.headers.get(t)})),r.abrupt("return",{headers:s,statusCode:i.status,statusMessage:i.statusText,body:Object(c.a)(new Uint8Array(a))});case 14:case"end":return r.stop()}}),r)})))}function $s(t){return($s="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)}var tu=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},eu=new h.b("web/5.7.1");function ru(t){return new Promise((function(e){setTimeout(e,t)}))}function nu(t,e){if(null==t)return null;if("string"==typeof t)return t;if(Object(c.k)(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return Et(t)}catch(t){}return Object(c.i)(t)}return t}function ou(t,e,r){var n="object"===$s(t)&&null!=t.throttleLimit?t.throttleLimit:12;eu.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);var o="object"===$s(t)?t.throttleCallback:null,i="object"===$s(t)&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;eu.assertArgument(i>0&&i%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);var a="object"===$s(t)&&!!t.errorPassThrough,s={},u=null,c={method:"GET"},f=!1,l=12e4;if("string"==typeof t)u=t;else if("object"===$s(t)){if(null!=t&&null!=t.url||eu.throwArgumentError("missing URL","connection.url",t),u=t.url,"number"==typeof t.timeout&&t.timeout>0&&(l=t.timeout),t.headers)for(var p in t.headers)s[p.toLowerCase()]={key:p,value:String(t.headers[p])},["if-none-match","if-modified-since"].indexOf(p.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==u.substring(0,6)&&!0!==t.allowInsecureAuthentication&&eu.throwError("basic authentication requires a secure https url",h.b.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:t.user,password:"[REDACTED]"});var d=t.user+":"+t.password;s.authorization={key:"Authorization",value:"Basic "+bs(wt(d))}}null!=t.skipFetchSetup&&(c.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(c.fetchOptions=I(t.fetchOptions))}var m,v=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),g=u?u.match(v):null;if(g)try{var y={statusCode:200,statusMessage:"OK",headers:{"content-type":g[1]||"text/plain"},body:g[2]?ys(g[3]):(m=g[3],wt(m.replace(/%([0-9a-f][0-9a-f])/gi,(function(t,e){return String.fromCharCode(parseInt(e,16))}))))},b=y.body;return r&&(b=r(y.body,y)),Promise.resolve(b)}catch(t){eu.throwError("processing response error",h.b.errors.SERVER_ERROR,{body:nu(g[1],g[2]),error:t,requestBody:null,requestMethod:"GET",url:u})}e&&(c.method="POST",c.body=e,null==s["content-type"]&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==s["content-length"]&&(s["content-length"]={key:"Content-Length",value:String(e.length)}));var w={};Object.keys(s).forEach((function(t){var e=s[t];w[e.key]=e.value})),c.headers=w;var k,_=(k=null,{promise:new Promise((function(t,e){l&&(k=setTimeout((function(){null!=k&&(k=null,e(eu.makeError("timeout",h.b.errors.TIMEOUT,{requestBody:nu(c.body,w["content-type"]),requestMethod:c.method,timeout:l,url:u})))}),l))})),cancel:function(){null!=k&&(clearTimeout(k),k=null)}}),A=function(){return tu(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,s,l,p,d,m,v,g,y,b;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=0;case 1:if(!(e<n)){t.next=65;break}return s=null,t.prev=3,t.next=6,Xs(u,c);case 6:if(s=t.sent,!(e<n)){t.next=28;break}if(301!==s.statusCode&&302!==s.statusCode){t.next=15;break}if(l=s.headers.location||"","GET"!==c.method||!l.match(/^https:/)){t.next=13;break}return u=s.headers.location,t.abrupt("continue",62);case 13:t.next=28;break;case 15:if(429!==s.statusCode){t.next=28;break}if(p=!0,!o){t.next=21;break}return t.next=20,o(e,u);case 20:p=t.sent;case 21:if(!p){t.next=28;break}return d=0,m=s.headers["retry-after"],d="string"==typeof m&&m.match(/^[1-9][0-9]*$/)?1e3*parseInt(m):i*parseInt(String(Math.random()*Math.pow(2,e))),t.next=27,ru(d);case 27:return t.abrupt("continue",62);case 28:t.next=34;break;case 30:t.prev=30,t.t0=t.catch(3),null==(s=t.t0.response)&&(_.cancel(),eu.throwError("missing response",h.b.errors.SERVER_ERROR,{requestBody:nu(c.body,w["content-type"]),requestMethod:c.method,serverError:t.t0,url:u}));case 34:if(v=s.body,f&&304===s.statusCode?v=null:!a&&(s.statusCode<200||s.statusCode>=300)&&(_.cancel(),eu.throwError("bad response",h.b.errors.SERVER_ERROR,{status:s.statusCode,headers:s.headers,body:nu(v,s.headers?s.headers["content-type"]:null),requestBody:nu(c.body,w["content-type"]),requestMethod:c.method,url:u})),!r){t.next=60;break}return t.prev=37,t.next=40,r(v,s);case 40:return g=t.sent,_.cancel(),t.abrupt("return",g);case 45:if(t.prev=45,t.t1=t.catch(37),!(t.t1.throttleRetry&&e<n)){t.next=58;break}if(y=!0,!o){t.next=53;break}return t.next=52,o(e,u);case 52:y=t.sent;case 53:if(!y){t.next=58;break}return b=i*parseInt(String(Math.random()*Math.pow(2,e))),t.next=57,ru(b);case 57:return t.abrupt("continue",62);case 58:_.cancel(),eu.throwError("processing response error",h.b.errors.SERVER_ERROR,{body:nu(v,s.headers?s.headers["content-type"]:null),error:t.t1,requestBody:nu(c.body,w["content-type"]),requestMethod:c.method,url:u});case 60:return _.cancel(),t.abrupt("return",v);case 62:e++,t.next=1;break;case 65:return t.abrupt("return",eu.throwError("failed response",h.b.errors.SERVER_ERROR,{requestBody:nu(c.body,w["content-type"]),requestMethod:c.method,url:u}));case 66:case"end":return t.stop()}}),t,null,[[3,30],[37,45]])})))}();return Promise.race([_.promise,A])}function iu(t,e,r){var n=null;if(null!=e){n=wt(e);var o="string"==typeof t?{url:t}:I(t);if(o.headers)0!==Object.keys(o.headers).filter((function(t){return"content-type"===t.toLowerCase()})).length||(o.headers=I(o.headers),o.headers["content-type"]="application/json");else o.headers={"content-type":"application/json"};t=o}return ou(t,n,(function(t,e){var n=null;if(null!=t)try{n=JSON.parse(Et(t))}catch(e){eu.throwError("invalid JSON",h.b.errors.SERVER_ERROR,{body:t,error:e})}return r&&(n=r(n,e)),n}))}function au(t,e){return e||(e={}),null==(e=I(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){var o=null,i=!1,a=function(){return!i&&(i=!0,o&&clearTimeout(o),!0)};e.timeout&&(o=setTimeout((function(){a()&&n(new Error("timeout"))}),e.timeout));var s=e.retryLimit,u=0;!function o(){return t().then((function(t){if(void 0!==t)a()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",o);else if(e.onceBlock)e.onceBlock.once("block",o);else if(!i){if(++u>s)return void(a()&&n(new Error("retry limit reached")));var c=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));c<e.floor&&(c=e.floor),c>e.ceiling&&(c=e.ceiling),setTimeout(o,c)}return null}),(function(t){a()&&n(t)}))}()}))}var su=r(19),uu=r.n(su);function cu(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)}}var fu=new h.b("providers/5.7.2"),lu=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.formats=this.getDefaultFormats()}var e,r,n;return e=t,n=[{key:"check",value:function(t,e){var r={};for(var n in t)try{var o=t[n](e[n]);void 0!==o&&(r[n]=o)}catch(t){throw t.checkKey=n,t.checkValue=e[n],t}return r}},{key:"allowNull",value:function(t,e){return function(r){return null==r?e:t(r)}}},{key:"allowFalsish",value:function(t,e){return function(r){return r?t(r):e}}},{key:"arrayOf",value:function(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");var r=[];return e.forEach((function(e){r.push(t(e))})),r}}}],(r=[{key:"getDefaultFormats",value:function(){var e=this,r={},n=this.address.bind(this),o=this.bigNumber.bind(this),i=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),u=this.hex.bind(this),c=this.number.bind(this),f=this.type.bind(this);return r.transaction={hash:s,type:f,accessList:t.allowNull(this.accessList.bind(this),null),blockHash:t.allowNull(s,null),blockNumber:t.allowNull(c,null),transactionIndex:t.allowNull(c,null),confirmations:t.allowNull(c,null),from:n,gasPrice:t.allowNull(o),maxPriorityFeePerGas:t.allowNull(o),maxFeePerGas:t.allowNull(o),gasLimit:o,to:t.allowNull(n,null),value:o,nonce:c,data:a,r:t.allowNull(this.uint256),s:t.allowNull(this.uint256),v:t.allowNull(c),creates:t.allowNull(n,null),raw:t.allowNull(a)},r.transactionRequest={from:t.allowNull(n),nonce:t.allowNull(c),gasLimit:t.allowNull(o),gasPrice:t.allowNull(o),maxPriorityFeePerGas:t.allowNull(o),maxFeePerGas:t.allowNull(o),to:t.allowNull(n),value:t.allowNull(o),data:t.allowNull((function(t){return e.data(t,!0)})),type:t.allowNull(c),accessList:t.allowNull(this.accessList.bind(this),null)},r.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:s,address:n,topics:t.arrayOf(s),data:a,logIndex:c,blockHash:s},r.receipt={to:t.allowNull(this.address,null),from:t.allowNull(this.address,null),contractAddress:t.allowNull(n,null),transactionIndex:c,root:t.allowNull(u),gasUsed:o,logsBloom:t.allowNull(a),blockHash:s,transactionHash:s,logs:t.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:t.allowNull(c,null),cumulativeGasUsed:o,effectiveGasPrice:t.allowNull(o),status:t.allowNull(c),type:f},r.block={hash:t.allowNull(s),parentHash:s,number:c,timestamp:c,nonce:t.allowNull(u),difficulty:this.difficulty.bind(this),gasLimit:o,gasUsed:o,miner:t.allowNull(n),extraData:a,transactions:t.allowNull(t.arrayOf(s)),baseFeePerGas:t.allowNull(o)},r.blockWithTransactions=I(r.block),r.blockWithTransactions.transactions=t.allowNull(t.arrayOf(this.transactionResponse.bind(this))),r.filter={fromBlock:t.allowNull(i,void 0),toBlock:t.allowNull(i,void 0),blockHash:t.allowNull(s,void 0),address:t.allowNull(n,void 0),topics:t.allowNull(this.topics.bind(this),void 0)},r.filterLog={blockNumber:t.allowNull(c),blockHash:t.allowNull(s),transactionIndex:c,removed:t.allowNull(this.boolean.bind(this)),address:n,data:t.allowFalsish(a,"0x"),topics:t.arrayOf(s),transactionHash:s,logIndex:c},r}},{key:"accessList",value:function(t){return ro(t||[])}},{key:"number",value:function(t){return"0x"===t?0:y.from(t).toNumber()}},{key:"type",value:function(t){return"0x"===t||null==t?0:y.from(t).toNumber()}},{key:"bigNumber",value:function(t){return y.from(t)}},{key:"boolean",value:function(t){if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw new Error("invalid boolean - "+t)}},{key:"hex",value:function(t,e){return"string"==typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),Object(c.l)(t))?t.toLowerCase():fu.throwArgumentError("invalid hash","value",t)}},{key:"data",value:function(t,e){var r=this.hex(t,e);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+t);return r}},{key:"address",value:function(t){return ct(t)}},{key:"callAddress",value:function(t){if(!Object(c.l)(t,32))return null;var e=ct(Object(c.e)(t,12));return e===ss?null:e}},{key:"contractAddress",value:function(t){return ht(t)}},{key:"blockTag",value:function(t){if(null==t)return"latest";if("earliest"===t)return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if("number"==typeof t||Object(c.l)(t))return Object(c.g)(t);throw new Error("invalid blockTag")}},{key:"hash",value:function(t,e){var r=this.hex(t,e);return 32!==Object(c.d)(r)?fu.throwArgumentError("invalid hash","value",t):r}},{key:"difficulty",value:function(t){if(null==t)return null;var e=y.from(t);try{return e.toNumber()}catch(t){}return null}},{key:"uint256",value:function(t){if(!Object(c.l)(t))throw new Error("invalid uint256");return Object(c.h)(t,32)}},{key:"_block",value:function(e,r){null!=e.author&&null==e.miner&&(e.miner=e.author);var n=null!=e._difficulty?e._difficulty:e.difficulty,o=t.check(r,e);return o._difficulty=null==n?null:y.from(n),o}},{key:"block",value:function(t){return this._block(t,this.formats.block)}},{key:"blockWithTransactions",value:function(t){return this._block(t,this.formats.blockWithTransactions)}},{key:"transactionRequest",value:function(e){return t.check(this.formats.transactionRequest,e)}},{key:"transactionResponse",value:function(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&y.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);var r=t.check(this.formats.transaction,e);if(null!=e.chainId){var n=e.chainId;Object(c.l)(n)&&(n=y.from(n).toNumber()),r.chainId=n}else{var o=e.networkId;null==o&&null==r.v&&(o=e.chainId),Object(c.l)(o)&&(o=y.from(o).toNumber()),"number"!=typeof o&&null!=r.v&&((o=(r.v-35)/2)<0&&(o=0),o=parseInt(o)),"number"!=typeof o&&(o=0),r.chainId=o}return r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}},{key:"transaction",value:function(t){return uo(t)}},{key:"receiptLog",value:function(e){return t.check(this.formats.receiptLog,e)}},{key:"receipt",value:function(e){var r=t.check(this.formats.receipt,e);if(null!=r.root)if(r.root.length<=4){var n=y.from(r.root).toNumber();0===n||1===n?(null!=r.status&&r.status!==n&&fu.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):fu.throwArgumentError("invalid alt-root-status","value.root",r.root)}else 66!==r.root.length&&fu.throwArgumentError("invalid root hash","value.root",r.root);return null!=r.status&&(r.byzantium=!0),r}},{key:"topics",value:function(t){var e=this;return Array.isArray(t)?t.map((function(t){return e.topics(t)})):null!=t?this.hash(t,!0):null}},{key:"filter",value:function(e){return t.check(this.formats.filter,e)}},{key:"filterLog",value:function(e){return t.check(this.formats.filterLog,e)}}])&&cu(e.prototype,r),n&&cu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function hu(t){return t&&"function"==typeof t.isCommunityResource}function pu(t){return hu(t)&&t.isCommunityResource()}var du=!1;function mu(){du||(du=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}function vu(t,e){return(vu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function gu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=wu(t);if(e){var o=wu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yu(this,r)}}function yu(t,e){if(e&&("object"===Eu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return bu(t)}function bu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wu(t){return(wu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ku(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _u(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)}}function Au(t,e,r){return e&&_u(t.prototype,e),r&&_u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Eu(t){return(Eu="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)}var xu=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Ou=new h.b("providers/5.7.2");function Su(t){return null==t?"null":(32!==Object(c.d)(t)&&Ou.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function Pu(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map((function(t){if(Array.isArray(t)){var e={};t.forEach((function(t){e[Su(t)]=!0}));var r=Object.keys(e);return r.sort(),r.join("|")}return Su(t)})).join("&")}function Ru(t){if("string"==typeof t){if(t=t.toLowerCase(),32===Object(c.d)(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+Pu(t);if(kn.isForkEvent(t))throw Ou.warn("not implemented"),new Error("not implemented");if(t&&"object"===Eu(t))return"filter:"+(t.address||"*")+":"+Pu(t.topics||[])}throw new Error("invalid event - "+t)}function Tu(){return(new Date).getTime()}function ju(t){return new Promise((function(e){setTimeout(e,t)}))}var Iu=["block","network","pending","poll"],Nu=function(){function t(e,r,n){ku(this,t),P(this,"tag",e),P(this,"listener",r),P(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}return Au(t,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var t=this.tag.split(":");return"tx"!==t[0]?null:t[1]}},{key:"filter",get:function(){var t=this.tag.split(":");if("filter"!==t[0])return null;var e,r=t[1],n=""===(e=t[2])?[]:e.split(/&/g).map((function(t){if(""===t)return[];var e=t.split("|").map((function(t){return"null"===t?null:t}));return 1===e.length?e[0]:e})),o={};return n.length>0&&(o.topics=n),r&&"*"!==r&&(o.address=r),o}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||Iu.indexOf(this.tag)>=0}}]),t}(),Cu={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Mu(t){return Object(c.h)(y.from(t).toHexString(),32)}function Bu(t){return xi.encode(Object(c.b)([t,Object(c.e)(Ti(Ti(t)),0,4)]))}var Fu=new RegExp("^(ipfs)://(.*)$","i"),Du=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Fu,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Uu(t,e){try{return Et(Lu(t,e))}catch(t){}return null}function Lu(t,e){if("0x"===t)return null;var r=y.from(Object(c.e)(t,e,e+32)).toNumber(),n=y.from(Object(c.e)(t,r,r+32)).toNumber();return Object(c.e)(t,r+32,r+32+n)}function zu(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ou.throwArgumentError("unsupported IPFS format","link",t),"https://gateway.ipfs.io/ipfs/".concat(t)}function qu(t){var e=Object(c.a)(t);if(e.length>32)throw new Error("internal; should not happen");var r=new Uint8Array(32);return r.set(e,32-e.length),r}function Hu(t){if(t.length%32==0)return t;var e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function Gu(t){for(var e=[],r=0,n=0;n<t.length;n++)e.push(null),r+=32;for(var o=0;o<t.length;o++){var i=Object(c.a)(t[o]);e[o]=qu(r),e.push(qu(i.length)),e.push(Hu(i)),r+=32+32*Math.ceil(i.length/32)}return Object(c.c)(e)}var Ku=function(){function t(e,r,n,o){ku(this,t),P(this,"provider",e),P(this,"name",n),P(this,"address",e.formatter.address(r)),P(this,"_resolvedAddress",o)}return Au(t,[{key:"supportsWildcard",value:function(){var t=this;return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((function(t){return y.from(t).eq(1)})).catch((function(e){if(e.code===h.b.errors.CALL_EXCEPTION)return!1;throw t._supportsEip2544=null,e}))),this._supportsEip2544}},{key:"_fetch",value:function(t,e){return xu(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n={to:this.address,ccipReadEnabled:!0,data:Object(c.c)([t,Js(this.name),e||"0x"])},o=!1,r.next=4,this.supportsWildcard();case 4:if(!r.sent){r.next=7;break}o=!0,n.data=Object(c.c)(["0x9061b923",Gu([Ys(this.name),n.data])]);case 7:return r.prev=7,r.next=10,this.provider.call(n);case 10:return i=r.sent,Object(c.a)(i).length%32==4&&Ou.throwError("resolver threw error",h.b.errors.CALL_EXCEPTION,{transaction:n,data:i}),o&&(i=Lu(i,0)),r.abrupt("return",i);case 16:if(r.prev=16,r.t0=r.catch(7),r.t0.code!==h.b.errors.CALL_EXCEPTION){r.next=20;break}return r.abrupt("return",null);case 20:throw r.t0;case 21:case"end":return r.stop()}}),r,this,[[7,16]])})))}},{key:"_fetchBytes",value:function(t,e){return xu(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this._fetch(t,e);case 2:if(null==(n=r.sent)){r.next=5;break}return r.abrupt("return",Lu(n,0));case 5:return r.abrupt("return",null);case 6:case"end":return r.stop()}}),r,this)})))}},{key:"_getAddress",value:function(t,e){var r=Cu[String(t)];if(null==r&&Ou.throwError("unsupported coin type: ".concat(t),h.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(t,")")}),"eth"===r.ilk)return this.provider.formatter.address(e);var n=Object(c.a)(e);if(null!=r.p2pkh){var o=e.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){var i=parseInt(o[1],16);if(o[2].length===2*i&&i>=1&&i<=75)return Bu(Object(c.b)([[r.p2pkh],"0x"+o[2]]))}}if(null!=r.p2sh){var a=e.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===2*s&&s>=1&&s<=75)return Bu(Object(c.b)([[r.p2sh],"0x"+a[2]]))}}if(null!=r.prefix){var u=n[1],f=n[0];if(0===f?20!==u&&32!==u&&(f=-1):f=-1,f>=0&&n.length===2+u&&u>=1&&u<=75){var l=uu.a.toWords(n.slice(2));return l.unshift(f),uu.a.encode(r.prefix,l)}}return null}},{key:"getAddress",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t&&(t=60),60!==t){e.next=16;break}return e.prev=2,e.next=5,this._fetch("0x3b3b57de");case 5:if("0x"!==(r=e.sent)&&r!==us){e.next=8;break}return e.abrupt("return",null);case 8:return e.abrupt("return",this.provider.formatter.callAddress(r));case 11:if(e.prev=11,e.t0=e.catch(2),e.t0.code!==h.b.errors.CALL_EXCEPTION){e.next=15;break}return e.abrupt("return",null);case 15:throw e.t0;case 16:return e.next=18,this._fetchBytes("0xf1cb7e06",Mu(t));case 18:if(null!=(n=e.sent)&&"0x"!==n){e.next=21;break}return e.abrupt("return",null);case 21:return null==(o=this._getAddress(t,n))&&Ou.throwError("invalid or unsupported coin data",h.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(t,")"),coinType:t,data:n}),e.abrupt("return",o);case 24:case"end":return e.stop()}}),e,this,[[2,11]])})))}},{key:"getAvatar",value:function(){return xu(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n,o,i,a,s,u,f,l,h,p,d,m,v,g;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[{type:"name",content:this.name}],t.prev=1,t.next=4,this.getText("avatar");case 4:if(null!=(r=t.sent)){t.next=7;break}return t.abrupt("return",null);case 7:n=0;case 8:if(!(n<Du.length)){t.next=91;break}if(null!=(o=r.match(Du[n]))){t.next=12;break}return t.abrupt("continue",88);case 12:i=o[1].toLowerCase(),t.t0=i,t.next="https"===t.t0?16:"data"===t.t0?18:"ipfs"===t.t0?20:"erc721"===t.t0||"erc1155"===t.t0?22:88;break;case 16:return e.push({type:"url",content:r}),t.abrupt("return",{linkage:e,url:r});case 18:return e.push({type:"data",content:r}),t.abrupt("return",{linkage:e,url:r});case 20:return e.push({type:"ipfs",content:r}),t.abrupt("return",{linkage:e,url:zu(r)});case 22:if(a="erc721"===i?"0xc87b56dd":"0x0e89341c",e.push({type:i,content:r}),t.t1=this._resolvedAddress,t.t1){t.next=29;break}return t.next=28,this.getAddress();case 28:t.t1=t.sent;case 29:if(s=t.t1,2===(u=(o[2]||"").split("/")).length){t.next=33;break}return t.abrupt("return",null);case 33:return t.next=35,this.provider.formatter.address(u[0]);case 35:if(f=t.sent,l=Object(c.h)(y.from(u[1]).toHexString(),32),"erc721"!==i){t.next=48;break}return t.t2=this.provider.formatter,t.next=41,this.provider.call({to:f,data:Object(c.c)(["0x6352211e",l])});case 41:if(t.t3=t.sent,h=t.t2.callAddress.call(t.t2,t.t3),s===h){t.next=45;break}return t.abrupt("return",null);case 45:e.push({type:"owner",content:h}),t.next=57;break;case 48:if("erc1155"!==i){t.next=57;break}return t.t4=y,t.next=52,this.provider.call({to:f,data:Object(c.c)(["0x00fdd58e",Object(c.h)(s,32),l])});case 52:if(t.t5=t.sent,!(p=t.t4.from.call(t.t4,t.t5)).isZero()){t.next=56;break}return t.abrupt("return",null);case 56:e.push({type:"balance",content:p.toString()});case 57:return d={to:this.provider.formatter.address(u[0]),data:Object(c.c)([a,l])},t.t6=Uu,t.next=61,this.provider.call(d);case 61:if(t.t7=t.sent,null!=(m=(0,t.t6)(t.t7,0))){t.next=65;break}return t.abrupt("return",null);case 65:return e.push({type:"metadata-url-base",content:m}),"erc1155"===i&&(m=m.replace("{id}",l.substring(2)),e.push({type:"metadata-url-expanded",content:m})),m.match(/^ipfs:/i)&&(m=zu(m)),e.push({type:"metadata-url",content:m}),t.next=71,iu(m);case 71:if(v=t.sent){t.next=74;break}return t.abrupt("return",null);case 74:if(e.push({type:"metadata",content:JSON.stringify(v)}),"string"==typeof(g=v.image)){t.next=78;break}return t.abrupt("return",null);case 78:if(!g.match(/^(https:\/\/|data:)/i)){t.next=81;break}t.next=86;break;case 81:if(null!=g.match(Fu)){t.next=84;break}return t.abrupt("return",null);case 84:e.push({type:"url-ipfs",content:g}),g=zu(g);case 86:return e.push({type:"url",content:g}),t.abrupt("return",{linkage:e,url:g});case 88:n++,t.next=8;break;case 91:t.next=95;break;case 93:t.prev=93,t.t8=t.catch(1);case 95:return t.abrupt("return",null);case 96:case"end":return t.stop()}}),t,this,[[1,93]])})))}},{key:"getContentHash",value:function(){return xu(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n,o,i,a,s,u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._fetchBytes("0xbc1c58d1");case 2:if(null!=(e=t.sent)&&"0x"!==e){t.next=5;break}return t.abrupt("return",null);case 5:if(!(r=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){t.next=10;break}if(n=parseInt(r[3],16),r[4].length!==2*n){t.next=10;break}return t.abrupt("return","ipfs://"+xi.encode("0x"+r[1]));case 10:if(!(o=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){t.next=15;break}if(i=parseInt(o[3],16),o[4].length!==2*i){t.next=15;break}return t.abrupt("return","ipns://"+xi.encode("0x"+o[1]));case 15:if(!(a=e.match(/^0xe40101fa011b20([0-9a-f]*)$/))){t.next=19;break}if(64!==a[1].length){t.next=19;break}return t.abrupt("return","bzz://"+a[1]);case 19:if(!(s=e.match(/^0x90b2c605([0-9a-f]*)$/))){t.next=25;break}if(68!==s[1].length){t.next=25;break}return u={"=":"","+":"-","/":"_"},c=bs("0x"+s[1]).replace(/[=+\/]/g,(function(t){return u[t]})),t.abrupt("return","sia://"+c);case 25:return t.abrupt("return",Ou.throwError("invalid or unsupported content hash data",h.b.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e}));case 26:case"end":return t.stop()}}),t,this)})))}},{key:"getText",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=wt(t),(r=Object(c.b)([Mu(64),Mu(r.length),r])).length%32!=0&&(r=Object(c.b)([r,Object(c.h)("0x",32-t.length%32)])),e.next=5,this._fetchBytes("0x59d1d43c",Object(c.i)(r));case 5:if(null!=(n=e.sent)&&"0x"!==n){e.next=8;break}return e.abrupt("return",null);case 8:return e.abrupt("return",Et(n));case 9:case"end":return e.stop()}}),e,this)})))}}]),t}(),Wu=null,Qu=1,Vu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vu(t,e)}(r,t);var e=gu(r);function r(t){var n;if(ku(this,r),(n=e.call(this))._events=[],n._emitted={block:-2},n.disableCcipRead=!1,n.formatter=(this instanceof r?this.constructor:void 0).getFormatter(),P(bu(n),"anyNetwork","any"===t),n.anyNetwork&&(t=n.detectNetwork()),t instanceof Promise)n._networkPromise=t,t.catch((function(t){})),n._ready().catch((function(t){}));else{var o=R(this instanceof r?this.constructor:void 0,"getNetwork")(t);o?(P(bu(n),"_network",o),n.emit("network",o,null)):Ou.throwArgumentError("invalid network","network",t)}return n._maxInternalBlockNumber=-1024,n._lastBlockNumber=-2,n._maxFilterBlockRange=10,n._pollingInterval=4e3,n._fastQueryDate=0,n}return Au(r,[{key:"_ready",value:function(){return xu(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=this._network){t.next=17;break}if(e=null,!this._networkPromise){t.next=11;break}return t.prev=3,t.next=6,this._networkPromise;case 6:e=t.sent,t.next=11;break;case 9:t.prev=9,t.t0=t.catch(3);case 11:if(null!=e){t.next=15;break}return t.next=14,this.detectNetwork();case 14:e=t.sent;case 15:e||Ou.throwError("no network detected",h.b.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:P(this,"_network",e),this.emit("network",e,null));case 17:return t.abrupt("return",this._network);case 18:case"end":return t.stop()}}),t,this,[[3,9]])})))}},{key:"ready",get:function(){var t=this;return au((function(){return t._ready().then((function(t){return t}),(function(t){if(t.code!==h.b.errors.NETWORK_ERROR||"noNetwork"!==t.event)throw t}))}))}},{key:"ccipReadFetch",value:function(t,e,r){return xu(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a,s,u,c,f,l,p;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.disableCcipRead&&0!==r.length){n.next=2;break}return n.abrupt("return",null);case 2:o=t.to.toLowerCase(),i=e.toLowerCase(),a=[],s=0;case 6:if(!(s<r.length)){n.next=22;break}return u=r[s],c=u.replace("{sender}",o).replace("{data}",i),f=u.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:o}),n.next=12,iu({url:c,errorPassThrough:!0},f,(function(t,e){return t.status=e.statusCode,t}));case 12:if(!(l=n.sent).data){n.next=15;break}return n.abrupt("return",l.data);case 15:if(p=l.message||"unknown error",!(l.status>=400&&l.status<500)){n.next=18;break}return n.abrupt("return",Ou.throwError("response not found during CCIP fetch: ".concat(p),h.b.errors.SERVER_ERROR,{url:u,errorMessage:p}));case 18:a.push(p);case 19:s++,n.next=6;break;case 22:return n.abrupt("return",Ou.throwError("error encountered during CCIP fetch: ".concat(a.map((function(t){return JSON.stringify(t)})).join(", ")),h.b.errors.SERVER_ERROR,{urls:r,errorMessages:a}));case 23:case"end":return n.stop()}}),n,this)})))}},{key:"_getInternalBlockNumber",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o,i,a=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:if(!(t>0)){e.next=20;break}case 3:if(!this._internalBlockNumber){e.next=20;break}return r=this._internalBlockNumber,e.prev=5,e.next=8,r;case 8:if(n=e.sent,!(Tu()-n.respTime<=t)){e.next=11;break}return e.abrupt("return",n.blockNumber);case 11:return e.abrupt("break",20);case 14:if(e.prev=14,e.t0=e.catch(5),this._internalBlockNumber!==r){e.next=18;break}return e.abrupt("break",20);case 18:e.next=3;break;case 20:return o=Tu(),i=T({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(t){return null}),(function(t){return t}))}).then((function(t){var e=t.blockNumber,r=t.networkError;if(r)throw a._internalBlockNumber===i&&(a._internalBlockNumber=null),r;var n=Tu();return(e=y.from(e).toNumber())<a._maxInternalBlockNumber&&(e=a._maxInternalBlockNumber),a._maxInternalBlockNumber=e,a._setFastBlockNumber(e),{blockNumber:e,reqTime:o,respTime:n}})),this._internalBlockNumber=i,i.catch((function(t){a._internalBlockNumber===i&&(a._internalBlockNumber=null)})),e.next=26,i;case 26:return e.abrupt("return",e.sent.blockNumber);case 27:case"end":return e.stop()}}),e,this,[[5,14]])})))}},{key:"poll",value:function(){return xu(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n,o,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Qu++,r=[],n=null,t.prev=3,t.next=6,this._getInternalBlockNumber(100+this.pollingInterval/2);case 6:n=t.sent,t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(3),this.emit("error",t.t0),t.abrupt("return");case 13:if(this._setFastBlockNumber(n),this.emit("poll",e,n),n!==this._lastBlockNumber){t.next=18;break}return this.emit("didPoll",e),t.abrupt("return");case 18:if(-2===this._emitted.block&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ou.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(n,")")),this.emit("error",Ou.makeError("network block skew detected",h.b.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(o=this._emitted.block+1;o<=n;o++)this.emit("block",o);return this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach((function(t){if("block"!==t){var e=i._emitted[t];"pending"!==e&&n-e>12&&delete i._emitted[t]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=n-1),this._events.forEach((function(t){switch(t.type){case"tx":var e=t.hash,o=i.getTransactionReceipt(e).then((function(t){return t&&null!=t.blockNumber?(i._emitted["t:"+e]=t.blockNumber,i.emit(e,t),null):null})).catch((function(t){i.emit("error",t)}));r.push(o);break;case"filter":if(!t._inflight){t._inflight=!0,-2===t._lastBlockNumber&&(t._lastBlockNumber=n-1);var a=t.filter;a.fromBlock=t._lastBlockNumber+1,a.toBlock=n;var s=a.toBlock-i._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);var u=i.getLogs(a).then((function(e){t._inflight=!1,0!==e.length&&e.forEach((function(e){e.blockNumber>t._lastBlockNumber&&(t._lastBlockNumber=e.blockNumber),i._emitted["b:"+e.blockHash]=e.blockNumber,i._emitted["t:"+e.transactionHash]=e.blockNumber,i.emit(a,e)}))})).catch((function(e){i.emit("error",e),t._inflight=!1}));r.push(u)}}})),this._lastBlockNumber=n,Promise.all(r).then((function(){i.emit("didPoll",e)})).catch((function(t){i.emit("error",t)})),t.abrupt("return");case 26:case"end":return t.stop()}}),t,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return xu(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Ou.throwError("provider does not support network detection",h.b.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return t.stop()}}),t)})))}},{key:"getNetwork",value:function(){return xu(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:return e=t.sent,t.next=5,this.detectNetwork();case 5:if(r=t.sent,e.chainId===r.chainId){t.next=23;break}if(!this.anyNetwork){t.next=20;break}return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),t.next=19,ju(0);case 19:return t.abrupt("return",this._network);case 20:throw n=Ou.makeError("underlying network changed",h.b.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r}),this.emit("error",n),n;case 23:return t.abrupt("return",e);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"blockNumber",get:function(){var t=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(e){t._setFastBlockNumber(e)}),(function(t){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(t){var e=this;t&&!this._poller?(this._poller=setInterval((function(){e.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){e.poll(),e._bootstrapPoll=setTimeout((function(){e._poller||e.poll(),e._bootstrapPoll=null}),e.pollingInterval)}),0))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(t){var e=this;if("number"!=typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){e.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var t=this,e=Tu();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((function(e){return(null==t._fastBlockNumber||e>t._fastBlockNumber)&&(t._fastBlockNumber=e),t._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(t){null!=this._fastBlockNumber&&t<this._fastBlockNumber||(this._fastQueryDate=Tu(),(null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}},{key:"waitForTransaction",value:function(t,e,r){return xu(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._waitForTransaction(t,null==e?1:e,r||0,null));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_waitForTransaction",value:function(t,e,r,n){return xu(this,void 0,void 0,regeneratorRuntime.mark((function o(){var i,a=this;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.getTransactionReceipt(t);case 2:if(!(((i=o.sent)?i.confirmations:0)>=e)){o.next=5;break}return o.abrupt("return",i);case 5:return o.abrupt("return",new Promise((function(o,i){var s=[],u=!1,c=function(){return!!u||(u=!0,s.forEach((function(t){t()})),!1)},f=function(t){t.confirmations<e||c()||o(t)};if(a.on(t,f),s.push((function(){a.removeListener(t,f)})),n){var l=n.startBlock,p=null,d=function r(o){return xu(a,void 0,void 0,regeneratorRuntime.mark((function a(){var s=this;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!u){a.next=2;break}return a.abrupt("return");case 2:return a.next=4,ju(1e3);case 4:this.getTransactionCount(n.from).then((function(a){return xu(s,void 0,void 0,regeneratorRuntime.mark((function s(){var f,d,m,v,g,y;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!u){s.next=2;break}return s.abrupt("return");case 2:if(!(a<=n.nonce)){s.next=6;break}l=o,s.next=41;break;case 6:return s.next=8,this.getTransaction(t);case 8:if(!(f=s.sent)||null==f.blockNumber){s.next=11;break}return s.abrupt("return");case 11:null==p&&(p=l-3)<n.startBlock&&(p=n.startBlock);case 12:if(!(p<=o)){s.next=41;break}if(!u){s.next=15;break}return s.abrupt("return");case 15:return s.next=17,this.getBlockWithTransactions(p);case 17:d=s.sent,m=0;case 19:if(!(m<d.transactions.length)){s.next=38;break}if((v=d.transactions[m]).hash!==t){s.next=23;break}return s.abrupt("return");case 23:if(v.from!==n.from||v.nonce!==n.nonce){s.next=35;break}if(!u){s.next=26;break}return s.abrupt("return");case 26:return s.next=28,this.waitForTransaction(v.hash,e);case 28:if(g=s.sent,!c()){s.next=31;break}return s.abrupt("return");case 31:return y="replaced",v.data===n.data&&v.to===n.to&&v.value.eq(n.value)?y="repriced":"0x"===v.data&&v.from===v.to&&v.value.isZero()&&(y="cancelled"),i(Ou.makeError("transaction was replaced",h.b.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===y||"cancelled"===y,reason:y,replacement:this._wrapTransaction(v),hash:t,receipt:g})),s.abrupt("return");case 35:m++,s.next=19;break;case 38:p++,s.next=12;break;case 41:if(!u){s.next=43;break}return s.abrupt("return");case 43:this.once("block",r);case 44:case"end":return s.stop()}}),s,this)})))}),(function(t){u||s.once("block",r)}));case 5:case"end":return a.stop()}}),a,this)})))};if(u)return;a.once("block",d),s.push((function(){a.removeListener("block",d)}))}if("number"==typeof r&&r>0){var m=setTimeout((function(){c()||i(Ou.makeError("timeout exceeded",h.b.errors.TIMEOUT,{timeout:r}))}),r);m.unref&&m.unref(),s.push((function(){clearTimeout(m)}))}})));case 6:case"end":return o.stop()}}),o,this)})))}},{key:"getBlockNumber",value:function(){return xu(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getGasPrice",value:function(){return xu(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,this.perform("getGasPrice",{});case 4:return e=t.sent,t.prev=5,t.abrupt("return",y.from(e));case 9:return t.prev=9,t.t0=t.catch(5),t.abrupt("return",Ou.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t.t0}));case 12:case"end":return t.stop()}}),t,this,[[5,9]])})))}},{key:"getBalance",value:function(t,e){return xu(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,T({address:this._getAddress(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("getBalance",n);case 7:return o=r.sent,r.prev=8,r.abrupt("return",y.from(o));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Ou.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getBalance",params:n,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(t,e){return xu(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,T({address:this._getAddress(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("getTransactionCount",n);case 7:return o=r.sent,r.prev=8,r.abrupt("return",y.from(o).toNumber());case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Ou.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getCode",value:function(t,e){return xu(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,T({address:this._getAddress(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("getCode",n);case 7:return o=r.sent,r.prev=8,r.abrupt("return",Object(c.i)(o));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Ou.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getCode",params:n,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getStorageAt",value:function(t,e,r){return xu(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,T({address:this._getAddress(t),blockTag:this._getBlockTag(r),position:Promise.resolve(e).then((function(t){return Object(c.g)(t)}))});case 4:return o=n.sent,n.next=7,this.perform("getStorageAt",o);case 7:return i=n.sent,n.prev=8,n.abrupt("return",Object(c.i)(i));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",Ou.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getStorageAt",params:o,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(t,e,r){var n=this;if(null!=e&&32!==Object(c.d)(e))throw new Error("invalid response - sendTransaction");var o=t;return null!=e&&t.hash!==e&&Ou.throwError("Transaction hash mismatch from Provider.sendTransaction.",h.b.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),o.wait=function(e,o){return xu(n,void 0,void 0,regeneratorRuntime.mark((function n(){var i,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==e&&(e=1),null==o&&(o=0),i=void 0,0!==e&&null!=r&&(i={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:r}),n.next=6,this._waitForTransaction(t.hash,e,o,i);case 6:if(null!=(a=n.sent)||0!==e){n.next=9;break}return n.abrupt("return",null);case 9:return this._emitted["t:"+t.hash]=a.blockNumber,0===a.status&&Ou.throwError("transaction failed",h.b.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:a}),n.abrupt("return",a);case 12:case"end":return n.stop()}}),n,this)})))},o}},{key:"sendTransaction",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,Promise.resolve(t).then((function(t){return Object(c.i)(t)}));case 4:return r=e.sent,null==(n=this.formatter.transaction(t)).confirmations&&(n.confirmations=0),e.next=9,this._getInternalBlockNumber(100+2*this.pollingInterval);case 9:return o=e.sent,e.prev=10,e.next=13,this.perform("sendTransaction",{signedTransaction:r});case 13:return i=e.sent,e.abrupt("return",this._wrapTransaction(n,i,o));case 17:throw e.prev=17,e.t0=e.catch(10),e.t0.transaction=n,e.t0.transactionHash=n.hash,e.t0;case 22:case"end":return e.stop()}}),e,this,[[10,17]])})))}},{key:"_getTransactionRequest",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return r=e.sent,n={},["from","to"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return t?o._getAddress(t):null})))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return t?y.from(t):null})))})),["type"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return null!=t?t:null})))})),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return t?Object(c.i)(t):null})))})),e.t0=this.formatter,e.next=12,T(n);case 12:return e.t1=e.sent,e.abrupt("return",e.t0.transactionRequest.call(e.t0,e.t1));case 14:case"end":return e.stop()}}),e,this)})))}},{key:"_getFilter",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,r={},null!=t.address&&(r.address=this._getAddress(t.address)),["blockHash","topics"].forEach((function(e){null!=t[e]&&(r[e]=t[e])})),["fromBlock","toBlock"].forEach((function(e){null!=t[e]&&(r[e]=n._getBlockTag(t[e]))})),e.t0=this.formatter,e.next=10,T(r);case 10:return e.t1=e.sent,e.abrupt("return",e.t0.filter.call(e.t0,e.t1));case 12:case"end":return e.stop()}}),e,this)})))}},{key:"_call",value:function(t,e,r){return xu(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a,s,u,f,l,p,d,m,v,g,b,w,k;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r>=10&&Ou.throwError("CCIP read exceeded maximum redirections",h.b.errors.SERVER_ERROR,{redirects:r,transaction:t}),o=t.to,n.next=4,this.perform("call",{transaction:t,blockTag:e});case 4:if(i=n.sent,!(r>=0&&"latest"===e&&null!=o&&"0x556f1830"===i.substring(0,10)&&Object(c.d)(i)%32==4)){n.next=31;break}for(n.prev=6,a=Object(c.e)(i,4),s=Object(c.e)(a,0,32),y.from(s).eq(o)||Ou.throwError("CCIP Read sender did not match",h.b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),u=[],f=y.from(Object(c.e)(a,32,64)).toNumber(),l=y.from(Object(c.e)(a,f,f+32)).toNumber(),p=Object(c.e)(a,f+32),d=0;d<l;d++)null==(m=Uu(p,32*d))&&Ou.throwError("CCIP Read contained corrupt URL string",h.b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),u.push(m);return v=Lu(a,64),y.from(Object(c.e)(a,100,128)).isZero()||Ou.throwError("CCIP Read callback selector included junk",h.b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),g=Object(c.e)(a,96,100),b=Lu(a,128),n.next=21,this.ccipReadFetch(t,v,u);case 21:return null==(w=n.sent)&&Ou.throwError("CCIP Read disabled or provided no URLs",h.b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),k={to:o,data:Object(c.c)([g,Gu([w,b])])},n.abrupt("return",this._call(k,e,r+1));case 27:if(n.prev=27,n.t0=n.catch(6),n.t0.code!==h.b.errors.SERVER_ERROR){n.next=31;break}throw n.t0;case 31:return n.prev=31,n.abrupt("return",Object(c.i)(i));case 35:return n.prev=35,n.t1=n.catch(31),n.abrupt("return",Ou.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"call",params:{transaction:t,blockTag:e},result:i,error:n.t1}));case 38:case"end":return n.stop()}}),n,this,[[6,27],[31,35]])})))}},{key:"call",value:function(t,e){return xu(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,T({transaction:this._getTransactionRequest(t),blockTag:this._getBlockTag(e),ccipReadEnabled:Promise.resolve(t.ccipReadEnabled)});case 4:return n=r.sent,r.abrupt("return",this._call(n.transaction,n.blockTag,n.ccipReadEnabled?0:-1));case 6:case"end":return r.stop()}}),r,this)})))}},{key:"estimateGas",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,T({transaction:this._getTransactionRequest(t)});case 4:return r=e.sent,e.next=7,this.perform("estimateGas",r);case 7:return n=e.sent,e.prev=8,e.abrupt("return",y.from(n));case 12:return e.prev=12,e.t0=e.catch(8),e.abrupt("return",Ou.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"estimateGas",params:r,result:n,error:e.t0}));case 15:case"end":return e.stop()}}),e,this,[[8,12]])})))}},{key:"_getAddress",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return"string"!=typeof(t=e.sent)&&Ou.throwArgumentError("invalid address or ENS name","name",t),e.next=6,this.resolveName(t);case 6:return null==(r=e.sent)&&Ou.throwError("ENS name not configured",h.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName(".concat(JSON.stringify(t),")")}),e.abrupt("return",r);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"_getBlock",value:function(t,e){return xu(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,t;case 4:if(t=r.sent,n=-128,o={includeTransactions:!!e},!Object(c.l)(t,32)){r.next=11;break}o.blockHash=t,r.next=21;break;case 11:return r.prev=11,r.next=14,this._getBlockTag(t);case 14:o.blockTag=r.sent,Object(c.l)(o.blockTag)&&(n=parseInt(o.blockTag.substring(2),16)),r.next=21;break;case 18:r.prev=18,r.t0=r.catch(11),Ou.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",t);case 21:return r.abrupt("return",au((function(){return xu(i,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i,a,s,u,c,f=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.perform("getBlock",o);case 2:if(null!=(r=t.sent)){t.next=11;break}if(null==o.blockHash){t.next=7;break}if(null!=this._emitted["b:"+o.blockHash]){t.next=7;break}return t.abrupt("return",null);case 7:if(null==o.blockTag){t.next=10;break}if(!(n>this._emitted.block)){t.next=10;break}return t.abrupt("return",null);case 10:return t.abrupt("return",void 0);case 11:if(!e){t.next=34;break}i=null,a=0;case 14:if(!(a<r.transactions.length)){t.next=31;break}if(null!=(s=r.transactions[a]).blockNumber){t.next=20;break}s.confirmations=0,t.next=28;break;case 20:if(null!=s.confirmations){t.next=28;break}if(null!=i){t.next=25;break}return t.next=24,this._getInternalBlockNumber(100+2*this.pollingInterval);case 24:i=t.sent;case 25:(u=i-s.blockNumber+1)<=0&&(u=1),s.confirmations=u;case 28:a++,t.next=14;break;case 31:return(c=this.formatter.blockWithTransactions(r)).transactions=c.transactions.map((function(t){return f._wrapTransaction(t)})),t.abrupt("return",c);case 34:return t.abrupt("return",this.formatter.block(r));case 35:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this}));case 22:case"end":return r.stop()}}),r,this,[[11,18]])})))}},{key:"getBlock",value:function(t){return this._getBlock(t,!1)}},{key:"getBlockWithTransactions",value:function(t){return this._getBlock(t,!0)}},{key:"getTransaction",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,t;case 4:return t=e.sent,r={transactionHash:this.formatter.hash(t,!0)},e.abrupt("return",au((function(){return xu(n,void 0,void 0,regeneratorRuntime.mark((function e(){var n,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getTransaction",r);case 2:if(null!=(n=e.sent)){e.next=7;break}if(null!=this._emitted["t:"+t]){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",void 0);case 7:if(null!=(o=this.formatter.transactionResponse(n)).blockNumber){e.next=12;break}o.confirmations=0,e.next=19;break;case 12:if(null!=o.confirmations){e.next=19;break}return e.next=15,this._getInternalBlockNumber(100+2*this.pollingInterval);case 15:i=e.sent,(a=i-o.blockNumber+1)<=0&&(a=1),o.confirmations=a;case 19:return e.abrupt("return",this._wrapTransaction(o));case 20:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this}));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getTransactionReceipt",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,t;case 4:return t=e.sent,r={transactionHash:this.formatter.hash(t,!0)},e.abrupt("return",au((function(){return xu(n,void 0,void 0,regeneratorRuntime.mark((function e(){var n,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getTransactionReceipt",r);case 2:if(null!=(n=e.sent)){e.next=7;break}if(null!=this._emitted["t:"+t]){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",void 0);case 7:if(null!=n.blockHash){e.next=9;break}return e.abrupt("return",void 0);case 9:if(null!=(o=this.formatter.receipt(n)).blockNumber){e.next=14;break}o.confirmations=0,e.next=21;break;case 14:if(null!=o.confirmations){e.next=21;break}return e.next=17,this._getInternalBlockNumber(100+2*this.pollingInterval);case 17:i=e.sent,(a=i-o.blockNumber+1)<=0&&(a=1),o.confirmations=a;case 21:return e.abrupt("return",o);case 22:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this}));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getLogs",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,T({filter:this._getFilter(t)});case 4:return r=e.sent,e.next=7,this.perform("getLogs",r);case 7:return(n=e.sent).forEach((function(t){null==t.removed&&(t.removed=!1)})),e.abrupt("return",lu.arrayOf(this.formatter.filterLog.bind(this.formatter))(n));case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getEtherPrice",value:function(){return xu(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.abrupt("return",this.perform("getEtherPrice",{}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"_getBlockTag",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:if(!("number"==typeof(t=e.sent)&&t<0)){e.next=11;break}return t%1&&Ou.throwArgumentError("invalid BlockTag","blockTag",t),e.next=7,this._getInternalBlockNumber(100+2*this.pollingInterval);case 7:return r=e.sent,(r+=t)<0&&(r=0),e.abrupt("return",this.formatter.blockTag(r));case 11:return e.abrupt("return",this.formatter.blockTag(t));case 12:case"end":return e.stop()}}),e,this)})))}},{key:"getResolver",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t;case 1:if(""!==r&&"."!==r){e.next=4;break}return e.abrupt("return",null);case 4:if("eth"===t||"eth"!==r){e.next=6;break}return e.abrupt("return",null);case 6:return e.next=8,this._getResolver(r,"getResolver");case 8:if(null==(n=e.sent)){e.next=19;break}if(o=new Ku(this,n,t),e.t0=r!==t,!e.t0){e.next=16;break}return e.next=15,o.supportsWildcard();case 15:e.t0=!e.sent;case 16:if(!e.t0){e.next=18;break}return e.abrupt("return",null);case 18:return e.abrupt("return",o);case 19:r=r.split(".").slice(1).join("."),e.next=1;break;case 22:case"end":return e.stop()}}),e,this)})))}},{key:"_getResolver",value:function(t,e){return xu(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==e&&(e="ENS"),r.next=3,this.getNetwork();case 3:return(n=r.sent).ensAddress||Ou.throwError("network does not support ENS",h.b.errors.UNSUPPORTED_OPERATION,{operation:e,network:n.name}),r.prev=5,r.next=8,this.call({to:n.ensAddress,data:"0x0178b8bf"+Js(t).substring(2)});case 8:return o=r.sent,r.abrupt("return",this.formatter.callAddress(o));case 12:r.prev=12,r.t0=r.catch(5);case 14:return r.abrupt("return",null);case 15:case"end":return r.stop()}}),r,this,[[5,12]])})))}},{key:"resolveName",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,e.prev=3,e.abrupt("return",Promise.resolve(this.formatter.address(t)));case 7:if(e.prev=7,e.t0=e.catch(3),!Object(c.l)(t)){e.next=11;break}throw e.t0;case 11:return"string"!=typeof t&&Ou.throwArgumentError("invalid ENS name","name",t),e.next=14,this.getResolver(t);case 14:if(r=e.sent){e.next=17;break}return e.abrupt("return",null);case 17:return e.next=19,r.getAddress();case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop()}}),e,this,[[3,7]])})))}},{key:"lookupAddress",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,t=this.formatter.address(t),r=t.substring(2).toLowerCase()+".addr.reverse",e.next=7,this._getResolver(r,"lookupAddress");case 7:if(null!=(n=e.sent)){e.next=10;break}return e.abrupt("return",null);case 10:return e.t0=Uu,e.next=13,this.call({to:n,data:"0x691f3431"+Js(r).substring(2)});case 13:return e.t1=e.sent,o=(0,e.t0)(e.t1,0),e.next=17,this.resolveName(o);case 17:if(e.sent==t){e.next=20;break}return e.abrupt("return",null);case 20:return e.abrupt("return",o);case 21:case"end":return e.stop()}}),e,this)})))}},{key:"getAvatar",value:function(t){return xu(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o,i,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null,!Object(c.l)(t)){e.next=40;break}return n=this.formatter.address(t),o=n.substring(2).toLowerCase()+".addr.reverse",e.next=6,this._getResolver(o,"getAvatar");case 6:if(i=e.sent){e.next=9;break}return e.abrupt("return",null);case 9:return r=new Ku(this,i,o),e.prev=10,e.next=13,r.getAvatar();case 13:if(!(a=e.sent)){e.next=16;break}return e.abrupt("return",a.url);case 16:e.next=22;break;case 18:if(e.prev=18,e.t0=e.catch(10),e.t0.code===h.b.errors.CALL_EXCEPTION){e.next=22;break}throw e.t0;case 22:return e.prev=22,e.t1=Uu,e.next=26,this.call({to:i,data:"0x691f3431"+Js(o).substring(2)});case 26:return e.t2=e.sent,s=(0,e.t1)(e.t2,0),e.next=30,this.getResolver(s);case 30:r=e.sent,e.next=38;break;case 33:if(e.prev=33,e.t3=e.catch(22),e.t3.code===h.b.errors.CALL_EXCEPTION){e.next=37;break}throw e.t3;case 37:return e.abrupt("return",null);case 38:e.next=45;break;case 40:return e.next=42,this.getResolver(t);case 42:if(r=e.sent){e.next=45;break}return e.abrupt("return",null);case 45:return e.next=47,r.getAvatar();case 47:if(null!=(u=e.sent)){e.next=50;break}return e.abrupt("return",null);case 50:return e.abrupt("return",u.url);case 51:case"end":return e.stop()}}),e,this,[[10,18],[22,33]])})))}},{key:"perform",value:function(t,e){return Ou.throwError(t+" not implemented",h.b.errors.NOT_IMPLEMENTED,{operation:t})}},{key:"_startEvent",value:function(t){this.polling=this._events.filter((function(t){return t.pollable()})).length>0}},{key:"_stopEvent",value:function(t){this.polling=this._events.filter((function(t){return t.pollable()})).length>0}},{key:"_addEventListener",value:function(t,e,r){var n=new Nu(Ru(t),e,r);return this._events.push(n),this._startEvent(n),this}},{key:"on",value:function(t,e){return this._addEventListener(t,e,!1)}},{key:"once",value:function(t,e){return this._addEventListener(t,e,!0)}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=!1,a=[],s=Ru(t);return this._events=this._events.filter((function(t){return t.tag!==s||(setTimeout((function(){t.listener.apply(e,n)}),0),i=!0,!t.once||(a.push(t),!1))})),a.forEach((function(t){e._stopEvent(t)})),i}},{key:"listenerCount",value:function(t){if(!t)return this._events.length;var e=Ru(t);return this._events.filter((function(t){return t.tag===e})).length}},{key:"listeners",value:function(t){if(null==t)return this._events.map((function(t){return t.listener}));var e=Ru(t);return this._events.filter((function(t){return t.tag===e})).map((function(t){return t.listener}))}},{key:"off",value:function(t,e){var r=this;if(null==e)return this.removeAllListeners(t);var n=[],o=!1,i=Ru(t);return this._events=this._events.filter((function(t){return t.tag!==i||t.listener!=e||(!!o||(o=!0,n.push(t),!1))})),n.forEach((function(t){r._stopEvent(t)})),this}},{key:"removeAllListeners",value:function(t){var e=this,r=[];if(null==t)r=this._events,this._events=[];else{var n=Ru(t);this._events=this._events.filter((function(t){return t.tag!==n||(r.push(t),!1)}))}return r.forEach((function(t){e._stopEvent(t)})),this}}],[{key:"getFormatter",value:function(){return null==Wu&&(Wu=new lu),Wu}},{key:"getNetwork",value:function(t){return gs(null==t?"homestead":t)}}]),r}(_n);function Ju(){return(Ju="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Yu(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Yu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ic(t)););return t}function Zu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xu(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)}}function $u(t,e,r){return e&&Xu(t.prototype,e),r&&Xu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function tc(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ec(t,e)}function ec(t,e){return(ec=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function rc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ic(t);if(e){var o=ic(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nc(this,r)}}function nc(t,e){if(e&&("object"===ac(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return oc(t)}function oc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ic(t){return(ic=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ac(t){return(ac="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)}var sc=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},uc=new h.b("providers/5.7.2"),cc=["call","estimateGas"];function fc(t,e){if(null==t)return null;if("string"==typeof t.message&&t.message.match("reverted")){var r=Object(c.l)(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if("object"===ac(t)){for(var n in t){var o=fc(t[n],e);if(o)return o}return null}if("string"==typeof t)try{return fc(JSON.parse(t),e)}catch(t){}return null}function lc(t,e,r){var n=r.transaction||r.signedTransaction;if("call"===t){var o=fc(e,!0);if(o)return o.data;uc.throwError("missing revert data in call exception; Transaction reverted without a reason string",h.b.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if("estimateGas"===t){var i=fc(e.body,!1);null==i&&(i=fc(e,!1)),i&&uc.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.b.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}var a=e.message;throw e.code===h.b.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?a=e.error.message:"string"==typeof e.body?a=e.body:"string"==typeof e.responseText&&(a=e.responseText),(a=(a||"").toLowerCase()).match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&uc.throwError("insufficient funds for intrinsic transaction cost",h.b.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),a.match(/nonce (is )?too low/i)&&uc.throwError("nonce has already been used",h.b.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),a.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&uc.throwError("replacement fee too low",h.b.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),a.match(/only replay-protected/i)&&uc.throwError("legacy pre-eip-155 transactions not supported",h.b.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),cc.indexOf(t)>=0&&a.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&uc.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function hc(t){return new Promise((function(e){setTimeout(e,t)}))}function pc(t){if(t.error){var e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function dc(t){return t?t.toLowerCase():t}var mc={},vc=function(t){tc(r,t);var e=rc(r);function r(t,n,o){var i;if(Zu(this,r),i=e.call(this),t!==mc)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return P(oc(i),"provider",n),null==o&&(o=0),"string"==typeof o?(P(oc(i),"_address",i.provider.formatter.address(o)),P(oc(i),"_index",null)):"number"==typeof o?(P(oc(i),"_index",o),P(oc(i),"_address",null)):uc.throwArgumentError("invalid address or index","addressOrIndex",o),i}return $u(r,[{key:"connect",value:function(t){return uc.throwError("cannot alter JSON-RPC Signer connection",h.b.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new gc(mc,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var t=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(e){return e.length<=t._index&&uc.throwError("unknown account #"+t._index,h.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),t.provider.formatter.address(e[t._index])}))}},{key:"sendUncheckedTransaction",value:function(t){var e=this;t=I(t);var r=this.getAddress().then((function(t){return t&&(t=t.toLowerCase()),t}));if(null==t.gasLimit){var n=I(t);n.from=r,t.gasLimit=this.provider.estimateGas(n)}return null!=t.to&&(t.to=Promise.resolve(t.to).then((function(t){return sc(e,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,this.provider.resolveName(t);case 4:return null==(r=e.sent)&&uc.throwArgumentError("provided ENS name resolves to null","tx.to",t),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})))}))),T({tx:T(t),sender:r}).then((function(r){var n=r.tx,o=r.sender;null!=n.from?n.from.toLowerCase()!==o&&uc.throwArgumentError("from address mismatch","transaction",t):n.from=o;var i=e.provider.constructor.hexlifyTransaction(n,{from:!0});return e.provider.send("eth_sendTransaction",[i]).then((function(t){return t}),(function(t){return"string"==typeof t.message&&t.message.match(/user denied/i)&&uc.throwError("user rejected transaction",h.b.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),lc("sendTransaction",t,i)}))}))}},{key:"signTransaction",value:function(t){return uc.throwError("signing transactions is unsupported",h.b.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(t){return sc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);case 2:return r=e.sent,e.next=5,this.sendUncheckedTransaction(t);case 5:return n=e.sent,e.prev=6,e.next=9,au((function(){return sc(o,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider.getTransaction(n);case 2:if(null!==(e=t.sent)){t.next=5;break}return t.abrupt("return",void 0);case 5:return t.abrupt("return",this.provider._wrapTransaction(e,n,r));case 6:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this.provider});case 9:return e.abrupt("return",e.sent);case 12:throw e.prev=12,e.t0=e.catch(6),e.t0.transactionHash=n,e.t0;case 16:case"end":return e.stop()}}),e,this,[[6,12]])})))}},{key:"signMessage",value:function(t){return sc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="string"==typeof t?wt(t):t,e.next=3,this.getAddress();case 3:return n=e.sent,e.prev=4,e.next=7,this.provider.send("personal_sign",[Object(c.i)(r),n.toLowerCase()]);case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(4),"string"==typeof e.t0.message&&e.t0.message.match(/user denied/i)&&uc.throwError("user rejected signing",h.b.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:t}),e.t0;case 14:case"end":return e.stop()}}),e,this,[[4,10]])})))}},{key:"_legacySignMessage",value:function(t){return sc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="string"==typeof t?wt(t):t,e.next=3,this.getAddress();case 3:return n=e.sent,e.prev=4,e.next=7,this.provider.send("eth_sign",[n.toLowerCase(),Object(c.i)(r)]);case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(4),"string"==typeof e.t0.message&&e.t0.message.match(/user denied/i)&&uc.throwError("user rejected signing",h.b.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:t}),e.t0;case 14:case"end":return e.stop()}}),e,this,[[4,10]])})))}},{key:"_signTypedData",value:function(t,e,r){return sc(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,ki.resolveNames(t,e,r,(function(t){return a.provider.resolveName(t)}));case 2:return o=n.sent,n.next=5,this.getAddress();case 5:return i=n.sent,n.prev=6,n.next=9,this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(ki.getPayload(o.domain,e,o.value))]);case 9:return n.abrupt("return",n.sent);case 12:throw n.prev=12,n.t0=n.catch(6),"string"==typeof n.t0.message&&n.t0.message.match(/user denied/i)&&uc.throwError("user rejected signing",h.b.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:o.domain,types:e,value:o.value}}),n.t0;case 16:case"end":return n.stop()}}),n,this,[[6,12]])})))}},{key:"unlock",value:function(t){return sc(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.provider,e.next=3,this.getAddress();case 3:return n=e.sent,e.abrupt("return",r.send("personal_unlockAccount",[n.toLowerCase(),t,null]));case 5:case"end":return e.stop()}}),e,this)})))}}]),r}(Bn),gc=function(t){tc(r,t);var e=rc(r);function r(){return Zu(this,r),e.apply(this,arguments)}return $u(r,[{key:"sendTransaction",value:function(t){var e=this;return this.sendUncheckedTransaction(t).then((function(t){return{hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(r){return e.provider.waitForTransaction(t,r)}}}))}}]),r}(vc),yc={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},bc=function(t){tc(r,t);var e=rc(r);function r(t,n){var o;Zu(this,r);var i=n;return null==i&&(i=new Promise((function(t,e){setTimeout((function(){o.detectNetwork().then((function(e){t(e)}),(function(t){e(t)}))}),0)}))),o=e.call(this,i),t||(t=R(o.constructor,"defaultUrl")()),P(oc(o),"connection","string"==typeof t?Object.freeze({url:t}):Object.freeze(I(t))),o._nextId=42,o}return $u(r,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var t=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){t._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return sc(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,hc(0);case 2:return e=null,t.prev=3,t.next=6,this.send("eth_chainId",[]);case 6:e=t.sent,t.next=19;break;case 9:return t.prev=9,t.t0=t.catch(3),t.prev=11,t.next=14,this.send("net_version",[]);case 14:e=t.sent,t.next=19;break;case 17:t.prev=17,t.t1=t.catch(11);case 19:if(null==e){t.next=28;break}return r=R(this.constructor,"getNetwork"),t.prev=21,t.abrupt("return",r(y.from(e).toNumber()));case 25:return t.prev=25,t.t2=t.catch(21),t.abrupt("return",uc.throwError("could not detect network",h.b.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t.t2}));case 28:return t.abrupt("return",uc.throwError("could not detect network",h.b.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return t.stop()}}),t,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(t){return new vc(mc,this,t)}},{key:"getUncheckedSigner",value:function(t){return this.getSigner(t).connectUnchecked()}},{key:"listAccounts",value:function(){var t=this;return this.send("eth_accounts",[]).then((function(e){return e.map((function(e){return t.formatter.address(e)}))}))}},{key:"send",value:function(t,e){var r=this,n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:M(n),provider:this});var o=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(o&&this._cache[t])return this._cache[t];var i=iu(this.connection,JSON.stringify(n),pc).then((function(t){return r.emit("debug",{action:"response",request:n,response:t,provider:r}),t}),(function(t){throw r.emit("debug",{action:"response",error:t,request:n,provider:r}),t}));return o&&(this._cache[t]=i,setTimeout((function(){r._cache[t]=null}),0)),i}},{key:"prepareRequest",value:function(t,e){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[dc(e.address),e.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[dc(e.address),e.blockTag]];case"getCode":return["eth_getCode",[dc(e.address),e.blockTag]];case"getStorageAt":return["eth_getStorageAt",[dc(e.address),Object(c.h)(e.position,32),e.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[e.signedTransaction]];case"getBlock":return e.blockTag?["eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]]:e.blockHash?["eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[e.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[e.transactionHash]];case"call":return["eth_call",[R(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0}),e.blockTag]];case"estimateGas":return["eth_estimateGas",[R(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0})]];case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=dc(e.filter.address)),["eth_getLogs",[e.filter]]}return null}},{key:"perform",value:function(t,e){return sc(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("call"!==t&&"estimateGas"!==t){r.next=8;break}if(!(n=e.transaction)||null==n.type||!y.from(n.type).isZero()){r.next=8;break}if(null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas){r.next=8;break}return r.next=6,this.getFeeData();case 6:null==(o=r.sent).maxFeePerGas&&null==o.maxPriorityFeePerGas&&((e=I(e)).transaction=I(n),delete e.transaction.type);case 8:return null==(i=this.prepareRequest(t,e))&&uc.throwError(t+" not implemented",h.b.errors.NOT_IMPLEMENTED,{operation:t}),r.prev=10,r.next=13,this.send(i[0],i[1]);case 13:return r.abrupt("return",r.sent);case 16:return r.prev=16,r.t0=r.catch(10),r.abrupt("return",lc(t,r.t0,e));case 19:case"end":return r.stop()}}),r,this,[[10,16]])})))}},{key:"_startEvent",value:function(t){"pending"===t.tag&&this._startPending(),Ju(ic(r.prototype),"_startEvent",this).call(this,t)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var t=this,e=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=e,e.then((function(r){return function n(){t.send("eth_getFilterChanges",[r]).then((function(r){if(t._pendingFilter!=e)return null;var n=Promise.resolve();return r.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),n.then((function(){return hc(1e3)}))})).then((function(){if(t._pendingFilter==e)return setTimeout((function(){n()}),0),null;t.send("eth_uninstallFilter",[r])})).catch((function(t){}))}(),r})).catch((function(t){}))}}},{key:"_stopEvent",value:function(t){"pending"===t.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),Ju(ic(r.prototype),"_stopEvent",this).call(this,t)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(t,e){var r=I(yc);if(e)for(var n in e)e[n]&&(r[n]=!0);j(t,r);var o={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(e){if(null!=t[e]){var r=Object(c.g)(y.from(t[e]));"gasLimit"===e&&(e="gas"),o[e]=r}})),["from","to","data"].forEach((function(e){null!=t[e]&&(o[e]=Object(c.i)(t[e]))})),t.accessList&&(o.accessList=ro(t.accessList)),o}}]),r}(Vu),wc=null;try{if(null==(wc=WebSocket))throw new Error("inject please")}catch(t){var kc=new h.b("providers/5.7.2");wc=function(){kc.throwError("WebSockets not supported in this environment",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}function _c(t){return(_c="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 Ac(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)}}function Ec(t,e){return(Ec=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tc(t);if(e){var o=Tc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Oc(this,r)}}function Oc(t,e){if(e&&("object"===_c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Sc(t)}function Sc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pc(){return(Pc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Rc(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Rc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Tc(t)););return t}function Tc(t){return(Tc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jc=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Ic=new h.b("providers/5.7.2"),Nc=1,Cc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ec(t,e)}(i,t);var e,r,n,o=xc(i);function i(t,e){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),"any"===e&&Ic.throwError("WebSocketProvider does not support 'any' network yet",h.b.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),(n="string"==typeof t?o.call(this,t,e):o.call(this,"_websocket",e))._pollingInterval=-1,n._wsReady=!1,P(Sc(n),"_websocket","string"==typeof t?new wc(n.connection.url):t),P(Sc(n),"_requests",{}),P(Sc(n),"_subs",{}),P(Sc(n),"_subIds",{}),P(Sc(n),"_detectNetwork",Pc((r=Sc(n),Tc(i.prototype)),"detectNetwork",r).call(r)),n.websocket.onopen=function(){n._wsReady=!0,Object.keys(n._requests).forEach((function(t){n.websocket.send(n._requests[t].payload)}))},n.websocket.onmessage=function(t){var e=t.data,r=JSON.parse(e);if(null!=r.id){var o=String(r.id),i=n._requests[o];if(delete n._requests[o],void 0!==r.result)i.callback(null,r.result),n.emit("debug",{action:"response",request:JSON.parse(i.payload),response:r.result,provider:Sc(n)});else{var a=null;r.error?(P(a=new Error(r.error.message||"unknown error"),"code",r.error.code||null),P(a,"response",e)):a=new Error("unknown error"),i.callback(a,void 0),n.emit("debug",{action:"response",error:a,request:JSON.parse(i.payload),provider:Sc(n)})}}else if("eth_subscription"===r.method){var s=n._subs[r.params.subscription];s&&s.processFunc(r.params.result)}else console.warn("this should not happen")};var a=setInterval((function(){n.emit("poll")}),1e3);return a.unref&&a.unref(),Oc(n)}return e=i,n=[{key:"defaultUrl",value:function(){return"ws://localhost:8546"}}],(r=[{key:"websocket",get:function(){return this._websocket}},{key:"detectNetwork",value:function(){return this._detectNetwork}},{key:"pollingInterval",get:function(){return 0},set:function(t){Ic.throwError("cannot set polling interval on WebSocketProvider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}},{key:"resetEventsBlock",value:function(t){Ic.throwError("cannot reset events block on WebSocketProvider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}},{key:"poll",value:function(){return jc(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)})))}},{key:"polling",set:function(t){t&&Ic.throwError("cannot set polling on WebSocketProvider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}},{key:"send",value:function(t,e){var r=this,n=Nc++;return new Promise((function(o,i){var a=JSON.stringify({method:t,params:e,id:n,jsonrpc:"2.0"});r.emit("debug",{action:"request",request:JSON.parse(a),provider:r}),r._requests[String(n)]={callback:function(t,e){return t?i(t):o(e)},payload:a},r._wsReady&&r.websocket.send(a)}))}},{key:"_subscribe",value:function(t,e,r){return jc(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==(o=this._subIds[t])&&(o=Promise.all(e).then((function(t){return a.send("eth_subscribe",t)})),this._subIds[t]=o),n.next=4,o;case 4:i=n.sent,this._subs[i]={tag:t,processFunc:r};case 6:case"end":return n.stop()}}),n,this)})))}},{key:"_startEvent",value:function(t){var e=this;switch(t.type){case"block":this._subscribe("block",["newHeads"],(function(t){var r=y.from(t.number).toNumber();e._emitted.block=r,e.emit("block",r)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(function(t){e.emit("pending",t)}));break;case"filter":this._subscribe(t.tag,["logs",this._getFilter(t.filter)],(function(r){null==r.removed&&(r.removed=!1),e.emit(t.filter,e.formatter.filterLog(r))}));break;case"tx":var r=function(t){var r=t.hash;e.getTransactionReceipt(r).then((function(t){t&&e.emit(r,t)}))};r(t),this._subscribe("tx",["newHeads"],(function(t){e._events.filter((function(t){return"tx"===t.type})).forEach(r)}));break;case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",t)}}},{key:"_stopEvent",value:function(t){var e=this,r=t.tag;if("tx"===t.type){if(this._events.filter((function(t){return"tx"===t.type})).length)return;r="tx"}else if(this.listenerCount(t.event))return;var n=this._subIds[r];n&&(delete this._subIds[r],n.then((function(t){e._subs[t]&&(delete e._subs[t],e.send("eth_unsubscribe",[t]))})))}},{key:"destroy",value:function(){return jc(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.websocket.readyState!==wc.CONNECTING){t.next=3;break}return t.next=3,new Promise((function(t){e.websocket.onopen=function(){t(!0)},e.websocket.onerror=function(){t(!1)}}));case 3:this.websocket.close(1e3);case 4:case"end":return t.stop()}}),t,this)})))}}])&&Ac(e.prototype,r),n&&Ac(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(bc);function Mc(t){return(Mc="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 Bc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fc(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)}}function Dc(t,e,r){return e&&Fc(t.prototype,e),r&&Fc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Uc(){return(Uc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Lc(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Lc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Wc(t)););return t}function zc(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qc(t,e)}function qc(t,e){return(qc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Wc(t);if(e){var o=Wc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Gc(this,r)}}function Gc(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Kc(t)}function Kc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wc(t){return(Wc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qc=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Vc=new h.b("providers/5.7.2"),Jc=function(t){zc(r,t);var e=Hc(r);function r(){return Bc(this,r),e.apply(this,arguments)}return Dc(r,[{key:"detectNetwork",value:function(){var t=this,e=Object.create(null,{detectNetwork:{get:function(){return Uc(Wc(r.prototype),"detectNetwork",t)}}});return Qc(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(r=this.network)){t.next=7;break}return t.next=4,e.detectNetwork.call(this);case 4:(r=t.sent)||Vc.throwError("no network detected",h.b.errors.UNKNOWN_ERROR,{}),null==this._network&&(P(this,"_network",r),this.emit("network",r,null));case 7:return t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)})))}}]),r}(bc),Yc=function(t){zc(r,t);var e=Hc(r);function r(t,n){var o;Bc(this,r),Vc.checkAbstract(this instanceof r?this.constructor:void 0,r),t=R(this instanceof r?this.constructor:void 0,"getNetwork")(t),n=R(this instanceof r?this.constructor:void 0,"getApiKey")(n);var i=R(this instanceof r?this.constructor:void 0,"getUrl")(t,n);return o=e.call(this,i,t),"string"==typeof n?P(Kc(o),"apiKey",n):null!=n&&Object.keys(n).forEach((function(t){P(Kc(o),t,n[t])})),o}return Dc(r,[{key:"_startPending",value:function(){Vc.warn("WARNING: API provider does not support pending filters")}},{key:"isCommunityResource",value:function(){return!1}},{key:"getSigner",value:function(t){return Vc.throwError("API provider does not support signing",h.b.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}},{key:"listAccounts",value:function(){return Promise.resolve([])}}],[{key:"getApiKey",value:function(t){return t}},{key:"getUrl",value:function(t,e){return Vc.throwError("not implemented; sub-classes must override getUrl",h.b.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}]),r}(Jc);function Zc(t){return(Zc="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 Xc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $c(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)}}function tf(t,e,r){return e&&$c(t.prototype,e),r&&$c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ef(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rf(t,e)}function rf(t,e){return(rf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sf(t);if(e){var o=sf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return of(this,r)}}function of(t,e){if(e&&("object"===Zc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return af(t)}function af(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sf(t){return(sf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uf=new h.b("providers/5.7.2"),cf="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ff=function(t){ef(r,t);var e=nf(r);function r(t,n){var o;Xc(this,r);var i=new lf(t,n),a=i.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");return P(af(o=e.call(this,a,i.network)),"apiKey",i.apiKey),o}return tf(r,[{key:"isCommunityResource",value:function(){return this.apiKey===cf}}]),r}(Cc),lf=function(t){ef(r,t);var e=nf(r);function r(){return Xc(this,r),e.apply(this,arguments)}return tf(r,[{key:"isCommunityResource",value:function(){return this.apiKey===cf}}],[{key:"getWebSocketProvider",value:function(t,e){return new ff(t,e)}},{key:"getApiKey",value:function(t){return null==t?cf:(t&&"string"!=typeof t&&uf.throwArgumentError("invalid apiKey","apiKey",t),t)}},{key:"getUrl",value:function(t,e){var r=null;switch(t.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:uf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+e,throttleCallback:function(t,r){return e===cf&&mu(),Promise.resolve(!0)}}}}]),r}(Yc);function hf(t){return(hf="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 pf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function df(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)}}function mf(t,e){return(mf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yf(t);if(e){var o=yf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gf(this,r)}}function gf(t,e){if(e&&("object"===hf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yf(t){return(yf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var bf=new h.b("providers/5.7.2"),wf="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function kf(t){switch(t){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return bf.throwArgumentError("unsupported network","name",t)}var _f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mf(t,e)}(i,t);var e,r,n,o=vf(i);function i(){return pf(this,i),o.apply(this,arguments)}return e=i,n=[{key:"getApiKey",value:function(t){return null==t?wf:t}},{key:"getUrl",value:function(t,e){null==e&&(e=wf);var r={allowGzip:!0,url:"https://"+kf(t.name)+e,throttleCallback:function(t,r){return e.apiKey===wf&&mu(),Promise.resolve(!0)}};return null!=e.projectSecret&&(r.user="",r.password=e.projectSecret),r}}],(r=[{key:"isCommunityResource",value:function(){return this.apiKey===wf}}])&&df(e.prototype,r),n&&df(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Yc);function Af(t){return(Af="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 Ef(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xf(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)}}function Of(){return(Of="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Sf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Sf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jf(t)););return t}function Pf(t,e){return(Pf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Rf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=jf(t);if(e){var o=jf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tf(this,r)}}function Tf(t,e){if(e&&("object"===Af(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jf(t){return(jf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var If=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Nf=new h.b("providers/5.7.2"),Cf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pf(t,e)}(i,t);var e,r,n,o=Rf(i);function i(){return Ef(this,i),o.apply(this,arguments)}return e=i,n=[{key:"getApiKey",value:function(t){return null!=t&&Nf.throwArgumentError("apiKey not supported for cloudflare","apiKey",t),null}},{key:"getUrl",value:function(t,e){var r=null;switch(t.name){case"homestead":r="https://cloudflare-eth.com/";break;default:Nf.throwArgumentError("unsupported network","network",arguments[0])}return r}}],(r=[{key:"perform",value:function(t,e){var r=this,n=Object.create(null,{perform:{get:function(){return Of(jf(i.prototype),"perform",r)}}});return If(this,void 0,void 0,regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("getBlockNumber"!==t){r.next=5;break}return r.next=3,n.perform.call(this,"getBlock",{blockTag:"latest"});case 3:return o=r.sent,r.abrupt("return",o.number);case 5:return r.abrupt("return",n.perform.call(this,t,e));case 6:case"end":return r.stop()}}),r,this)})))}}])&&xf(e.prototype,r),n&&xf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Yc);function Mf(t){return(Mf="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 Bf(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)}}function Ff(){return(Ff="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Df(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Df(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Hf(t)););return t}function Uf(t,e){return(Uf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Hf(t);if(e){var o=Hf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zf(this,r)}}function zf(t,e){if(e&&("object"===Mf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qf(t)}function qf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hf(t){return(Hf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Gf=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Kf=new h.b("providers/5.7.2");function Wf(t){var e={};for(var r in t)if(null!=t[r]){var n=t[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?Object(c.g)(Object(c.i)(n)):"accessList"===r?"["+ro(n).map((function(t){return'{address:"'.concat(t.address,'",storageKeys:["').concat(t.storageKeys.join('","'),'"]}')})).join(",")+"]":Object(c.i)(n),e[r]=n)}return e}function Qf(t){if(0==t.status&&("No records found"===t.message||"No transactions found"===t.message))return t.result;if(1!=t.status||"string"!=typeof t.message||!t.message.match(/^OK/)){var e=new Error("invalid response");throw e.result=JSON.stringify(t),(t.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return t.result}function Vf(t){if(t&&0==t.status&&"NOTOK"==t.message&&(t.result||"").toLowerCase().indexOf("rate limit")>=0){var e=new Error("throttled response");throw e.result=JSON.stringify(t),e.throttleRetry=!0,e}if("2.0"!=t.jsonrpc){var r=new Error("invalid response");throw r.result=JSON.stringify(t),r}if(t.error){var n=new Error(t.error.message||"unknown error");throw t.error.code&&(n.code=t.error.code),t.error.data&&(n.data=t.error.data),n}return t.result}function Jf(t){if("pending"===t)throw new Error("pending not supported");return"latest"===t?t:parseInt(t.substring(2),16)}function Yf(t,e,r){if("call"===t&&e.code===h.b.errors.SERVER_ERROR){var n=e.error;if(n&&(n.message.match(/reverted/i)||n.message.match(/VM execution error/i))){var o=n.data;if(o&&(o="0x"+o.replace(/^.*0x/i,"")),Object(c.l)(o))return o;Kf.throwError("missing revert data in call exception",h.b.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}var i=e.message;throw e.code===h.b.errors.SERVER_ERROR&&(e.error&&"string"==typeof e.error.message?i=e.error.message:"string"==typeof e.body?i=e.body:"string"==typeof e.responseText&&(i=e.responseText)),(i=(i||"").toLowerCase()).match(/insufficient funds/)&&Kf.throwError("insufficient funds for intrinsic transaction cost",h.b.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:r}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Kf.throwError("nonce has already been used",h.b.errors.NONCE_EXPIRED,{error:e,method:t,transaction:r}),i.match(/another transaction with same nonce/)&&Kf.throwError("replacement fee too low",h.b.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:r}),i.match(/execution failed due to an exception|execution reverted/)&&Kf.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:r}),e}var Zf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uf(t,e)}(i,t);var e,r,n,o=Lf(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),P(qf(r=o.call(this,t)),"baseUrl",r.getBaseUrl()),P(qf(r),"apiKey",e||null),r}return e=i,(r=[{key:"getBaseUrl",value:function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return Kf.throwArgumentError("unsupported network","network",this.network.name)}},{key:"getUrl",value:function(t,e){var r=Object.keys(e).reduce((function(t,r){var n=e[r];return null!=n&&(t+="&".concat(r,"=").concat(n)),t}),""),n=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(t).concat(r).concat(n)}},{key:"getPostUrl",value:function(){return"".concat(this.baseUrl,"/api")}},{key:"getPostData",value:function(t,e){return e.module=t,e.apikey=this.apiKey,e}},{key:"fetch",value:function(t,e,r){return Gf(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a,s,u,c,f=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=r?this.getPostUrl():this.getUrl(t,e),i=r?this.getPostData(t,e):null,a="proxy"===t?Vf:Qf,this.emit("debug",{action:"request",request:o,provider:this}),s={url:o,throttleSlotInterval:1e3,throttleCallback:function(t,e){return f.isCommunityResource()&&mu(),Promise.resolve(!0)}},u=null,i&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(i).map((function(t){return"".concat(t,"=").concat(i[t])})).join("&")),n.next=9,iu(s,u,a||Vf);case 9:return c=n.sent,this.emit("debug",{action:"response",request:o,response:M(c),provider:this}),n.abrupt("return",c);case 12:case"end":return n.stop()}}),n,this)})))}},{key:"detectNetwork",value:function(){return Gf(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.network);case 1:case"end":return t.stop()}}),t,this)})))}},{key:"perform",value:function(t,e){var r=this,n=Object.create(null,{perform:{get:function(){return Ff(Hf(i.prototype),"perform",r)}}});return Gf(this,void 0,void 0,regeneratorRuntime.mark((function r(){var o,i,a,s,u,c,f,l,p;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=t,r.next="getBlockNumber"===r.t0?3:"getGasPrice"===r.t0?4:"getBalance"===r.t0?5:"getTransactionCount"===r.t0?6:"getCode"===r.t0?7:"getStorageAt"===r.t0?8:"sendTransaction"===r.t0?9:"getBlock"===r.t0?10:"getTransaction"===r.t0?13:"getTransactionReceipt"===r.t0?14:"call"===r.t0?15:"estimateGas"===r.t0?29:"getLogs"===r.t0?41:"getEtherPrice"===r.t0?65:72;break;case 3:return r.abrupt("return",this.fetch("proxy",{action:"eth_blockNumber"}));case 4:return r.abrupt("return",this.fetch("proxy",{action:"eth_gasPrice"}));case 5:return r.abrupt("return",this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag}));case 6:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag}));case 7:return r.abrupt("return",this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag}));case 8:return r.abrupt("return",this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag}));case 9:return r.abrupt("return",this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch((function(t){return Yf("sendTransaction",t,e.signedTransaction)})));case 10:if(!e.blockTag){r.next=12;break}return r.abrupt("return",this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"}));case 12:throw new Error("getBlock by blockHash not implemented");case 13:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.transactionHash}));case 14:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.transactionHash}));case 15:if("latest"===e.blockTag){r.next=17;break}throw new Error("EtherscanProvider does not support blockTag for call");case 17:return(o=Wf(e.transaction)).module="proxy",o.action="eth_call",r.prev=20,r.next=23,this.fetch("proxy",o,!0);case 23:return r.abrupt("return",r.sent);case 26:return r.prev=26,r.t1=r.catch(20),r.abrupt("return",Yf("call",r.t1,e.transaction));case 29:return(i=Wf(e.transaction)).module="proxy",i.action="eth_estimateGas",r.prev=32,r.next=35,this.fetch("proxy",i,!0);case 35:return r.abrupt("return",r.sent);case 38:return r.prev=38,r.t2=r.catch(32),r.abrupt("return",Yf("estimateGas",r.t2,e.transaction));case 41:return a={action:"getLogs"},e.filter.fromBlock&&(a.fromBlock=Jf(e.filter.fromBlock)),e.filter.toBlock&&(a.toBlock=Jf(e.filter.toBlock)),e.filter.address&&(a.address=e.filter.address),e.filter.topics&&e.filter.topics.length>0&&(e.filter.topics.length>1&&Kf.throwError("unsupported topic count",h.b.errors.UNSUPPORTED_OPERATION,{topics:e.filter.topics}),1===e.filter.topics.length&&("string"==typeof(s=e.filter.topics[0])&&66===s.length||Kf.throwError("unsupported topic format",h.b.errors.UNSUPPORTED_OPERATION,{topic0:s}),a.topic0=s)),r.next=48,this.fetch("logs",a);case 48:u=r.sent,c={},f=0;case 51:if(!(f<u.length)){r.next=64;break}if(null==(l=u[f]).blockHash){r.next=55;break}return r.abrupt("continue",61);case 55:if(null!=c[l.blockNumber]){r.next=60;break}return r.next=58,this.getBlock(l.blockNumber);case 58:(p=r.sent)&&(c[l.blockNumber]=p.hash);case 60:l.blockHash=c[l.blockNumber];case 61:f++,r.next=51;break;case 64:return r.abrupt("return",u);case 65:if("homestead"===this.network.name){r.next=67;break}return r.abrupt("return",0);case 67:return r.t3=parseFloat,r.next=70,this.fetch("stats",{action:"ethprice"});case 70:return r.t4=r.sent.ethusd,r.abrupt("return",(0,r.t3)(r.t4));case 72:return r.abrupt("break",73);case 73:return r.abrupt("return",n.perform.call(this,t,e));case 74:case"end":return r.stop()}}),r,this,[[20,26],[32,38]])})))}},{key:"getHistory",value:function(t,e,r){return Gf(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.resolveName(t);case 2:return n.t0=n.sent,n.t1=null==e?0:e,n.t2=null==r?99999999:r,o={action:"txlist",address:n.t0,startblock:n.t1,endblock:n.t2,sort:"asc"},n.next=8,this.fetch("account",o);case 8:return i=n.sent,n.abrupt("return",i.map((function(t){["contractAddress","to"].forEach((function(e){""==t[e]&&delete t[e]})),null==t.creates&&null!=t.contractAddress&&(t.creates=t.contractAddress);var e=a.formatter.transactionResponse(t);return t.timeStamp&&(e.timestamp=parseInt(t.timeStamp)),e})));case 10:case"end":return n.stop()}}),n,this)})))}},{key:"isCommunityResource",value:function(){return null==this.apiKey}}])&&Bf(e.prototype,r),n&&Bf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Vu);function Xf(t){for(var e=(t=t.slice()).length-1;e>0;e--){var r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}function $f(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)}}function tl(t,e){return(tl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function el(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ol(t);if(e){var o=ol(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rl(this,r)}}function rl(t,e){if(e&&("object"===il(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return nl(t)}function nl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ol(t){return(ol=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function il(t){return(il="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)}var al=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},sl=new h.b("providers/5.7.2");function ul(){return(new Date).getTime()}function cl(t){for(var e=null,r=0;r<t.length;r++){var n=t[r];if(null==n)return null;e?e.name===n.name&&e.chainId===n.chainId&&(e.ensAddress===n.ensAddress||null==e.ensAddress&&null==n.ensAddress)||sl.throwArgumentError("provider mismatch","networks",t):e=n}return e}function fl(t,e){t=t.slice().sort();var r=Math.floor(t.length/2);if(t.length%2)return t[r];var n=t[r-1],o=t[r];return null!=e&&Math.abs(n-o)>e?null:(n+o)/2}function ll(t){if(null===t)return"null";if("number"==typeof t||"boolean"==typeof t)return JSON.stringify(t);if("string"==typeof t)return t;if(y.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map((function(t){return ll(t)})));if("object"===il(t)){var e=Object.keys(t);return e.sort(),"{"+e.map((function(e){var r=t[e];return r="function"==typeof r?"[function]":ll(r),JSON.stringify(e)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+il(t))}var hl=1;function pl(t){var e=null,r=null,n=new Promise((function(n){e=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(e,t)}));return{cancel:e,getPromise:function(){return n},wait:function(t){return n=n.then(t)}}}var dl=[h.b.errors.CALL_EXCEPTION,h.b.errors.INSUFFICIENT_FUNDS,h.b.errors.NONCE_EXPIRED,h.b.errors.REPLACEMENT_UNDERPRICED,h.b.errors.UNPREDICTABLE_GAS_LIMIT],ml=["address","args","errorArgs","errorSignature","method","transaction"];function vl(t,e){var r={weight:t.weight};return Object.defineProperty(r,"provider",{get:function(){return t.provider}}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function gl(t,e,r){var n=ll;switch(e){case"getBlockNumber":return function(e){var r=e.map((function(t){return t.result})),n=fl(e.map((function(t){return t.result})),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=t._highestBlockNumber&&(t._highestBlockNumber=n),t._highestBlockNumber};case"getGasPrice":return function(t){var e=t.map((function(t){return t.result}));return e.sort(),e[Math.floor(e.length/2)]};case"getEtherPrice":return function(t){return fl(t.map((function(t){return t.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(t){return null==t?null:((t=I(t)).confirmations=-1,ll(t))};break;case"getBlock":n=r.includeTransactions?function(t){return null==t?null:((t=I(t)).transactions=t.transactions.map((function(t){return(t=I(t)).confirmations=-1,t})),ll(t))}:function(t){return null==t?null:ll(t)};break;default:throw new Error("unknown method: "+e)}return function(t,e){return function(r){var n={};r.forEach((function(e){var r=t(e.result);n[r]||(n[r]={count:0,result:e.result}),n[r].count++}));for(var o=Object.keys(n),i=0;i<o.length;i++){var a=n[o[i]];if(a.count>=e)return a.result}}}(n,t.quorum)}function yl(t,e){return al(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(null!=(n=t.provider).blockNumber&&n.blockNumber>=e||-1===e)){r.next=3;break}return r.abrupt("return",n);case 3:return r.abrupt("return",au((function(){return new Promise((function(r,o){setTimeout((function(){return n.blockNumber>=e?r(n):t.cancelled?r(null):r(void 0)}),0)}))}),{oncePoll:n}));case 4:case"end":return r.stop()}}),r)})))}function bl(t,e,r,n){return al(this,void 0,void 0,regeneratorRuntime.mark((function o(){var i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:i=t.provider,o.t0=r,o.next="getBlockNumber"===o.t0||"getGasPrice"===o.t0?4:"getEtherPrice"===o.t0?5:"getBalance"===o.t0||"getTransactionCount"===o.t0||"getCode"===o.t0?8:"getStorageAt"===o.t0?13:"getBlock"===o.t0?18:"call"===o.t0||"estimateGas"===o.t0?23:"getTransaction"===o.t0||"getTransactionReceipt"===o.t0?30:"getLogs"===o.t0?31:37;break;case 4:return o.abrupt("return",i[r]());case 5:if(!i.getEtherPrice){o.next=7;break}return o.abrupt("return",i.getEtherPrice());case 7:return o.abrupt("break",37);case 8:if(!n.blockTag||!Object(c.l)(n.blockTag)){o.next=12;break}return o.next=11,yl(t,e);case 11:i=o.sent;case 12:return o.abrupt("return",i[r](n.address,n.blockTag||"latest"));case 13:if(!n.blockTag||!Object(c.l)(n.blockTag)){o.next=17;break}return o.next=16,yl(t,e);case 16:i=o.sent;case 17:return o.abrupt("return",i.getStorageAt(n.address,n.position,n.blockTag||"latest"));case 18:if(!n.blockTag||!Object(c.l)(n.blockTag)){o.next=22;break}return o.next=21,yl(t,e);case 21:i=o.sent;case 22:return o.abrupt("return",i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash));case 23:if(!n.blockTag||!Object(c.l)(n.blockTag)){o.next=27;break}return o.next=26,yl(t,e);case 26:i=o.sent;case 27:if("call"!==r||!n.blockTag){o.next=29;break}return o.abrupt("return",i[r](n.transaction,n.blockTag));case 29:return o.abrupt("return",i[r](n.transaction));case 30:return o.abrupt("return",i[r](n.transactionHash));case 31:if(!((a=n.filter).fromBlock&&Object(c.l)(a.fromBlock)||a.toBlock&&Object(c.l)(a.toBlock))){o.next=36;break}return o.next=35,yl(t,e);case 35:i=o.sent;case 36:return o.abrupt("return",i.getLogs(a));case 37:return o.abrupt("return",sl.throwError("unknown method error",h.b.errors.UNKNOWN_ERROR,{method:r,params:n}));case 38:case"end":return o.stop()}}),o)})))}var wl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tl(t,e)}(i,t);var e,r,n,o=el(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),0===t.length&&sl.throwArgumentError("missing providers","providers",t);var n=t.map((function(t,e){if(_n.isProvider(t)){var r=pu(t)?2e3:750;return Object.freeze({provider:t,weight:1,stallTimeout:r,priority:1})}var n=I(t);null==n.priority&&(n.priority=1),null==n.stallTimeout&&(n.stallTimeout=pu(t)?2e3:750),null==n.weight&&(n.weight=1);var o=n.weight;return(o%1||o>512||o<1)&&sl.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(e,"].weight"),o),Object.freeze(n)})),a=n.reduce((function(t,e){return t+e.weight}),0);null==e?e=a/2:e>a&&sl.throwArgumentError("quorum will always fail; larger than total weight","quorum",e);var s=cl(n.map((function(t){return t.provider.network})));return null==s&&(s=new Promise((function(t,e){setTimeout((function(){r.detectNetwork().then(t,e)}),0)}))),P(nl(r=o.call(this,s)),"providerConfigs",Object.freeze(n)),P(nl(r),"quorum",e),r._highestBlockNumber=-1,r}return e=i,(r=[{key:"detectNetwork",value:function(){return al(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(this.providerConfigs.map((function(t){return t.provider.getNetwork()})));case 2:return e=t.sent,t.abrupt("return",cl(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"perform",value:function(t,e){return al(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i,a,s,u,c,f,l,p,d=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("sendTransaction"!==t){r.next=13;break}return r.next=3,Promise.all(this.providerConfigs.map((function(t){return t.provider.sendTransaction(e.signedTransaction).then((function(t){return t.hash}),(function(t){return t}))})));case 3:n=r.sent,o=0;case 5:if(!(o<n.length)){r.next=12;break}if("string"!=typeof(i=n[o])){r.next=9;break}return r.abrupt("return",i);case 9:o++,r.next=5;break;case 12:throw n[0];case 13:if(-1!==this._highestBlockNumber||"getBlockNumber"===t){r.next=16;break}return r.next=16,this.getBlockNumber();case 16:a=gl(this,t,e),(s=Xf(this.providerConfigs.map(I))).sort((function(t,e){return t.priority-e.priority})),u=this._highestBlockNumber,c=0,f=!0,l=regeneratorRuntime.mark((function r(){var n,o,i,l,h,p,m;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(n=ul(),o=s.filter((function(t){return t.runner&&n-t.start<t.stallTimeout})).reduce((function(t,e){return t+e.weight}),0),i=function(){var r=s[c++],n=hl++;r.start=ul(),r.staller=pl(r.stallTimeout),r.staller.wait((function(){r.staller=null})),r.runner=bl(r,u,t,e).then((function(o){r.done=!0,r.result=o,d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:n,backend:vl(r,ul()),request:{method:t,params:M(e)},provider:d})}),(function(o){r.done=!0,r.error=o,d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:n,backend:vl(r,ul()),request:{method:t,params:M(e)},provider:d})})),d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:n,backend:vl(r,null),request:{method:t,params:M(e)},provider:d}),o+=r.weight};o<d.quorum&&c<s.length;)i();if(l=[],s.forEach((function(t){!t.done&&t.runner&&(l.push(t.runner),t.staller&&l.push(t.staller.getPromise()))})),!l.length){r.next=9;break}return r.next=9,Promise.race(l);case 9:if(!((h=s.filter((function(t){return t.done&&null==t.error}))).length>=d.quorum)){r.next=19;break}if(void 0===(p=a(h))){r.next=15;break}return s.forEach((function(t){t.staller&&t.staller.cancel(),t.cancelled=!0})),r.abrupt("return",{v:p});case 15:if(f){r.next=18;break}return r.next=18,pl(100).getPromise();case 18:f=!1;case 19:if(m=s.reduce((function(t,e){if(!e.done||null==e.error)return t;var r=e.error.code;return dl.indexOf(r)>=0&&(t[r]||(t[r]={error:e.error,weight:0}),t[r].weight+=e.weight),t}),{}),Object.keys(m).forEach((function(t){var e=m[t];if(!(e.weight<d.quorum)){s.forEach((function(t){t.staller&&t.staller.cancel(),t.cancelled=!0}));var r=e.error,n={};ml.forEach((function(t){null!=r[t]&&(n[t]=r[t])})),sl.throwError(r.reason||r.message,t,n)}})),0!==s.filter((function(t){return!t.done})).length){r.next=23;break}return r.abrupt("return","break");case 23:case"end":return r.stop()}}),r)}));case 23:return r.delegateYield(l(),"t0",25);case 25:if("break"!==(p=r.t0)){r.next=28;break}return r.abrupt("break",32);case 28:if("object"!==il(p)){r.next=30;break}return r.abrupt("return",p.v);case 30:r.next=23;break;case 32:return s.forEach((function(t){t.staller&&t.staller.cancel(),t.cancelled=!0})),r.abrupt("return",sl.throwError("failed to meet quorum",h.b.errors.SERVER_ERROR,{method:t,params:e,results:s.map((function(t){return vl(t)})),provider:this}));case 34:case"end":return r.stop()}}),r,this)})))}}])&&$f(e.prototype,r),n&&$f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Vu),kl=null;function _l(t){return(_l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Al(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function El(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)}}function xl(t,e,r){return e&&El(t.prototype,e),r&&El(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ol(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sl(t,e)}function Sl(t,e){return(Sl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Pl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=jl(t);if(e){var o=jl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rl(this,r)}}function Rl(t,e){if(e&&("object"===_l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Tl(t)}function Tl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jl(t){return(jl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Il=new h.b("providers/5.7.2"),Nl="84842078b09946638c03157f83405213",Cl=function(t){Ol(r,t);var e=Pl(r);function r(t,n){var o;Al(this,r);var i=new Ml(t,n),a=i.connection;a.password&&Il.throwError("INFURA WebSocket project secrets unsupported",h.b.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});var s=a.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");return P(Tl(o=e.call(this,s,t)),"apiKey",i.projectId),P(Tl(o),"projectId",i.projectId),P(Tl(o),"projectSecret",i.projectSecret),o}return xl(r,[{key:"isCommunityResource",value:function(){return this.projectId===Nl}}]),r}(Cc),Ml=function(t){Ol(r,t);var e=Pl(r);function r(){return Al(this,r),e.apply(this,arguments)}return xl(r,[{key:"isCommunityResource",value:function(){return this.projectId===Nl}}],[{key:"getWebSocketProvider",value:function(t,e){return new Cl(t,e)}},{key:"getApiKey",value:function(t){var e={apiKey:Nl,projectId:Nl,projectSecret:null};return null==t||("string"==typeof t?e.projectId=t:null!=t.projectSecret?(Il.assertArgument("string"==typeof t.projectId,"projectSecret requires a projectId","projectId",t.projectId),Il.assertArgument("string"==typeof t.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),e.projectId=t.projectId,e.projectSecret=t.projectSecret):t.projectId&&(e.projectId=t.projectId),e.apiKey=e.projectId),e}},{key:"getUrl",value:function(t,e){var r=null;switch(t?t.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:Il.throwError("unsupported network",h.b.errors.INVALID_ARGUMENT,{argument:"network",value:t})}var n={allowGzip:!0,url:"https://"+r+"/v3/"+e.projectId,throttleCallback:function(t,r){return e.projectId===Nl&&mu(),Promise.resolve(!0)}};return null!=e.projectSecret&&(n.user="",n.password=e.projectSecret),n}}]),r}(Yc);function Bl(t){return(Bl="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 Fl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dl(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)}}function Ul(t,e){return(Ul=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ll(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ql(t);if(e){var o=ql(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zl(this,r)}}function zl(t,e){if(e&&("object"===Bl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ql(t){return(ql=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Hl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ul(t,e)}(i,t);var e,r,n,o=Ll(i);function i(){return Fl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"send",value:function(t,e){var r=this,n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);var o={request:n,resolve:null,reject:null},i=new Promise((function(t,e){o.resolve=t,o.reject=e}));return this._pendingBatch.push(o),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((function(){var t=r._pendingBatch;r._pendingBatch=null,r._pendingBatchAggregator=null;var e=t.map((function(t){return t.request}));return r.emit("debug",{action:"requestBatch",request:M(e),provider:r}),iu(r.connection,JSON.stringify(e)).then((function(n){r.emit("debug",{action:"response",request:e,response:n,provider:r}),t.forEach((function(t,e){var r=n[e];if(r.error){var o=new Error(r.error.message);o.code=r.error.code,o.data=r.error.data,t.reject(o)}else t.resolve(r.result)}))}),(function(n){r.emit("debug",{action:"response",error:n,request:e,provider:r}),t.forEach((function(t){t.reject(n)}))}))}),10)),i}}])&&Dl(e.prototype,r),n&&Dl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(bc);function Gl(t){return(Gl="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 Kl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wl(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)}}function Ql(t,e){return(Ql=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Yl(t);if(e){var o=Yl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jl(this,r)}}function Jl(t,e){if(e&&("object"===Gl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Yl(t){return(Yl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Zl=new h.b("providers/5.7.2"),Xl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ql(t,e)}(i,t);var e,r,n,o=Vl(i);function i(){return Kl(this,i),o.apply(this,arguments)}return e=i,n=[{key:"getApiKey",value:function(t){return t&&"string"!=typeof t&&Zl.throwArgumentError("invalid apiKey","apiKey",t),t||"ETHERS_JS_SHARED"}},{key:"getUrl",value:function(t,e){Zl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");var r=null;switch(t.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Zl.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+e}}],(r=null)&&Wl(e.prototype,r),n&&Wl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Yc);function $l(t){return($l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function th(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function eh(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)}}function rh(t,e){return(rh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ih(t);if(e){var o=ih(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return oh(this,r)}}function oh(t,e){if(e&&("object"===$l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ih(t){return(ih=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ah=new h.b("providers/5.7.2"),sh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rh(t,e)}(i,t);var e,r,n,o=nh(i);function i(){return th(this,i),o.apply(this,arguments)}return e=i,n=[{key:"getApiKey",value:function(t){var e={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==t?e.applicationId="62e1ad51b37b8e00394bda3b":"string"==typeof t?e.applicationId=t:null!=t.applicationSecretKey?(e.applicationId=t.applicationId,e.applicationSecretKey=t.applicationSecretKey):t.applicationId?e.applicationId=t.applicationId:ah.throwArgumentError("unsupported PocketProvider apiKey","apiKey",t),e}},{key:"getUrl",value:function(t,e){var r=null;switch(t?t.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:ah.throwError("unsupported network",h.b.errors.INVALID_ARGUMENT,{argument:"network",value:t})}var n={headers:{},url:"https://".concat(r,"/v1/lb/").concat(e.applicationId)};return null!=e.applicationSecretKey&&(n.user="",n.password=e.applicationSecretKey),n}}],(r=[{key:"isCommunityResource",value:function(){return"62e1ad51b37b8e00394bda3b"===this.applicationId}}])&&eh(e.prototype,r),n&&eh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Yc);function uh(t){return(uh="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 ch(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)}}function fh(t,e){return(fh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function lh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=dh(t);if(e){var o=dh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hh(this,r)}}function hh(t,e){if(e&&("object"===uh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ph(t)}function ph(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dh(t){return(dh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var mh=new h.b("providers/5.7.2"),vh=1;function gh(t,e){var r="Web3LegacyFetcher";return function(t,n){var o=this,i={method:t,params:n,id:vh++,jsonrpc:"2.0"};return new Promise((function(t,n){o.emit("debug",{action:"request",fetcher:r,request:M(i),provider:o}),e(i,(function(e,a){if(e)return o.emit("debug",{action:"response",fetcher:r,error:e,request:i,provider:o}),n(e);if(o.emit("debug",{action:"response",fetcher:r,request:i,response:a,provider:o}),a.error){var s=new Error(a.error.message);return s.code=a.error.code,s.data=a.error.data,n(s)}t(a.result)}))}))}}var yh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fh(t,e)}(i,t);var e,r,n,o=lh(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),null==t&&mh.throwArgumentError("missing provider","provider",t);var n=null,a=null,s=null;return"function"==typeof t?(n="unknown:",a=t):(!(n=t.host||t.path||"")&&t.isMetaMask&&(n="metamask"),s=t,t.request?(""===n&&(n="eip-1193:"),a=function(t){return function(e,r){var n=this;null==r&&(r=[]);var o={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:M(o),provider:this}),t.request(o).then((function(t){return n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:o,response:t,provider:n}),t}),(function(t){throw n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:o,error:t,provider:n}),t}))}}(t)):t.sendAsync?a=gh(0,t.sendAsync.bind(t)):t.send?a=gh(0,t.send.bind(t)):mh.throwArgumentError("unsupported provider","provider",t),n||(n="unknown:")),P(ph(r=o.call(this,n,e)),"jsonRpcFetchFunc",a),P(ph(r),"provider",s),r}return e=i,(r=[{key:"send",value:function(t,e){return this.jsonRpcFetchFunc(t,e)}}])&&ch(e.prototype,r),n&&ch(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(bc),bh=new h.b("providers/5.7.2");function wh(t,e){if(null==t&&(t="homestead"),"string"==typeof t){var r=t.match(/^(ws|http)s?:/i);if(r)switch(r[1].toLowerCase()){case"http":case"https":return new bc(t);case"ws":case"wss":return new Cc(t);default:bh.throwArgumentError("unsupported URL scheme","network",t)}}var n=gs(t);return n&&n._defaultProvider||bh.throwError("unsupported getDefaultProvider network",h.b.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:t}),n._defaultProvider({FallbackProvider:wl,AlchemyProvider:lf,AnkrProvider:_f,CloudflareProvider:Cf,EtherscanProvider:Zf,InfuraProvider:Ml,JsonRpcProvider:bc,NodesmithProvider:Xl,PocketProvider:sh,Web3Provider:yh,IpcProvider:kl},e)}var kh=new RegExp("^bytes([0-9]+)$"),_h=new RegExp("^(u?int)([0-9]*)$"),Ah=new RegExp("^(.*)\\[([0-9]*)\\]$"),Eh=new h.b("solidity/5.7.0");function xh(t,e){t.length!=e.length&&Eh.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);var r=[];return t.forEach((function(t,n){r.push(function t(e,r,n){switch(e){case"address":return n?Object(c.p)(r,32):Object(c.a)(r);case"string":return wt(r);case"bytes":return Object(c.a)(r);case"bool":return r=r?"0x01":"0x00",n?Object(c.p)(r,32):Object(c.a)(r)}var o=e.match(_h);if(o){var i=parseInt(o[2]||"256");return(o[2]&&String(i)!==o[2]||i%8!=0||0===i||i>256)&&Eh.throwArgumentError("invalid number type","type",e),n&&(i=256),r=y.from(r).toTwos(i),Object(c.p)(r,i/8)}if(o=e.match(kh)){var a=parseInt(o[1]);return(String(a)!==o[1]||0===a||a>32)&&Eh.throwArgumentError("invalid bytes type","type",e),Object(c.a)(r).byteLength!==a&&Eh.throwArgumentError("invalid value for ".concat(e),"value",r),n?Object(c.a)((r+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):r}if((o=e.match(Ah))&&Array.isArray(r)){var s=o[1];parseInt(o[2]||String(r.length))!=r.length&&Eh.throwArgumentError("invalid array length for ".concat(e),"value",r);var u=[];return r.forEach((function(e){u.push(t(s,e,!0))})),Object(c.b)(u)}return Eh.throwArgumentError("invalid type","type",e)}(t,e[n]))})),Object(c.i)(Object(c.b)(r))}function Oh(t,e){return Q(xh(t,e))}function Sh(t,e){return Ti(xh(t,e))}function Ph(t,e){e||(e=function(t){return[parseInt(t,16)]});var r=0,n={};return t.split(",").forEach((function(t){var o=t.split(":");r+=parseInt(o[0],16),n[r]=e(o[1])})),n}function Rh(t){var e=0;return t.split(",").map((function(t){var r=t.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:e+parseInt(r[0],16),h:e=parseInt(r[1],16)}}))}function Th(t,e){for(var r=0,n=0;n<e.length;n++){var o=e[n];if(t>=(r+=o.l)&&t<=r+o.h&&(t-r)%(o.d||1)==0){if(o.e&&-1!==o.e.indexOf(t-r))continue;return o}}return null}var jh=Rh("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Ih="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(t){return parseInt(t,16)})),Nh=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Ch=Ph("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Mh=Ph("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),Bh=Ph("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(t){if(t.length%4!=0)throw new Error("bad data");for(var e=[],r=0;r<t.length;r+=4)e.push(parseInt(t.substring(r,r+4),16));return e})),Fh=Rh("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function Dh(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();var e,r=xt(t);e=r.map((function(t){if(Ih.indexOf(t)>=0)return[];if(t>=65024&&t<=65039)return[];var e=function(t){var e=Th(t,Nh);if(e)return[t+e.s];var r=Ch[t];if(r)return r;var n=Mh[t];if(n)return[t+n[0]];var o=Bh[t];return o||null}(t);return e||[t]})),(r=xt(At(r=e.reduce((function(t,e){return e.forEach((function(e){t.push(e)})),t}),[])),dt.NFKC)).forEach((function(t){if(Th(t,Fh))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(t){if(Th(t,jh))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var n=At(r);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}function Uh(t){var e=wt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Object(c.i)(Object(c.b)([e,us]).slice(0,32))}function Lh(t){var e=Object(c.a)(t);if(32!==e.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==e[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===e[r-1];)r--;return Et(e.slice(0,r))}var zh=new h.b("units/5.7.0"),qh=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Hh(t){var e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||"."===t||"-."===t)&&zh.throwArgumentError("invalid value","value",t);var r=e[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");var o="";for(2===e.length&&(o="."+(e[1]||"0"));o.length>2&&"0"===o[o.length-1];)o=o.substring(0,o.length-1);for(var i=[];r.length;){if(r.length<=3){i.unshift(r);break}var a=r.length-3;i.unshift(r.substring(a)),r=r.substring(0,a)}return n+i.join(",")+o}function Gh(t,e){if("string"==typeof e){var r=qh.indexOf(e);-1!==r&&(e=3*r)}return Xo(t,null!=e?e:18)}function Kh(t,e){if("string"!=typeof t&&zh.throwArgumentError("value must be a string","value",t),"string"==typeof e){var r=qh.indexOf(e);-1!==r&&(e=3*r)}return $o(t,null!=e?e:18)}function Wh(t){return Gh(t,18)}function Qh(t){return Kh(t,18)}var Vh="ethers/5.7.2",Jh=new h.b(Vh);try{var Yh=window;null==Yh._ethers&&(Yh._ethers=u)}catch(t){}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(0),o=r(1),i=r(34),a=new o.b(i.a);var s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}(),u=s.crypto||s.msCrypto;function c(t){(t<=0||t>1024||t%1||t!=t)&&a.throwArgumentError("invalid length","length",t);var e=new Uint8Array(t);return u.getRandomValues(e),Object(n.a)(e)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(t){return a.throwError("no secure random source avaialble",o.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(9))}])}));
|
|
59
|
+
*/!function(s,u){"use strict";"object"===a(t)&&t.exports?t.exports=u(r(26),r(27),r(28)):(o=[r(26),r(27),r(28)],void 0===(i="function"==typeof(n=u)?n.apply(e,o):n)||(t.exports=i))}(0,(function(t,e,r,n){"use strict";var o=n&&n.URI;function i(t,e){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof i))return r?n?new i(t,e):new i(t):new i;if(void 0===t){if(r)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&r)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}i.version="1.19.11";var s=i.prototype,u=Object.prototype.hasOwnProperty;function c(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function f(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function l(t){return"Array"===f(t)}function h(t,e){var r,n,o={};if("RegExp"===f(e))o=null;else if(l(e))for(r=0,n=e.length;r<n;r++)o[e[r]]=!0;else o[e]=!0;for(r=0,n=t.length;r<n;r++){(o&&void 0!==o[t[r]]||!o&&e.test(t[r]))&&(t.splice(r,1),n--,r--)}return t}function p(t,e){var r,n;if(l(e)){for(r=0,n=e.length;r<n;r++)if(!p(t,e[r]))return!1;return!0}var o=f(e);for(r=0,n=t.length;r<n;r++)if("RegExp"===o){if("string"==typeof t[r]&&t[r].match(e))return!0}else if(t[r]===e)return!0;return!1}function d(t,e){if(!l(t)||!l(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function m(t){return t.replace(/^\/+|\/+$/g,"")}function y(t){return escape(t)}function v(t){return encodeURIComponent(t).replace(/[!'()*]/g,y).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return i.domAttributes[e]}},i.encode=v,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=v,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(t,e){var r=i.encode(t+"");return void 0===e&&(e=i.escapeQuerySpace),e?r.replace(/%20/g,"+"):r},i.decodeQuery=function(t,e){t+="",void 0===e&&(e=i.escapeQuerySpace);try{return i.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var g,b={encode:"encode",decode:"decode"},w=function(t,e){return function(r){try{return i[e](r+"").replace(i.characters[t][e].expression,(function(r){return i.characters[t][e].map[r]}))}catch(t){return r}}};for(g in b)i[g+"PathSegment"]=w("pathname",b[g]),i[g+"UrnPathSegment"]=w("urnpath",b[g]);var _=function(t,e,r){return function(n){var o;o=r?function(t){return i[e](i[r](t))}:i[e];for(var a=(n+"").split(t),s=0,u=a.length;s<u;s++)a[s]=o(a[s]);return a.join(t)}};function k(t){return function(e,r){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!r),this)}}function A(t,e){return function(r,n){return void 0===r?this._parts[t]||"":(null!==r&&(r+="").charAt(0)===e&&(r=r.substring(1)),this._parts[t]=r,this.build(!n),this)}}i.decodePath=_("/","decodePathSegment"),i.decodeUrnPath=_(":","decodeUrnPathSegment"),i.recodePath=_("/","encodePathSegment","decode"),i.recodeUrnPath=_(":","encodeUrnPathSegment","decode"),i.encodeReserved=w("reserved","encode"),i.parse=function(t,e){var r;return e||(e={preventInvalidHostname:i.preventInvalidHostname}),(r=(t=(t=t.replace(i.leading_whitespace_expression,"")).replace(i.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(e.fragment=t.substring(r+1)||null,t=t.substring(0,r)),(r=t.indexOf("?"))>-1&&(e.query=t.substring(r+1)||null,t=t.substring(0,r)),"//"===(t=(t=t.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(e.protocol=null,t=t.substring(2),t=i.parseAuthority(t,e)):(r=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,r)||null,e.protocol&&!e.protocol.match(i.protocol_expression)?e.protocol=void 0:"//"===t.substring(r+1,r+3).replace(/\\/g,"/")?(t=t.substring(r+3),t=i.parseAuthority(t,e)):(t=t.substring(r+1),e.urn=!0)),e.path=t,e},i.parseHost=function(t,e){t||(t="");var r,n,o=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=t.length),"["===t.charAt(0))r=t.indexOf("]"),e.hostname=t.substring(1,r)||null,e.port=t.substring(r+2,o)||null,"/"===e.port&&(e.port=null);else{var a=t.indexOf(":"),s=t.indexOf("/"),u=t.indexOf(":",a+1);-1!==u&&(-1===s||u<s)?(e.hostname=t.substring(0,o)||null,e.port=null):(n=t.substring(0,o).split(":"),e.hostname=n[0]||null,e.port=n[1]||null)}return e.hostname&&"/"!==t.substring(o).charAt(0)&&(o++,t="/"+t),e.preventInvalidHostname&&i.ensureValidHostname(e.hostname,e.protocol),e.port&&i.ensureValidPort(e.port),t.substring(o)||"/"},i.parseAuthority=function(t,e){return t=i.parseUserinfo(t,e),i.parseHost(t,e)},i.parseUserinfo=function(t,e){var r=t;-1!==t.indexOf("\\")&&(t=t.replace(/\\/g,"/"));var n,o=t.indexOf("/"),a=t.lastIndexOf("@",o>-1?o:t.length-1);return a>-1&&(-1===o||a<o)?(n=t.substring(0,a).split(":"),e.username=n[0]?i.decode(n[0]):null,n.shift(),e.password=n[0]?i.decode(n.join(":")):null,t=r.substring(a+1)):(e.username=null,e.password=null),t},i.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,a={},s=t.split("&"),c=s.length,f=0;f<c;f++)r=s[f].split("="),n=i.decodeQuery(r.shift(),e),o=r.length?i.decodeQuery(r.join("="),e):null,"__proto__"!==n&&(u.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(o)):a[n]=o);return a},i.build=function(t){var e="",r=!1;return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//",r=!0),e+=i.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&r&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},i.buildHost=function(t){var e="";return t.hostname?(i.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},i.buildAuthority=function(t){return i.buildUserinfo(t)+i.buildHost(t)},i.buildUserinfo=function(t){var e="";return t.username&&(e+=i.encode(t.username)),t.password&&(e+=":"+i.encode(t.password)),e&&(e+="@"),e},i.buildQuery=function(t,e,r){var n,o,a,s,c="";for(o in t)if("__proto__"!==o&&u.call(t,o))if(l(t[o]))for(n={},a=0,s=t[o].length;a<s;a++)void 0!==t[o][a]&&void 0===n[t[o][a]+""]&&(c+="&"+i.buildQueryParameter(o,t[o][a],r),!0!==e&&(n[t[o][a]+""]=!0));else void 0!==t[o]&&(c+="&"+i.buildQueryParameter(o,t[o],r));return c.substring(1)},i.buildQueryParameter=function(t,e,r){return i.encodeQuery(t,r)+(null!==e?"="+i.encodeQuery(e,r):"")},i.addQuery=function(t,e,r){if("object"===a(e))for(var n in e)u.call(e,n)&&i.addQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=r);"string"==typeof t[e]&&(t[e]=[t[e]]),l(r)||(r=[r]),t[e]=(t[e]||[]).concat(r)}},i.setQuery=function(t,e,r){if("object"===a(e))for(var n in e)u.call(e,n)&&i.setQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");t[e]=void 0===r?null:r}},i.removeQuery=function(t,e,r){var n,o,s;if(l(e))for(n=0,o=e.length;n<o;n++)t[e[n]]=void 0;else if("RegExp"===f(e))for(s in t)e.test(s)&&(t[s]=void 0);else if("object"===a(e))for(s in e)u.call(e,s)&&i.removeQuery(t,s,e[s]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===f(r)?!l(t[e])&&r.test(t[e])?t[e]=void 0:t[e]=h(t[e],r):t[e]!==String(r)||l(r)&&1!==r.length?l(t[e])&&(t[e]=h(t[e],r)):t[e]=void 0:t[e]=void 0}},i.hasQuery=function(t,e,r,n){switch(f(e)){case"String":break;case"RegExp":for(var o in t)if(u.call(t,o)&&e.test(o)&&(void 0===r||i.hasQuery(t,o,r)))return!0;return!1;case"Object":for(var a in e)if(u.call(e,a)&&!i.hasQuery(t,a,e[a]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(f(r)){case"Undefined":return e in t;case"Boolean":return r===Boolean(l(t[e])?t[e].length:t[e]);case"Function":return!!r(t[e],e,t);case"Array":return!!l(t[e])&&(n?p:d)(t[e],r);case"RegExp":return l(t[e])?!!n&&p(t[e],r):Boolean(t[e]&&t[e].match(r));case"Number":r=String(r);case"String":return l(t[e])?!!n&&p(t[e],r):t[e]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var t=[],e=[],r=0,n=0;n<arguments.length;n++){var o=new i(arguments[n]);t.push(o);for(var a=o.segment(),s=0;s<a.length;s++)"string"==typeof a[s]&&e.push(a[s]),a[s]&&r++}if(!e.length||!r)return new i("");var u=new i("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},i.commonPath=function(t,e){var r,n=Math.min(t.length,e.length);for(r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r)){r--;break}return r<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(r)&&"/"===e.charAt(r)||(r=t.substring(0,r).lastIndexOf("/")),t.substring(0,r+1))},i.withinString=function(t,e,r){r||(r={});var n=r.start||i.findUri.start,o=r.end||i.findUri.end,a=r.trim||i.findUri.trim,s=r.parens||i.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var c=n.exec(t);if(!c)break;var f=c.index;if(r.ignoreHtml){var l=t.slice(Math.max(f-3,0),f);if(l&&u.test(l))continue}for(var h=f+t.slice(f).search(o),p=t.slice(f,h),d=-1;;){var m=s.exec(p);if(!m)break;var y=m.index+m[0].length;d=Math.max(d,y)}if(!((p=d>-1?p.slice(0,d)+p.slice(d).replace(a,""):p.replace(a,"")).length<=c[0].length||r.ignore&&r.ignore.test(p))){var v=e(p,f,h=f+p.length,t);void 0!==v?(v=String(v),t=t.slice(0,f)+v+t.slice(h),n.lastIndex=f+v.length):n.lastIndex=h}}return n.lastIndex=0,t},i.ensureValidHostname=function(e,r){var n=!!e,o=!1;if(!!r&&(o=p(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(e&&e.match(i.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},i.noConflict=function(t){if(t){var e={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e}return n.URI===this&&(n.URI=o),this},s.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new i(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=k("protocol"),s.username=k("username"),s.password=k("password"),s.hostname=k("hostname"),s.port=k("port"),s.query=A("query","?"),s.fragment=A("fragment","#"),s.search=function(t,e){var r=this.query(t,e);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(t,e){var r=this.fragment(t,e);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(t,e){if(void 0===t||!0===t){var r=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=t?i.recodeUrnPath(t):"":this._parts.path=t?i.recodePath(t):"/",this.build(!e),this},s.path=s.pathname,s.href=function(t,e){var r;if(void 0===t)return this.toString();this._string="",this._parts=i._parts();var n=t instanceof i,o="object"===a(t)&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[i.getDomAttribute(t)]||"",o=!1);if(!n&&o&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=i.parse(String(t),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var s=n?t._parts:t;for(r in s)"query"!==r&&u.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!e),this},s.is=function(t){var e=!1,n=!1,o=!1,a=!1,s=!1,u=!1,c=!1,f=!this._parts.urn;switch(this._parts.hostname&&(f=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),s=(a=!(e=n||o))&&r&&r.has(this._parts.hostname),u=a&&i.idn_expression.test(this._parts.hostname),c=a&&i.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return f;case"absolute":return!f;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var E=s.protocol,x=s.port,O=s.hostname;s.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,t,e)},s.scheme=s.protocol,s.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),i.ensureValidPort(t))),x.call(this,t,e))},s.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(t,r))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(t,this._parts.protocol)}return O.call(this,t,e)},s.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(t);return this.protocol(n.protocol()).authority(n.authority()).build(!e),this},s.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==t[t.length-1]&&(t+="@"),i.parseUserinfo(t,this._parts),this.build(!e),this},s.resource=function(t,e){var r;return void 0===t?this.path()+this.search()+this.hash():(r=i.parse(t),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!e),this)},s.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),a=new RegExp("^"+c(o));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&i.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,t),this.build(!e),this},s.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(e).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var o=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},s.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==e&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');i=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},s.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return t?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,o),s=new RegExp("^"+c(a));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t),this.build(!e),this},s.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return t?i.decodePathSegment(n):n}var o=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(o=!0);var a=new RegExp(c(this.filename())+"$");return t=i.recodePath(t),this._parts.path=this._parts.path.replace(a,t),o?this.normalizePath(e):this.build(!e),this},s.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),a=o.lastIndexOf(".");return-1===a?"":(r=o.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",t?i.decodePathSegment(n):n)}"."===t.charAt(0)&&(t=t.substring(1));var s,u=this.suffix();if(u)s=t?new RegExp(c(u)+"$"):new RegExp(c("."+u)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return s&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t)),this.build(!e),this},s.segment=function(t,e,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),a=o.split(n);if(void 0!==t&&"number"!=typeof t&&(r=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(i&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(l(e)){a=[];for(var s=0,u=e.length;s<u;s++)(e[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(m(e[s])))}else(e||"string"==typeof e)&&(e=m(e),""===a[a.length-1]?a[a.length-1]=e:a.push(e));else e?a[t]=m(e):a.splice(t,1);return i&&a.unshift(""),this.path(a.join(n),r)},s.segmentCoded=function(t,e,r){var n,o,a;if("number"!=typeof t&&(r=e,e=t,t=void 0),void 0===e){if(l(n=this.segment(t,e,r)))for(o=0,a=n.length;o<a;o++)n[o]=i.decode(n[o]);else n=void 0!==n?i.decode(n):void 0;return n}if(l(e))for(o=0,a=e.length;o<a;o++)e[o]=i.encode(e[o]);else e="string"==typeof e||e instanceof String?i.encode(e):e;return this.segment(t,e,r)};var S=s.query;return s.query=function(t,e){if(!0===t)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=t.call(this,r);return this._parts.query=i.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=i.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):S.call(this,t,e)},s.setQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)n[t]=void 0!==e?e:null;else{if("object"!==a(t))throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in t)u.call(t,o)&&(n[o]=t[o])}return this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},s.addQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(n,t,void 0===e?null:e),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},s.removeQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(n,t,e),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},s.hasQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(n,t,e,r)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},s.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},s.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},s.normalizePath=function(t){var e,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;var n,o,a="";for("/"!==(r=i.recodePath(r)).charAt(0)&&(e=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),e&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r=r.substring(0,o)+r.substring(n+3)):r=r.substring(3);return e&&this.is("relative")&&(r=a+r.substring(1)),this._parts.path=r,this.build(!t),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},s.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var t=i.encode,e=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},s.unicode=function(){var t=i.encode,e=i.decode;i.encode=v,i.decode=unescape;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},s.readable=function(){var e=this.clone();e.username("").password("").normalize();var r="";if(e._parts.protocol&&(r+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(r+=t.toUnicode(e._parts.hostname),e._parts.port&&(r+=":"+e._parts.port)):r+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(r+="/"),r+=e.path(!0),e._parts.query){for(var n="",o=0,a=e._parts.query.split("&"),s=a.length;o<s;o++){var u=(a[o]||"").split("=");n+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(n+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=i.decodeQuery(e.hash(),!0)},s.absoluteTo=function(t){var e,r,n,o=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof i||(t=new i(t)),o._parts.protocol)return o;if(o._parts.protocol=t._parts.protocol,this._parts.hostname)return o;for(r=0;n=a[r];r++)o._parts[n]=t._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(e=(e=t.directory())||(0===t.path().indexOf("/")?"/":""),o._parts.path=(e?e+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=t._parts.path,o._parts.query||(o._parts.query=t._parts.query)),o.build(),o},s.relativeTo=function(t){var e,r,n,o,a,s=this.clone().normalize();if(s._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new i(t).normalize(),e=s._parts,r=t._parts,o=s.path(),a=t.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===r.protocol&&(e.protocol=null),e.username!==r.username||e.password!==r.password)return s.build();if(null!==e.protocol||null!==e.username||null!==e.password)return s.build();if(e.hostname!==r.hostname||e.port!==r.port)return s.build();if(e.hostname=null,e.port=null,o===a)return e.path="",s.build();if(!(n=i.commonPath(o,a)))return s.build();var u=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=u+e.path.substring(n.length)||"./",s.build()},s.equals=function(t){var e,r,n,o,a,s=this.clone(),c=new i(t),f={};if(s.normalize(),c.normalize(),s.toString()===c.toString())return!0;if(n=s.query(),o=c.query(),s.query(""),c.query(""),s.toString()!==c.toString())return!1;if(n.length!==o.length)return!1;for(a in e=i.parseQuery(n,this._parts.escapeQuerySpace),r=i.parseQuery(o,this._parts.escapeQuerySpace),e)if(u.call(e,a)){if(l(e[a])){if(!d(e[a],r[a]))return!1}else if(e[a]!==r[a])return!1;f[a]=!0}for(a in r)if(u.call(r,a)&&!f[a])return!1;return!0},s.preventInvalidHostname=function(t){return this._parts.preventInvalidHostname=!!t,this},s.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},s.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},i}))}).call(this,r(8)(t))},function(t,e,r){"use strict";r.r(e),r.d(e,"Deflate",(function(){return Qe})),r.d(e,"Inflate",(function(){return Xe})),r.d(e,"constants",(function(){return rr})),r.d(e,"default",(function(){return nr})),r.d(e,"deflate",(function(){return Je})),r.d(e,"deflateRaw",(function(){return Ye})),r.d(e,"gzip",(function(){return Ze})),r.d(e,"inflate",(function(){return $e})),r.d(e,"inflateRaw",(function(){return tr})),r.d(e,"ungzip",(function(){return er}));function n(t){let e=t.length;for(;--e>=0;)t[e]=0}const o=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=new Array(576);n(u);const c=new Array(60);n(c);const f=new Array(512);n(f);const l=new Array(256);n(l);const h=new Array(29);n(h);const p=new Array(30);function d(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}let m,y,v;function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(p);const b=t=>t<256?f[t]:f[256+(t>>>7)],w=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},_=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},k=(t,e,r)=>{_(t,r[2*e],r[2*e+1])},A=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},E=(t,e,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=15;o++)n[o]=a=a+r[o-1]<<1;for(i=0;i<=e;i++){let e=t[2*i+1];0!==e&&(t[2*i]=A(n[e]++,e))}},x=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},O=t=>{t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=(t,e,r,n)=>{const o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]},P=(t,e,r)=>{const n=t.heap[r];let o=r<<1;for(;o<=t.heap_len&&(o<t.heap_len&&S(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!S(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n},R=(t,e,r)=>{let n,a,s,u,c=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],a=t.pending_buf[t.l_buf+c],c++,0===n?k(t,a,e):(s=l[a],k(t,s+256+1,e),u=o[s],0!==u&&(a-=h[s],_(t,a,u)),n--,s=b(n),k(t,s,r),u=i[s],0!==u&&(n-=p[s],_(t,n,u)))}while(c<t.last_lit);k(t,256,e)},j=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.elems;let a,s,u,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<i;a++)0!==r[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,r[2*u]=1,t.depth[u]=0,t.opt_len--,o&&(t.static_len-=n[2*u+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)P(t,r,a);u=i;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*u]=r[2*a]+r[2*s],t.depth[u]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=u,t.heap[1]=u++,P(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,o=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,f,l,h,p,d,m=0;for(h=0;h<=15;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)f=t.heap[c],h=r[2*r[2*f+1]+1]+1,h>u&&(h=u,m++),r[2*f+1]=h,f>n||(t.bl_count[h]++,p=0,f>=s&&(p=a[f-s]),d=r[2*f],t.opt_len+=d*(h+p),i&&(t.static_len+=d*(o[2*f+1]+p)));if(0!==m){do{for(h=u-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[u]--,m-=2}while(m>0);for(h=u;0!==h;h--)for(f=t.bl_count[h];0!==f;)l=t.heap[--c],l>n||(r[2*l+1]!==h&&(t.opt_len+=(h-r[2*l+1])*r[2*l],r[2*l+1]=h),f--)}})(t,e),E(r,c,t.bl_count)},T=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<u&&o===a||(s<c?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4))},I=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<u&&o===a)){if(s<c)do{k(t,o,t.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(k(t,o,t.bl_tree),s--),k(t,16,t.bl_tree),_(t,s-3,2)):s<=10?(k(t,17,t.bl_tree),_(t,s-3,3)):(k(t,18,t.bl_tree),_(t,s-11,7));s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4)}};let N=!1;const C=(t,e,r,n)=>{_(t,0+(n?1:0),3),((t,e,r,n)=>{O(t),n&&(w(t,r),w(t,~r)),t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r})(t,e,r,!0)};var M={_tr_init:t=>{N||((()=>{let t,e,r,n,s;const g=new Array(16);for(r=0,n=0;n<28;n++)for(h[n]=r,t=0;t<1<<o[n];t++)l[r++]=n;for(l[r-1]=n,s=0,n=0;n<16;n++)for(p[n]=s,t=0;t<1<<i[n];t++)f[s++]=n;for(s>>=7;n<30;n++)for(p[n]=s<<7,t=0;t<1<<i[n]-7;t++)f[256+s++]=n;for(e=0;e<=15;e++)g[e]=0;for(t=0;t<=143;)u[2*t+1]=8,t++,g[8]++;for(;t<=255;)u[2*t+1]=9,t++,g[9]++;for(;t<=279;)u[2*t+1]=7,t++,g[7]++;for(;t<=287;)u[2*t+1]=8,t++,g[8]++;for(E(u,287,g),t=0;t<30;t++)c[2*t+1]=5,c[2*t]=A(t,5);m=new d(u,o,257,286,15),y=new d(c,i,0,30,15),v=new d(new Array(0),a,0,19,7)})(),N=!0),t.l_desc=new g(t.dyn_ltree,m),t.d_desc=new g(t.dyn_dtree,y),t.bl_desc=new g(t.bl_tree,v),t.bi_buf=0,t.bi_valid=0,x(t)},_tr_stored_block:C,_tr_flush_block:(t,e,r,n)=>{let o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),j(t,t.l_desc),j(t,t.d_desc),a=(t=>{let e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),j(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*s[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?C(t,e,r,n):4===t.strategy||i===o?(_(t,2+(n?1:0),3),R(t,u,c)):(_(t,4+(n?1:0),3),((t,e,r,n)=>{let o;for(_(t,e-257,5),_(t,r-1,5),_(t,n-4,4),o=0;o<n;o++)_(t,t.bl_tree[2*s[o]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),R(t,t.dyn_ltree,t.dyn_dtree)),x(t),n&&O(t)},_tr_tally:(t,e,r)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(l[r]+256+1)]++,t.dyn_dtree[2*b(e)]++),t.last_lit===t.lit_bufsize-1),_tr_align:t=>{_(t,2,3),k(t,256,u),(t=>{16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var B=(t,e,r,n)=>{let o=65535&t|0,i=t>>>16&65535|0,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+e[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16|0};const F=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var D=(t,e,r,n)=>{const o=F,i=n+r;t^=-1;for(let r=n;r<i;r++)t=t>>>8^o[255&(t^e[r])];return-1^t},U={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},L={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:z,_tr_stored_block:G,_tr_flush_block:H,_tr_tally:q,_tr_align:K}=M,{Z_NO_FLUSH:V,Z_PARTIAL_FLUSH:W,Z_FULL_FLUSH:Q,Z_FINISH:J,Z_BLOCK:Y,Z_OK:Z,Z_STREAM_END:X,Z_STREAM_ERROR:$,Z_DATA_ERROR:tt,Z_BUF_ERROR:et,Z_DEFAULT_COMPRESSION:rt,Z_FILTERED:nt,Z_HUFFMAN_ONLY:ot,Z_RLE:it,Z_FIXED:at,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:ut,Z_DEFLATED:ct}=L,ft=(t,e)=>(t.msg=U[e],e),lt=t=>(t<<1)-(t>4?9:0),ht=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let pt=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const dt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},mt=(t,e)=>{H(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,dt(t.strm)},yt=(t,e)=>{t.pending_buf[t.pending++]=e},vt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},gt=(t,e,r,n)=>{let o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,e.set(t.input.subarray(t.next_in,t.next_in+o),r),1===t.state.wrap?t.adler=B(t.adler,e,o,r):2===t.state.wrap&&(t.adler=D(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)},bt=(t,e)=>{let r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,f=t.w_mask,l=t.prev,h=t.strstart+258;let p=c[i+a-1],d=c[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===d&&c[r+a-1]===p&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<h);if(n=258-(h-i),i=h-258,n>a){if(t.match_start=e,a=n,n>=s)break;p=c[i+a-1],d=c[i+a]}}}while((e=l[e&f])>u&&0!=--o);return a<=t.lookahead?a:t.lookahead},wt=t=>{const e=t.w_size;let r,n,o,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do{o=t.head[--r],t.head[r]=o>=e?o-e:0}while(--n);n=e,r=n;do{o=t.prev[--r],t.prev[r]=o>=e?o-e:0}while(--n);i+=e}if(0===t.strm.avail_in)break;if(n=gt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=pt(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=pt(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},_t=(t,e)=>{let r,n;for(;;){if(t.lookahead<262){if(wt(t),t.lookahead<262&&e===V)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=bt(t,r)),t.match_length>=3)if(n=q(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=pt(t,t.ins_h,t.window[t.strstart+1]);else n=q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(mt(t,!1),0===t.strm.avail_out)?1:2},kt=(t,e)=>{let r,n,o;for(;;){if(t.lookahead<262){if(wt(t),t.lookahead<262&&e===V)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=bt(t,r),t.match_length<=5&&(t.strategy===nt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=q(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(mt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=q(t,0,t.window[t.strstart-1]),n&&mt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=q(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(mt(t,!1),0===t.strm.avail_out)?1:2};function At(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}const Et=[new At(0,0,0,0,(t,e)=>{let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(wt(t),0===t.lookahead&&e===V)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,mt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(mt(t,!1),t.strm.avail_out),1)}),new At(4,4,8,4,_t),new At(4,5,16,8,_t),new At(4,6,32,32,_t),new At(4,4,16,16,kt),new At(8,16,32,32,kt),new At(8,16,128,128,kt),new At(8,32,128,256,kt),new At(32,128,258,1024,kt),new At(32,258,258,4096,kt)];function xt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),ht(this.dyn_ltree),ht(this.dyn_dtree),ht(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),ht(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),ht(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ot=t=>{if(!t||!t.state)return ft(t,$);t.total_in=t.total_out=0,t.data_type=ut;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=V,z(e),Z},St=t=>{const e=Ot(t);var r;return e===Z&&((r=t.state).window_size=2*r.w_size,ht(r.head),r.max_lazy_match=Et[r.level].max_lazy,r.good_match=Et[r.level].good_length,r.nice_match=Et[r.level].nice_length,r.max_chain_length=Et[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},Pt=(t,e,r,n,o,i)=>{if(!t)return $;let a=1;if(e===rt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==ct||n<8||n>15||e<0||e>9||i<0||i>at)return ft(t,$);8===n&&(n=9);const s=new xt;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=i,s.method=r,St(t)};var Rt={deflateInit:(t,e)=>Pt(t,e,ct,15,8,st),deflateInit2:Pt,deflateReset:St,deflateResetKeep:Ot,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?$:(t.state.gzhead=e,Z):$,deflate:(t,e)=>{let r,n;if(!t||!t.state||e>Y||e<0)return t?ft(t,$):$;const o=t.state;if(!t.output||!t.input&&0!==t.avail_in||666===o.status&&e!==J)return ft(t,0===t.avail_out?et:$);o.strm=t;const i=o.last_flush;if(o.last_flush=e,42===o.status)if(2===o.wrap)t.adler=0,yt(o,31),yt(o,139),yt(o,8),o.gzhead?(yt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),yt(o,255&o.gzhead.time),yt(o,o.gzhead.time>>8&255),yt(o,o.gzhead.time>>16&255),yt(o,o.gzhead.time>>24&255),yt(o,9===o.level?2:o.strategy>=ot||o.level<2?4:0),yt(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(yt(o,255&o.gzhead.extra.length),yt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=D(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(yt(o,0),yt(o,0),yt(o,0),yt(o,0),yt(o,0),yt(o,9===o.level?2:o.strategy>=ot||o.level<2?4:0),yt(o,3),o.status=113);else{let e=ct+(o.w_bits-8<<4)<<8,r=-1;r=o.strategy>=ot||o.level<2?0:o.level<6?1:6===o.level?2:3,e|=r<<6,0!==o.strstart&&(e|=32),e+=31-e%31,o.status=113,vt(o,e),0!==o.strstart&&(vt(o,t.adler>>>16),vt(o,65535&t.adler)),t.adler=1}if(69===o.status)if(o.gzhead.extra){for(r=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),dt(t),r=o.pending,o.pending!==o.pending_buf_size));)yt(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),dt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,yt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),dt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,yt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=D(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&dt(t),o.pending+2<=o.pending_buf_size&&(yt(o,255&t.adler),yt(o,t.adler>>8&255),t.adler=0,o.status=113)):o.status=113),0!==o.pending){if(dt(t),0===t.avail_out)return o.last_flush=-1,Z}else if(0===t.avail_in&<(e)<=lt(i)&&e!==J)return ft(t,et);if(666===o.status&&0!==t.avail_in)return ft(t,et);if(0!==t.avail_in||0!==o.lookahead||e!==V&&666!==o.status){let r=o.strategy===ot?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(wt(t),0===t.lookahead)){if(e===V)return 1;break}if(t.match_length=0,r=q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(mt(t,!1),0===t.strm.avail_out)?1:2})(o,e):o.strategy===it?((t,e)=>{let r,n,o,i;const a=t.window;for(;;){if(t.lookahead<=258){if(wt(t),t.lookahead<=258&&e===V)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(o=t.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=t.strstart+258;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=258-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=q(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(mt(t,!1),0===t.strm.avail_out)?1:2})(o,e):Et[o.level].func(o,e);if(3!==r&&4!==r||(o.status=666),1===r||3===r)return 0===t.avail_out&&(o.last_flush=-1),Z;if(2===r&&(e===W?K(o):e!==Y&&(G(o,0,0,!1),e===Q&&(ht(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),dt(t),0===t.avail_out))return o.last_flush=-1,Z}return e!==J?Z:o.wrap<=0?X:(2===o.wrap?(yt(o,255&t.adler),yt(o,t.adler>>8&255),yt(o,t.adler>>16&255),yt(o,t.adler>>24&255),yt(o,255&t.total_in),yt(o,t.total_in>>8&255),yt(o,t.total_in>>16&255),yt(o,t.total_in>>24&255)):(vt(o,t.adler>>>16),vt(o,65535&t.adler)),dt(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?Z:X)},deflateEnd:t=>{if(!t||!t.state)return $;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?ft(t,$):(t.state=null,113===e?ft(t,tt):Z)},deflateSetDictionary:(t,e)=>{let r=e.length;if(!t||!t.state)return $;const n=t.state,o=n.wrap;if(2===o||1===o&&42!==n.status||n.lookahead)return $;if(1===o&&(t.adler=B(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===o&&(ht(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const i=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,wt(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=pt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,wt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=i,n.wrap=o,Z},deflateInfo:"pako deflate (from Nodeca project)"};const jt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)jt(r,e)&&(t[e]=r[e])}}return t},It=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,o=t.length;e<o;e++){let o=t[e];r.set(o,n),n+=o.length}return r};let Nt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Nt=!1}const Ct=new Uint8Array(256);for(let t=0;t<256;t++)Ct[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ct[254]=Ct[254]=1;var Mt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(s),i=0,o=0;i<s;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e},Bt=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,o;const i=new Array(2*r);for(o=0,n=0;n<r;){let e=t[n++];if(e<128){i[o++]=e;continue}let a=Ct[e];if(a>4)i[o++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n<r;)e=e<<6|63&t[n++],a--;a>1?i[o++]=65533:e<65536?i[o++]=e:(e-=65536,i[o++]=55296|e>>10&1023,i[o++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Nt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(i,o)},Ft=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Ct[t[r]]>e?r:e};var Dt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ut=Object.prototype.toString,{Z_NO_FLUSH:Lt,Z_SYNC_FLUSH:zt,Z_FULL_FLUSH:Gt,Z_FINISH:Ht,Z_OK:qt,Z_STREAM_END:Kt,Z_DEFAULT_COMPRESSION:Vt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:Qt}=L;function Jt(t){this.options=Tt({level:Vt,method:Qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Dt,this.strm.avail_out=0;let r=Rt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==qt)throw new Error(U[r]);if(e.header&&Rt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Mt(e.dictionary):"[object ArrayBuffer]"===Ut.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=Rt.deflateSetDictionary(this.strm,t),r!==qt)throw new Error(U[r]);this._dict_set=!0}}function Yt(t,e){const r=new Jt(e);if(r.push(t,!0),r.err)throw r.msg||U[r.err];return r.result}Jt.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=e===~~e?e:!0===e?Ht:Lt,"string"==typeof t?r.input=Mt(t):"[object ArrayBuffer]"===Ut.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===zt||i===Gt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=Rt.deflate(r,i),o===Kt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=Rt.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===qt;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===qt&&(this.result=It(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Zt={Deflate:Jt,deflate:Yt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Yt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Yt(t,e)},constants:L};var Xt=function(t,e){let r,n,o,i,a,s,u,c,f,l,h,p,d,m,y,v,g,b,w,_,k,A,E,x;const O=t.state;r=t.next_in,E=t.input,n=r+(t.avail_in-5),o=t.next_out,x=t.output,i=o-(e-t.avail_out),a=o+(t.avail_out-257),s=O.dmax,u=O.wsize,c=O.whave,f=O.wnext,l=O.window,h=O.hold,p=O.bits,d=O.lencode,m=O.distcode,y=(1<<O.lenbits)-1,v=(1<<O.distbits)-1;t:do{p<15&&(h+=E[r++]<<p,p+=8,h+=E[r++]<<p,p+=8),g=d[h&y];e:for(;;){if(b=g>>>24,h>>>=b,p-=b,b=g>>>16&255,0===b)x[o++]=65535&g;else{if(!(16&b)){if(0==(64&b)){g=d[(65535&g)+(h&(1<<b)-1)];continue e}if(32&b){O.mode=12;break t}t.msg="invalid literal/length code",O.mode=30;break t}w=65535&g,b&=15,b&&(p<b&&(h+=E[r++]<<p,p+=8),w+=h&(1<<b)-1,h>>>=b,p-=b),p<15&&(h+=E[r++]<<p,p+=8,h+=E[r++]<<p,p+=8),g=m[h&v];r:for(;;){if(b=g>>>24,h>>>=b,p-=b,b=g>>>16&255,!(16&b)){if(0==(64&b)){g=m[(65535&g)+(h&(1<<b)-1)];continue r}t.msg="invalid distance code",O.mode=30;break t}if(_=65535&g,b&=15,p<b&&(h+=E[r++]<<p,p+=8,p<b&&(h+=E[r++]<<p,p+=8)),_+=h&(1<<b)-1,_>s){t.msg="invalid distance too far back",O.mode=30;break t}if(h>>>=b,p-=b,b=o-i,_>b){if(b=_-b,b>c&&O.sane){t.msg="invalid distance too far back",O.mode=30;break t}if(k=0,A=l,0===f){if(k+=u-b,b<w){w-=b;do{x[o++]=l[k++]}while(--b);k=o-_,A=x}}else if(f<b){if(k+=u+f-b,b-=f,b<w){w-=b;do{x[o++]=l[k++]}while(--b);if(k=0,f<w){b=f,w-=b;do{x[o++]=l[k++]}while(--b);k=o-_,A=x}}}else if(k+=f-b,b<w){w-=b;do{x[o++]=l[k++]}while(--b);k=o-_,A=x}for(;w>2;)x[o++]=A[k++],x[o++]=A[k++],x[o++]=A[k++],w-=3;w&&(x[o++]=A[k++],w>1&&(x[o++]=A[k++]))}else{k=o-_;do{x[o++]=x[k++],x[o++]=x[k++],x[o++]=x[k++],w-=3}while(w>2);w&&(x[o++]=x[k++],w>1&&(x[o++]=x[k++]))}break}}break}}while(r<n&&o<a);w=p>>3,r-=w,p-=w<<3,h&=(1<<p)-1,t.next_in=r,t.next_out=o,t.avail_in=r<n?n-r+5:5-(r-n),t.avail_out=o<a?a-o+257:257-(o-a),O.hold=h,O.bits=p};const $t=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),te=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ee=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),re=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,r,n,o,i,a,s)=>{const u=s.bits;let c,f,l,h,p,d,m=0,y=0,v=0,g=0,b=0,w=0,_=0,k=0,A=0,E=0,x=null,O=0;const S=new Uint16Array(16),P=new Uint16Array(16);let R,j,T,I=null,N=0;for(m=0;m<=15;m++)S[m]=0;for(y=0;y<n;y++)S[e[r+y]]++;for(b=u,g=15;g>=1&&0===S[g];g--);if(b>g&&(b=g),0===g)return o[i++]=20971520,o[i++]=20971520,s.bits=1,0;for(v=1;v<g&&0===S[v];v++);for(b<v&&(b=v),k=1,m=1;m<=15;m++)if(k<<=1,k-=S[m],k<0)return-1;if(k>0&&(0===t||1!==g))return-1;for(P[1]=0,m=1;m<15;m++)P[m+1]=P[m]+S[m];for(y=0;y<n;y++)0!==e[r+y]&&(a[P[e[r+y]]++]=y);if(0===t?(x=I=a,d=19):1===t?(x=$t,O-=257,I=te,N-=257,d=256):(x=ee,I=re,d=-1),E=0,y=0,m=v,p=i,w=b,_=0,l=-1,A=1<<b,h=A-1,1===t&&A>852||2===t&&A>592)return 1;for(;;){R=m-_,a[y]<d?(j=0,T=a[y]):a[y]>d?(j=I[N+a[y]],T=x[O+a[y]]):(j=96,T=0),c=1<<m-_,f=1<<w,v=f;do{f-=c,o[p+(E>>_)+f]=R<<24|j<<16|T|0}while(0!==f);for(c=1<<m-1;E&c;)c>>=1;if(0!==c?(E&=c-1,E+=c):E=0,y++,0==--S[m]){if(m===g)break;m=e[r+a[y]]}if(m>b&&(E&h)!==l){for(0===_&&(_=b),p+=v,w=m-_,k=1<<w;w+_<g&&(k-=S[w+_],!(k<=0));)w++,k<<=1;if(A+=1<<w,1===t&&A>852||2===t&&A>592)return 1;l=E&h,o[l]=b<<24|w<<16|p-i|0}}return 0!==E&&(o[p+E]=m-_<<24|64<<16|0),s.bits=b,0};const{Z_FINISH:oe,Z_BLOCK:ie,Z_TREES:ae,Z_OK:se,Z_STREAM_END:ue,Z_NEED_DICT:ce,Z_STREAM_ERROR:fe,Z_DATA_ERROR:le,Z_MEM_ERROR:he,Z_BUF_ERROR:pe,Z_DEFLATED:de}=L,me=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ye(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ve=t=>{if(!t||!t.state)return fe;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,se},ge=t=>{if(!t||!t.state)return fe;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ve(t)},be=(t,e)=>{let r;if(!t||!t.state)return fe;const n=t.state;return e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?fe:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,ge(t))},we=(t,e)=>{if(!t)return fe;const r=new ye;t.state=r,r.window=null;const n=be(t,e);return n!==se&&(t.state=null),n};let _e,ke,Ae=!0;const Ee=t=>{if(Ae){_e=new Int32Array(512),ke=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,_e,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,ke,0,t.work,{bits:5}),Ae=!1}t.lencode=_e,t.lenbits=9,t.distcode=ke,t.distbits=5},xe=(t,e,r,n)=>{let o;const i=t.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),n>=i.wsize?(i.window.set(e.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>n&&(o=n),i.window.set(e.subarray(r-n,r-n+o),i.wnext),(n-=o)?(i.window.set(e.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0};var Oe={inflateReset:ge,inflateReset2:be,inflateResetKeep:ve,inflateInit:t=>we(t,15),inflateInit2:we,inflate:(t,e)=>{let r,n,o,i,a,s,u,c,f,l,h,p,d,m,y,v,g,b,w,_,k,A,E=0;const x=new Uint8Array(4);let O,S;const P=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return fe;r=t.state,12===r.mode&&(r.mode=13),a=t.next_out,o=t.output,u=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,c=r.hold,f=r.bits,l=s,h=u,A=se;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(2&r.wrap&&35615===c){r.check=0,x[0]=255&c,x[1]=c>>>8&255,r.check=D(r.check,x,2,0),c=0,f=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=30;break}if((15&c)!==de){t.msg="unknown compression method",r.mode=30;break}if(c>>>=4,f-=4,k=8+(15&c),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<r.wbits,t.adler=r.check=1,r.mode=512&c?10:12,c=0,f=0;break;case 2:for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(r.flags=c,(255&r.flags)!==de){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&(x[0]=255&c,x[1]=c>>>8&255,r.check=D(r.check,x,2,0)),c=0,f=0,r.mode=3;case 3:for(;f<32;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.head&&(r.head.time=c),512&r.flags&&(x[0]=255&c,x[1]=c>>>8&255,x[2]=c>>>16&255,x[3]=c>>>24&255,r.check=D(r.check,x,4,0)),c=0,f=0,r.mode=4;case 4:for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&(x[0]=255&c,x[1]=c>>>8&255,r.check=D(r.check,x,2,0)),c=0,f=0,r.mode=5;case 5:if(1024&r.flags){for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&(x[0]=255&c,x[1]=c>>>8&255,r.check=D(r.check,x,2,0)),c=0,f=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p=r.length,p>s&&(p=s),p&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+p),k)),512&r.flags&&(r.check=D(r.check,n,p,i)),s-=p,i+=p,r.length-=p),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===s)break t;p=0;do{k=n[i+p++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&p<s);if(512&r.flags&&(r.check=D(r.check,n,p,i)),s-=p,i+=p,k)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===s)break t;p=0;do{k=n[i+p++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k))}while(k&&p<s);if(512&r.flags&&(r.check=D(r.check,n,p,i)),s-=p,i+=p,k)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;f<16;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(c!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}c=0,f=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;f<32;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}t.adler=r.check=me(c),c=0,f=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=a,t.avail_out=u,t.next_in=i,t.avail_in=s,r.hold=c,r.bits=f,ce;t.adler=r.check=1,r.mode=12;case 12:if(e===ie||e===ae)break t;case 13:if(r.last){c>>>=7&f,f-=7&f,r.mode=27;break}for(;f<3;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}switch(r.last=1&c,c>>>=1,f-=1,3&c){case 0:r.mode=14;break;case 1:if(Ee(r),r.mode=20,e===ae){c>>>=2,f-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}c>>>=2,f-=2;break;case 14:for(c>>>=7&f,f-=7&f;f<32;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if((65535&c)!=(c>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&c,c=0,f=0,r.mode=15,e===ae)break t;case 15:r.mode=16;case 16:if(p=r.length,p){if(p>s&&(p=s),p>u&&(p=u),0===p)break t;o.set(n.subarray(i,i+p),a),s-=p,i+=p,u-=p,a+=p,r.length-=p;break}r.mode=12;break;case 17:for(;f<14;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(r.nlen=257+(31&c),c>>>=5,f-=5,r.ndist=1+(31&c),c>>>=5,f-=5,r.ncode=4+(15&c),c>>>=4,f-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;f<3;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.lens[P[r.have++]]=7&c,c>>>=3,f-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,O={bits:r.lenbits},A=ne(0,r.lens,0,19,r.lencode,0,r.work,O),r.lenbits=O.bits,A){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;E=r.lencode[c&(1<<r.lenbits)-1],y=E>>>24,v=E>>>16&255,g=65535&E,!(y<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(g<16)c>>>=y,f-=y,r.lens[r.have++]=g;else{if(16===g){for(S=y+2;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(c>>>=y,f-=y,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],p=3+(3&c),c>>>=2,f-=2}else if(17===g){for(S=y+3;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}c>>>=y,f-=y,k=0,p=3+(7&c),c>>>=3,f-=3}else{for(S=y+7;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}c>>>=y,f-=y,k=0,p=11+(127&c),c>>>=7,f-=7}if(r.have+p>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;p--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,O={bits:r.lenbits},A=ne(1,r.lens,0,r.nlen,r.lencode,0,r.work,O),r.lenbits=O.bits,A){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,O={bits:r.distbits},A=ne(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,O),r.distbits=O.bits,A){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,e===ae)break t;case 20:r.mode=21;case 21:if(s>=6&&u>=258){t.next_out=a,t.avail_out=u,t.next_in=i,t.avail_in=s,r.hold=c,r.bits=f,Xt(t,h),a=t.next_out,o=t.output,u=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,c=r.hold,f=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;E=r.lencode[c&(1<<r.lenbits)-1],y=E>>>24,v=E>>>16&255,g=65535&E,!(y<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(v&&0==(240&v)){for(b=y,w=v,_=g;E=r.lencode[_+((c&(1<<b+w)-1)>>b)],y=E>>>24,v=E>>>16&255,g=65535&E,!(b+y<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}c>>>=b,f-=b,r.back+=b}if(c>>>=y,f-=y,r.back+=y,r.length=g,0===v){r.mode=26;break}if(32&v){r.back=-1,r.mode=12;break}if(64&v){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&v,r.mode=22;case 22:if(r.extra){for(S=r.extra;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,f-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;E=r.distcode[c&(1<<r.distbits)-1],y=E>>>24,v=E>>>16&255,g=65535&E,!(y<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(0==(240&v)){for(b=y,w=v,_=g;E=r.distcode[_+((c&(1<<b+w)-1)>>b)],y=E>>>24,v=E>>>16&255,g=65535&E,!(b+y<=f);){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}c>>>=b,f-=b,r.back+=b}if(c>>>=y,f-=y,r.back+=y,64&v){t.msg="invalid distance code",r.mode=30;break}r.offset=g,r.extra=15&v,r.mode=24;case 24:if(r.extra){for(S=r.extra;f<S;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,f-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===u)break t;if(p=h-u,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}p>r.wnext?(p-=r.wnext,d=r.wsize-p):d=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=o,d=a-r.offset,p=r.length;p>u&&(p=u),u-=p,r.length-=p;do{o[a++]=m[d++]}while(--p);0===r.length&&(r.mode=21);break;case 26:if(0===u)break t;o[a++]=r.length,u--,r.mode=21;break;case 27:if(r.wrap){for(;f<32;){if(0===s)break t;s--,c|=n[i++]<<f,f+=8}if(h-=u,t.total_out+=h,r.total+=h,h&&(t.adler=r.check=r.flags?D(r.check,o,h,a-h):B(r.check,o,h,a-h)),h=u,(r.flags?c:me(c))!==r.check){t.msg="incorrect data check",r.mode=30;break}c=0,f=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;f<32;){if(0===s)break t;s--,c+=n[i++]<<f,f+=8}if(c!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}c=0,f=0}r.mode=29;case 29:A=ue;break t;case 30:A=le;break t;case 31:return he;case 32:default:return fe}return t.next_out=a,t.avail_out=u,t.next_in=i,t.avail_in=s,r.hold=c,r.bits=f,(r.wsize||h!==t.avail_out&&r.mode<30&&(r.mode<27||e!==oe))&&xe(t,t.output,t.next_out,h-t.avail_out),l-=t.avail_in,h-=t.avail_out,t.total_in+=l,t.total_out+=h,r.total+=h,r.wrap&&h&&(t.adler=r.check=r.flags?D(r.check,o,h,t.next_out-h):B(r.check,o,h,t.next_out-h)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===l&&0===h||e===oe)&&A===se&&(A=pe),A},inflateEnd:t=>{if(!t||!t.state)return fe;let e=t.state;return e.window&&(e.window=null),t.state=null,se},inflateGetHeader:(t,e)=>{if(!t||!t.state)return fe;const r=t.state;return 0==(2&r.wrap)?fe:(r.head=e,e.done=!1,se)},inflateSetDictionary:(t,e)=>{const r=e.length;let n,o,i;return t&&t.state?(n=t.state,0!==n.wrap&&11!==n.mode?fe:11===n.mode&&(o=1,o=B(o,e,r,0),o!==n.check)?le:(i=xe(t,e,r,r),i?(n.mode=31,he):(n.havedict=1,se))):fe},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Pe=Object.prototype.toString,{Z_NO_FLUSH:Re,Z_FINISH:je,Z_OK:Te,Z_STREAM_END:Ie,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ce,Z_DATA_ERROR:Me,Z_MEM_ERROR:Be}=L;function Fe(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Dt,this.strm.avail_out=0;let r=Oe.inflateInit2(this.strm,e.windowBits);if(r!==Te)throw new Error(U[r]);if(this.header=new Se,Oe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Mt(e.dictionary):"[object ArrayBuffer]"===Pe.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Oe.inflateSetDictionary(this.strm,e.dictionary),r!==Te)))throw new Error(U[r])}function De(t,e){const r=new Fe(e);if(r.push(t),r.err)throw r.msg||U[r.err];return r.result}Fe.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,o=this.options.dictionary;let i,a,s;if(this.ended)return!1;for(a=e===~~e?e:!0===e?je:Re,"[object ArrayBuffer]"===Pe.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),i=Oe.inflate(r,a),i===Ne&&o&&(i=Oe.inflateSetDictionary(r,o),i===Te?i=Oe.inflate(r,a):i===Me&&(i=Ne));r.avail_in>0&&i===Ie&&r.state.wrap>0&&0!==t[r.next_in];)Oe.inflateReset(r),i=Oe.inflate(r,a);switch(i){case Ce:case Me:case Ne:case Be:return this.onEnd(i),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(0===r.avail_out||i===Ie))if("string"===this.options.to){let t=Ft(r.output,r.next_out),e=r.next_out-t,o=Bt(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(o)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(i!==Te||0!==s){if(i===Ie)return i=Oe.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Fe.prototype.onData=function(t){this.chunks.push(t)},Fe.prototype.onEnd=function(t){t===Te&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=It(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Ue={Inflate:Fe,inflate:De,inflateRaw:function(t,e){return(e=e||{}).raw=!0,De(t,e)},ungzip:De,constants:L};const{Deflate:Le,deflate:ze,deflateRaw:Ge,gzip:He}=Zt,{Inflate:qe,inflate:Ke,inflateRaw:Ve,ungzip:We}=Ue;var Qe=Le,Je=ze,Ye=Ge,Ze=He,Xe=qe,$e=Ke,tr=Ve,er=We,rr=L,nr={Deflate:Le,deflate:ze,deflateRaw:Ge,gzip:He,Inflate:qe,inflate:Ke,inflateRaw:Ve,ungzip:We,constants:L}},function(t,e){},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){"use strict";e.sha1=r(67),e.sha224=r(68),e.sha256=r(30),e.sha384=r(69),e.sha512=r(31)},function(t,e,r){"use strict";var n=r(7),o=r(13),i=r(29),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=i.ft_1,f=o.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,f),t.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var o=this.h[0],i=this.h[1],f=this.h[2],h=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var d=~~(n/20),m=u(a(o,5),c(d,i,f,h),p,r[n],l[d]);p=h,h=f,f=a(i,30),i=o,o=m}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],i),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],h),this.h[4]=s(this.h[4],p)},h.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(7),o=r(30);function i(){if(!(this instanceof i))return new i;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(i,o),t.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,e,r){"use strict";var n=r(7),o=r(31);function i(){if(!(this instanceof i))return new i;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(i,o),t.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,e,r){"use strict";var n=r(7),o=r(13),i=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=o.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function h(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(f,c),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],o=this.h[2],c=this.h[3],f=this.h[4],g=r,b=n,w=o,_=c,k=f,A=0;A<80;A++){var E=a(i(u(r,l(A,n,o,c),t[d[A]+e],h(A)),y[A]),f);r=f,f=c,c=i(o,10),o=n,n=E,E=a(i(u(g,l(79-A,b,w,_),t[m[A]+e],p(A)),v[A]),k),g=k,k=_,_=i(w,10),w=b,b=E}E=s(this.h[1],o,_),this.h[1]=s(this.h[2],c,k),this.h[2]=s(this.h[3],f,g),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,w),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,r){"use strict";var n=r(7),o=r(12);function i(t,e,r){if(!(this instanceof i))return new i(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=i,i.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),o(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},i.prototype.update=function(t,e){return this.inner.update(t,e),this},i.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(73),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(9))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,o,i,a,s,u=1,c={},f=!1,l=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(){var t=p(arguments);return e.nextTick(d(m,t)),t}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){m(t.data)},n=function(){var t=p(arguments);return i.port2.postMessage(t),t}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,n=function(){var t=p(arguments),e=l.createElement("script");return e.onreadystatechange=function(){m(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e),t}):n=function(){var t=p(arguments);return setTimeout(d(m,t),0),t}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&m(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),n=function(){var e=p(arguments);return t.postMessage(a+e,"*"),e}),h.setImmediate=n,h.clearImmediate=y}function p(t){return c[u]=d.apply(void 0,t),u++}function d(t){var e=[].slice.call(arguments,1);return function(){"function"==typeof t?t.apply(void 0,e):new Function(""+t)()}}function m(t){if(f)setTimeout(d(m,t),0);else{var e=c[t];if(e){f=!0;try{e()}finally{y(t),f=!1}}}}function y(t){delete c[t]}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(9),r(17))},function(t,e,r){"use strict";r.r(e),r.d(e,"ethers",(function(){return u})),r.d(e,"Signer",(function(){return Cn})),r.d(e,"Wallet",(function(){return rs})),r.d(e,"VoidSigner",(function(){return Mn})),r.d(e,"getDefaultProvider",(function(){return gh})),r.d(e,"providers",(function(){return i})),r.d(e,"BaseContract",(function(){return Bo})),r.d(e,"Contract",(function(){return Fo})),r.d(e,"ContractFactory",(function(){return Do})),r.d(e,"BigNumber",(function(){return g})),r.d(e,"FixedNumber",(function(){return $o})),r.d(e,"constants",(function(){return o})),r.d(e,"errors",(function(){return h.a})),r.d(e,"logger",(function(){return Rm})),r.d(e,"utils",(function(){return s})),r.d(e,"wordlists",(function(){return qi})),r.d(e,"version",(function(){return Pm})),r.d(e,"Wordlist",(function(){return Ci}));var n={};r.r(n),r.d(n,"encode",(function(){return Y})),r.d(n,"decode",(function(){return $}));var o={};r.r(o),r.d(o,"AddressZero",(function(){return is})),r.d(o,"NegativeOne",(function(){return je})),r.d(o,"Zero",(function(){return Te})),r.d(o,"One",(function(){return Ie})),r.d(o,"Two",(function(){return Ne})),r.d(o,"WeiPerEther",(function(){return Ce})),r.d(o,"MaxUint256",(function(){return Me})),r.d(o,"MinInt256",(function(){return Be})),r.d(o,"MaxInt256",(function(){return Fe})),r.d(o,"HashZero",(function(){return as})),r.d(o,"EtherSymbol",(function(){return ss}));var i={};r.r(i),r.d(i,"Provider",(function(){return wn})),r.d(i,"BaseProvider",(function(){return Vu})),r.d(i,"Resolver",(function(){return Hu})),r.d(i,"UrlJsonRpcProvider",(function(){return Qc})),r.d(i,"FallbackProvider",(function(){return gl})),r.d(i,"AlchemyProvider",(function(){return cf})),r.d(i,"AlchemyWebSocketProvider",(function(){return uf})),r.d(i,"AnkrProvider",(function(){return wf})),r.d(i,"CloudflareProvider",(function(){return If})),r.d(i,"EtherscanProvider",(function(){return Jf})),r.d(i,"InfuraProvider",(function(){return Nl})),r.d(i,"InfuraWebSocketProvider",(function(){return Il})),r.d(i,"JsonRpcProvider",(function(){return vc})),r.d(i,"JsonRpcBatchProvider",(function(){return zl})),r.d(i,"NodesmithProvider",(function(){return Yl})),r.d(i,"PocketProvider",(function(){return ih})),r.d(i,"StaticJsonRpcProvider",(function(){return Wc})),r.d(i,"Web3Provider",(function(){return yh})),r.d(i,"WebSocketProvider",(function(){return Ic})),r.d(i,"IpcProvider",(function(){return bl})),r.d(i,"JsonRpcSigner",(function(){return dc})),r.d(i,"getDefaultProvider",(function(){return gh})),r.d(i,"getNetwork",(function(){return ms})),r.d(i,"isCommunityResource",(function(){return lu})),r.d(i,"isCommunityResourcable",(function(){return fu})),r.d(i,"showThrottleMessage",(function(){return pu})),r.d(i,"Formatter",(function(){return cu}));var a={};r.r(a),r.d(a,"decode",(function(){return ys})),r.d(a,"encode",(function(){return vs}));var s={};r.r(s),r.d(s,"AbiCoder",(function(){return Bd})),r.d(s,"defaultAbiCoder",(function(){return Fd})),r.d(s,"Fragment",(function(){return bd})),r.d(s,"ConstructorFragment",(function(){return Ed})),r.d(s,"ErrorFragment",(function(){return Sd})),r.d(s,"EventFragment",(function(){return wd})),r.d(s,"FunctionFragment",(function(){return xd})),r.d(s,"ParamType",(function(){return vd})),r.d(s,"FormatTypes",(function(){return md})),r.d(s,"checkResultErrors",(function(){return Ah})),r.d(s,"Logger",(function(){return h.b})),r.d(s,"RLP",(function(){return n})),r.d(s,"_fetchData",(function(){return ru})),r.d(s,"fetchJson",(function(){return nu})),r.d(s,"poll",(function(){return ou})),r.d(s,"checkProperties",(function(){return T})),r.d(s,"deepCopy",(function(){return M})),r.d(s,"defineReadOnly",(function(){return P})),r.d(s,"getStatic",(function(){return R})),r.d(s,"resolveProperties",(function(){return j})),r.d(s,"shallowCopy",(function(){return I})),r.d(s,"arrayify",(function(){return c.a})),r.d(s,"concat",(function(){return c.b})),r.d(s,"stripZeros",(function(){return c.o})),r.d(s,"zeroPad",(function(){return c.p})),r.d(s,"isBytes",(function(){return c.j})),r.d(s,"isBytesLike",(function(){return c.k})),r.d(s,"defaultPath",(function(){return ta})),r.d(s,"HDNode",(function(){return ea})),r.d(s,"SigningKey",(function(){return zn})),r.d(s,"Interface",(function(){return tm})),r.d(s,"LogDescription",(function(){return Qd})),r.d(s,"TransactionDescription",(function(){return Jd})),r.d(s,"base58",(function(){return Ai})),r.d(s,"base64",(function(){return a})),r.d(s,"hexlify",(function(){return c.i})),r.d(s,"isHexString",(function(){return c.l})),r.d(s,"hexConcat",(function(){return c.c})),r.d(s,"hexStripZeros",(function(){return c.f})),r.d(s,"hexValue",(function(){return c.g})),r.d(s,"hexZeroPad",(function(){return c.h})),r.d(s,"hexDataLength",(function(){return c.d})),r.d(s,"hexDataSlice",(function(){return c.e})),r.d(s,"nameprep",(function(){return gm})),r.d(s,"_toEscapedUtf8String",(function(){return _t})),r.d(s,"toUtf8Bytes",(function(){return bt})),r.d(s,"toUtf8CodePoints",(function(){return Et})),r.d(s,"toUtf8String",(function(){return At})),r.d(s,"Utf8ErrorFuncs",(function(){return vt})),r.d(s,"formatBytes32String",(function(){return bm})),r.d(s,"parseBytes32String",(function(){return wm})),r.d(s,"dnsEncode",(function(){return Qs})),r.d(s,"hashMessage",(function(){return ri})),r.d(s,"namehash",(function(){return Ws})),r.d(s,"isValidName",(function(){return Vs})),r.d(s,"id",(function(){return xt})),r.d(s,"_TypedDataEncoder",(function(){return bi})),r.d(s,"getAddress",(function(){return ut})),r.d(s,"getIcapAddress",(function(){return ft})),r.d(s,"getContractAddress",(function(){return lt})),r.d(s,"getCreate2Address",(function(){return ht})),r.d(s,"isAddress",(function(){return ct})),r.d(s,"formatEther",(function(){return Om})),r.d(s,"parseEther",(function(){return Sm})),r.d(s,"formatUnits",(function(){return Em})),r.d(s,"parseUnits",(function(){return xm})),r.d(s,"commify",(function(){return Am})),r.d(s,"computeHmac",(function(){return ji})),r.d(s,"keccak256",(function(){return V})),r.d(s,"ripemd160",(function(){return Si})),r.d(s,"sha256",(function(){return Pi})),r.d(s,"sha512",(function(){return Ri})),r.d(s,"randomBytes",(function(){return sa.a})),r.d(s,"shuffled",(function(){return Yf})),r.d(s,"solidityPack",(function(){return im})),r.d(s,"solidityKeccak256",(function(){return am})),r.d(s,"soliditySha256",(function(){return sm})),r.d(s,"splitSignature",(function(){return c.n})),r.d(s,"joinSignature",(function(){return c.m})),r.d(s,"accessListify",(function(){return to})),r.d(s,"parseTransaction",(function(){return ao})),r.d(s,"serializeTransaction",(function(){return oo})),r.d(s,"TransactionTypes",(function(){return qn})),r.d(s,"getJsonWalletAddress",(function(){return qa})),r.d(s,"computeAddress",(function(){return Yn})),r.d(s,"recoverAddress",(function(){return Zn})),r.d(s,"computePublicKey",(function(){return Hn})),r.d(s,"recoverPublicKey",(function(){return Gn})),r.d(s,"verifyMessage",(function(){return ns})),r.d(s,"verifyTypedData",(function(){return os})),r.d(s,"getAccountPath",(function(){return aa})),r.d(s,"mnemonicToEntropy",(function(){return na})),r.d(s,"entropyToMnemonic",(function(){return oa})),r.d(s,"isValidMnemonic",(function(){return ia})),r.d(s,"mnemonicToSeed",(function(){return ra})),r.d(s,"SupportedAlgorithm",(function(){return _i})),r.d(s,"UnicodeNormalizationForm",(function(){return pt})),r.d(s,"Utf8ErrorReason",(function(){return dt})),r.d(s,"Indexed",(function(){return Zd}));var u={};r.r(u),r.d(u,"Signer",(function(){return Cn})),r.d(u,"Wallet",(function(){return rs})),r.d(u,"VoidSigner",(function(){return Mn})),r.d(u,"getDefaultProvider",(function(){return gh})),r.d(u,"providers",(function(){return i})),r.d(u,"BaseContract",(function(){return Bo})),r.d(u,"Contract",(function(){return Fo})),r.d(u,"ContractFactory",(function(){return Do})),r.d(u,"BigNumber",(function(){return g})),r.d(u,"FixedNumber",(function(){return $o})),r.d(u,"constants",(function(){return o})),r.d(u,"errors",(function(){return h.a})),r.d(u,"logger",(function(){return Rm})),r.d(u,"utils",(function(){return s})),r.d(u,"wordlists",(function(){return qi})),r.d(u,"version",(function(){return Pm})),r.d(u,"Wordlist",(function(){return Ci}));var c=r(0),f=r(2),l=r.n(f),h=r(1);function p(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)}}var d=l.a.BN,m=new h.b("bignumber/5.7.0"),y={};var v=!1,g=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e!==y&&m.throwError("cannot call constructor directly; use BigNumber.from",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}var e,r,n;return e=t,n=[{key:"from",value:function(e){if(e instanceof t)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new t(y,b(e)):e.match(/^-?[0-9]+$/)?new t(y,b(new d(e))):m.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&k("underflow","BigNumber.from",e),(e>=9007199254740991||e<=-9007199254740991)&&k("overflow","BigNumber.from",e),t.from(String(e));var r=e;if("bigint"==typeof r)return t.from(r.toString());if(Object(c.j)(r))return t.from(Object(c.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return t.from(n)}else{var o=r._hex;if(null==o&&"BigNumber"===r.type&&(o=r.hex),"string"==typeof o&&(Object(c.l)(o)||"-"===o[0]&&Object(c.l)(o.substring(1))))return t.from(o)}return m.throwArgumentError("invalid BigNumber value","value",e)}},{key:"isBigNumber",value:function(t){return!(!t||!t._isBigNumber)}}],(r=[{key:"fromTwos",value:function(t){return w(_(this).fromTwos(t))}},{key:"toTwos",value:function(t){return w(_(this).toTwos(t))}},{key:"abs",value:function(){return"-"===this._hex[0]?t.from(this._hex.substring(1)):this}},{key:"add",value:function(t){return w(_(this).add(_(t)))}},{key:"sub",value:function(t){return w(_(this).sub(_(t)))}},{key:"div",value:function(e){return t.from(e).isZero()&&k("division-by-zero","div"),w(_(this).div(_(e)))}},{key:"mul",value:function(t){return w(_(this).mul(_(t)))}},{key:"mod",value:function(t){var e=_(t);return e.isNeg()&&k("division-by-zero","mod"),w(_(this).umod(e))}},{key:"pow",value:function(t){var e=_(t);return e.isNeg()&&k("negative-power","pow"),w(_(this).pow(e))}},{key:"and",value:function(t){var e=_(t);return(this.isNegative()||e.isNeg())&&k("unbound-bitwise-result","and"),w(_(this).and(e))}},{key:"or",value:function(t){var e=_(t);return(this.isNegative()||e.isNeg())&&k("unbound-bitwise-result","or"),w(_(this).or(e))}},{key:"xor",value:function(t){var e=_(t);return(this.isNegative()||e.isNeg())&&k("unbound-bitwise-result","xor"),w(_(this).xor(e))}},{key:"mask",value:function(t){return(this.isNegative()||t<0)&&k("negative-width","mask"),w(_(this).maskn(t))}},{key:"shl",value:function(t){return(this.isNegative()||t<0)&&k("negative-width","shl"),w(_(this).shln(t))}},{key:"shr",value:function(t){return(this.isNegative()||t<0)&&k("negative-width","shr"),w(_(this).shrn(t))}},{key:"eq",value:function(t){return _(this).eq(_(t))}},{key:"lt",value:function(t){return _(this).lt(_(t))}},{key:"lte",value:function(t){return _(this).lte(_(t))}},{key:"gt",value:function(t){return _(this).gt(_(t))}},{key:"gte",value:function(t){return _(this).gte(_(t))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return _(this).isZero()}},{key:"toNumber",value:function(){try{return _(this).toNumber()}catch(t){k("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(t){}return m.throwError("this platform does not support BigInt",h.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?v||(v=!0,m.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?m.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",h.b.errors.UNEXPECTED_ARGUMENT,{}):m.throwError("BigNumber.toString does not accept parameters",h.b.errors.UNEXPECTED_ARGUMENT,{})),_(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(t){return{type:"BigNumber",hex:this.toHexString()}}}])&&p(e.prototype,r),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function b(t){if("string"!=typeof t)return b(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&m.throwArgumentError("invalid hex","value",t),"0x00"===(t=b(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function w(t){return g.from(b(t))}function _(t){var e=g.from(t).toHexString();return"-"===e[0]?new d("-"+e.substring(3),16):new d(e.substring(2),16)}function k(t,e,r){var n={fault:t,operation:e};return null!=r&&(n.value=r),m.throwError(t,h.b.errors.NUMERIC_FAULT,n)}function A(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)}}function E(t,e,r){return e&&A(t.prototype,e),r&&A(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function x(t){return(x="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)}var O=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},S=new h.b("properties/5.7.0");function P(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function R(t,e){for(var r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||"object"!==x(t.prototype))break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function j(t){return O(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object.keys(t).map((function(e){var r=t[e];return Promise.resolve(r).then((function(t){return{key:e,value:t}}))})),e.next=3,Promise.all(r);case 3:return n=e.sent,e.abrupt("return",n.reduce((function(t,e){return t[e.key]=e.value,t}),{}));case 5:case"end":return e.stop()}}),e)})))}function T(t,e){t&&"object"===x(t)||S.throwArgumentError("invalid object","object",t),Object.keys(t).forEach((function(r){e[r]||S.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)}))}function I(t){var e={};for(var r in t)e[r]=t[r];return e}var N={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function C(t){if(function t(e){if(null==e||N[x(e)])return!0;if(Array.isArray(e)||"object"===x(e)){if(!Object.isFrozen(e))return!1;for(var r=Object.keys(e),n=0;n<r.length;n++){var o=null;try{o=e[r[n]]}catch(t){continue}if(!t(o))return!1}return!0}return S.throwArgumentError("Cannot deepCopy ".concat(x(e)),"object",e)}(t))return t;if(Array.isArray(t))return Object.freeze(t.map((function(t){return M(t)})));if("object"===x(t)){var e={};for(var r in t){var n=t[r];void 0!==n&&P(e,r,M(n))}return e}return S.throwArgumentError("Cannot deepCopy ".concat(x(t)),"object",t)}function M(t){return C(t)}var B=E((function t(e){for(var r in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e)this[r]=M(e[r])}));function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function D(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)}}function U(t,e,r){return e&&D(t.prototype,e),r&&D(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var L=new h.b("abi/5.7.0");var z=function(){function t(e,r,n,o){F(this,t),this.name=e,this.type=r,this.localName=n,this.dynamic=o}return U(t,[{key:"_throwError",value:function(t,e){L.throwArgumentError(t,this.localName,e)}}]),t}(),G=function(){function t(e){F(this,t),P(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}return U(t,[{key:"data",get:function(){return Object(c.c)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(t){return this._data.push(t),this._dataLength+=t.length,t.length}},{key:"appendWriter",value:function(t){return this._writeData(Object(c.b)(t._data))}},{key:"writeBytes",value:function(t){var e=Object(c.a)(t),r=e.length%this.wordSize;return r&&(e=Object(c.b)([e,this._padding.slice(r)])),this._writeData(e)}},{key:"_getValue",value:function(t){var e=Object(c.a)(g.from(t));return e.length>this.wordSize&&L.throwError("value out-of-bounds",h.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=Object(c.b)([this._padding.slice(e.length%this.wordSize),e])),e}},{key:"writeValue",value:function(t){return this._writeData(this._getValue(t))}},{key:"writeUpdatableValue",value:function(){var t=this,e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){t._data[e]=t._getValue(r)}}}]),t}(),H=function(){function t(e,r,n,o){F(this,t),P(this,"_data",Object(c.a)(e)),P(this,"wordSize",r||32),P(this,"_coerceFunc",n),P(this,"allowLoose",o),this._offset=0}return U(t,[{key:"data",get:function(){return Object(c.i)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(e,r){return this._coerceFunc?this._coerceFunc(e,r):t.coerce(e,r)}},{key:"_peekBytes",value:function(t,e,r){var n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:L.throwError("data out-of-bounds",h.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(e){return new t(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(t,e){var r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}},{key:"readValue",value:function(){return g.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(t,e){var r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}}]),t}(),q=r(33),K=r.n(q);function V(t){return"0x"+K.a.keccak_256(Object(c.a)(t))}var W=new h.b("rlp/5.7.0");function Q(t){for(var e=[];t;)e.unshift(255&t),t>>=8;return e}function J(t,e,r){for(var n=0,o=0;o<r;o++)n=256*n+t[e+o];return n}function Y(t){return Object(c.i)(function t(e){if(Array.isArray(e)){var r=[];if(e.forEach((function(e){r=r.concat(t(e))})),r.length<=55)return r.unshift(192+r.length),r;var n=Q(r.length);return n.unshift(247+n.length),n.concat(r)}Object(c.k)(e)||W.throwArgumentError("RLP object must be BytesLike","object",e);var o=Array.prototype.slice.call(Object(c.a)(e));if(1===o.length&&o[0]<=127)return o;if(o.length<=55)return o.unshift(128+o.length),o;var i=Q(o.length);return i.unshift(183+i.length),i.concat(o)}(t))}function Z(t,e,r,n){for(var o=[];r<e+1+n;){var i=X(t,r);o.push(i.result),(r+=i.consumed)>e+1+n&&W.throwError("child data too short",h.b.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function X(t,e){if(0===t.length&&W.throwError("data too short",h.b.errors.BUFFER_OVERRUN,{}),t[e]>=248){var r=t[e]-247;e+1+r>t.length&&W.throwError("data short segment too short",h.b.errors.BUFFER_OVERRUN,{});var n=J(t,e+1,r);return e+1+r+n>t.length&&W.throwError("data long segment too short",h.b.errors.BUFFER_OVERRUN,{}),Z(t,e,e+1+r,r+n)}if(t[e]>=192){var o=t[e]-192;return e+1+o>t.length&&W.throwError("data array too short",h.b.errors.BUFFER_OVERRUN,{}),Z(t,e,e+1,o)}if(t[e]>=184){var i=t[e]-183;e+1+i>t.length&&W.throwError("data array too short",h.b.errors.BUFFER_OVERRUN,{});var a=J(t,e+1,i);return e+1+i+a>t.length&&W.throwError("data array too short",h.b.errors.BUFFER_OVERRUN,{}),{consumed:1+i+a,result:Object(c.i)(t.slice(e+1+i,e+1+i+a))}}if(t[e]>=128){var s=t[e]-128;return e+1+s>t.length&&W.throwError("data too short",h.b.errors.BUFFER_OVERRUN,{}),{consumed:1+s,result:Object(c.i)(t.slice(e+1,e+1+s))}}return{consumed:1,result:Object(c.i)(t[e])}}function $(t){var e=Object(c.a)(t),r=X(e,0);return r.consumed!==e.length&&W.throwArgumentError("invalid rlp data","data",t),r.result}var tt=new h.b("address/5.7.0");function et(t){Object(c.l)(t,20)||tt.throwArgumentError("invalid address","address",t);for(var e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=e[n].charCodeAt(0);for(var o=Object(c.a)(V(r)),i=0;i<40;i+=2)o[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&o[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}for(var rt={},nt=0;nt<10;nt++)rt[String(nt)]=String(nt);for(var ot=0;ot<26;ot++)rt[String.fromCharCode(65+ot)]=String(10+ot);var it,at=Math.floor((it=9007199254740991,Math.log10?Math.log10(it):Math.log(it)/Math.LN10));function st(t){for(var e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((function(t){return rt[t]})).join("");e.length>=at;){var r=e.substring(0,at);e=parseInt(r,10)%97+e.substring(r.length)}for(var n=String(98-parseInt(e,10)%97);n.length<2;)n="0"+n;return n}function ut(t){var e,r=null;if("string"!=typeof t&&tt.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),r=et(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==t&&tt.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==st(t)&&tt.throwArgumentError("bad icap checksum","address",t),e=t.substring(4),r=new d(e,36).toString(16);r.length<40;)r="0"+r;r=et("0x"+r)}else tt.throwArgumentError("invalid address","address",t);return r}function ct(t){try{return ut(t),!0}catch(t){}return!1}function ft(t){for(var e,r=(e=ut(t).substring(2),new d(e,16).toString(36)).toUpperCase();r.length<30;)r="0"+r;return"XE"+st("XE00"+r)+r}function lt(t){var e=null;try{e=ut(t.from)}catch(e){tt.throwArgumentError("missing from address","transaction",t)}var r=Object(c.o)(Object(c.a)(g.from(t.nonce).toHexString()));return ut(Object(c.e)(V(Y([e,r])),12))}function ht(t,e,r){return 32!==Object(c.d)(e)&&tt.throwArgumentError("salt must be 32 bytes","salt",e),32!==Object(c.d)(r)&&tt.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),ut(Object(c.e)(V(Object(c.b)(["0xff",ut(t),e,r])),12))}var pt,dt,mt=new h.b("strings/5.7.0");function yt(t,e,r,n,o){if(t===dt.BAD_PREFIX||t===dt.UNEXPECTED_CONTINUE){for(var i=0,a=e+1;a<r.length&&r[a]>>6==2;a++)i++;return i}return t===dt.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(pt||(pt={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(dt||(dt={}));var vt=Object.freeze({error:function(t,e,r,n,o){return mt.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:yt,replace:function(t,e,r,n,o){return t===dt.OVERLONG?(n.push(o),0):(n.push(65533),yt(t,e,r))}});function gt(t,e){null==e&&(e=vt.error),t=Object(c.a)(t);for(var r=[],n=0;n<t.length;){var o=t[n++];if(o>>7!=0){var i=null,a=null;if(192==(224&o))i=1,a=127;else if(224==(240&o))i=2,a=2047;else{if(240!=(248&o)){n+=e(128==(192&o)?dt.UNEXPECTED_CONTINUE:dt.BAD_PREFIX,n-1,t,r);continue}i=3,a=65535}if(n-1+i>=t.length)n+=e(dt.OVERRUN,n-1,t,r);else{for(var s=o&(1<<8-i-1)-1,u=0;u<i;u++){var f=t[n];if(128!=(192&f)){n+=e(dt.MISSING_CONTINUE,n,t,r),s=null;break}s=s<<6|63&f,n++}null!==s&&(s>1114111?n+=e(dt.OUT_OF_RANGE,n-1-i,t,r,s):s>=55296&&s<=57343?n+=e(dt.UTF16_SURROGATE,n-1-i,t,r,s):s<=a?n+=e(dt.OVERLONG,n-1-i,t,r,s):r.push(s))}}else r.push(o)}return r}function bt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt.current;e!=pt.current&&(mt.checkNormalize(),t=t.normalize(e));for(var r=[],n=0;n<t.length;n++){var o=t.charCodeAt(n);if(o<128)r.push(o);else if(o<2048)r.push(o>>6|192),r.push(63&o|128);else if(55296==(64512&o)){n++;var i=t.charCodeAt(n);if(n>=t.length||56320!=(64512&i))throw new Error("invalid utf-8 string");var a=65536+((1023&o)<<10)+(1023&i);r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)}else r.push(o>>12|224),r.push(o>>6&63|128),r.push(63&o|128)}return Object(c.a)(r)}function wt(t){var e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function _t(t,e){return'"'+gt(t,e).map((function(t){if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?wt(t):wt(55296+((t-=65536)>>10&1023))+wt(56320+(1023&t))})).join("")+'"'}function kt(t){return t.map((function(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t)))})).join("")}function At(t,e){return kt(gt(t,e))}function Et(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt.current;return gt(bt(t,e))}function xt(t){return V(bt(t))}function Ot(t){return(Ot="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 St(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)}}function Pt(t,e){return(Pt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Rt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tt(t);if(e){var o=Tt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jt(this,r)}}function jt(t,e){if(e&&("object"===Ot(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tt(t){return(Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var It=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pt(t,e)}(i,t);var e,r,n,o=Rt(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"address","address",t,!1)}return e=i,(r=[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(t,e){try{e=ut(e)}catch(t){this._throwError(t.message,e)}return t.writeValue(e)}},{key:"decode",value:function(t){return ut(Object(c.h)(t.readValue().toHexString(),20))}}])&&St(e.prototype,r),n&&St(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(z);function Nt(t){return(Nt="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 Ct(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)}}function Mt(t,e){return(Mt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Bt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Dt(t);if(e){var o=Dt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ft(this,r)}}function Ft(t,e){if(e&&("object"===Nt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Dt(t){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ut=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mt(t,e)}(i,t);var e,r,n,o=Bt(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t.name,t.type,void 0,t.dynamic)).coder=t,e}return e=i,(r=[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(t,e){return this.coder.encode(t,e)}},{key:"decode",value:function(t){return this.coder.decode(t)}}])&&Ct(e.prototype,r),n&&Ct(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(z);function Lt(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)}}function zt(t,e){return(zt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Gt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=qt(t);if(e){var o=qt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ht(this,r)}}function Ht(t,e){if(e&&("object"===Kt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function qt(t){return(qt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Kt(t){return(Kt="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)}var Vt=new h.b("abi/5.7.0");function Wt(t,e,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===Kt(r)){var o={};n=e.map((function(t){var e=t.localName;return e||Vt.throwError("cannot encode object for signature with missing names",h.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),o[e]&&Vt.throwError("cannot encode object for signature with duplicate names",h.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),o[e]=!0,r[e]}))}else Vt.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Vt.throwArgumentError("types/value length mismatch","tuple",r);var i=new G(t.wordSize),a=new G(t.wordSize),s=[];e.forEach((function(t,e){var r=n[e];if(t.dynamic){var o=a.length;t.encode(a,r);var u=i.writeUpdatableValue();s.push((function(t){u(t+o)}))}else t.encode(i,r)})),s.forEach((function(t){t(i.length)}));var u=t.appendWriter(i);return u+=t.appendWriter(a)}function Qt(t,e){var r=[],n=t.subReader(0);e.forEach((function(e){var o=null;if(e.dynamic){var i=t.readValue(),a=n.subReader(i.toNumber());try{o=e.decode(a)}catch(t){if(t.code===h.b.errors.BUFFER_OVERRUN)throw t;(o=t).baseType=e.name,o.name=e.localName,o.type=e.type}}else try{o=e.decode(t)}catch(t){if(t.code===h.b.errors.BUFFER_OVERRUN)throw t;(o=t).baseType=e.name,o.name=e.localName,o.type=e.type}null!=o&&r.push(o)}));var o=e.reduce((function(t,e){var r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach((function(t,e){var n=t.localName;if(n&&1===o[n]&&("length"===n&&(n="_length"),null==r[n])){var i=r[e];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw i}}):r[n]=i}}));for(var i=function(t){var e=r[t];e instanceof Error&&Object.defineProperty(r,t,{enumerable:!0,get:function(){throw e}})},a=0;a<r.length;a++)i(a);return Object.freeze(r)}var Jt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zt(t,e)}(i,t);var e,r,n,o=Gt(i);function i(t,e,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var a=t.type+"["+(e>=0?e:"")+"]",s=-1===e||t.dynamic;return(n=o.call(this,"array",a,r,s)).coder=t,n.length=e,n}return e=i,(r=[{key:"defaultValue",value:function(){for(var t=this.coder.defaultValue(),e=[],r=0;r<this.length;r++)e.push(t);return e}},{key:"encode",value:function(t,e){Array.isArray(e)||this._throwError("expected array value",e);var r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),Vt.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));for(var n=[],o=0;o<e.length;o++)n.push(this.coder);return Wt(t,n,e)}},{key:"decode",value:function(t){var e=this.length;-1===e&&32*(e=t.readValue().toNumber())>t._data.length&&Vt.throwError("insufficient data length",h.b.errors.BUFFER_OVERRUN,{length:t._data.length,count:e});for(var r=[],n=0;n<e;n++)r.push(new Ut(this.coder));return t.coerce(this.name,Qt(t,r))}}])&&Lt(e.prototype,r),n&&Lt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(z);function Yt(t){return(Yt="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 Zt(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)}}function Xt(t,e){return(Xt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $t(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ee(t);if(e){var o=ee(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return te(this,r)}}function te(t,e){if(e&&("object"===Yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ee(t){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var re=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xt(t,e)}(i,t);var e,r,n,o=$t(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"bool","bool",t,!1)}return e=i,(r=[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(t,e){return t.writeValue(e?1:0)}},{key:"decode",value:function(t){return t.coerce(this.type,!t.readValue().isZero())}}])&&Zt(e.prototype,r),n&&Zt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(z);function ne(t){return(ne="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 oe(){return(oe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ie(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function ie(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pe(t)););return t}function ae(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function se(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)}}function ue(t,e,r){return e&&se(t.prototype,e),r&&se(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ce(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fe(t,e)}function fe(t,e){return(fe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function le(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pe(t);if(e){var o=pe(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return he(this,r)}}function he(t,e){if(e&&("object"===ne(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pe(t){return(pe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var de=function(t){ce(r,t);var e=le(r);function r(t,n){return ae(this,r),e.call(this,t,t,n,!0)}return ue(r,[{key:"defaultValue",value:function(){return"0x"}},{key:"encode",value:function(t,e){e=Object(c.a)(e);var r=t.writeValue(e.length);return r+=t.writeBytes(e)}},{key:"decode",value:function(t){return t.readBytes(t.readValue().toNumber(),!0)}}]),r}(z),me=function(t){ce(r,t);var e=le(r);function r(t){return ae(this,r),e.call(this,"bytes",t)}return ue(r,[{key:"decode",value:function(t){return t.coerce(this.name,Object(c.i)(oe(pe(r.prototype),"decode",this).call(this,t)))}}]),r}(de);function ye(t){return(ye="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 ve(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)}}function ge(t,e){return(ge=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function be(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_e(t);if(e){var o=_e(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return we(this,r)}}function we(t,e){if(e&&("object"===ye(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _e(t){return(_e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ke=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ge(t,e)}(i,t);var e,r,n,o=be(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n="bytes"+String(t);return(r=o.call(this,n,n,e,!1)).size=t,r}return e=i,(r=[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(t,e){var r=Object(c.a)(e);return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}},{key:"decode",value:function(t){return t.coerce(this.name,Object(c.i)(t.readBytes(this.size)))}}])&&ve(e.prototype,r),n&&ve(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(z);function Ae(t){return(Ae="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 Ee(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)}}function xe(t,e){return(xe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Oe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pe(t);if(e){var o=Pe(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Se(this,r)}}function Se(t,e){if(e&&("object"===Ae(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pe(t){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Re=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xe(t,e)}(i,t);var e,r,n,o=Oe(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"null","",t,!1)}return e=i,(r=[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}},{key:"decode",value:function(t){return t.readBytes(0),t.coerce(this.name,null)}}])&&Ee(e.prototype,r),n&&Ee(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(z),je=g.from(-1),Te=g.from(0),Ie=g.from(1),Ne=g.from(2),Ce=g.from("1000000000000000000"),Me=g.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Be=g.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Fe=g.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function De(t){return(De="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 Ue(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)}}function Le(t,e){return(Le=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ze(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=He(t);if(e){var o=He(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ge(this,r)}}function Ge(t,e){if(e&&("object"===De(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function He(t){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Le(t,e)}(i,t);var e,r,n,o=ze(i);function i(t,e,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var a=(e?"int":"uint")+8*t;return(n=o.call(this,a,a,r,!1)).size=t,n.signed=e,n}return e=i,(r=[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(t,e){var r=g.from(e),n=Me.mask(8*t.wordSize);if(this.signed){var o=n.mask(8*this.size-1);(r.gt(o)||r.lt(o.add(Ie).mul(je)))&&this._throwError("value out-of-bounds",e)}else(r.lt(Te)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(r)}},{key:"decode",value:function(t){var e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}])&&Ue(e.prototype,r),n&&Ue(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(z);function Ke(t){return(Ke="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 Ve(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)}}function We(){return(We="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Qe(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Qe(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xe(t)););return t}function Je(t,e){return(Je=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ye(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xe(t);if(e){var o=Xe(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ze(this,r)}}function Ze(t,e){if(e&&("object"===Ke(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xe(t){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $e=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Je(t,e)}(i,t);var e,r,n,o=Ye(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"string",t)}return e=i,(r=[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(t,e){return We(Xe(i.prototype),"encode",this).call(this,t,bt(e))}},{key:"decode",value:function(t){return At(We(Xe(i.prototype),"decode",this).call(this,t))}}])&&Ve(e.prototype,r),n&&Ve(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(de);function tr(t){return(tr="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 er(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)}}function rr(t,e){return(rr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ir(t);if(e){var o=ir(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return or(this,r)}}function or(t,e){if(e&&("object"===tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ir(t){return(ir=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ar=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rr(t,e)}(i,t);var e,r,n,o=nr(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n=!1,a=[];t.forEach((function(t){t.dynamic&&(n=!0),a.push(t.type)}));var s="tuple("+a.join(",")+")";return(r=o.call(this,"tuple",s,e,n)).coders=t,r}return e=i,(r=[{key:"defaultValue",value:function(){var t=[];this.coders.forEach((function(e){t.push(e.defaultValue())}));var e=this.coders.reduce((function(t,e){var r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach((function(r,n){var o=r.localName;o&&1===e[o]&&("length"===o&&(o="_length"),null==t[o]&&(t[o]=t[n]))})),Object.freeze(t)}},{key:"encode",value:function(t,e){return Wt(t,this.coders,e)}},{key:"decode",value:function(t){return t.coerce(this.name,Qt(t,this.coders))}}])&&er(e.prototype,r),n&&er(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(z);function sr(t){return(sr="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 ur(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cr(t,e)}function cr(t,e){return(cr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hr(t);if(e){var o=hr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lr(this,r)}}function lr(t,e){if(e&&("object"===sr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hr(t){return(hr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dr(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)}}function mr(t,e,r){return e&&dr(t.prototype,e),r&&dr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var yr=new h.b("abi/5.7.0"),vr={},gr={calldata:!0,memory:!0,storage:!0},br={calldata:!0,memory:!0};function wr(t,e){if("bytes"===t||"string"===t){if(gr[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&br[e])return!0;return(gr[e]||"payable"===e)&&yr.throwArgumentError("invalid modifier","name",e),!1}function _r(t,e){for(var r in e)P(t,r,e[r])}var kr=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Ar=new RegExp(/^(.*)\[([0-9]*)\]$/),Er=function(){function t(e,r){pr(this,t),e!==vr&&yr.throwError("use fromString",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),_r(this,r);var n=this.type.match(Ar);_r(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:t.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return mr(t,[{key:"format",value:function(t){if(t||(t=kr.sighash),kr[t]||yr.throwArgumentError("invalid format type","format",t),t===kr.json){var e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((function(e){return JSON.parse(e.format(t))}))),JSON.stringify(e)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(t),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==kr.sighash&&(r+=this.type),r+="("+this.components.map((function(e){return e.format(t)})).join(t===kr.full?", ":",")+")"):r+=this.type,t!==kr.sighash&&(!0===this.indexed&&(r+=" indexed"),t===kr.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(e,r){return"string"==typeof e?t.fromString(e,r):t.fromObject(e)}},{key:"fromObject",value:function(e){return t.isParamType(e)?e:new t(vr,{name:e.name||null,type:Mr(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(t.fromObject):null})}},{key:"fromString",value:function(e,r){return function(e){return t.fromObject({name:e.name,type:e.type,indexed:e.indexed,components:e.components})}(function(t,e){var r=t;function n(e){yr.throwArgumentError("unexpected character at position ".concat(e),"param",t)}function o(t){var r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},a=i,s=0;s<t.length;s++){var u=t[s];switch(u){case"(":a.state.allowType&&""===a.type?a.type="tuple":a.state.allowParams||n(s),a.state.allowType=!1,a.type=Mr(a.type),a.components=[o(a)],a=a.components[0];break;case")":delete a.state,"indexed"===a.name&&(e||n(s),a.indexed=!0,a.name=""),wr(a.type,a.name)&&(a.name=""),a.type=Mr(a.type);var c=a;(a=a.parent)||n(s),delete c.parent,a.state.allowParams=!1,a.state.allowName=!0,a.state.allowArray=!0;break;case",":delete a.state,"indexed"===a.name&&(e||n(s),a.indexed=!0,a.name=""),wr(a.type,a.name)&&(a.name=""),a.type=Mr(a.type);var f=o(a.parent);a.parent.components.push(f),delete a.parent,a=f;break;case" ":a.state.allowType&&""!==a.type&&(a.type=Mr(a.type),delete a.state.allowType,a.state.allowName=!0,a.state.allowParams=!0),a.state.allowName&&""!==a.name&&("indexed"===a.name?(e||n(s),a.indexed&&n(s),a.indexed=!0,a.name=""):wr(a.type,a.name)?a.name="":a.state.allowName=!1);break;case"[":a.state.allowArray||n(s),a.type+=u,a.state.allowArray=!1,a.state.allowName=!1,a.state.readArray=!0;break;case"]":a.state.readArray||n(s),a.type+=u,a.state.readArray=!1,a.state.allowArray=!0,a.state.allowName=!0;break;default:a.state.allowType?(a.type+=u,a.state.allowParams=!0,a.state.allowArray=!0):a.state.allowName?(a.name+=u,delete a.state.allowArray):a.state.readArray?a.type+=u:n(s)}}return a.parent&&yr.throwArgumentError("unexpected eof","param",t),delete i.state,"indexed"===a.name?(e||n(r.length-7),a.indexed&&n(r.length-7),a.indexed=!0,a.name=""):wr(a.type,a.name)&&(a.name=""),i.type=Mr(i.type),i}(e,!!r))}},{key:"isParamType",value:function(t){return!(null==t||!t._isParamType)}}]),t}();function xr(t,e){return function(t){t=t.trim();for(var e=[],r="",n=0,o=0;o<t.length;o++){var i=t[o];","===i&&0===n?(e.push(r),r=""):(r+=i,"("===i?n++:")"===i&&-1===--n&&yr.throwArgumentError("unbalanced parenthesis","value",t))}r&&e.push(r);return e}(t).map((function(t){return Er.fromString(t,e)}))}var Or=function(){function t(e,r){pr(this,t),e!==vr&&yr.throwError("use a static from method",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),_r(this,r),this._isFragment=!0,Object.freeze(this)}return mr(t,null,[{key:"from",value:function(e){return t.isFragment(e)?e:"string"==typeof e?t.fromString(e):t.fromObject(e)}},{key:"fromObject",value:function(e){if(t.isFragment(e))return e;switch(e.type){case"function":return Ir.fromObject(e);case"event":return Sr.fromObject(e);case"constructor":return Tr.fromObject(e);case"error":return Cr.fromObject(e);case"fallback":case"receive":return null}return yr.throwArgumentError("invalid fragment object","value",e)}},{key:"fromString",value:function(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Sr.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?Ir.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?Tr.fromString(t.trim()):"error"===t.split(" ")[0]?Cr.fromString(t.substring(5).trim()):yr.throwArgumentError("unsupported fragment","value",t)}},{key:"isFragment",value:function(t){return!(!t||!t._isFragment)}}]),t}(),Sr=function(t){ur(r,t);var e=fr(r);function r(){return pr(this,r),e.apply(this,arguments)}return mr(r,[{key:"format",value:function(t){if(t||(t=kr.sighash),kr[t]||yr.throwArgumentError("invalid format type","format",t),t===kr.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))}))});var e="";return t!==kr.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((function(e){return e.format(t)})).join(t===kr.full?", ":",")+") ",t!==kr.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isEventFragment(t))return t;"event"!==t.type&&yr.throwArgumentError("invalid event object","value",t);var e={name:Fr(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(Er.fromObject):[],type:"event"};return new r(vr,e)}},{key:"fromString",value:function(t){var e=t.match(Dr);e||yr.throwArgumentError("invalid event string","value",t);var n=!1;return e[3].split(" ").forEach((function(t){switch(t.trim()){case"anonymous":n=!0;break;case"":break;default:yr.warn("unknown modifier: "+t)}})),r.fromObject({name:e[1].trim(),anonymous:n,inputs:xr(e[2],!0),type:"event"})}},{key:"isEventFragment",value:function(t){return t&&t._isFragment&&"event"===t.type}}]),r}(Or);function Pr(t,e){e.gas=null;var r=t.split("@");return 1!==r.length?(r.length>2&&yr.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||yr.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=g.from(r[1]),r[0]):t}function Rr(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((function(t){switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function jr(t){var e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&yr.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&yr.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||yr.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&yr.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&yr.throwArgumentError("unable to determine stateMutability","value",t),e}var Tr=function(t){ur(r,t);var e=fr(r);function r(){return pr(this,r),e.apply(this,arguments)}return mr(r,[{key:"format",value:function(t){if(t||(t=kr.sighash),kr[t]||yr.throwArgumentError("invalid format type","format",t),t===kr.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))}))});t===kr.sighash&&yr.throwError("cannot format a constructor for sighash",h.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var e="constructor("+this.inputs.map((function(e){return e.format(t)})).join(t===kr.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isConstructorFragment(t))return t;"constructor"!==t.type&&yr.throwArgumentError("invalid constructor object","value",t);var e=jr(t);e.constant&&yr.throwArgumentError("constructor cannot be constant","value",t);var n={name:null,type:t.type,inputs:t.inputs?t.inputs.map(Er.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?g.from(t.gas):null};return new r(vr,n)}},{key:"fromString",value:function(t){var e={type:"constructor"},n=(t=Pr(t,e)).match(Dr);return n&&"constructor"===n[1].trim()||yr.throwArgumentError("invalid constructor string","value",t),e.inputs=xr(n[2].trim(),!1),Rr(n[3].trim(),e),r.fromObject(e)}},{key:"isConstructorFragment",value:function(t){return t&&t._isFragment&&"constructor"===t.type}}]),r}(Or),Ir=function(t){ur(r,t);var e=fr(r);function r(){return pr(this,r),e.apply(this,arguments)}return mr(r,[{key:"format",value:function(t){if(t||(t=kr.sighash),kr[t]||yr.throwArgumentError("invalid format type","format",t),t===kr.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))})),outputs:this.outputs.map((function(e){return JSON.parse(e.format(t))}))});var e="";return t!==kr.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((function(e){return e.format(t)})).join(t===kr.full?", ":",")+") ",t!==kr.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((function(e){return e.format(t)})).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isFunctionFragment(t))return t;"function"!==t.type&&yr.throwArgumentError("invalid function object","value",t);var e=jr(t),n={type:t.type,name:Fr(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(Er.fromObject):[],outputs:t.outputs?t.outputs.map(Er.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?g.from(t.gas):null};return new r(vr,n)}},{key:"fromString",value:function(t){var e={type:"function"},n=(t=Pr(t,e)).split(" returns ");n.length>2&&yr.throwArgumentError("invalid function string","value",t);var o=n[0].match(Dr);if(o||yr.throwArgumentError("invalid function signature","value",t),e.name=o[1].trim(),e.name&&Fr(e.name),e.inputs=xr(o[2],!1),Rr(o[3].trim(),e),n.length>1){var i=n[1].match(Dr);""==i[1].trim()&&""==i[3].trim()||yr.throwArgumentError("unexpected tokens","value",t),e.outputs=xr(i[2],!1)}else e.outputs=[];return r.fromObject(e)}},{key:"isFunctionFragment",value:function(t){return t&&t._isFragment&&"function"===t.type}}]),r}(Tr);function Nr(t){var e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||yr.throwArgumentError("cannot specify user defined ".concat(e," error"),"fragment",t),t}var Cr=function(t){ur(r,t);var e=fr(r);function r(){return pr(this,r),e.apply(this,arguments)}return mr(r,[{key:"format",value:function(t){if(t||(t=kr.sighash),kr[t]||yr.throwArgumentError("invalid format type","format",t),t===kr.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))}))});var e="";return t!==kr.sighash&&(e+="error "),(e+=this.name+"("+this.inputs.map((function(e){return e.format(t)})).join(t===kr.full?", ":",")+") ").trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isErrorFragment(t))return t;"error"!==t.type&&yr.throwArgumentError("invalid error object","value",t);var e={type:t.type,name:Fr(t.name),inputs:t.inputs?t.inputs.map(Er.fromObject):[]};return Nr(new r(vr,e))}},{key:"fromString",value:function(t){var e={type:"error"},n=t.match(Dr);return n||yr.throwArgumentError("invalid error signature","value",t),e.name=n[1].trim(),e.name&&Fr(e.name),e.inputs=xr(n[2],!1),Nr(r.fromObject(e))}},{key:"isErrorFragment",value:function(t){return t&&t._isFragment&&"error"===t.type}}]),r}(Or);function Mr(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}var Br=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Fr(t){return t&&t.match(Br)||yr.throwArgumentError('invalid identifier "'.concat(t,'"'),"value",t),t}var Dr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Ur(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)}}var Lr=new h.b("abi/5.7.0"),zr=new RegExp(/^bytes([0-9]*)$/),Gr=new RegExp(/^(u?int)([0-9]*)$/),Hr=new(function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"coerceFunc",e||null)}var e,r,n;return e=t,(r=[{key:"_getCoder",value:function(t){var e=this;switch(t.baseType){case"address":return new It(t.name);case"bool":return new re(t.name);case"string":return new $e(t.name);case"bytes":return new me(t.name);case"array":return new Jt(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new ar((t.components||[]).map((function(t){return e._getCoder(t)})),t.name);case"":return new Re(t.name)}var r=t.type.match(Gr);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!=0)&&Lr.throwArgumentError("invalid "+r[1]+" bit length","param",t),new qe(n/8,"int"===r[1],t.name)}if(r=t.type.match(zr)){var o=parseInt(r[1]);return(0===o||o>32)&&Lr.throwArgumentError("invalid bytes length","param",t),new ke(o,t.name)}return Lr.throwArgumentError("invalid type","type",t.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(t,e){return new H(t,this._getWordSize(),this.coerceFunc,e)}},{key:"_getWriter",value:function(){return new G(this._getWordSize())}},{key:"getDefaultValue",value:function(t){var e=this,r=t.map((function(t){return e._getCoder(Er.from(t))}));return new ar(r,"_").defaultValue()}},{key:"encode",value:function(t,e){var r=this;t.length!==e.length&&Lr.throwError("types/values length mismatch",h.b.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});var n=t.map((function(t){return r._getCoder(Er.from(t))})),o=new ar(n,"_"),i=this._getWriter();return o.encode(i,e),i.data}},{key:"decode",value:function(t,e,r){var n=this,o=t.map((function(t){return n._getCoder(Er.from(t))}));return new ar(o,"_").decode(this._getReader(Object(c.a)(e),r))}}])&&Ur(e.prototype,r),n&&Ur(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}());function qr(t){return(qr="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 Kr(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)}}function Vr(t,e,r){return e&&Kr(t.prototype,e),r&&Kr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Wr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jr(t,e)}function Jr(t,e){return(Jr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Yr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xr(t);if(e){var o=Xr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zr(this,r)}}function Zr(t,e){if(e&&("object"===qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xr(t){return(Xr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $r=new h.b("abi/5.7.0"),tn=function(t){Qr(r,t);var e=Yr(r);function r(){return Wr(this,r),e.apply(this,arguments)}return Vr(r)}(B),en=function(t){Qr(r,t);var e=Yr(r);function r(){return Wr(this,r),e.apply(this,arguments)}return Vr(r)}(B),rn=function(t){Qr(r,t);var e=Yr(r);function r(){return Wr(this,r),e.apply(this,arguments)}return Vr(r)}(B),nn=function(t){Qr(r,t);var e=Yr(r);function r(){return Wr(this,r),e.apply(this,arguments)}return Vr(r,null,[{key:"isIndexed",value:function(t){return!(!t||!t._isIndexed)}}]),r}(B),on={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function an(t,e){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(t));return r.error=e,r}var sn=function(){function t(e){var r=this;Wr(this,t);P(this,"fragments",("string"==typeof e?JSON.parse(e):e).map((function(t){return Or.from(t)})).filter((function(t){return null!=t}))),P(this,"_abiCoder",R(this instanceof t?this.constructor:void 0,"getAbiCoder")()),P(this,"functions",{}),P(this,"errors",{}),P(this,"events",{}),P(this,"structs",{}),this.fragments.forEach((function(t){var e=null;switch(t.type){case"constructor":return r.deploy?void $r.warn("duplicate definition - constructor"):void P(r,"deploy",t);case"function":e=r.functions;break;case"event":e=r.events;break;case"error":e=r.errors;break;default:return}var n=t.format();e[n]?$r.warn("duplicate definition - "+n):e[n]=t})),this.deploy||P(this,"deploy",Tr.from({payable:!1,type:"constructor"})),P(this,"_isInterface",!0)}return Vr(t,[{key:"format",value:function(t){t||(t=kr.full),t===kr.sighash&&$r.throwArgumentError("interface does not support formatting sighash","format",t);var e=this.fragments.map((function(e){return e.format(t)}));return t===kr.json?JSON.stringify(e.map((function(t){return JSON.parse(t)}))):e}},{key:"getFunction",value:function(t){if(Object(c.l)(t)){for(var e in this.functions)if(t===this.getSighash(e))return this.functions[e];$r.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){var r=t.trim(),n=Object.keys(this.functions).filter((function(t){return t.split("(")[0]===r}));return 0===n.length?$r.throwArgumentError("no matching function","name",r):n.length>1&&$r.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var o=this.functions[Ir.fromString(t).format()];return o||$r.throwArgumentError("no matching function","signature",t),o}},{key:"getEvent",value:function(t){if(Object(c.l)(t)){var e=t.toLowerCase();for(var r in this.events)if(e===this.getEventTopic(r))return this.events[r];$r.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){var n=t.trim(),o=Object.keys(this.events).filter((function(t){return t.split("(")[0]===n}));return 0===o.length?$r.throwArgumentError("no matching event","name",n):o.length>1&&$r.throwArgumentError("multiple matching events","name",n),this.events[o[0]]}var i=this.events[Sr.fromString(t).format()];return i||$r.throwArgumentError("no matching event","signature",t),i}},{key:"getError",value:function(t){if(Object(c.l)(t)){var e=R(this.constructor,"getSighash");for(var r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}$r.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){var n=t.trim(),o=Object.keys(this.errors).filter((function(t){return t.split("(")[0]===n}));return 0===o.length?$r.throwArgumentError("no matching error","name",n):o.length>1&&$r.throwArgumentError("multiple matching errors","name",n),this.errors[o[0]]}var i=this.errors[Ir.fromString(t).format()];return i||$r.throwArgumentError("no matching error","signature",t),i}},{key:"getSighash",value:function(t){if("string"==typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(t){throw e}}return R(this.constructor,"getSighash")(t)}},{key:"getEventTopic",value:function(t){return"string"==typeof t&&(t=this.getEvent(t)),R(this.constructor,"getEventTopic")(t)}},{key:"_decodeParams",value:function(t,e){return this._abiCoder.decode(t,e)}},{key:"_encodeParams",value:function(t,e){return this._abiCoder.encode(t,e)}},{key:"encodeDeploy",value:function(t){return this._encodeParams(this.deploy.inputs,t||[])}},{key:"decodeErrorResult",value:function(t,e){"string"==typeof t&&(t=this.getError(t));var r=Object(c.a)(e);return Object(c.i)(r.slice(0,4))!==this.getSighash(t)&&$r.throwArgumentError("data signature does not match error ".concat(t.name,"."),"data",Object(c.i)(r)),this._decodeParams(t.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(t,e){return"string"==typeof t&&(t=this.getError(t)),Object(c.i)(Object(c.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}},{key:"decodeFunctionData",value:function(t,e){"string"==typeof t&&(t=this.getFunction(t));var r=Object(c.a)(e);return Object(c.i)(r.slice(0,4))!==this.getSighash(t)&&$r.throwArgumentError("data signature does not match function ".concat(t.name,"."),"data",Object(c.i)(r)),this._decodeParams(t.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(t,e){return"string"==typeof t&&(t=this.getFunction(t)),Object(c.i)(Object(c.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}},{key:"decodeFunctionResult",value:function(t,e){"string"==typeof t&&(t=this.getFunction(t));var r=Object(c.a)(e),n=null,o="",i=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(l){}break;case 4:var u=Object(c.i)(r.slice(0,4)),f=on[u];if(f)i=this._abiCoder.decode(f.inputs,r.slice(4)),a=f.name,s=f.signature,f.reason&&(n=i[0]),"Error"===a?o="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(i[0])):"Panic"===a&&(o="; VM Exception while processing transaction: reverted with panic code ".concat(i[0]));else try{var l=this.getError(u);i=this._abiCoder.decode(l.inputs,r.slice(4)),a=l.name,s=l.format()}catch(l){}}return $r.throwError("call revert exception"+o,h.b.errors.CALL_EXCEPTION,{method:t.format(),data:Object(c.i)(e),errorArgs:i,errorName:a,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(t,e){return"string"==typeof t&&(t=this.getFunction(t)),Object(c.i)(this._abiCoder.encode(t.outputs,e||[]))}},{key:"encodeFilterTopics",value:function(t,e){var r=this;"string"==typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&$r.throwError("too many arguments for "+t.format(),h.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});var n=[];t.anonymous||n.push(this.getEventTopic(t));var o=function(t,e){return"string"===t.type?xt(e):"bytes"===t.type?V(Object(c.i)(e)):("bool"===t.type&&"boolean"==typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=g.from(e).toHexString()),"address"===t.type&&r._abiCoder.encode(["address"],[e]),Object(c.h)(Object(c.i)(e),32))};for(e.forEach((function(e,r){var i=t.inputs[r];i.indexed?null==e?n.push(null):"array"===i.baseType||"tuple"===i.baseType?$r.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,e):Array.isArray(e)?n.push(e.map((function(t){return o(i,t)}))):n.push(o(i,e)):null!=e&&$r.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,e)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(t,e){var r=this;"string"==typeof t&&(t=this.getEvent(t));var n=[],o=[],i=[];return t.anonymous||n.push(this.getEventTopic(t)),e.length!==t.inputs.length&&$r.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach((function(t,a){var s=e[a];if(t.indexed)if("string"===t.type)n.push(xt(s));else if("bytes"===t.type)n.push(V(s));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([t.type],[s]))}else o.push(t),i.push(s)})),{data:this._abiCoder.encode(o,i),topics:n}}},{key:"decodeEventLog",value:function(t,e,r){if("string"==typeof t&&(t=this.getEvent(t)),null!=r&&!t.anonymous){var n=this.getEventTopic(t);Object(c.l)(r[0],32)&&r[0].toLowerCase()===n||$r.throwError("fragment/topic mismatch",h.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var o=[],i=[],a=[];t.inputs.forEach((function(t,e){t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(o.push(Er.fromObject({type:"bytes32",name:t.name})),a.push(!0)):(o.push(t),a.push(!1)):(i.push(t),a.push(!1))}));var s=null!=r?this._abiCoder.decode(o,Object(c.b)(r)):null,u=this._abiCoder.decode(i,e,!0),f=[],l=0,p=0;t.inputs.forEach((function(t,e){if(t.indexed)if(null==s)f[e]=new nn({_isIndexed:!0,hash:null});else if(a[e])f[e]=new nn({_isIndexed:!0,hash:s[p++]});else try{f[e]=s[p++]}catch(t){f[e]=t}else try{f[e]=u[l++]}catch(t){f[e]=t}if(t.name&&null==f[t.name]){var r=f[e];r instanceof Error?Object.defineProperty(f,t.name,{enumerable:!0,get:function(){throw an("property ".concat(JSON.stringify(t.name)),r)}}):f[t.name]=r}}));for(var d=function(t){var e=f[t];e instanceof Error&&Object.defineProperty(f,t,{enumerable:!0,get:function(){throw an("index ".concat(t),e)}})},m=0;m<f.length;m++)d(m);return Object.freeze(f)}},{key:"parseTransaction",value:function(t){var e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new en({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:g.from(t.value||"0")}):null}},{key:"parseLog",value:function(t){var e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new tn({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}},{key:"parseError",value:function(t){var e=Object(c.i)(t),r=this.getError(e.substring(0,10).toLowerCase());return r?new rn({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}}],[{key:"getAbiCoder",value:function(){return Hr}},{key:"getAddress",value:function(t){return ut(t)}},{key:"getSighash",value:function(t){return Object(c.e)(xt(t.format()),0,4)}},{key:"getEventTopic",value:function(t){return xt(t.format())}},{key:"isInterface",value:function(t){return!(!t||!t._isInterface)}}]),t}();function un(t){return(un="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 cn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fn(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)}}function ln(t,e,r){return e&&fn(t.prototype,e),r&&fn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function hn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pn(t,e)}function pn(t,e){return(pn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yn(t);if(e){var o=yn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mn(this,r)}}function mn(t,e){if(e&&("object"===un(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yn(t){return(yn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},gn=new h.b("abstract-provider/5.7.0"),bn=function(t){hn(r,t);var e=dn(r);function r(){return cn(this,r),e.apply(this,arguments)}return ln(r,null,[{key:"isForkEvent",value:function(t){return!(!t||!t._isForkEvent)}}]),r}(B),wn=function(){function t(){cn(this,t),gn.checkAbstract(this instanceof t?this.constructor:void 0,t),P(this,"_isProvider",!0)}return ln(t,[{key:"getFeeData",value:function(){return vn(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n,o,i,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,j({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((function(t){return null}))});case 2:return e=t.sent,r=e.block,n=e.gasPrice,o=null,i=null,a=null,r&&r.baseFeePerGas&&(o=r.baseFeePerGas,a=g.from("1500000000"),i=r.baseFeePerGas.mul(2).add(a)),t.abrupt("return",{lastBaseFeePerGas:o,maxFeePerGas:i,maxPriorityFeePerGas:a,gasPrice:n});case 8:case"end":return t.stop()}}),t,this)})))}},{key:"addListener",value:function(t,e){return this.on(t,e)}},{key:"removeListener",value:function(t,e){return this.off(t,e)}}],[{key:"isProvider",value:function(t){return!(!t||!t._isProvider)}}]),t}();function _n(t){return(_n="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 kn(t,e){return(kn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function An(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=On(t);if(e){var o=On(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return En(this,r)}}function En(t,e){if(e&&("object"===_n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xn(t)}function xn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function On(t){return(On=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Sn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pn(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)}}function Rn(t,e,r){return e&&Pn(t.prototype,e),r&&Pn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var jn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Tn=new h.b("abstract-signer/5.7.0"),In=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Nn=[h.b.errors.INSUFFICIENT_FUNDS,h.b.errors.NONCE_EXPIRED,h.b.errors.REPLACEMENT_UNDERPRICED],Cn=function(){function t(){Sn(this,t),Tn.checkAbstract(this instanceof t?this.constructor:void 0,t),P(this,"_isSigner",!0)}return Rn(t,[{key:"getBalance",value:function(t){return jn(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getBalance"),e.next=3,this.provider.getBalance(this.getAddress(),t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"getTransactionCount",value:function(t){return jn(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getTransactionCount"),e.next=3,this.provider.getTransactionCount(this.getAddress(),t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"estimateGas",value:function(t){return jn(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("estimateGas"),e.next=3,j(this.checkTransaction(t));case 3:return r=e.sent,e.next=6,this.provider.estimateGas(r);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"call",value:function(t,e){return jn(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this._checkProvider("call"),r.next=3,j(this.checkTransaction(t));case 3:return n=r.sent,r.next=6,this.provider.call(n,e);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"sendTransaction",value:function(t){return jn(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("sendTransaction"),e.next=3,this.populateTransaction(t);case 3:return r=e.sent,e.next=6,this.signTransaction(r);case 6:return n=e.sent,e.next=9,this.provider.sendTransaction(n);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getChainId",value:function(){return jn(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getChainId"),t.next=3,this.provider.getNetwork();case 3:return e=t.sent,t.abrupt("return",e.chainId);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getGasPrice",value:function(){return jn(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getGasPrice"),t.next=3,this.provider.getGasPrice();case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getFeeData",value:function(){return jn(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getFeeData"),t.next=3,this.provider.getFeeData();case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"resolveName",value:function(t){return jn(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("resolveName"),e.next=3,this.provider.resolveName(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"checkTransaction",value:function(t){for(var e in t)-1===In.indexOf(e)&&Tn.throwArgumentError("invalid transaction key: "+e,"transaction",t);var r=I(t);return null==r.from?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then((function(e){return e[0].toLowerCase()!==e[1].toLowerCase()&&Tn.throwArgumentError("from address mismatch","transaction",t),e[0]})),r}},{key:"populateTransaction",value:function(t){return jn(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o,i,a=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j(this.checkTransaction(t));case 2:if(null!=(r=e.sent).to&&(r.to=Promise.resolve(r.to).then((function(t){return jn(a,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,this.resolveName(t);case 4:return null==(r=e.sent)&&Tn.throwArgumentError("provided ENS name resolves to null","tx.to",t),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})))})),r.to.catch((function(t){}))),n=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas,null==r.gasPrice||2!==r.type&&!n?0!==r.type&&1!==r.type||!n||Tn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t):Tn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas){e.next=10;break}r.type=2,e.next=18;break;case 10:if(0!==r.type&&1!==r.type){e.next=14;break}null==r.gasPrice&&(r.gasPrice=this.getGasPrice()),e.next=18;break;case 14:return e.next=16,this.getFeeData();case 16:o=e.sent,null==r.type?null!=o.maxFeePerGas&&null!=o.maxPriorityFeePerGas?(r.type=2,null!=r.gasPrice?(i=r.gasPrice,delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i):(null==r.maxFeePerGas&&(r.maxFeePerGas=o.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas))):null!=o.gasPrice?(n&&Tn.throwError("network does not support EIP-1559",h.b.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=o.gasPrice),r.type=0):Tn.throwError("failed to get consistent fee data",h.b.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"}):2===r.type&&(null==r.maxFeePerGas&&(r.maxFeePerGas=o.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=o.maxPriorityFeePerGas));case 18:return null==r.nonce&&(r.nonce=this.getTransactionCount("pending")),null==r.gasLimit&&(r.gasLimit=this.estimateGas(r).catch((function(t){if(Nn.indexOf(t.code)>=0)throw t;return Tn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:r})}))),null==r.chainId?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then((function(e){return 0!==e[1]&&e[0]!==e[1]&&Tn.throwArgumentError("chainId address mismatch","transaction",t),e[0]})),e.next=23,j(r);case 23:return e.abrupt("return",e.sent);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"_checkProvider",value:function(t){this.provider||Tn.throwError("missing provider",h.b.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}}],[{key:"isSigner",value:function(t){return!(!t||!t._isSigner)}}]),t}(),Mn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kn(t,e)}(r,t);var e=An(r);function r(t,n){var o;return Sn(this,r),P(xn(o=e.call(this)),"address",t),P(xn(o),"provider",n||null),o}return Rn(r,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(t,e){return Promise.resolve().then((function(){Tn.throwError(t,h.b.errors.UNSUPPORTED_OPERATION,{operation:e})}))}},{key:"signMessage",value:function(t){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(t){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(t,e,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(t){return new r(this.address,t)}}]),r}(Cn),Bn=r(32);function Fn(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)}}var Dn=new h.b("signing-key/5.7.0"),Un=null;function Ln(){return Un||(Un=new Bn.a("secp256k1")),Un}var zn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"curve","secp256k1"),P(this,"privateKey",Object(c.i)(e)),32!==Object(c.d)(this.privateKey)&&Dn.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=Ln().keyFromPrivate(Object(c.a)(this.privateKey));P(this,"publicKey","0x"+r.getPublic(!1,"hex")),P(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),P(this,"_isSigningKey",!0)}var e,r,n;return e=t,n=[{key:"isSigningKey",value:function(t){return!(!t||!t._isSigningKey)}}],(r=[{key:"_addPoint",value:function(t){var e=Ln().keyFromPublic(Object(c.a)(this.publicKey)),r=Ln().keyFromPublic(Object(c.a)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(t){var e=Ln().keyFromPrivate(Object(c.a)(this.privateKey)),r=Object(c.a)(t);32!==r.length&&Dn.throwArgumentError("bad digest length","digest",t);var n=e.sign(r,{canonical:!0});return Object(c.n)({recoveryParam:n.recoveryParam,r:Object(c.h)("0x"+n.r.toString(16),32),s:Object(c.h)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(t){var e=Ln().keyFromPrivate(Object(c.a)(this.privateKey)),r=Ln().keyFromPublic(Object(c.a)(Hn(t)));return Object(c.h)("0x"+e.derive(r.getPublic()).toString(16),32)}}])&&Fn(e.prototype,r),n&&Fn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Gn(t,e){var r=Object(c.n)(e),n={r:Object(c.a)(r.r),s:Object(c.a)(r.s)};return"0x"+Ln().recoverPubKey(Object(c.a)(t),n,r.recoveryParam).encode("hex",!1)}function Hn(t,e){var r=Object(c.a)(t);if(32===r.length){var n=new zn(r);return e?"0x"+Ln().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?e?Object(c.i)(r):"0x"+Ln().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+Ln().keyFromPublic(r).getPublic(!0,"hex"):Object(c.i)(r):Dn.throwArgumentError("invalid public or private key","key","[REDACTED]")}var qn,Kn=new h.b("transactions/5.7.0");function Vn(t){return"0x"===t?null:ut(t)}function Wn(t){return"0x"===t?Te:g.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(qn||(qn={}));var Qn=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Jn={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Yn(t){var e=Hn(t);return ut(Object(c.e)(V(Object(c.e)(e,1)),12))}function Zn(t,e){return Yn(Gn(Object(c.a)(t),e))}function Xn(t,e){var r=Object(c.o)(g.from(t).toHexString());return r.length>32&&Kn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function $n(t,e){return{address:ut(t),storageKeys:(e||[]).map((function(e,r){return 32!==Object(c.d)(e)&&Kn.throwArgumentError("invalid access list storageKey","accessList[".concat(t,":").concat(r,"]"),e),e.toLowerCase()}))}}function to(t){if(Array.isArray(t))return t.map((function(t,e){return Array.isArray(t)?(t.length>2&&Kn.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(e,"]"),t),$n(t[0],t[1])):$n(t.address,t.storageKeys)}));var e=Object.keys(t).map((function(e){var r=t[e].reduce((function(t,e){return t[e]=!0,t}),{});return $n(e,Object.keys(r).sort())}));return e.sort((function(t,e){return t.address.localeCompare(e.address)})),e}function eo(t){return to(t).map((function(t){return[t.address,t.storageKeys]}))}function ro(t,e){if(null!=t.gasPrice){var r=g.from(t.gasPrice),n=g.from(t.maxFeePerGas||0);r.eq(n)||Kn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var o=[Xn(t.chainId||0,"chainId"),Xn(t.nonce||0,"nonce"),Xn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Xn(t.maxFeePerGas||0,"maxFeePerGas"),Xn(t.gasLimit||0,"gasLimit"),null!=t.to?ut(t.to):"0x",Xn(t.value||0,"value"),t.data||"0x",eo(t.accessList||[])];if(e){var i=Object(c.n)(e);o.push(Xn(i.recoveryParam,"recoveryParam")),o.push(Object(c.o)(i.r)),o.push(Object(c.o)(i.s))}return Object(c.c)(["0x02",Y(o)])}function no(t,e){var r=[Xn(t.chainId||0,"chainId"),Xn(t.nonce||0,"nonce"),Xn(t.gasPrice||0,"gasPrice"),Xn(t.gasLimit||0,"gasLimit"),null!=t.to?ut(t.to):"0x",Xn(t.value||0,"value"),t.data||"0x",eo(t.accessList||[])];if(e){var n=Object(c.n)(e);r.push(Xn(n.recoveryParam,"recoveryParam")),r.push(Object(c.o)(n.r)),r.push(Object(c.o)(n.s))}return Object(c.c)(["0x01",Y(r)])}function oo(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&Kn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){T(t,Jn);var r=[];Qn.forEach((function(e){var n=t[e.name]||[],o={};e.numeric&&(o.hexPad="left"),n=Object(c.a)(Object(c.i)(n,o)),e.length&&n.length!==e.length&&n.length>0&&Kn.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),e.maxLength&&(n=Object(c.o)(n)).length>e.maxLength&&Kn.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),r.push(Object(c.i)(n))}));var n=0;if(null!=t.chainId?"number"!=typeof(n=t.chainId)&&Kn.throwArgumentError("invalid transaction.chainId","transaction",t):e&&!Object(c.k)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),0!==n&&(r.push(Object(c.i)(n)),r.push("0x"),r.push("0x")),!e)return Y(r);var o=Object(c.n)(e),i=27+o.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),i+=2*n+8,o.v>28&&o.v!==i&&Kn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):o.v!==i&&Kn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Object(c.i)(i)),r.push(Object(c.o)(Object(c.a)(o.r))),r.push(Object(c.o)(Object(c.a)(o.s))),Y(r)}(t,e);switch(t.type){case 1:return no(t,e);case 2:return ro(t,e)}return Kn.throwError("unsupported transaction type: ".concat(t.type),h.b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function io(t,e,r){try{var n=Wn(e[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");t.v=n}catch(t){Kn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Object(c.h)(e[1],32),t.s=Object(c.h)(e[2],32);try{var o=V(r(t));t.from=Zn(o,{r:t.r,s:t.s,recoveryParam:t.v})}catch(t){}}function ao(t){var e=Object(c.a)(t);if(e[0]>127)return function(t){var e=$(t);9!==e.length&&6!==e.length&&Kn.throwArgumentError("invalid raw transaction","rawTransaction",t);var r={nonce:Wn(e[0]).toNumber(),gasPrice:Wn(e[1]),gasLimit:Wn(e[2]),to:Vn(e[3]),value:Wn(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=g.from(e[6]).toNumber()}catch(t){return r}if(r.r=Object(c.h)(e[7],32),r.s=Object(c.h)(e[8],32),g.from(r.r).isZero()&&g.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,o=e.slice(0,6);0!==r.chainId&&(o.push(Object(c.i)(r.chainId)),o.push("0x"),o.push("0x"),n-=2*r.chainId+8);var i=V(Y(o));try{r.from=Zn(i,{r:Object(c.i)(r.r),s:Object(c.i)(r.s),recoveryParam:n})}catch(t){}r.hash=V(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){var e=$(t.slice(1));8!==e.length&&11!==e.length&&Kn.throwArgumentError("invalid component count for transaction type: 1","payload",Object(c.i)(t));var r={type:1,chainId:Wn(e[0]).toNumber(),nonce:Wn(e[1]).toNumber(),gasPrice:Wn(e[2]),gasLimit:Wn(e[3]),to:Vn(e[4]),value:Wn(e[5]),data:e[6],accessList:to(e[7])};return 8===e.length||(r.hash=V(t),io(r,e.slice(8),no)),r}(e);case 2:return function(t){var e=$(t.slice(1));9!==e.length&&12!==e.length&&Kn.throwArgumentError("invalid component count for transaction type: 2","payload",Object(c.i)(t));var r=Wn(e[2]),n=Wn(e[3]),o={type:2,chainId:Wn(e[0]).toNumber(),nonce:Wn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Wn(e[4]),to:Vn(e[5]),value:Wn(e[6]),data:e[7],accessList:to(e[8])};return 9===e.length||(o.hash=V(t),io(o,e.slice(9),ro)),o}(e)}return Kn.throwError("unsupported transaction type: ".concat(e[0]),h.b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}function so(t){return function(t){if(Array.isArray(t))return uo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return uo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uo(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function co(){return(co="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=fo(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function fo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vo(t)););return t}function lo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ho(t,e)}function ho(t,e){return(ho=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function po(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=vo(t);if(e){var o=vo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mo(this,r)}}function mo(t,e){if(e&&("object"===_o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return yo(t)}function yo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vo(t){return(vo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function go(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bo(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)}}function wo(t,e,r){return e&&bo(t.prototype,e),r&&bo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function _o(t){return(_o="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)}var ko=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Ao=new h.b("contracts/5.7.0"),Eo={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function xo(t,e){return ko(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e;case 2:return"string"!=typeof(n=r.sent)&&Ao.throwArgumentError("invalid address or ENS name","name",n),r.prev=4,r.abrupt("return",ut(n));case 8:r.prev=8,r.t0=r.catch(4);case 10:return t||Ao.throwError("a provider or signer is needed to resolve ENS names",h.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),r.next=13,t.resolveName(n);case 13:return null==(o=r.sent)&&Ao.throwArgumentError("resolver or addr is not configured for ENS name","name",n),r.abrupt("return",o);case 16:case"end":return r.stop()}}),r,null,[[4,8]])})))}function Oo(t,e,r){return ko(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Array.isArray(r)){n.next=4;break}return n.next=3,Promise.all(r.map((function(r,n){return Oo(t,Array.isArray(e)?e[n]:e[r.name],r)})));case 3:return n.abrupt("return",n.sent);case 4:if("address"!==r.type){n.next=8;break}return n.next=7,xo(t,e);case 7:return n.abrupt("return",n.sent);case 8:if("tuple"!==r.type){n.next=12;break}return n.next=11,Oo(t,e,r.components);case 11:return n.abrupt("return",n.sent);case 12:if("array"!==r.baseType){n.next=18;break}if(Array.isArray(e)){n.next=15;break}return n.abrupt("return",Promise.reject(Ao.makeError("invalid value for array",h.b.errors.INVALID_ARGUMENT,{argument:"value",value:e})));case 15:return n.next=17,Promise.all(e.map((function(e){return Oo(t,e,r.arrayChildren)})));case 17:return n.abrupt("return",n.sent);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),n)})))}function So(t,e,r){return ko(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a,s,u,f,l,p,d,m,y=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o={},r.length===e.inputs.length+1&&"object"===_o(r[r.length-1])&&(o=I(r.pop())),Ao.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?o.from?o.from=j({override:xo(t.signer,o.from),signer:t.signer.getAddress()}).then((function(t){return ko(y,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ut(t.signer)!==t.override&&Ao.throwError("Contract with a Signer cannot override from",h.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.abrupt("return",t.override);case 2:case"end":return e.stop()}}),e)})))})):o.from=t.signer.getAddress():o.from&&(o.from=xo(t.provider,o.from)),n.next=6,j({args:Oo(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:j(o)||{}});case 6:if(i=n.sent,a=t.interface.encodeFunctionData(e,i.args),s={data:a,to:i.address},null!=(u=i.overrides).nonce&&(s.nonce=g.from(u.nonce).toNumber()),null!=u.gasLimit&&(s.gasLimit=g.from(u.gasLimit)),null!=u.gasPrice&&(s.gasPrice=g.from(u.gasPrice)),null!=u.maxFeePerGas&&(s.maxFeePerGas=g.from(u.maxFeePerGas)),null!=u.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=g.from(u.maxPriorityFeePerGas)),null!=u.from&&(s.from=u.from),null!=u.type&&(s.type=u.type),null!=u.accessList&&(s.accessList=to(u.accessList)),null==s.gasLimit&&null!=e.gas){for(f=21e3,l=Object(c.a)(a),p=0;p<l.length;p++)f+=4,l[p]&&(f+=64);s.gasLimit=g.from(e.gas).add(f)}return u.value&&((d=g.from(u.value)).isZero()||e.payable||Ao.throwError("non-payable method cannot override value",h.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:o.value}),s.value=d),u.customData&&(s.customData=I(u.customData)),u.ccipReadEnabled&&(s.ccipReadEnabled=!!u.ccipReadEnabled),delete o.nonce,delete o.gasLimit,delete o.gasPrice,delete o.from,delete o.value,delete o.type,delete o.accessList,delete o.maxFeePerGas,delete o.maxPriorityFeePerGas,delete o.customData,delete o.ccipReadEnabled,(m=Object.keys(o).filter((function(t){return null!=o[t]}))).length&&Ao.throwError("cannot override ".concat(m.map((function(t){return JSON.stringify(t)})).join(",")),h.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:m}),n.abrupt("return",s);case 36:case"end":return n.stop()}}),n)})))}function Po(t,e){var r=e.wait.bind(e);e.wait=function(e){return r(e).then((function(e){return e.events=e.logs.map((function(r){var n=M(r),o=null;try{o=t.interface.parseLog(r)}catch(t){}return o&&(n.args=o.args,n.decode=function(e,r){return t.interface.decodeEventLog(o.eventFragment,e,r)},n.event=o.name,n.eventSignature=o.signature),n.removeListener=function(){return t.provider},n.getBlock=function(){return t.provider.getBlock(e.blockHash)},n.getTransaction=function(){return t.provider.getTransaction(e.transactionHash)},n.getTransactionReceipt=function(){return Promise.resolve(e)},n})),e}))}}function Ro(t,e,r){var n=t.signer||t.provider;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return ko(this,void 0,void 0,regeneratorRuntime.mark((function o(){var a,s,u,c,f;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(a=void 0,i.length!==e.inputs.length+1||"object"!==_o(i[i.length-1])){o.next=9;break}if(null==(s=I(i.pop())).blockTag){o.next=7;break}return o.next=6,s.blockTag;case 6:a=o.sent;case 7:delete s.blockTag,i.push(s);case 9:if(null==t.deployTransaction){o.next=12;break}return o.next=12,t._deployed(a);case 12:return o.next=14,So(t,e,i);case 14:return u=o.sent,o.next=17,n.call(u,a);case 17:return c=o.sent,o.prev=18,f=t.interface.decodeFunctionResult(e,c),r&&1===e.outputs.length&&(f=f[0]),o.abrupt("return",f);case 24:throw o.prev=24,o.t0=o.catch(18),o.t0.code===h.b.errors.CALL_EXCEPTION&&(o.t0.address=t.address,o.t0.args=i,o.t0.transaction=u),o.t0;case 28:case"end":return o.stop()}}),o,null,[[18,24]])})))}}function jo(t,e,r){return e.constant?Ro(t,e,r):function(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return ko(this,void 0,void 0,regeneratorRuntime.mark((function r(){var o,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.signer||Ao.throwError("sending a transaction requires a signer",h.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null==t.deployTransaction){r.next=4;break}return r.next=4,t._deployed();case 4:return r.next=6,So(t,e,n);case 6:return o=r.sent,r.next=9,t.signer.sendTransaction(o);case 9:return i=r.sent,Po(t,i),r.abrupt("return",i);case 12:case"end":return r.stop()}}),r)})))}}(t,e)}function To(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.map((function(t){return Array.isArray(t)?t.join("|"):t})).join(":"):""):"*"}var Io=function(){function t(e,r){go(this,t),P(this,"tag",e),P(this,"filter",r),this._listeners=[]}return wo(t,[{key:"addListener",value:function(t,e){this._listeners.push({listener:t,once:e})}},{key:"removeListener",value:function(t){var e=!1;this._listeners=this._listeners.filter((function(r){return!(!e&&r.listener===t)||(e=!0,!1)}))}},{key:"removeAllListeners",value:function(){this._listeners=[]}},{key:"listeners",value:function(){return this._listeners.map((function(t){return t.listener}))}},{key:"listenerCount",value:function(){return this._listeners.length}},{key:"run",value:function(t){var e=this,r=this.listenerCount();return this._listeners=this._listeners.filter((function(r){var n=t.slice();return setTimeout((function(){r.listener.apply(e,n)}),0),!r.once})),r}},{key:"prepareEvent",value:function(t){}},{key:"getEmit",value:function(t){return[t]}}]),t}(),No=function(t){lo(r,t);var e=po(r);function r(){return go(this,r),e.call(this,"error",null)}return wo(r)}(Io),Co=function(t){lo(r,t);var e=po(r);function r(t,n,o,i){var a;go(this,r);var s={address:t},u=n.getEventTopic(o);return i?(u!==i[0]&&Ao.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[u],P(yo(a=e.call(this,To(s),s)),"address",t),P(yo(a),"interface",n),P(yo(a),"fragment",o),a}return wo(r,[{key:"prepareEvent",value:function(t){var e=this;co(vo(r.prototype),"prepareEvent",this).call(this,t),t.event=this.fragment.name,t.eventSignature=this.fragment.format(),t.decode=function(t,r){return e.interface.decodeEventLog(e.fragment,t,r)};try{t.args=this.interface.decodeEventLog(this.fragment,t.data,t.topics)}catch(e){t.args=null,t.decodeError=e}}},{key:"getEmit",value:function(t){var e=function(t){var e=[];return function t(r,n){if(Array.isArray(n))for(var o in n){var i=r.slice();i.push(o);try{t(i,n[o])}catch(t){e.push({path:i,error:t})}}}([],t),e}(t.args);if(e.length)throw e[0].error;var r=(t.args||[]).slice();return r.push(t),r}}]),r}(Io),Mo=function(t){lo(r,t);var e=po(r);function r(t,n){var o;return go(this,r),P(yo(o=e.call(this,"*",{address:t})),"address",t),P(yo(o),"interface",n),o}return wo(r,[{key:"prepareEvent",value:function(t){var e=this;co(vo(r.prototype),"prepareEvent",this).call(this,t);try{var n=this.interface.parseLog(t);t.event=n.name,t.eventSignature=n.signature,t.decode=function(t,r){return e.interface.decodeEventLog(n.eventFragment,t,r)},t.args=n.args}catch(t){}}}]),r}(Io),Bo=function(){function t(e,r,n){var o=this;go(this,t),P(this,"interface",R(this instanceof t?this.constructor:void 0,"getInterface")(r)),null==n?(P(this,"provider",null),P(this,"signer",null)):Cn.isSigner(n)?(P(this,"provider",n.provider||null),P(this,"signer",n)):wn.isProvider(n)?(P(this,"provider",n),P(this,"signer",null)):Ao.throwArgumentError("invalid signer or provider","signerOrProvider",n),P(this,"callStatic",{}),P(this,"estimateGas",{}),P(this,"functions",{}),P(this,"populateTransaction",{}),P(this,"filters",{});var i={};if(Object.keys(this.interface.events).forEach((function(t){var e=o.interface.events[t];P(o.filters,t,(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return{address:o.address,topics:o.interface.encodeFilterTopics(e,r)}})),i[e.name]||(i[e.name]=[]),i[e.name].push(t)})),Object.keys(i).forEach((function(t){var e=i[t];1===e.length?P(o.filters,t,o.filters[e[0]]):Ao.warn("Duplicate definition of ".concat(t," (").concat(e.join(", "),")"))})),P(this,"_runningEvents",{}),P(this,"_wrappedEmits",{}),null==e&&Ao.throwArgumentError("invalid contract address or ENS name","addressOrName",e),P(this,"address",e),this.provider)P(this,"resolvedAddress",xo(this.provider,e));else try{P(this,"resolvedAddress",Promise.resolve(ut(e)))}catch(t){Ao.throwError("provider is required to use ENS name as contract address",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((function(t){}));var a={},s={};Object.keys(this.interface.functions).forEach((function(t){var e=o.interface.functions[t];if(s[t])Ao.warn("Duplicate ABI entry for ".concat(JSON.stringify(t)));else{s[t]=!0;var r=e.name;a["%".concat(r)]||(a["%".concat(r)]=[]),a["%".concat(r)].push(t),null==o[t]&&P(o,t,jo(o,e,!0)),null==o.functions[t]&&P(o.functions,t,jo(o,e,!1)),null==o.callStatic[t]&&P(o.callStatic,t,Ro(o,e,!0)),null==o.populateTransaction[t]&&P(o.populateTransaction,t,function(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return So(t,e,n)}}(o,e)),null==o.estimateGas[t]&&P(o.estimateGas,t,function(t,e){var r=t.signer||t.provider;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return ko(this,void 0,void 0,regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r||Ao.throwError("estimate require a provider or signer",h.b.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"}),n.next=3,So(t,e,o);case 3:return i=n.sent,n.next=6,r.estimateGas(i);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n)})))}}(o,e))}})),Object.keys(a).forEach((function(t){var e=a[t];if(!(e.length>1)){t=t.substring(1);var r=e[0];try{null==o[t]&&P(o,t,o[r])}catch(t){}null==o.functions[t]&&P(o.functions,t,o.functions[r]),null==o.callStatic[t]&&P(o.callStatic,t,o.callStatic[r]),null==o.populateTransaction[t]&&P(o.populateTransaction,t,o.populateTransaction[r]),null==o.estimateGas[t]&&P(o.estimateGas,t,o.estimateGas[r])}}))}return wo(t,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(t){var e=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return e})):this._deployedPromise=this.provider.getCode(this.address,t).then((function(t){return"0x"===t&&Ao.throwError("contract not deployed",h.b.errors.UNSUPPORTED_OPERATION,{contractAddress:e.address,operation:"getDeployed"}),e}))),this._deployedPromise}},{key:"fallback",value:function(t){var e=this;this.signer||Ao.throwError("sending a transactions require a signer",h.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=I(t||{});return["from","to"].forEach((function(t){null!=r[t]&&Ao.throwError("cannot override "+t,h.b.errors.UNSUPPORTED_OPERATION,{operation:t})})),r.to=this.resolvedAddress,this.deployed().then((function(){return e.signer.sendTransaction(r)}))}},{key:"connect",value:function(t){"string"==typeof t&&(t=new Mn(t,this.provider));var e=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&P(e,"deployTransaction",this.deployTransaction),e}},{key:"attach",value:function(t){return new this.constructor(t,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t}},{key:"_getRunningEvent",value:function(t){if("string"==typeof t){if("error"===t)return this._normalizeRunningEvent(new No);if("event"===t)return this._normalizeRunningEvent(new Io("event",null));if("*"===t)return this._normalizeRunningEvent(new Mo(this.address,this.interface));var e=this.interface.getEvent(t);return this._normalizeRunningEvent(new Co(this.address,this.interface,e))}if(t.topics&&t.topics.length>0){try{var r=t.topics[0];if("string"!=typeof r)throw new Error("invalid topic");var n=this.interface.getEvent(r);return this._normalizeRunningEvent(new Co(this.address,this.interface,n,t.topics))}catch(t){}var o={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new Io(To(o),o))}return this._normalizeRunningEvent(new Mo(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(t){if(0===t.listenerCount()){delete this._runningEvents[t.tag];var e=this._wrappedEmits[t.tag];e&&t.filter&&(this.provider.off(t.filter,e),delete this._wrappedEmits[t.tag])}}},{key:"_wrapEvent",value:function(t,e,r){var n=this,o=M(e);return o.removeListener=function(){r&&(t.removeListener(r),n._checkRunningEvents(t))},o.getBlock=function(){return n.provider.getBlock(e.blockHash)},o.getTransaction=function(){return n.provider.getTransaction(e.transactionHash)},o.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(e.transactionHash)},t.prepareEvent(o),o}},{key:"_addEventListener",value:function(t,e,r){var n=this;if(this.provider||Ao.throwError("events require a provider or a signer with a provider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(e,r),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){var o=function(r){var o=n._wrapEvent(t,r,e);if(null==o.decodeError)try{var i=t.getEmit(o);n.emit.apply(n,[t.filter].concat(so(i)))}catch(t){o.decodeError=t.error}null!=t.filter&&n.emit("event",o),null!=o.decodeError&&n.emit("error",o.decodeError,o)};this._wrappedEmits[t.tag]=o,null!=t.filter&&this.provider.on(t.filter,o)}}},{key:"queryFilter",value:function(t,e,r){var n=this,o=this._getRunningEvent(t),i=I(o.filter);return"string"==typeof e&&Object(c.l)(e,32)?(null!=r&&Ao.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=e):(i.fromBlock=null!=e?e:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((function(t){return t.map((function(t){return n._wrapEvent(o,t,null)}))}))}},{key:"on",value:function(t,e){return this._addEventListener(this._getRunningEvent(t),e,!1),this}},{key:"once",value:function(t,e){return this._addEventListener(this._getRunningEvent(t),e,!0),this}},{key:"emit",value:function(t){if(!this.provider)return!1;for(var e=this._getRunningEvent(t),r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=e.run(n)>0;return this._checkRunningEvents(e),i}},{key:"listenerCount",value:function(t){var e=this;return this.provider?null==t?Object.keys(this._runningEvents).reduce((function(t,r){return t+e._runningEvents[r].listenerCount()}),0):this._getRunningEvent(t).listenerCount():0}},{key:"listeners",value:function(t){var e=this;if(!this.provider)return[];if(null==t){var r=function(){var t=[];for(var r in e._runningEvents)e._runningEvents[r].listeners().forEach((function(e){t.push(e)}));return{v:t}}();if("object"===_o(r))return r.v}return this._getRunningEvent(t).listeners()}},{key:"removeAllListeners",value:function(t){if(!this.provider)return this;if(null==t){for(var e in this._runningEvents){var r=this._runningEvents[e];r.removeAllListeners(),this._checkRunningEvents(r)}return this}var n=this._getRunningEvent(t);return n.removeAllListeners(),this._checkRunningEvents(n),this}},{key:"off",value:function(t,e){if(!this.provider)return this;var r=this._getRunningEvent(t);return r.removeListener(e),this._checkRunningEvents(r),this}},{key:"removeListener",value:function(t,e){return this.off(t,e)}}],[{key:"getContractAddress",value:function(t){return lt(t)}},{key:"getInterface",value:function(t){return sn.isInterface(t)?t:new sn(t)}},{key:"isIndexed",value:function(t){return nn.isIndexed(t)}}]),t}(),Fo=function(t){lo(r,t);var e=po(r);function r(){return go(this,r),e.apply(this,arguments)}return wo(r)}(Bo),Do=function(){function t(e,r,n){go(this,t);var o=null;"0x"!==(o="string"==typeof r?r:Object(c.j)(r)?Object(c.i)(r):r&&"string"==typeof r.object?r.object:"!").substring(0,2)&&(o="0x"+o),(!Object(c.l)(o)||o.length%2)&&Ao.throwArgumentError("invalid bytecode","bytecode",r),n&&!Cn.isSigner(n)&&Ao.throwArgumentError("invalid signer","signer",n),P(this,"bytecode",o),P(this,"interface",R(this instanceof t?this.constructor:void 0,"getInterface")(e)),P(this,"signer",n||null)}return wo(t,[{key:"getDeployTransaction",value:function(){for(var t={},e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(r.length===this.interface.deploy.inputs.length+1&&"object"===_o(r[r.length-1]))for(var o in t=I(r.pop()))if(!Eo[o])throw new Error("unknown transaction override "+o);if(["data","from","to"].forEach((function(e){null!=t[e]&&Ao.throwError("cannot override "+e,h.b.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value){var i=g.from(t.value);i.isZero()||this.interface.deploy.payable||Ao.throwError("non-payable constructor cannot override value",h.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return Ao.checkArgumentCount(r.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=Object(c.i)(Object(c.b)([this.bytecode,this.interface.encodeDeploy(r)])),t}},{key:"deploy",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return ko(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r,n,o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},e.length===this.interface.deploy.inputs.length+1&&(r=e.pop()),Ao.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.next=5,Oo(this.signer,e,this.interface.deploy.inputs);case 5:return(n=t.sent).push(r),o=this.getDeployTransaction.apply(this,so(n)),t.next=10,this.signer.sendTransaction(o);case 10:return i=t.sent,a=R(this.constructor,"getContractAddress")(i),Po(s=R(this.constructor,"getContract")(a,this.interface,this.signer),i),P(s,"deployTransaction",i),t.abrupt("return",s);case 16:case"end":return t.stop()}}),t,this)})))}},{key:"attach",value:function(t){return this.constructor.getContract(t,this.interface,this.signer)}},{key:"connect",value:function(t){return new this.constructor(this.interface,this.bytecode,t)}}],[{key:"fromSolidity",value:function(t,e){null==t&&Ao.throwError("missing compiler output",h.b.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof t&&(t=JSON.parse(t));var r=t.abi,n=null;return t.bytecode?n=t.bytecode:t.evm&&t.evm.bytecode&&(n=t.evm.bytecode),new this(r,n,e)}},{key:"getInterface",value:function(t){return Fo.getInterface(t)}},{key:"getContractAddress",value:function(t){return lt(t)}},{key:"getContract",value:function(t,e,r){return new Fo(t,e,r)}}]),t}();function Uo(t){return(Uo="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 Lo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zo(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)}}function Go(t,e,r){return e&&zo(t.prototype,e),r&&zo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var Ho=new h.b("bignumber/5.7.0"),qo={},Ko=g.from(0),Vo=g.from(-1);function Wo(t,e,r,n){var o={fault:e,operation:r};return void 0!==n&&(o.value=n),Ho.throwError(t,h.b.errors.NUMERIC_FAULT,o)}for(var Qo="0";Qo.length<256;)Qo+=Qo;function Jo(t){if("number"!=typeof t)try{t=g.from(t).toNumber()}catch(t){}return"number"==typeof t&&t>=0&&t<=256&&!(t%1)?"1"+Qo.substring(0,t):Ho.throwArgumentError("invalid decimal size","decimals",t)}function Yo(t,e){null==e&&(e=0);var r=Jo(e),n=(t=g.from(t)).lt(Ko);n&&(t=t.mul(Vo));for(var o=t.mod(r).toString();o.length<r.length-1;)o="0"+o;o=o.match(/^([0-9]*[1-9]|0)(0*)/)[1];var i=t.div(r).toString();return t=1===r.length?i:i+"."+o,n&&(t="-"+t),t}function Zo(t,e){null==e&&(e=0);var r=Jo(e);"string"==typeof t&&t.match(/^-?[0-9.]+$/)||Ho.throwArgumentError("invalid decimal value","value",t);var n="-"===t.substring(0,1);n&&(t=t.substring(1)),"."===t&&Ho.throwArgumentError("missing value","value",t);var o=t.split(".");o.length>2&&Ho.throwArgumentError("too many decimal points","value",t);var i=o[0],a=o[1];for(i||(i="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&Wo("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length<r.length-1;)a+="0";var s=g.from(i),u=g.from(a),c=s.mul(r).add(u);return n&&(c=c.mul(Vo)),c}var Xo=function(){function t(e,r,n,o){Lo(this,t),e!==qo&&Ho.throwError("cannot use FixedFormat constructor; use FixedFormat.from",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=r,this.width=n,this.decimals=o,this.name=(r?"":"u")+"fixed"+String(n)+"x"+String(o),this._multiplier=Jo(o),Object.freeze(this)}return Go(t,null,[{key:"from",value:function(e){if(e instanceof t)return e;"number"==typeof e&&(e="fixed128x".concat(e));var r=!0,n=128,o=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)r=!1;else{var i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||Ho.throwArgumentError("invalid fixed format","format",e),r="u"!==i[1],n=parseInt(i[2]),o=parseInt(i[3])}else if(e){var a=function(t,r,n){return null==e[t]?n:(Uo(e[t])!==r&&Ho.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t])};r=a("signed","boolean",r),n=a("width","number",n),o=a("decimals","number",o)}return n%8&&Ho.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),o>80&&Ho.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new t(qo,r,n,o)}}]),t}(),$o=function(){function t(e,r,n,o){Lo(this,t),e!==qo&&Ho.throwError("cannot use FixedNumber constructor; use FixedNumber.from",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=o,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return Go(t,[{key:"_checkFormat",value:function(t){this.format.name!==t.format.name&&Ho.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}},{key:"addUnsafe",value:function(e){this._checkFormat(e);var r=Zo(this._value,this.format.decimals),n=Zo(e._value,e.format.decimals);return t.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(e){this._checkFormat(e);var r=Zo(this._value,this.format.decimals),n=Zo(e._value,e.format.decimals);return t.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(e){this._checkFormat(e);var r=Zo(this._value,this.format.decimals),n=Zo(e._value,e.format.decimals);return t.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(e){this._checkFormat(e);var r=Zo(this._value,this.format.decimals),n=Zo(e._value,e.format.decimals);return t.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var e=this.toString().split(".");1===e.length&&e.push("0");var r=t.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(ti.toFormat(r.format))),r}},{key:"ceiling",value:function(){var e=this.toString().split(".");1===e.length&&e.push("0");var r=t.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(ti.toFormat(r.format))),r}},{key:"round",value:function(e){null==e&&(e=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(e<0||e>80||e%1)&&Ho.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;var n=t.from("1"+Qo.substring(0,e),this.format),o=ei.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(o).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(t){if(null==t)return this._hex;t%8&&Ho.throwArgumentError("invalid byte width","width",t);var e=g.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString();return Object(c.h)(e,t/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(e){return t.fromString(this._value,e)}}],[{key:"fromValue",value:function(e,r,n){return null!=n||null==r||function(t){return null!=t&&(g.isBigNumber(t)||"number"==typeof t&&t%1==0||"string"==typeof t&&!!t.match(/^-?[0-9]+$/)||Object(c.l)(t)||"bigint"==typeof t||Object(c.j)(t))}(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),t.fromString(Yo(e,r),Xo.from(n))}},{key:"fromString",value:function(e,r){null==r&&(r="fixed");var n=Xo.from(r),o=Zo(e,n.decimals);!n.signed&&o.lt(Ko)&&Wo("unsigned value cannot be negative","overflow","value",e);var i=null;n.signed?i=o.toTwos(n.width).toHexString():(i=o.toHexString(),i=Object(c.h)(i,n.width/8));var a=Yo(o,n.decimals);return new t(qo,i,a,n)}},{key:"fromBytes",value:function(e,r){null==r&&(r="fixed");var n=Xo.from(r);if(Object(c.a)(e).length>n.width/8)throw new Error("overflow");var o=g.from(e);n.signed&&(o=o.fromTwos(n.width));var i=o.toTwos((n.signed?0:1)+n.width).toHexString(),a=Yo(o,n.decimals);return new t(qo,i,a,n)}},{key:"from",value:function(e,r){if("string"==typeof e)return t.fromString(e,r);if(Object(c.j)(e))return t.fromBytes(e,r);try{return t.fromValue(e,0,r)}catch(t){if(t.code!==h.b.errors.INVALID_ARGUMENT)throw t}return Ho.throwArgumentError("invalid FixedNumber value","value",e)}},{key:"isFixedNumber",value:function(t){return!(!t||!t._isFixedNumber)}}]),t}(),ti=$o.from(1),ei=$o.from("0.5");function ri(t){return"string"==typeof t&&(t=bt(t)),V(Object(c.b)([bt("Ethereum Signed Message:\n"),bt(String(t.length)),t]))}function ni(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)}}var oi=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},ii=new h.b("hash/5.7.0"),ai=new Uint8Array(32);ai.fill(0);var si=g.from(-1),ui=g.from(0),ci=g.from(1),fi=g.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var li=Object(c.h)(ci.toHexString(),32),hi=Object(c.h)(ui.toHexString(),32),pi={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},di=["name","version","chainId","verifyingContract","salt"];function mi(t){return function(e){return"string"!=typeof e&&ii.throwArgumentError("invalid domain value for ".concat(JSON.stringify(t)),"domain.".concat(t),e),e}}var yi={name:mi("name"),version:mi("version"),chainId:function(t){try{return g.from(t).toString()}catch(t){}return ii.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return ut(t).toLowerCase()}catch(t){}return ii.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{var e=Object(c.a)(t);if(32!==e.length)throw new Error("bad length");return Object(c.i)(e)}catch(t){}return ii.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function vi(t){var e=t.match(/^(u?)int(\d*)$/);if(e){var r=""===e[1],n=parseInt(e[2]||"256");(n%8!=0||n>256||e[2]&&e[2]!==String(n))&&ii.throwArgumentError("invalid numeric width","type",t);var o=fi.mask(r?n-1:n),i=r?o.add(ci).mul(si):ui;return function(e){var r=g.from(e);return(r.lt(i)||r.gt(o))&&ii.throwArgumentError("value out-of-bounds for ".concat(t),"value",e),Object(c.h)(r.toTwos(256).toHexString(),32)}}var a=t.match(/^bytes(\d+)$/);if(a){var s=parseInt(a[1]);return(0===s||s>32||a[1]!==String(s))&&ii.throwArgumentError("invalid bytes width","type",t),function(e){return Object(c.a)(e).length!==s&&ii.throwArgumentError("invalid length for ".concat(t),"value",e),function(t){var e=Object(c.a)(t),r=e.length%32;return r?Object(c.c)([e,ai.slice(r)]):Object(c.i)(e)}(e)}}switch(t){case"address":return function(t){return Object(c.h)(ut(t),32)};case"bool":return function(t){return t?li:hi};case"bytes":return function(t){return V(t)};case"string":return function(t){return xt(t)}}return null}function gi(t,e){return"".concat(t,"(").concat(e.map((function(t){var e=t.name;return t.type+" "+e})).join(","),")")}var bi=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"types",Object.freeze(M(e))),P(this,"_encoderCache",{}),P(this,"_types",{});var r={},n={},o={};Object.keys(e).forEach((function(t){r[t]={},n[t]=[],o[t]={}}));var i=function(t){var o={};e[t].forEach((function(i){o[i.name]&&ii.throwArgumentError("duplicate variable name ".concat(JSON.stringify(i.name)," in ").concat(JSON.stringify(t)),"types",e),o[i.name]=!0;var a=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===t&&ii.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",e),vi(a)||(n[a]||ii.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",e),n[a].push(t),r[t][a]=!0)}))};for(var a in e)i(a);var s=Object.keys(n).filter((function(t){return 0===n[t].length}));for(var u in 0===s.length?ii.throwArgumentError("missing primary type","types",e):s.length>1&&ii.throwArgumentError("ambiguous primary types or unused types: ".concat(s.map((function(t){return JSON.stringify(t)})).join(", ")),"types",e),P(this,"primaryType",s[0]),function t(i,a){a[i]&&ii.throwArgumentError("circular type reference to ".concat(JSON.stringify(i)),"types",e),a[i]=!0,Object.keys(r[i]).forEach((function(e){n[e]&&(t(e,a),Object.keys(a).forEach((function(t){o[t][e]=!0})))})),delete a[i]}(this.primaryType,{}),o){var c=Object.keys(o[u]);c.sort(),this._types[u]=gi(u,e[u])+c.map((function(t){return gi(t,e[t])})).join("")}}var e,r,n;return e=t,n=[{key:"from",value:function(e){return new t(e)}},{key:"getPrimaryType",value:function(e){return t.from(e).primaryType}},{key:"hashStruct",value:function(e,r,n){return t.from(r).hashStruct(e,n)}},{key:"hashDomain",value:function(e){var r=[];for(var n in e){var o=pi[n];o||ii.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",e),r.push({name:n,type:o})}return r.sort((function(t,e){return di.indexOf(t.name)-di.indexOf(e.name)})),t.hashStruct("EIP712Domain",{EIP712Domain:r},e)}},{key:"encode",value:function(e,r,n){return Object(c.c)(["0x1901",t.hashDomain(e),t.from(r).hash(n)])}},{key:"hash",value:function(e,r,n){return V(t.encode(e,r,n))}},{key:"resolveNames",value:function(e,r,n,o){return oi(this,void 0,void 0,regeneratorRuntime.mark((function i(){var a,s,u;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:e=I(e),a={},e.verifyingContract&&!Object(c.l)(e.verifyingContract,20)&&(a[e.verifyingContract]="0x"),(s=t.from(r)).visit(n,(function(t,e){return"address"!==t||Object(c.l)(e,20)||(a[e]="0x"),e})),i.t0=regeneratorRuntime.keys(a);case 6:if((i.t1=i.t0()).done){i.next=13;break}return u=i.t1.value,i.next=10,o(u);case 10:a[u]=i.sent,i.next=6;break;case 13:return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(function(t,e){return"address"===t&&a[e]?a[e]:e})),i.abrupt("return",{domain:e,value:n});case 16:case"end":return i.stop()}}),i)})))}},{key:"getPayload",value:function(e,r,n){t.hashDomain(e);var o={},i=[];di.forEach((function(t){var r=e[t];null!=r&&(o[t]=yi[t](r),i.push({name:t,type:pi[t]}))}));var a=t.from(r),s=I(r);return s.EIP712Domain?ii.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=i,a.encode(n),{types:s,domain:o,primaryType:a.primaryType,message:a.visit(n,(function(t,e){if(t.match(/^bytes(\d*)/))return Object(c.i)(Object(c.a)(e));if(t.match(/^u?int/))return g.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!=typeof e&&ii.throwArgumentError("invalid string","value",e),e}return ii.throwArgumentError("unsupported type","type",t)}))}}}],(r=[{key:"getEncoder",value:function(t){var e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}},{key:"_getEncoder",value:function(t){var e=this,r=vi(t);if(r)return r;var n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var o=n[1],i=this.getEncoder(o),a=parseInt(n[3]);return function(t){a>=0&&t.length!==a&&ii.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);var r=t.map(i);return e._types[o]&&(r=r.map(V)),V(Object(c.c)(r))}}var s=this.types[t];if(s){var u=xt(this._types[t]);return function(t){var r=s.map((function(r){var n=r.name,o=r.type,i=e.getEncoder(o)(t[n]);return e._types[o]?V(i):i}));return r.unshift(u),Object(c.c)(r)}}return ii.throwArgumentError("unknown type: ".concat(t),"type",t)}},{key:"encodeType",value:function(t){var e=this._types[t];return e||ii.throwArgumentError("unknown type: ".concat(JSON.stringify(t)),"name",t),e}},{key:"encodeData",value:function(t,e){return this.getEncoder(t)(e)}},{key:"hashStruct",value:function(t,e){return V(this.encodeData(t,e))}},{key:"encode",value:function(t){return this.encodeData(this.primaryType,t)}},{key:"hash",value:function(t){return this.hashStruct(this.primaryType,t)}},{key:"_visit",value:function(t,e,r){var n=this;if(vi(t))return r(t,e);var o=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(o){var i=o[1],a=parseInt(o[3]);return a>=0&&e.length!==a&&ii.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((function(t){return n._visit(i,t,r)}))}var s=this.types[t];return s?s.reduce((function(t,o){var i=o.name,a=o.type;return t[i]=n._visit(a,e[i],r),t}),{}):ii.throwArgumentError("unknown type: ".concat(t),"type",t)}},{key:"visit",value:function(t,e){return this._visit(this.primaryType,t,e)}}])&&ni(e.prototype,r),n&&ni(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function wi(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)}}var _i,ki=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"alphabet",e),P(this,"base",e.length),P(this,"_alphabetMap",{}),P(this,"_leader",e.charAt(0));for(var r=0;r<e.length;r++)this._alphabetMap[e.charAt(r)]=r}var e,r,n;return e=t,(r=[{key:"encode",value:function(t){var e=Object(c.a)(t);if(0===e.length)return"";for(var r=[0],n=0;n<e.length;++n){for(var o=e[n],i=0;i<r.length;++i)o+=r[i]<<8,r[i]=o%this.base,o=o/this.base|0;for(;o>0;)r.push(o%this.base),o=o/this.base|0}for(var a="",s=0;0===e[s]&&s<e.length-1;++s)a+=this._leader;for(var u=r.length-1;u>=0;--u)a+=this.alphabet[r[u]];return a}},{key:"decode",value:function(t){if("string"!=typeof t)throw new TypeError("Expected String");var e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(var r=0;r<t.length;r++){var n=this._alphabetMap[t[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");for(var o=n,i=0;i<e.length;++i)o+=e[i]*this.base,e[i]=255&o,o>>=8;for(;o>0;)e.push(255&o),o>>=8}for(var a=0;t[a]===this._leader&&a<t.length-1;++a)e.push(0);return Object(c.a)(new Uint8Array(e.reverse()))}}])&&wi(e.prototype,r),n&&wi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ai=(new ki("abcdefghijklmnopqrstuvwxyz234567"),new ki("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),Ei=r(4),xi=r.n(Ei);!function(t){t.sha256="sha256",t.sha512="sha512"}(_i||(_i={}));var Oi=new h.b("sha2/5.7.0");function Si(t){return"0x"+xi.a.ripemd160().update(Object(c.a)(t)).digest("hex")}function Pi(t){return"0x"+xi.a.sha256().update(Object(c.a)(t)).digest("hex")}function Ri(t){return"0x"+xi.a.sha512().update(Object(c.a)(t)).digest("hex")}function ji(t,e,r){return _i[t]||Oi.throwError("unsupported algorithm "+t,h.b.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),"0x"+xi.a.hmac(xi.a[t],Object(c.a)(e)).update(Object(c.a)(r)).digest("hex")}function Ti(t,e,r,n,o){var i;t=Object(c.a)(t),e=Object(c.a)(e);var a,s,u=1,f=new Uint8Array(n),l=new Uint8Array(e.length+4);l.set(e);for(var h=1;h<=u;h++){l[e.length]=h>>24&255,l[e.length+1]=h>>16&255,l[e.length+2]=h>>8&255,l[e.length+3]=255&h;var p=Object(c.a)(ji(o,t,l));i||(i=p.length,s=new Uint8Array(i),a=n-((u=Math.ceil(n/i))-1)*i),s.set(p);for(var d=1;d<r;d++){p=Object(c.a)(ji(o,t,p));for(var m=0;m<i;m++)s[m]^=p[m]}var y=(h-1)*i,v=h===u?a:i;f.set(Object(c.a)(s).slice(0,v),y)}return Object(c.i)(f)}function Ii(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)}}var Ni=new h.b("wordlists/5.7.0"),Ci=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ni.checkAbstract(this instanceof t?this.constructor:void 0,t),P(this,"locale",e)}var e,r,n;return e=t,n=[{key:"check",value:function(t){for(var e=[],r=0;r<2048;r++){var n=t.getWord(r);if(r!==t.getWordIndex(n))return"0x";e.push(n)}return xt(e.join("\n")+"\n")}},{key:"register",value:function(t,e){e||(e=t.locale)}}],(r=[{key:"split",value:function(t){return t.toLowerCase().split(/ +/g)}},{key:"join",value:function(t){return t.join(" ")}}])&&Ii(e.prototype,r),n&&Ii(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Mi(t){return(Mi="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 Bi(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)}}function Fi(t,e){return(Fi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Di(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Li(t);if(e){var o=Li(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ui(this,r)}}function Ui(t,e){if(e&&("object"===Mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Li(t){return(Li=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var zi=null;function Gi(t){if(null==zi&&(zi="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==Ci.check(t)))throw zi=null,new Error("BIP39 Wordlist for en (English) FAILED")}var Hi=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fi(t,e)}(i,t);var e,r,n,o=Di(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"en")}return e=i,(r=[{key:"getWord",value:function(t){return Gi(this),zi[t]}},{key:"getWordIndex",value:function(t){return Gi(this),zi.indexOf(t)}}])&&Bi(e.prototype,r),n&&Bi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ci));Ci.register(Hi);var qi={en:Hi};function Ki(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)}}var Vi=new h.b("hdnode/5.7.0"),Wi=g.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Qi=bt("Bitcoin seed");function Ji(t){return(1<<t)-1<<8-t}function Yi(t){return Object(c.h)(Object(c.i)(t),32)}function Zi(t){return Ai.encode(Object(c.b)([t,Object(c.e)(Pi(Pi(t)),0,4)]))}function Xi(t){if(null==t)return qi.en;if("string"==typeof t){var e=qi[t];return null==e&&Vi.throwArgumentError("unknown locale","wordlist",t),e}return t}var $i={},ta="m/44'/60'/0'/0/0",ea=function(){function t(e,r,n,o,i,a,s,u){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e!==$i)throw new Error("HDNode constructor cannot be called directly");if(r){var f=new zn(r);P(this,"privateKey",f.privateKey),P(this,"publicKey",f.compressedPublicKey)}else P(this,"privateKey",null),P(this,"publicKey",Object(c.i)(n));P(this,"parentFingerprint",o),P(this,"fingerprint",Object(c.e)(Si(Pi(this.publicKey)),0,4)),P(this,"address",Yn(this.publicKey)),P(this,"chainCode",i),P(this,"index",a),P(this,"depth",s),null==u?(P(this,"mnemonic",null),P(this,"path",null)):"string"==typeof u?(P(this,"mnemonic",null),P(this,"path",u)):(P(this,"mnemonic",u),P(this,"path",u.path))}var e,r,n;return e=t,n=[{key:"_fromSeed",value:function(e,r){var n=Object(c.a)(e);if(n.length<16||n.length>64)throw new Error("invalid seed");var o=Object(c.a)(ji(_i.sha512,Qi,n));return new t($i,Yi(o.slice(0,32)),null,"0x00000000",Yi(o.slice(32)),0,0,r)}},{key:"fromMnemonic",value:function(e,r,n){return e=oa(na(e,n=Xi(n)),n),t._fromSeed(ra(e,r),{phrase:e,path:"m",locale:n.locale})}},{key:"fromSeed",value:function(e){return t._fromSeed(e,null)}},{key:"fromExtendedKey",value:function(e){var r=Ai.decode(e);82===r.length&&Zi(r.slice(0,78))===e||Vi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var n=r[4],o=Object(c.i)(r.slice(5,9)),i=parseInt(Object(c.i)(r.slice(9,13)).substring(2),16),a=Object(c.i)(r.slice(13,45)),s=r.slice(45,78);switch(Object(c.i)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new t($i,null,Object(c.i)(s),o,a,i,n,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new t($i,Object(c.i)(s.slice(1)),null,o,a,i,n,null)}return Vi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}],(r=[{key:"extendedKey",get:function(){if(this.depth>=256)throw new Error("Depth too large!");return Zi(Object(c.b)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(c.i)(this.depth),this.parentFingerprint,Object(c.h)(Object(c.i)(this.index),4),this.chainCode,null!=this.privateKey?Object(c.b)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new t($i,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(e){if(e>4294967295)throw new Error("invalid index - "+String(e));var r=this.path;r&&(r+="/"+(2147483647&e));var n=new Uint8Array(37);if(2147483648&e){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Object(c.a)(this.privateKey),1),r&&(r+="'")}else n.set(Object(c.a)(this.publicKey));for(var o=24;o>=0;o-=8)n[33+(o>>3)]=e>>24-o&255;var i=Object(c.a)(ji(_i.sha512,this.chainCode,n)),a=i.slice(0,32),s=i.slice(32),u=null,f=null;this.privateKey?u=Yi(g.from(a).add(this.privateKey).mod(Wi)):f=new zn(Object(c.i)(a))._addPoint(this.publicKey);var l=r,h=this.mnemonic;return h&&(l=Object.freeze({phrase:h.phrase,path:r,locale:h.locale||"en"})),new t($i,u,f,this.fingerprint,Yi(s),e,this.depth+1,l)}},{key:"derivePath",value:function(t){var e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===e[0]&&e.shift();for(var r=this,n=0;n<e.length;n++){var o=e[n];if(o.match(/^[0-9]+'$/)){var i=parseInt(o.substring(0,o.length-1));if(i>=2147483648)throw new Error("invalid path index - "+o);r=r._derive(2147483648+i)}else{if(!o.match(/^[0-9]+$/))throw new Error("invalid path component - "+o);var a=parseInt(o);if(a>=2147483648)throw new Error("invalid path index - "+o);r=r._derive(a)}}return r}}])&&Ki(e.prototype,r),n&&Ki(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ra(t,e){e||(e="");var r=bt("mnemonic"+e,pt.NFKD);return Ti(bt(t,pt.NFKD),r,2048,64,"sha512")}function na(t,e){e=Xi(e),Vi.checkNormalize();var r=e.split(t);if(r.length%3!=0)throw new Error("invalid mnemonic");for(var n=Object(c.a)(new Uint8Array(Math.ceil(11*r.length/8))),o=0,i=0;i<r.length;i++){var a=e.getWordIndex(r[i].normalize("NFKD"));if(-1===a)throw new Error("invalid mnemonic");for(var s=0;s<11;s++)a&1<<10-s&&(n[o>>3]|=1<<7-o%8),o++}var u=32*r.length/3,f=Ji(r.length/3);if((Object(c.a)(Pi(n.slice(0,u/8)))[0]&f)!==(n[n.length-1]&f))throw new Error("invalid checksum");return Object(c.i)(n.slice(0,u/8))}function oa(t,e){if(e=Xi(e),(t=Object(c.a)(t)).length%4!=0||t.length<16||t.length>32)throw new Error("invalid entropy");for(var r=[0],n=11,o=0;o<t.length;o++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&(1<<8-n)-1),n+=3);var i=t.length/4,a=Object(c.a)(Pi(t))[0]&Ji(i);return r[r.length-1]<<=i,r[r.length-1]|=a>>8-i,e.join(r.map((function(t){return e.getWord(t)})))}function ia(t,e){try{return na(t,e),!0}catch(t){}return!1}function aa(t){return("number"!=typeof t||t<0||t>=2147483648||t%1)&&Vi.throwArgumentError("invalid account index","index",t),"m/44'/60'/".concat(t,"'/0/0")}var sa=r(77),ua=r(6),ca=r.n(ua),fa=r(14),la=r.n(fa);function ha(t){return"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),Object(c.a)(t)}function pa(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function da(t){return"string"==typeof t?bt(t,pt.NFKC):Object(c.a)(t)}function ma(t,e){for(var r=t,n=e.toLowerCase().split("/"),o=0;o<n.length;o++){var i=null;for(var a in r)if(a.toLowerCase()===n[o]){i=r[a];break}if(null===i)return null;r=i}return r}function ya(t){var e=Object(c.a)(t);e[6]=15&e[6]|64,e[8]=63&e[8]|128;var r=Object(c.i)(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}function va(t){return(va="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 ga(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ba(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)}}function wa(t,e){return(wa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Aa(t);if(e){var o=Aa(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ka(this,r)}}function ka(t,e){if(e&&("object"===va(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Aa(t){return(Aa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ea=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},xa=new h.b("json-wallets/5.7.0");function Oa(t){return null!=t&&t.mnemonic&&t.mnemonic.phrase}var Sa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wa(t,e)}(i,t);var e,r,n,o=_a(i);function i(){return ga(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"isKeystoreAccount",value:function(t){return!(!t||!t._isKeystoreAccount)}}])&&ba(e.prototype,r),n&&ba(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(B);function Pa(t,e){var r=ha(ma(t,"crypto/ciphertext"));if(Object(c.i)(V(Object(c.b)([e.slice(16,32),r]))).substring(2)!==ma(t,"crypto/mac").toLowerCase())throw new Error("invalid password");var n=function(t,e,r){if("aes-128-ctr"===ma(t,"crypto/cipher")){var n=ha(ma(t,"crypto/cipherparams/iv")),o=new ca.a.Counter(n),i=new ca.a.ModeOfOperation.ctr(e,o);return Object(c.a)(i.decrypt(r))}return null}(t,e.slice(0,16),r);n||xa.throwError("unsupported cipher",h.b.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});var o=e.slice(32,64),i=Yn(n);if(t.address){var a=t.address.toLowerCase();if("0x"!==a.substring(0,2)&&(a="0x"+a),ut(a)!==i)throw new Error("address mismatch")}var s={_isKeystoreAccount:!0,address:i,privateKey:Object(c.i)(n)};if("0.1"===ma(t,"x-ethers/version")){var u=ha(ma(t,"x-ethers/mnemonicCiphertext")),f=ha(ma(t,"x-ethers/mnemonicCounter")),l=new ca.a.Counter(f),p=new ca.a.ModeOfOperation.ctr(o,l),d=ma(t,"x-ethers/path")||ta,m=ma(t,"x-ethers/locale")||"en",y=Object(c.a)(p.decrypt(u));try{var v=oa(y,m),g=ea.fromMnemonic(v,null,m).derivePath(d);if(g.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=g.mnemonic}catch(t){if(t.code!==h.b.errors.INVALID_ARGUMENT||"wordlist"!==t.argument)throw t}}return new Sa(s)}function Ra(t,e,r,n,o){return Object(c.a)(Ti(t,e,r,n,o))}function ja(t,e,r,n,o){return Promise.resolve(Ra(t,e,r,n,o))}function Ta(t,e,r,n,o){var i=da(e),a=ma(t,"crypto/kdf");if(a&&"string"==typeof a){var s=function(t,e){return xa.throwArgumentError("invalid key-derivation function parameters",t,e)};if("scrypt"===a.toLowerCase()){var u=ha(ma(t,"crypto/kdfparams/salt")),c=parseInt(ma(t,"crypto/kdfparams/n")),f=parseInt(ma(t,"crypto/kdfparams/r")),l=parseInt(ma(t,"crypto/kdfparams/p"));c&&f&&l||s("kdf",a),0!=(c&c-1)&&s("N",c);var h=parseInt(ma(t,"crypto/kdfparams/dklen"));return 32!==h&&s("dklen",h),n(i,u,c,f,l,64,o)}if("pbkdf2"===a.toLowerCase()){var p=ha(ma(t,"crypto/kdfparams/salt")),d=null,m=ma(t,"crypto/kdfparams/prf");"hmac-sha256"===m?d="sha256":"hmac-sha512"===m?d="sha512":s("prf",m);var y=parseInt(ma(t,"crypto/kdfparams/c")),v=parseInt(ma(t,"crypto/kdfparams/dklen"));return 32!==v&&s("dklen",v),r(i,p,y,v,d)}}return xa.throwArgumentError("unsupported key-derivation function","kdf",a)}function Ia(t){return(Ia="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 Na(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ca(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)}}function Ma(t,e){return(Ma=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ba(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Da(t);if(e){var o=Da(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fa(this,r)}}function Fa(t,e){if(e&&("object"===Ia(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Da(t){return(Da=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ua=new h.b("json-wallets/5.7.0"),La=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ma(t,e)}(i,t);var e,r,n,o=Ba(i);function i(){return Na(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"isCrowdsaleAccount",value:function(t){return!(!t||!t._isCrowdsaleAccount)}}])&&Ca(e.prototype,r),n&&Ca(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(B);function za(t,e){var r=JSON.parse(t);e=da(e);var n=ut(ma(r,"ethaddr")),o=ha(ma(r,"encseed"));o&&o.length%16==0||Ua.throwArgumentError("invalid encseed","json",t);for(var i=Object(c.a)(Ti(e,e,2e3,32,"sha256")).slice(0,16),a=o.slice(0,16),s=o.slice(16),u=new ca.a.ModeOfOperation.cbc(i,a),f=ca.a.padding.pkcs7.strip(Object(c.a)(u.decrypt(s))),l="",h=0;h<f.length;h++)l+=String.fromCharCode(f[h]);var p=V(bt(l));return new La({_isCrowdsaleAccount:!0,address:n,privateKey:p})}function Ga(t){var e=null;try{e=JSON.parse(t)}catch(t){return!1}return e.encseed&&e.ethaddr}function Ha(t){var e=null;try{e=JSON.parse(t)}catch(t){return!1}return!(!e.version||parseInt(e.version)!==e.version||3!==parseInt(e.version))}function qa(t){if(Ga(t))try{return ut(JSON.parse(t).ethaddr)}catch(t){return null}if(Ha(t))try{return ut(JSON.parse(t).address)}catch(t){return null}return null}function Ka(t,e,r){if(Ga(t)){r&&r(0);var n=za(t,e);return r&&r(1),Promise.resolve(n)}return Ha(t)?function(t,e,r){return Ea(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=JSON.parse(t),n.next=3,Ta(o,e,ja,la.a.scrypt,r);case 3:return i=n.sent,n.abrupt("return",Pa(o,i));case 5:case"end":return n.stop()}}),n)})))}(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function Va(t,e){if(Ga(t))return za(t,e);if(Ha(t))return function(t,e){var r=JSON.parse(t);return Pa(r,Ta(r,e,Ra,la.a.syncScrypt))}(t,e);throw new Error("invalid JSON wallet")}function Wa(t){return(Wa="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 Qa(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)}}function Ja(t,e){return(Ja=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ya(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=$a(t);if(e){var o=$a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Za(this,r)}}function Za(t,e){if(e&&("object"===Wa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Xa(t)}function Xa(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $a(t){return($a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ts=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},es=new h.b("wallet/5.7.0");var rs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ja(t,e)}(i,t);var e,r,n,o=Ya(i);function i(t,e){var r,n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),r=o.call(this),null!=(n=t)&&Object(c.l)(n.privateKey,32)&&null!=n.address){var a=new zn(t.privateKey);if(P(Xa(r),"_signingKey",(function(){return a})),P(Xa(r),"address",Yn(r.publicKey)),r.address!==ut(t.address)&&es.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(t){var e=t.mnemonic;return e&&e.phrase}(t)){var s=t.mnemonic;P(Xa(r),"_mnemonic",(function(){return{phrase:s.phrase,path:s.path||ta,locale:s.locale||"en"}}));var u=r.mnemonic;Yn(ea.fromMnemonic(u.phrase,null,u.locale).derivePath(u.path).privateKey)!==r.address&&es.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else P(Xa(r),"_mnemonic",(function(){return null}))}else{if(zn.isSigningKey(t))"secp256k1"!==t.curve&&es.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),P(Xa(r),"_signingKey",(function(){return t}));else{"string"==typeof t&&t.match(/^[0-9a-f]*$/i)&&64===t.length&&(t="0x"+t);var f=new zn(t);P(Xa(r),"_signingKey",(function(){return f}))}P(Xa(r),"_mnemonic",(function(){return null})),P(Xa(r),"address",Yn(r.publicKey))}return e&&!wn.isProvider(e)&&es.throwArgumentError("invalid provider","provider",e),P(Xa(r),"provider",e||null),r}return e=i,n=[{key:"createRandom",value:function(t){var e=Object(sa.a)(16);t||(t={}),t.extraEntropy&&(e=Object(c.a)(Object(c.e)(V(Object(c.b)([e,t.extraEntropy])),0,16)));var r=oa(e,t.locale);return i.fromMnemonic(r,t.path,t.locale)}},{key:"fromEncryptedJson",value:function(t,e,r){return Ka(t,e,r).then((function(t){return new i(t)}))}},{key:"fromEncryptedJsonSync",value:function(t,e){return new i(Va(t,e))}},{key:"fromMnemonic",value:function(t,e,r){return e||(e=ta),new i(ea.fromMnemonic(t,null,r).derivePath(e))}}],(r=[{key:"mnemonic",get:function(){return this._mnemonic()}},{key:"privateKey",get:function(){return this._signingKey().privateKey}},{key:"publicKey",get:function(){return this._signingKey().publicKey}},{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"connect",value:function(t){return new i(this,t)}},{key:"signTransaction",value:function(t){var e=this;return j(t).then((function(r){null!=r.from&&(ut(r.from)!==e.address&&es.throwArgumentError("transaction from address mismatch","transaction.from",t.from),delete r.from);var n=e._signingKey().signDigest(V(oo(r)));return oo(r,n)}))}},{key:"signMessage",value:function(t){return ts(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.m)(this._signingKey().signDigest(ri(t))));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"_signTypedData",value:function(t,e,r){return ts(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,bi.resolveNames(t,e,r,(function(t){return null==i.provider&&es.throwError("cannot resolve ENS names without a provider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:t}),i.provider.resolveName(t)}));case 2:return o=n.sent,n.abrupt("return",Object(c.m)(this._signingKey().signDigest(bi.hash(o.domain,e,o.value))));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"encrypt",value:function(t,e,r){if("function"!=typeof e||r||(r=e,e={}),r&&"function"!=typeof r)throw new Error("invalid callback");return e||(e={}),function(t,e,r,n){try{if(ut(t.address)!==Yn(t.privateKey))throw new Error("address/privateKey mismatch");if(Oa(t)){var o=t.mnemonic;if(ea.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path||ta).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(t){return Promise.reject(t)}"function"!=typeof r||n||(n=r,r={}),r||(r={});var i=Object(c.a)(t.privateKey),a=da(e),s=null,u=null,f=null;if(Oa(t)){var l=t.mnemonic;s=Object(c.a)(na(l.phrase,l.locale||"en")),u=l.path||ta,f=l.locale||"en"}var h=r.client;h||(h="ethers.js");var p=null;p=r.salt?Object(c.a)(r.salt):Object(sa.a)(32);var d=null;if(r.iv){if(16!==(d=Object(c.a)(r.iv)).length)throw new Error("invalid iv")}else d=Object(sa.a)(16);var m=null;if(r.uuid){if(16!==(m=Object(c.a)(r.uuid)).length)throw new Error("invalid uuid")}else m=Object(sa.a)(16);var y=1<<17,v=8,g=1;return r.scrypt&&(r.scrypt.N&&(y=r.scrypt.N),r.scrypt.r&&(v=r.scrypt.r),r.scrypt.p&&(g=r.scrypt.p)),la.a.scrypt(a,p,y,v,g,64,n).then((function(e){var r=(e=Object(c.a)(e)).slice(0,16),n=e.slice(16,32),o=e.slice(32,64),a=new ca.a.Counter(d),l=new ca.a.ModeOfOperation.ctr(r,a),b=Object(c.a)(l.encrypt(i)),w=V(Object(c.b)([n,b])),_={address:t.address.substring(2).toLowerCase(),id:ya(m),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Object(c.i)(d).substring(2)},ciphertext:Object(c.i)(b).substring(2),kdf:"scrypt",kdfparams:{salt:Object(c.i)(p).substring(2),n:y,dklen:32,p:g,r:v},mac:w.substring(2)}};if(s){var k=Object(sa.a)(16),A=new ca.a.Counter(k),E=new ca.a.ModeOfOperation.ctr(o,A),x=Object(c.a)(E.encrypt(s)),O=new Date,S=O.getUTCFullYear()+"-"+pa(O.getUTCMonth()+1,2)+"-"+pa(O.getUTCDate(),2)+"T"+pa(O.getUTCHours(),2)+"-"+pa(O.getUTCMinutes(),2)+"-"+pa(O.getUTCSeconds(),2)+".0Z";_["x-ethers"]={client:h,gethFilename:"UTC--"+S+"--"+_.address,mnemonicCounter:Object(c.i)(k).substring(2),mnemonicCiphertext:Object(c.i)(x).substring(2),path:u,locale:f,version:"0.1"}}return JSON.stringify(_)}))}(this,t,e,r)}}])&&Qa(e.prototype,r),n&&Qa(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Cn);function ns(t,e){return Zn(ri(t),e)}function os(t,e,r,n){return Zn(bi.hash(t,e,r),n)}var is="0x0000000000000000000000000000000000000000",as="0x0000000000000000000000000000000000000000000000000000000000000000",ss="Ξ",us=new h.b("networks/5.7.1");function cs(t){var e=function(e,r){null==r&&(r={});var n=[];if(e.InfuraProvider&&"-"!==r.infura)try{n.push(new e.InfuraProvider(t,r.infura))}catch(t){}if(e.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new e.EtherscanProvider(t,r.etherscan))}catch(t){}if(e.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new e.AlchemyProvider(t,r.alchemy))}catch(t){}if(e.PocketProvider&&"-"!==r.pocket){try{var o=new e.PocketProvider(t,r.pocket);o.network&&-1===["goerli","ropsten","rinkeby","sepolia"].indexOf(o.network.name)&&n.push(o)}catch(t){}}if(e.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new e.CloudflareProvider(t))}catch(t){}if(e.AnkrProvider&&"-"!==r.ankr)try{var i=new e.AnkrProvider(t,r.ankr);i.network&&-1===["ropsten"].indexOf(i.network.name)&&n.push(i)}catch(t){}if(0===n.length)return null;if(e.FallbackProvider){var a=1;return null!=r.quorum?a=r.quorum:"homestead"===t&&(a=2),new e.FallbackProvider(n,a)}return n[0]};return e.renetwork=function(t){return cs(t)},e}function fs(t,e){var r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return r.renetwork=function(e){return fs(t,e)},r}var ls={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:cs("homestead")},hs={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:cs("ropsten")},ps={chainId:63,name:"classicMordor",_defaultProvider:fs("https://www.ethercluster.com/mordor","classicMordor")},ds={unspecified:{chainId:0,name:"unspecified"},homestead:ls,mainnet:ls,morden:{chainId:2,name:"morden"},ropsten:hs,testnet:hs,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:cs("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:cs("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:cs("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:cs("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:fs("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:ps,classicTestnet:ps,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:fs("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:cs("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:cs("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function ms(t){if(null==t)return null;if("number"==typeof t){for(var e in ds){var r=ds[e];if(r.chainId===t)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){var n=ds[t];return null==n?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}var o=ds[t.name];if(!o)return"number"!=typeof t.chainId&&us.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==o.chainId&&us.throwArgumentError("network chainId mismatch","network",t);var i,a=t._defaultProvider||null;return null==a&&o._defaultProvider&&(a=(i=o._defaultProvider)&&"function"==typeof i.renetwork?o._defaultProvider.renetwork(t):o._defaultProvider),{name:t.name,chainId:o.chainId,ensAddress:t.ensAddress||o.ensAddress||null,_defaultProvider:a}}function ys(t){t=atob(t);for(var e=[],r=0;r<t.length;r++)e.push(t.charCodeAt(r));return Object(c.a)(e)}function vs(t){t=Object(c.a)(t);for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function gs(t,e){null==e&&(e=1);var r=[],n=r.forEach;return function t(e,o){n.call(e,(function(e){o>0&&Array.isArray(e)?t(e,o-1):r.push(e)}))}(t,e),r}function bs(t){return function(t){var e=0;return function(){return t[e++]}}(function(t){var e=0;function r(){return t[e++]<<8|t[e++]}for(var n=r(),o=1,i=[0,1],a=1;a<n;a++)i.push(o+=r());var s=r(),u=e;e+=s;var c=0,f=0;function l(){return 0==c&&(f=f<<8|t[e++],c=8),f>>--c&1}for(var h=Math.pow(2,31),p=h>>>1,d=p>>1,m=h-1,y=0,v=0;v<31;v++)y=y<<1|l();for(var g=[],b=0,w=h;;){for(var _=Math.floor(((y-b+1)*o-1)/w),k=0,A=n;A-k>1;){var E=k+A>>>1;_<i[E]?A=E:k=E}if(0==k)break;g.push(k);for(var x=b+Math.floor(w*i[k]/o),O=b+Math.floor(w*i[k+1]/o)-1;0==((x^O)&p);)y=y<<1&m|l(),x=x<<1&m,O=O<<1&m|1;for(;x&~O&d;)y=y&p|y<<1&m>>>1|l(),x=x<<1^p,O=(O^p)<<1|p|1;b=x,w=1+O-x}var S=n-4;return g.map((function(e){switch(e-S){case 3:return S+65792+(t[u++]<<16|t[u++]<<8|t[u++]);case 2:return S+256+(t[u++]<<8|t[u++]);case 1:return S+t[u++];default:return e-1}}))}(t))}function ws(t){return 1&t?~t>>1:t>>1}function _s(t,e){for(var r=Array(t),n=0,o=-1;n<t;n++)r[n]=o+=1+e();return r}function ks(t,e){for(var r=Array(t),n=0,o=0;n<t;n++)r[n]=o+=ws(e());return r}function As(t,e){for(var r=_s(t(),t),n=t(),o=_s(n,t),i=function(t,e){for(var r=Array(t),n=0;n<t;n++)r[n]=1+e();return r}(n,t),a=0;a<n;a++)for(var s=0;s<i[a];s++)r.push(o[a]+s);return e?r.map((function(t){return e[t]})):r}function Es(t,e,r){for(var n=Array(t).fill(void 0).map((function(){return[]})),o=0;o<e;o++)ks(t,r).forEach((function(t,e){return n[e].push(t)}));return n}function xs(t,e){var r=1+e(),n=e(),o=function(t){for(var e=[];;){var r=t();if(0==r)break;e.push(r)}return e}(e);return gs(Es(o.length,1+t,e).map((function(t,e){var i=t[0],a=t.slice(1);return Array(o[e]).fill(void 0).map((function(t,e){var o=e*n;return[i+e*r,a.map((function(t){return t+o}))]}))})))}function Os(t,e){return Es(1+e(),1+t,e).map((function(t){return[t[0],t.slice(1)]}))}function Ss(t){return function(t){if(Array.isArray(t))return Rs(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ps(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ps(t,e){if(t){if("string"==typeof t)return Rs(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rs(t,e):void 0}}function Rs(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var js,Ts,Is=bs(ys("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),Ns=new Set(As(Is)),Cs=new Set(As(Is)),Ms=function(t){for(var e=[];;){var r=t();if(0==r)break;e.push(xs(r,t))}for(;;){var n=t()-1;if(n<0)break;e.push(Os(n,t))}return function(t){for(var e={},r=0;r<t.length;r++){var n=t[r];e[n[0]]=n[1]}return e}(gs(e))}(Is),Bs=(Ts=As(js=Is).sort((function(t,e){return t-e})),function t(){for(var e=[];;){var r=As(js,Ts);if(0==r.length)break;e.push({set:new Set(r),node:t()})}e.sort((function(t,e){return e.set.size-t.set.size}));var n=js();return{branches:e,valid:n%3,fe0f:!!(1&(n=n/3|0)),save:1==(n>>=1),check:2==n}}());function Fs(t){return Et(t)}function Ds(t){return t.filter((function(t){return 65039!=t}))}function Us(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ps(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(t.split("."));try{for(r.s();!(e=r.n()).done;){var n=e.value,o=Fs(n);try{for(var i=o.lastIndexOf(95)-1;i>=0;i--)if(95!==o[i])throw new Error("underscore only allowed at start");if(o.length>=4&&o.every((function(t){return t<128}))&&45===o[2]&&45===o[3])throw new Error("invalid label extension")}catch(t){throw new Error('Invalid label "'.concat(n,'": ').concat(t.message))}}}catch(t){r.e(t)}finally{r.f()}return t}function Ls(t){return Us(function(t,e){var r=Fs(t).reverse(),n=[];for(;r.length;){var o=zs(r);if(o)n.push.apply(n,Ss(e(o)));else{var i=r.pop();if(Ns.has(i))n.push(i);else if(!Cs.has(i)){var a=Ms[i];if(!a)throw new Error("Disallowed codepoint: 0x".concat(i.toString(16).toUpperCase()));n.push.apply(n,Ss(a))}}}return Us((s=String.fromCodePoint.apply(String,n),s.normalize("NFC")));var s}(t,Ds))}function zs(t,e){var r,n,o,i=Bs,a=[],s=t.length;e&&(e.length=0);for(var u=function(){var u=t[--s];if(!(i=null===(r=i.branches.find((function(t){return t.set.has(u)})))||void 0===r?void 0:r.node))return"break";if(i.save)o=u;else if(i.check&&u===o)return"break";a.push(u),i.fe0f&&(a.push(65039),s>0&&65039==t[s-1]&&s--),i.valid&&(n=a.slice(),2==i.valid&&n.splice(1,1),e&&e.push.apply(e,Ss(t.slice(s).reverse())),t.length=s)};s;){if("break"===u())break}return n}var Gs=new h.b("hash/5.7.0"),Hs=new Uint8Array(32);function qs(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function Ks(t){var e=bt(Ls(t)),r=[];if(0===t.length)return r;for(var n=0,o=0;o<e.length;o++){46===e[o]&&(r.push(qs(e.slice(n,o))),n=o+1)}if(n>=e.length)throw new Error("invalid ENS name; empty component");return r.push(qs(e.slice(n))),r}function Vs(t){try{return 0!==Ks(t).length}catch(t){}return!1}function Ws(t){"string"!=typeof t&&Gs.throwArgumentError("invalid ENS name; not a string","name",t);for(var e=Hs,r=Ks(t);r.length;)e=V(Object(c.b)([e,V(r.pop())]));return Object(c.i)(e)}function Qs(t){return Object(c.i)(Object(c.b)(Ks(t).map((function(t){if(t.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var e=new Uint8Array(t.length+1);return e.set(t,1),e[0]=e.length-1,e}))))+"00"}Hs.fill(0);var Js=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};function Ys(t,e){return Js(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i,a,s;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==e&&(e={}),n={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0},!0!==e.skipFetchSetup&&(n.mode="cors",n.cache="no-cache",n.credentials="same-origin",n.redirect="follow",n.referrer="client"),null!=e.fetchOptions&&((o=e.fetchOptions).mode&&(n.mode=o.mode),o.cache&&(n.cache=o.cache),o.credentials&&(n.credentials=o.credentials),o.redirect&&(n.redirect=o.redirect),o.referrer&&(n.referrer=o.referrer)),r.next=7,fetch(t,n);case 7:return i=r.sent,r.next=10,i.arrayBuffer();case 10:return a=r.sent,s={},i.headers.forEach?i.headers.forEach((function(t,e){s[e.toLowerCase()]=t})):i.headers.keys().forEach((function(t){s[t.toLowerCase()]=i.headers.get(t)})),r.abrupt("return",{headers:s,statusCode:i.status,statusMessage:i.statusText,body:Object(c.a)(new Uint8Array(a))});case 14:case"end":return r.stop()}}),r)})))}function Zs(t){return(Zs="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)}var Xs=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},$s=new h.b("web/5.7.1");function tu(t){return new Promise((function(e){setTimeout(e,t)}))}function eu(t,e){if(null==t)return null;if("string"==typeof t)return t;if(Object(c.k)(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return At(t)}catch(t){}return Object(c.i)(t)}return t}function ru(t,e,r){var n="object"===Zs(t)&&null!=t.throttleLimit?t.throttleLimit:12;$s.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);var o="object"===Zs(t)?t.throttleCallback:null,i="object"===Zs(t)&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;$s.assertArgument(i>0&&i%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);var a="object"===Zs(t)&&!!t.errorPassThrough,s={},u=null,c={method:"GET"},f=!1,l=12e4;if("string"==typeof t)u=t;else if("object"===Zs(t)){if(null!=t&&null!=t.url||$s.throwArgumentError("missing URL","connection.url",t),u=t.url,"number"==typeof t.timeout&&t.timeout>0&&(l=t.timeout),t.headers)for(var p in t.headers)s[p.toLowerCase()]={key:p,value:String(t.headers[p])},["if-none-match","if-modified-since"].indexOf(p.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==u.substring(0,6)&&!0!==t.allowInsecureAuthentication&&$s.throwError("basic authentication requires a secure https url",h.b.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:t.user,password:"[REDACTED]"});var d=t.user+":"+t.password;s.authorization={key:"Authorization",value:"Basic "+vs(bt(d))}}null!=t.skipFetchSetup&&(c.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(c.fetchOptions=I(t.fetchOptions))}var m,y=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),v=u?u.match(y):null;if(v)try{var g={statusCode:200,statusMessage:"OK",headers:{"content-type":v[1]||"text/plain"},body:v[2]?ys(v[3]):(m=v[3],bt(m.replace(/%([0-9a-f][0-9a-f])/gi,(function(t,e){return String.fromCharCode(parseInt(e,16))}))))},b=g.body;return r&&(b=r(g.body,g)),Promise.resolve(b)}catch(t){$s.throwError("processing response error",h.b.errors.SERVER_ERROR,{body:eu(v[1],v[2]),error:t,requestBody:null,requestMethod:"GET",url:u})}e&&(c.method="POST",c.body=e,null==s["content-type"]&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==s["content-length"]&&(s["content-length"]={key:"Content-Length",value:String(e.length)}));var w={};Object.keys(s).forEach((function(t){var e=s[t];w[e.key]=e.value})),c.headers=w;var _,k=(_=null,{promise:new Promise((function(t,e){l&&(_=setTimeout((function(){null!=_&&(_=null,e($s.makeError("timeout",h.b.errors.TIMEOUT,{requestBody:eu(c.body,w["content-type"]),requestMethod:c.method,timeout:l,url:u})))}),l))})),cancel:function(){null!=_&&(clearTimeout(_),_=null)}}),A=function(){return Xs(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,s,l,p,d,m,y,v,g,b;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=0;case 1:if(!(e<n)){t.next=65;break}return s=null,t.prev=3,t.next=6,Ys(u,c);case 6:if(s=t.sent,!(e<n)){t.next=28;break}if(301!==s.statusCode&&302!==s.statusCode){t.next=15;break}if(l=s.headers.location||"","GET"!==c.method||!l.match(/^https:/)){t.next=13;break}return u=s.headers.location,t.abrupt("continue",62);case 13:t.next=28;break;case 15:if(429!==s.statusCode){t.next=28;break}if(p=!0,!o){t.next=21;break}return t.next=20,o(e,u);case 20:p=t.sent;case 21:if(!p){t.next=28;break}return d=0,m=s.headers["retry-after"],d="string"==typeof m&&m.match(/^[1-9][0-9]*$/)?1e3*parseInt(m):i*parseInt(String(Math.random()*Math.pow(2,e))),t.next=27,tu(d);case 27:return t.abrupt("continue",62);case 28:t.next=34;break;case 30:t.prev=30,t.t0=t.catch(3),null==(s=t.t0.response)&&(k.cancel(),$s.throwError("missing response",h.b.errors.SERVER_ERROR,{requestBody:eu(c.body,w["content-type"]),requestMethod:c.method,serverError:t.t0,url:u}));case 34:if(y=s.body,f&&304===s.statusCode?y=null:!a&&(s.statusCode<200||s.statusCode>=300)&&(k.cancel(),$s.throwError("bad response",h.b.errors.SERVER_ERROR,{status:s.statusCode,headers:s.headers,body:eu(y,s.headers?s.headers["content-type"]:null),requestBody:eu(c.body,w["content-type"]),requestMethod:c.method,url:u})),!r){t.next=60;break}return t.prev=37,t.next=40,r(y,s);case 40:return v=t.sent,k.cancel(),t.abrupt("return",v);case 45:if(t.prev=45,t.t1=t.catch(37),!(t.t1.throttleRetry&&e<n)){t.next=58;break}if(g=!0,!o){t.next=53;break}return t.next=52,o(e,u);case 52:g=t.sent;case 53:if(!g){t.next=58;break}return b=i*parseInt(String(Math.random()*Math.pow(2,e))),t.next=57,tu(b);case 57:return t.abrupt("continue",62);case 58:k.cancel(),$s.throwError("processing response error",h.b.errors.SERVER_ERROR,{body:eu(y,s.headers?s.headers["content-type"]:null),error:t.t1,requestBody:eu(c.body,w["content-type"]),requestMethod:c.method,url:u});case 60:return k.cancel(),t.abrupt("return",y);case 62:e++,t.next=1;break;case 65:return t.abrupt("return",$s.throwError("failed response",h.b.errors.SERVER_ERROR,{requestBody:eu(c.body,w["content-type"]),requestMethod:c.method,url:u}));case 66:case"end":return t.stop()}}),t,null,[[3,30],[37,45]])})))}();return Promise.race([k.promise,A])}function nu(t,e,r){var n=null;if(null!=e){n=bt(e);var o="string"==typeof t?{url:t}:I(t);if(o.headers)0!==Object.keys(o.headers).filter((function(t){return"content-type"===t.toLowerCase()})).length||(o.headers=I(o.headers),o.headers["content-type"]="application/json");else o.headers={"content-type":"application/json"};t=o}return ru(t,n,(function(t,e){var n=null;if(null!=t)try{n=JSON.parse(At(t))}catch(e){$s.throwError("invalid JSON",h.b.errors.SERVER_ERROR,{body:t,error:e})}return r&&(n=r(n,e)),n}))}function ou(t,e){return e||(e={}),null==(e=I(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){var o=null,i=!1,a=function(){return!i&&(i=!0,o&&clearTimeout(o),!0)};e.timeout&&(o=setTimeout((function(){a()&&n(new Error("timeout"))}),e.timeout));var s=e.retryLimit,u=0;!function o(){return t().then((function(t){if(void 0!==t)a()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",o);else if(e.onceBlock)e.onceBlock.once("block",o);else if(!i){if(++u>s)return void(a()&&n(new Error("retry limit reached")));var c=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));c<e.floor&&(c=e.floor),c>e.ceiling&&(c=e.ceiling),setTimeout(o,c)}return null}),(function(t){a()&&n(t)}))}()}))}var iu=r(19),au=r.n(iu);function su(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)}}var uu=new h.b("providers/5.7.2"),cu=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.formats=this.getDefaultFormats()}var e,r,n;return e=t,n=[{key:"check",value:function(t,e){var r={};for(var n in t)try{var o=t[n](e[n]);void 0!==o&&(r[n]=o)}catch(t){throw t.checkKey=n,t.checkValue=e[n],t}return r}},{key:"allowNull",value:function(t,e){return function(r){return null==r?e:t(r)}}},{key:"allowFalsish",value:function(t,e){return function(r){return r?t(r):e}}},{key:"arrayOf",value:function(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");var r=[];return e.forEach((function(e){r.push(t(e))})),r}}}],(r=[{key:"getDefaultFormats",value:function(){var e=this,r={},n=this.address.bind(this),o=this.bigNumber.bind(this),i=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),u=this.hex.bind(this),c=this.number.bind(this),f=this.type.bind(this);return r.transaction={hash:s,type:f,accessList:t.allowNull(this.accessList.bind(this),null),blockHash:t.allowNull(s,null),blockNumber:t.allowNull(c,null),transactionIndex:t.allowNull(c,null),confirmations:t.allowNull(c,null),from:n,gasPrice:t.allowNull(o),maxPriorityFeePerGas:t.allowNull(o),maxFeePerGas:t.allowNull(o),gasLimit:o,to:t.allowNull(n,null),value:o,nonce:c,data:a,r:t.allowNull(this.uint256),s:t.allowNull(this.uint256),v:t.allowNull(c),creates:t.allowNull(n,null),raw:t.allowNull(a)},r.transactionRequest={from:t.allowNull(n),nonce:t.allowNull(c),gasLimit:t.allowNull(o),gasPrice:t.allowNull(o),maxPriorityFeePerGas:t.allowNull(o),maxFeePerGas:t.allowNull(o),to:t.allowNull(n),value:t.allowNull(o),data:t.allowNull((function(t){return e.data(t,!0)})),type:t.allowNull(c),accessList:t.allowNull(this.accessList.bind(this),null)},r.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:s,address:n,topics:t.arrayOf(s),data:a,logIndex:c,blockHash:s},r.receipt={to:t.allowNull(this.address,null),from:t.allowNull(this.address,null),contractAddress:t.allowNull(n,null),transactionIndex:c,root:t.allowNull(u),gasUsed:o,logsBloom:t.allowNull(a),blockHash:s,transactionHash:s,logs:t.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:t.allowNull(c,null),cumulativeGasUsed:o,effectiveGasPrice:t.allowNull(o),status:t.allowNull(c),type:f},r.block={hash:t.allowNull(s),parentHash:s,number:c,timestamp:c,nonce:t.allowNull(u),difficulty:this.difficulty.bind(this),gasLimit:o,gasUsed:o,miner:t.allowNull(n),extraData:a,transactions:t.allowNull(t.arrayOf(s)),baseFeePerGas:t.allowNull(o)},r.blockWithTransactions=I(r.block),r.blockWithTransactions.transactions=t.allowNull(t.arrayOf(this.transactionResponse.bind(this))),r.filter={fromBlock:t.allowNull(i,void 0),toBlock:t.allowNull(i,void 0),blockHash:t.allowNull(s,void 0),address:t.allowNull(n,void 0),topics:t.allowNull(this.topics.bind(this),void 0)},r.filterLog={blockNumber:t.allowNull(c),blockHash:t.allowNull(s),transactionIndex:c,removed:t.allowNull(this.boolean.bind(this)),address:n,data:t.allowFalsish(a,"0x"),topics:t.arrayOf(s),transactionHash:s,logIndex:c},r}},{key:"accessList",value:function(t){return to(t||[])}},{key:"number",value:function(t){return"0x"===t?0:g.from(t).toNumber()}},{key:"type",value:function(t){return"0x"===t||null==t?0:g.from(t).toNumber()}},{key:"bigNumber",value:function(t){return g.from(t)}},{key:"boolean",value:function(t){if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw new Error("invalid boolean - "+t)}},{key:"hex",value:function(t,e){return"string"==typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),Object(c.l)(t))?t.toLowerCase():uu.throwArgumentError("invalid hash","value",t)}},{key:"data",value:function(t,e){var r=this.hex(t,e);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+t);return r}},{key:"address",value:function(t){return ut(t)}},{key:"callAddress",value:function(t){if(!Object(c.l)(t,32))return null;var e=ut(Object(c.e)(t,12));return e===is?null:e}},{key:"contractAddress",value:function(t){return lt(t)}},{key:"blockTag",value:function(t){if(null==t)return"latest";if("earliest"===t)return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if("number"==typeof t||Object(c.l)(t))return Object(c.g)(t);throw new Error("invalid blockTag")}},{key:"hash",value:function(t,e){var r=this.hex(t,e);return 32!==Object(c.d)(r)?uu.throwArgumentError("invalid hash","value",t):r}},{key:"difficulty",value:function(t){if(null==t)return null;var e=g.from(t);try{return e.toNumber()}catch(t){}return null}},{key:"uint256",value:function(t){if(!Object(c.l)(t))throw new Error("invalid uint256");return Object(c.h)(t,32)}},{key:"_block",value:function(e,r){null!=e.author&&null==e.miner&&(e.miner=e.author);var n=null!=e._difficulty?e._difficulty:e.difficulty,o=t.check(r,e);return o._difficulty=null==n?null:g.from(n),o}},{key:"block",value:function(t){return this._block(t,this.formats.block)}},{key:"blockWithTransactions",value:function(t){return this._block(t,this.formats.blockWithTransactions)}},{key:"transactionRequest",value:function(e){return t.check(this.formats.transactionRequest,e)}},{key:"transactionResponse",value:function(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&g.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);var r=t.check(this.formats.transaction,e);if(null!=e.chainId){var n=e.chainId;Object(c.l)(n)&&(n=g.from(n).toNumber()),r.chainId=n}else{var o=e.networkId;null==o&&null==r.v&&(o=e.chainId),Object(c.l)(o)&&(o=g.from(o).toNumber()),"number"!=typeof o&&null!=r.v&&((o=(r.v-35)/2)<0&&(o=0),o=parseInt(o)),"number"!=typeof o&&(o=0),r.chainId=o}return r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}},{key:"transaction",value:function(t){return ao(t)}},{key:"receiptLog",value:function(e){return t.check(this.formats.receiptLog,e)}},{key:"receipt",value:function(e){var r=t.check(this.formats.receipt,e);if(null!=r.root)if(r.root.length<=4){var n=g.from(r.root).toNumber();0===n||1===n?(null!=r.status&&r.status!==n&&uu.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):uu.throwArgumentError("invalid alt-root-status","value.root",r.root)}else 66!==r.root.length&&uu.throwArgumentError("invalid root hash","value.root",r.root);return null!=r.status&&(r.byzantium=!0),r}},{key:"topics",value:function(t){var e=this;return Array.isArray(t)?t.map((function(t){return e.topics(t)})):null!=t?this.hash(t,!0):null}},{key:"filter",value:function(e){return t.check(this.formats.filter,e)}},{key:"filterLog",value:function(e){return t.check(this.formats.filterLog,e)}}])&&su(e.prototype,r),n&&su(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function fu(t){return t&&"function"==typeof t.isCommunityResource}function lu(t){return fu(t)&&t.isCommunityResource()}var hu=!1;function pu(){hu||(hu=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}function du(t,e){return(du=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function mu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=gu(t);if(e){var o=gu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yu(this,r)}}function yu(t,e){if(e&&("object"===ku(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return vu(t)}function vu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gu(t){return(gu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function bu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wu(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)}}function _u(t,e,r){return e&&wu(t.prototype,e),r&&wu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ku(t){return(ku="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)}var Au=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Eu=new h.b("providers/5.7.2");function xu(t){return null==t?"null":(32!==Object(c.d)(t)&&Eu.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function Ou(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map((function(t){if(Array.isArray(t)){var e={};t.forEach((function(t){e[xu(t)]=!0}));var r=Object.keys(e);return r.sort(),r.join("|")}return xu(t)})).join("&")}function Su(t){if("string"==typeof t){if(t=t.toLowerCase(),32===Object(c.d)(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+Ou(t);if(bn.isForkEvent(t))throw Eu.warn("not implemented"),new Error("not implemented");if(t&&"object"===ku(t))return"filter:"+(t.address||"*")+":"+Ou(t.topics||[])}throw new Error("invalid event - "+t)}function Pu(){return(new Date).getTime()}function Ru(t){return new Promise((function(e){setTimeout(e,t)}))}var ju=["block","network","pending","poll"],Tu=function(){function t(e,r,n){bu(this,t),P(this,"tag",e),P(this,"listener",r),P(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}return _u(t,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var t=this.tag.split(":");return"tx"!==t[0]?null:t[1]}},{key:"filter",get:function(){var t=this.tag.split(":");if("filter"!==t[0])return null;var e,r=t[1],n=""===(e=t[2])?[]:e.split(/&/g).map((function(t){if(""===t)return[];var e=t.split("|").map((function(t){return"null"===t?null:t}));return 1===e.length?e[0]:e})),o={};return n.length>0&&(o.topics=n),r&&"*"!==r&&(o.address=r),o}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||ju.indexOf(this.tag)>=0}}]),t}(),Iu={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Nu(t){return Object(c.h)(g.from(t).toHexString(),32)}function Cu(t){return Ai.encode(Object(c.b)([t,Object(c.e)(Pi(Pi(t)),0,4)]))}var Mu=new RegExp("^(ipfs)://(.*)$","i"),Bu=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Mu,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Fu(t,e){try{return At(Du(t,e))}catch(t){}return null}function Du(t,e){if("0x"===t)return null;var r=g.from(Object(c.e)(t,e,e+32)).toNumber(),n=g.from(Object(c.e)(t,r,r+32)).toNumber();return Object(c.e)(t,r+32,r+32+n)}function Uu(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Eu.throwArgumentError("unsupported IPFS format","link",t),"https://gateway.ipfs.io/ipfs/".concat(t)}function Lu(t){var e=Object(c.a)(t);if(e.length>32)throw new Error("internal; should not happen");var r=new Uint8Array(32);return r.set(e,32-e.length),r}function zu(t){if(t.length%32==0)return t;var e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function Gu(t){for(var e=[],r=0,n=0;n<t.length;n++)e.push(null),r+=32;for(var o=0;o<t.length;o++){var i=Object(c.a)(t[o]);e[o]=Lu(r),e.push(Lu(i.length)),e.push(zu(i)),r+=32+32*Math.ceil(i.length/32)}return Object(c.c)(e)}var Hu=function(){function t(e,r,n,o){bu(this,t),P(this,"provider",e),P(this,"name",n),P(this,"address",e.formatter.address(r)),P(this,"_resolvedAddress",o)}return _u(t,[{key:"supportsWildcard",value:function(){var t=this;return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((function(t){return g.from(t).eq(1)})).catch((function(e){if(e.code===h.b.errors.CALL_EXCEPTION)return!1;throw t._supportsEip2544=null,e}))),this._supportsEip2544}},{key:"_fetch",value:function(t,e){return Au(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n={to:this.address,ccipReadEnabled:!0,data:Object(c.c)([t,Ws(this.name),e||"0x"])},o=!1,r.next=4,this.supportsWildcard();case 4:if(!r.sent){r.next=7;break}o=!0,n.data=Object(c.c)(["0x9061b923",Gu([Qs(this.name),n.data])]);case 7:return r.prev=7,r.next=10,this.provider.call(n);case 10:return i=r.sent,Object(c.a)(i).length%32==4&&Eu.throwError("resolver threw error",h.b.errors.CALL_EXCEPTION,{transaction:n,data:i}),o&&(i=Du(i,0)),r.abrupt("return",i);case 16:if(r.prev=16,r.t0=r.catch(7),r.t0.code!==h.b.errors.CALL_EXCEPTION){r.next=20;break}return r.abrupt("return",null);case 20:throw r.t0;case 21:case"end":return r.stop()}}),r,this,[[7,16]])})))}},{key:"_fetchBytes",value:function(t,e){return Au(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this._fetch(t,e);case 2:if(null==(n=r.sent)){r.next=5;break}return r.abrupt("return",Du(n,0));case 5:return r.abrupt("return",null);case 6:case"end":return r.stop()}}),r,this)})))}},{key:"_getAddress",value:function(t,e){var r=Iu[String(t)];if(null==r&&Eu.throwError("unsupported coin type: ".concat(t),h.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(t,")")}),"eth"===r.ilk)return this.provider.formatter.address(e);var n=Object(c.a)(e);if(null!=r.p2pkh){var o=e.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){var i=parseInt(o[1],16);if(o[2].length===2*i&&i>=1&&i<=75)return Cu(Object(c.b)([[r.p2pkh],"0x"+o[2]]))}}if(null!=r.p2sh){var a=e.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===2*s&&s>=1&&s<=75)return Cu(Object(c.b)([[r.p2sh],"0x"+a[2]]))}}if(null!=r.prefix){var u=n[1],f=n[0];if(0===f?20!==u&&32!==u&&(f=-1):f=-1,f>=0&&n.length===2+u&&u>=1&&u<=75){var l=au.a.toWords(n.slice(2));return l.unshift(f),au.a.encode(r.prefix,l)}}return null}},{key:"getAddress",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t&&(t=60),60!==t){e.next=16;break}return e.prev=2,e.next=5,this._fetch("0x3b3b57de");case 5:if("0x"!==(r=e.sent)&&r!==as){e.next=8;break}return e.abrupt("return",null);case 8:return e.abrupt("return",this.provider.formatter.callAddress(r));case 11:if(e.prev=11,e.t0=e.catch(2),e.t0.code!==h.b.errors.CALL_EXCEPTION){e.next=15;break}return e.abrupt("return",null);case 15:throw e.t0;case 16:return e.next=18,this._fetchBytes("0xf1cb7e06",Nu(t));case 18:if(null!=(n=e.sent)&&"0x"!==n){e.next=21;break}return e.abrupt("return",null);case 21:return null==(o=this._getAddress(t,n))&&Eu.throwError("invalid or unsupported coin data",h.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(t,")"),coinType:t,data:n}),e.abrupt("return",o);case 24:case"end":return e.stop()}}),e,this,[[2,11]])})))}},{key:"getAvatar",value:function(){return Au(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n,o,i,a,s,u,f,l,h,p,d,m,y,v;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[{type:"name",content:this.name}],t.prev=1,t.next=4,this.getText("avatar");case 4:if(null!=(r=t.sent)){t.next=7;break}return t.abrupt("return",null);case 7:n=0;case 8:if(!(n<Bu.length)){t.next=91;break}if(null!=(o=r.match(Bu[n]))){t.next=12;break}return t.abrupt("continue",88);case 12:i=o[1].toLowerCase(),t.t0=i,t.next="https"===t.t0?16:"data"===t.t0?18:"ipfs"===t.t0?20:"erc721"===t.t0||"erc1155"===t.t0?22:88;break;case 16:return e.push({type:"url",content:r}),t.abrupt("return",{linkage:e,url:r});case 18:return e.push({type:"data",content:r}),t.abrupt("return",{linkage:e,url:r});case 20:return e.push({type:"ipfs",content:r}),t.abrupt("return",{linkage:e,url:Uu(r)});case 22:if(a="erc721"===i?"0xc87b56dd":"0x0e89341c",e.push({type:i,content:r}),t.t1=this._resolvedAddress,t.t1){t.next=29;break}return t.next=28,this.getAddress();case 28:t.t1=t.sent;case 29:if(s=t.t1,2===(u=(o[2]||"").split("/")).length){t.next=33;break}return t.abrupt("return",null);case 33:return t.next=35,this.provider.formatter.address(u[0]);case 35:if(f=t.sent,l=Object(c.h)(g.from(u[1]).toHexString(),32),"erc721"!==i){t.next=48;break}return t.t2=this.provider.formatter,t.next=41,this.provider.call({to:f,data:Object(c.c)(["0x6352211e",l])});case 41:if(t.t3=t.sent,h=t.t2.callAddress.call(t.t2,t.t3),s===h){t.next=45;break}return t.abrupt("return",null);case 45:e.push({type:"owner",content:h}),t.next=57;break;case 48:if("erc1155"!==i){t.next=57;break}return t.t4=g,t.next=52,this.provider.call({to:f,data:Object(c.c)(["0x00fdd58e",Object(c.h)(s,32),l])});case 52:if(t.t5=t.sent,!(p=t.t4.from.call(t.t4,t.t5)).isZero()){t.next=56;break}return t.abrupt("return",null);case 56:e.push({type:"balance",content:p.toString()});case 57:return d={to:this.provider.formatter.address(u[0]),data:Object(c.c)([a,l])},t.t6=Fu,t.next=61,this.provider.call(d);case 61:if(t.t7=t.sent,null!=(m=(0,t.t6)(t.t7,0))){t.next=65;break}return t.abrupt("return",null);case 65:return e.push({type:"metadata-url-base",content:m}),"erc1155"===i&&(m=m.replace("{id}",l.substring(2)),e.push({type:"metadata-url-expanded",content:m})),m.match(/^ipfs:/i)&&(m=Uu(m)),e.push({type:"metadata-url",content:m}),t.next=71,nu(m);case 71:if(y=t.sent){t.next=74;break}return t.abrupt("return",null);case 74:if(e.push({type:"metadata",content:JSON.stringify(y)}),"string"==typeof(v=y.image)){t.next=78;break}return t.abrupt("return",null);case 78:if(!v.match(/^(https:\/\/|data:)/i)){t.next=81;break}t.next=86;break;case 81:if(null!=v.match(Mu)){t.next=84;break}return t.abrupt("return",null);case 84:e.push({type:"url-ipfs",content:v}),v=Uu(v);case 86:return e.push({type:"url",content:v}),t.abrupt("return",{linkage:e,url:v});case 88:n++,t.next=8;break;case 91:t.next=95;break;case 93:t.prev=93,t.t8=t.catch(1);case 95:return t.abrupt("return",null);case 96:case"end":return t.stop()}}),t,this,[[1,93]])})))}},{key:"getContentHash",value:function(){return Au(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n,o,i,a,s,u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._fetchBytes("0xbc1c58d1");case 2:if(null!=(e=t.sent)&&"0x"!==e){t.next=5;break}return t.abrupt("return",null);case 5:if(!(r=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){t.next=10;break}if(n=parseInt(r[3],16),r[4].length!==2*n){t.next=10;break}return t.abrupt("return","ipfs://"+Ai.encode("0x"+r[1]));case 10:if(!(o=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){t.next=15;break}if(i=parseInt(o[3],16),o[4].length!==2*i){t.next=15;break}return t.abrupt("return","ipns://"+Ai.encode("0x"+o[1]));case 15:if(!(a=e.match(/^0xe40101fa011b20([0-9a-f]*)$/))){t.next=19;break}if(64!==a[1].length){t.next=19;break}return t.abrupt("return","bzz://"+a[1]);case 19:if(!(s=e.match(/^0x90b2c605([0-9a-f]*)$/))){t.next=25;break}if(68!==s[1].length){t.next=25;break}return u={"=":"","+":"-","/":"_"},c=vs("0x"+s[1]).replace(/[=+\/]/g,(function(t){return u[t]})),t.abrupt("return","sia://"+c);case 25:return t.abrupt("return",Eu.throwError("invalid or unsupported content hash data",h.b.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e}));case 26:case"end":return t.stop()}}),t,this)})))}},{key:"getText",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=bt(t),(r=Object(c.b)([Nu(64),Nu(r.length),r])).length%32!=0&&(r=Object(c.b)([r,Object(c.h)("0x",32-t.length%32)])),e.next=5,this._fetchBytes("0x59d1d43c",Object(c.i)(r));case 5:if(null!=(n=e.sent)&&"0x"!==n){e.next=8;break}return e.abrupt("return",null);case 8:return e.abrupt("return",At(n));case 9:case"end":return e.stop()}}),e,this)})))}}]),t}(),qu=null,Ku=1,Vu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&du(t,e)}(r,t);var e=mu(r);function r(t){var n;if(bu(this,r),(n=e.call(this))._events=[],n._emitted={block:-2},n.disableCcipRead=!1,n.formatter=(this instanceof r?this.constructor:void 0).getFormatter(),P(vu(n),"anyNetwork","any"===t),n.anyNetwork&&(t=n.detectNetwork()),t instanceof Promise)n._networkPromise=t,t.catch((function(t){})),n._ready().catch((function(t){}));else{var o=R(this instanceof r?this.constructor:void 0,"getNetwork")(t);o?(P(vu(n),"_network",o),n.emit("network",o,null)):Eu.throwArgumentError("invalid network","network",t)}return n._maxInternalBlockNumber=-1024,n._lastBlockNumber=-2,n._maxFilterBlockRange=10,n._pollingInterval=4e3,n._fastQueryDate=0,n}return _u(r,[{key:"_ready",value:function(){return Au(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=this._network){t.next=17;break}if(e=null,!this._networkPromise){t.next=11;break}return t.prev=3,t.next=6,this._networkPromise;case 6:e=t.sent,t.next=11;break;case 9:t.prev=9,t.t0=t.catch(3);case 11:if(null!=e){t.next=15;break}return t.next=14,this.detectNetwork();case 14:e=t.sent;case 15:e||Eu.throwError("no network detected",h.b.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:P(this,"_network",e),this.emit("network",e,null));case 17:return t.abrupt("return",this._network);case 18:case"end":return t.stop()}}),t,this,[[3,9]])})))}},{key:"ready",get:function(){var t=this;return ou((function(){return t._ready().then((function(t){return t}),(function(t){if(t.code!==h.b.errors.NETWORK_ERROR||"noNetwork"!==t.event)throw t}))}))}},{key:"ccipReadFetch",value:function(t,e,r){return Au(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a,s,u,c,f,l,p;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.disableCcipRead&&0!==r.length){n.next=2;break}return n.abrupt("return",null);case 2:o=t.to.toLowerCase(),i=e.toLowerCase(),a=[],s=0;case 6:if(!(s<r.length)){n.next=22;break}return u=r[s],c=u.replace("{sender}",o).replace("{data}",i),f=u.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:o}),n.next=12,nu({url:c,errorPassThrough:!0},f,(function(t,e){return t.status=e.statusCode,t}));case 12:if(!(l=n.sent).data){n.next=15;break}return n.abrupt("return",l.data);case 15:if(p=l.message||"unknown error",!(l.status>=400&&l.status<500)){n.next=18;break}return n.abrupt("return",Eu.throwError("response not found during CCIP fetch: ".concat(p),h.b.errors.SERVER_ERROR,{url:u,errorMessage:p}));case 18:a.push(p);case 19:s++,n.next=6;break;case 22:return n.abrupt("return",Eu.throwError("error encountered during CCIP fetch: ".concat(a.map((function(t){return JSON.stringify(t)})).join(", ")),h.b.errors.SERVER_ERROR,{urls:r,errorMessages:a}));case 23:case"end":return n.stop()}}),n,this)})))}},{key:"_getInternalBlockNumber",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o,i,a=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:if(!(t>0)){e.next=20;break}case 3:if(!this._internalBlockNumber){e.next=20;break}return r=this._internalBlockNumber,e.prev=5,e.next=8,r;case 8:if(n=e.sent,!(Pu()-n.respTime<=t)){e.next=11;break}return e.abrupt("return",n.blockNumber);case 11:return e.abrupt("break",20);case 14:if(e.prev=14,e.t0=e.catch(5),this._internalBlockNumber!==r){e.next=18;break}return e.abrupt("break",20);case 18:e.next=3;break;case 20:return o=Pu(),i=j({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(t){return null}),(function(t){return t}))}).then((function(t){var e=t.blockNumber,r=t.networkError;if(r)throw a._internalBlockNumber===i&&(a._internalBlockNumber=null),r;var n=Pu();return(e=g.from(e).toNumber())<a._maxInternalBlockNumber&&(e=a._maxInternalBlockNumber),a._maxInternalBlockNumber=e,a._setFastBlockNumber(e),{blockNumber:e,reqTime:o,respTime:n}})),this._internalBlockNumber=i,i.catch((function(t){a._internalBlockNumber===i&&(a._internalBlockNumber=null)})),e.next=26,i;case 26:return e.abrupt("return",e.sent.blockNumber);case 27:case"end":return e.stop()}}),e,this,[[5,14]])})))}},{key:"poll",value:function(){return Au(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n,o,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Ku++,r=[],n=null,t.prev=3,t.next=6,this._getInternalBlockNumber(100+this.pollingInterval/2);case 6:n=t.sent,t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(3),this.emit("error",t.t0),t.abrupt("return");case 13:if(this._setFastBlockNumber(n),this.emit("poll",e,n),n!==this._lastBlockNumber){t.next=18;break}return this.emit("didPoll",e),t.abrupt("return");case 18:if(-2===this._emitted.block&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Eu.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(n,")")),this.emit("error",Eu.makeError("network block skew detected",h.b.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(o=this._emitted.block+1;o<=n;o++)this.emit("block",o);return this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach((function(t){if("block"!==t){var e=i._emitted[t];"pending"!==e&&n-e>12&&delete i._emitted[t]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=n-1),this._events.forEach((function(t){switch(t.type){case"tx":var e=t.hash,o=i.getTransactionReceipt(e).then((function(t){return t&&null!=t.blockNumber?(i._emitted["t:"+e]=t.blockNumber,i.emit(e,t),null):null})).catch((function(t){i.emit("error",t)}));r.push(o);break;case"filter":if(!t._inflight){t._inflight=!0,-2===t._lastBlockNumber&&(t._lastBlockNumber=n-1);var a=t.filter;a.fromBlock=t._lastBlockNumber+1,a.toBlock=n;var s=a.toBlock-i._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);var u=i.getLogs(a).then((function(e){t._inflight=!1,0!==e.length&&e.forEach((function(e){e.blockNumber>t._lastBlockNumber&&(t._lastBlockNumber=e.blockNumber),i._emitted["b:"+e.blockHash]=e.blockNumber,i._emitted["t:"+e.transactionHash]=e.blockNumber,i.emit(a,e)}))})).catch((function(e){i.emit("error",e),t._inflight=!1}));r.push(u)}}})),this._lastBlockNumber=n,Promise.all(r).then((function(){i.emit("didPoll",e)})).catch((function(t){i.emit("error",t)})),t.abrupt("return");case 26:case"end":return t.stop()}}),t,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return Au(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Eu.throwError("provider does not support network detection",h.b.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return t.stop()}}),t)})))}},{key:"getNetwork",value:function(){return Au(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:return e=t.sent,t.next=5,this.detectNetwork();case 5:if(r=t.sent,e.chainId===r.chainId){t.next=23;break}if(!this.anyNetwork){t.next=20;break}return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),t.next=19,Ru(0);case 19:return t.abrupt("return",this._network);case 20:throw n=Eu.makeError("underlying network changed",h.b.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r}),this.emit("error",n),n;case 23:return t.abrupt("return",e);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"blockNumber",get:function(){var t=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(e){t._setFastBlockNumber(e)}),(function(t){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(t){var e=this;t&&!this._poller?(this._poller=setInterval((function(){e.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){e.poll(),e._bootstrapPoll=setTimeout((function(){e._poller||e.poll(),e._bootstrapPoll=null}),e.pollingInterval)}),0))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(t){var e=this;if("number"!=typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){e.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var t=this,e=Pu();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((function(e){return(null==t._fastBlockNumber||e>t._fastBlockNumber)&&(t._fastBlockNumber=e),t._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(t){null!=this._fastBlockNumber&&t<this._fastBlockNumber||(this._fastQueryDate=Pu(),(null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}},{key:"waitForTransaction",value:function(t,e,r){return Au(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._waitForTransaction(t,null==e?1:e,r||0,null));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_waitForTransaction",value:function(t,e,r,n){return Au(this,void 0,void 0,regeneratorRuntime.mark((function o(){var i,a=this;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.getTransactionReceipt(t);case 2:if(!(((i=o.sent)?i.confirmations:0)>=e)){o.next=5;break}return o.abrupt("return",i);case 5:return o.abrupt("return",new Promise((function(o,i){var s=[],u=!1,c=function(){return!!u||(u=!0,s.forEach((function(t){t()})),!1)},f=function(t){t.confirmations<e||c()||o(t)};if(a.on(t,f),s.push((function(){a.removeListener(t,f)})),n){var l=n.startBlock,p=null,d=function r(o){return Au(a,void 0,void 0,regeneratorRuntime.mark((function a(){var s=this;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!u){a.next=2;break}return a.abrupt("return");case 2:return a.next=4,Ru(1e3);case 4:this.getTransactionCount(n.from).then((function(a){return Au(s,void 0,void 0,regeneratorRuntime.mark((function s(){var f,d,m,y,v,g;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!u){s.next=2;break}return s.abrupt("return");case 2:if(!(a<=n.nonce)){s.next=6;break}l=o,s.next=41;break;case 6:return s.next=8,this.getTransaction(t);case 8:if(!(f=s.sent)||null==f.blockNumber){s.next=11;break}return s.abrupt("return");case 11:null==p&&(p=l-3)<n.startBlock&&(p=n.startBlock);case 12:if(!(p<=o)){s.next=41;break}if(!u){s.next=15;break}return s.abrupt("return");case 15:return s.next=17,this.getBlockWithTransactions(p);case 17:d=s.sent,m=0;case 19:if(!(m<d.transactions.length)){s.next=38;break}if((y=d.transactions[m]).hash!==t){s.next=23;break}return s.abrupt("return");case 23:if(y.from!==n.from||y.nonce!==n.nonce){s.next=35;break}if(!u){s.next=26;break}return s.abrupt("return");case 26:return s.next=28,this.waitForTransaction(y.hash,e);case 28:if(v=s.sent,!c()){s.next=31;break}return s.abrupt("return");case 31:return g="replaced",y.data===n.data&&y.to===n.to&&y.value.eq(n.value)?g="repriced":"0x"===y.data&&y.from===y.to&&y.value.isZero()&&(g="cancelled"),i(Eu.makeError("transaction was replaced",h.b.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===g||"cancelled"===g,reason:g,replacement:this._wrapTransaction(y),hash:t,receipt:v})),s.abrupt("return");case 35:m++,s.next=19;break;case 38:p++,s.next=12;break;case 41:if(!u){s.next=43;break}return s.abrupt("return");case 43:this.once("block",r);case 44:case"end":return s.stop()}}),s,this)})))}),(function(t){u||s.once("block",r)}));case 5:case"end":return a.stop()}}),a,this)})))};if(u)return;a.once("block",d),s.push((function(){a.removeListener("block",d)}))}if("number"==typeof r&&r>0){var m=setTimeout((function(){c()||i(Eu.makeError("timeout exceeded",h.b.errors.TIMEOUT,{timeout:r}))}),r);m.unref&&m.unref(),s.push((function(){clearTimeout(m)}))}})));case 6:case"end":return o.stop()}}),o,this)})))}},{key:"getBlockNumber",value:function(){return Au(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getGasPrice",value:function(){return Au(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,this.perform("getGasPrice",{});case 4:return e=t.sent,t.prev=5,t.abrupt("return",g.from(e));case 9:return t.prev=9,t.t0=t.catch(5),t.abrupt("return",Eu.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t.t0}));case 12:case"end":return t.stop()}}),t,this,[[5,9]])})))}},{key:"getBalance",value:function(t,e){return Au(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,j({address:this._getAddress(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("getBalance",n);case 7:return o=r.sent,r.prev=8,r.abrupt("return",g.from(o));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Eu.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getBalance",params:n,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(t,e){return Au(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,j({address:this._getAddress(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("getTransactionCount",n);case 7:return o=r.sent,r.prev=8,r.abrupt("return",g.from(o).toNumber());case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Eu.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getCode",value:function(t,e){return Au(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,j({address:this._getAddress(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("getCode",n);case 7:return o=r.sent,r.prev=8,r.abrupt("return",Object(c.i)(o));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Eu.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getCode",params:n,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getStorageAt",value:function(t,e,r){return Au(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,j({address:this._getAddress(t),blockTag:this._getBlockTag(r),position:Promise.resolve(e).then((function(t){return Object(c.g)(t)}))});case 4:return o=n.sent,n.next=7,this.perform("getStorageAt",o);case 7:return i=n.sent,n.prev=8,n.abrupt("return",Object(c.i)(i));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",Eu.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"getStorageAt",params:o,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(t,e,r){var n=this;if(null!=e&&32!==Object(c.d)(e))throw new Error("invalid response - sendTransaction");var o=t;return null!=e&&t.hash!==e&&Eu.throwError("Transaction hash mismatch from Provider.sendTransaction.",h.b.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),o.wait=function(e,o){return Au(n,void 0,void 0,regeneratorRuntime.mark((function n(){var i,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==e&&(e=1),null==o&&(o=0),i=void 0,0!==e&&null!=r&&(i={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:r}),n.next=6,this._waitForTransaction(t.hash,e,o,i);case 6:if(null!=(a=n.sent)||0!==e){n.next=9;break}return n.abrupt("return",null);case 9:return this._emitted["t:"+t.hash]=a.blockNumber,0===a.status&&Eu.throwError("transaction failed",h.b.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:a}),n.abrupt("return",a);case 12:case"end":return n.stop()}}),n,this)})))},o}},{key:"sendTransaction",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,Promise.resolve(t).then((function(t){return Object(c.i)(t)}));case 4:return r=e.sent,null==(n=this.formatter.transaction(t)).confirmations&&(n.confirmations=0),e.next=9,this._getInternalBlockNumber(100+2*this.pollingInterval);case 9:return o=e.sent,e.prev=10,e.next=13,this.perform("sendTransaction",{signedTransaction:r});case 13:return i=e.sent,e.abrupt("return",this._wrapTransaction(n,i,o));case 17:throw e.prev=17,e.t0=e.catch(10),e.t0.transaction=n,e.t0.transactionHash=n.hash,e.t0;case 22:case"end":return e.stop()}}),e,this,[[10,17]])})))}},{key:"_getTransactionRequest",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return r=e.sent,n={},["from","to"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return t?o._getAddress(t):null})))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return t?g.from(t):null})))})),["type"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return null!=t?t:null})))})),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return t?Object(c.i)(t):null})))})),e.t0=this.formatter,e.next=12,j(n);case 12:return e.t1=e.sent,e.abrupt("return",e.t0.transactionRequest.call(e.t0,e.t1));case 14:case"end":return e.stop()}}),e,this)})))}},{key:"_getFilter",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,r={},null!=t.address&&(r.address=this._getAddress(t.address)),["blockHash","topics"].forEach((function(e){null!=t[e]&&(r[e]=t[e])})),["fromBlock","toBlock"].forEach((function(e){null!=t[e]&&(r[e]=n._getBlockTag(t[e]))})),e.t0=this.formatter,e.next=10,j(r);case 10:return e.t1=e.sent,e.abrupt("return",e.t0.filter.call(e.t0,e.t1));case 12:case"end":return e.stop()}}),e,this)})))}},{key:"_call",value:function(t,e,r){return Au(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a,s,u,f,l,p,d,m,y,v,b,w,_;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r>=10&&Eu.throwError("CCIP read exceeded maximum redirections",h.b.errors.SERVER_ERROR,{redirects:r,transaction:t}),o=t.to,n.next=4,this.perform("call",{transaction:t,blockTag:e});case 4:if(i=n.sent,!(r>=0&&"latest"===e&&null!=o&&"0x556f1830"===i.substring(0,10)&&Object(c.d)(i)%32==4)){n.next=31;break}for(n.prev=6,a=Object(c.e)(i,4),s=Object(c.e)(a,0,32),g.from(s).eq(o)||Eu.throwError("CCIP Read sender did not match",h.b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),u=[],f=g.from(Object(c.e)(a,32,64)).toNumber(),l=g.from(Object(c.e)(a,f,f+32)).toNumber(),p=Object(c.e)(a,f+32),d=0;d<l;d++)null==(m=Fu(p,32*d))&&Eu.throwError("CCIP Read contained corrupt URL string",h.b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),u.push(m);return y=Du(a,64),g.from(Object(c.e)(a,100,128)).isZero()||Eu.throwError("CCIP Read callback selector included junk",h.b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),v=Object(c.e)(a,96,100),b=Du(a,128),n.next=21,this.ccipReadFetch(t,y,u);case 21:return null==(w=n.sent)&&Eu.throwError("CCIP Read disabled or provided no URLs",h.b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i}),_={to:o,data:Object(c.c)([v,Gu([w,b])])},n.abrupt("return",this._call(_,e,r+1));case 27:if(n.prev=27,n.t0=n.catch(6),n.t0.code!==h.b.errors.SERVER_ERROR){n.next=31;break}throw n.t0;case 31:return n.prev=31,n.abrupt("return",Object(c.i)(i));case 35:return n.prev=35,n.t1=n.catch(31),n.abrupt("return",Eu.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"call",params:{transaction:t,blockTag:e},result:i,error:n.t1}));case 38:case"end":return n.stop()}}),n,this,[[6,27],[31,35]])})))}},{key:"call",value:function(t,e){return Au(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,j({transaction:this._getTransactionRequest(t),blockTag:this._getBlockTag(e),ccipReadEnabled:Promise.resolve(t.ccipReadEnabled)});case 4:return n=r.sent,r.abrupt("return",this._call(n.transaction,n.blockTag,n.ccipReadEnabled?0:-1));case 6:case"end":return r.stop()}}),r,this)})))}},{key:"estimateGas",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,j({transaction:this._getTransactionRequest(t)});case 4:return r=e.sent,e.next=7,this.perform("estimateGas",r);case 7:return n=e.sent,e.prev=8,e.abrupt("return",g.from(n));case 12:return e.prev=12,e.t0=e.catch(8),e.abrupt("return",Eu.throwError("bad result from backend",h.b.errors.SERVER_ERROR,{method:"estimateGas",params:r,result:n,error:e.t0}));case 15:case"end":return e.stop()}}),e,this,[[8,12]])})))}},{key:"_getAddress",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return"string"!=typeof(t=e.sent)&&Eu.throwArgumentError("invalid address or ENS name","name",t),e.next=6,this.resolveName(t);case 6:return null==(r=e.sent)&&Eu.throwError("ENS name not configured",h.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName(".concat(JSON.stringify(t),")")}),e.abrupt("return",r);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"_getBlock",value:function(t,e){return Au(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,t;case 4:if(t=r.sent,n=-128,o={includeTransactions:!!e},!Object(c.l)(t,32)){r.next=11;break}o.blockHash=t,r.next=21;break;case 11:return r.prev=11,r.next=14,this._getBlockTag(t);case 14:o.blockTag=r.sent,Object(c.l)(o.blockTag)&&(n=parseInt(o.blockTag.substring(2),16)),r.next=21;break;case 18:r.prev=18,r.t0=r.catch(11),Eu.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",t);case 21:return r.abrupt("return",ou((function(){return Au(i,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i,a,s,u,c,f=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.perform("getBlock",o);case 2:if(null!=(r=t.sent)){t.next=11;break}if(null==o.blockHash){t.next=7;break}if(null!=this._emitted["b:"+o.blockHash]){t.next=7;break}return t.abrupt("return",null);case 7:if(null==o.blockTag){t.next=10;break}if(!(n>this._emitted.block)){t.next=10;break}return t.abrupt("return",null);case 10:return t.abrupt("return",void 0);case 11:if(!e){t.next=34;break}i=null,a=0;case 14:if(!(a<r.transactions.length)){t.next=31;break}if(null!=(s=r.transactions[a]).blockNumber){t.next=20;break}s.confirmations=0,t.next=28;break;case 20:if(null!=s.confirmations){t.next=28;break}if(null!=i){t.next=25;break}return t.next=24,this._getInternalBlockNumber(100+2*this.pollingInterval);case 24:i=t.sent;case 25:(u=i-s.blockNumber+1)<=0&&(u=1),s.confirmations=u;case 28:a++,t.next=14;break;case 31:return(c=this.formatter.blockWithTransactions(r)).transactions=c.transactions.map((function(t){return f._wrapTransaction(t)})),t.abrupt("return",c);case 34:return t.abrupt("return",this.formatter.block(r));case 35:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this}));case 22:case"end":return r.stop()}}),r,this,[[11,18]])})))}},{key:"getBlock",value:function(t){return this._getBlock(t,!1)}},{key:"getBlockWithTransactions",value:function(t){return this._getBlock(t,!0)}},{key:"getTransaction",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,t;case 4:return t=e.sent,r={transactionHash:this.formatter.hash(t,!0)},e.abrupt("return",ou((function(){return Au(n,void 0,void 0,regeneratorRuntime.mark((function e(){var n,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getTransaction",r);case 2:if(null!=(n=e.sent)){e.next=7;break}if(null!=this._emitted["t:"+t]){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",void 0);case 7:if(null!=(o=this.formatter.transactionResponse(n)).blockNumber){e.next=12;break}o.confirmations=0,e.next=19;break;case 12:if(null!=o.confirmations){e.next=19;break}return e.next=15,this._getInternalBlockNumber(100+2*this.pollingInterval);case 15:i=e.sent,(a=i-o.blockNumber+1)<=0&&(a=1),o.confirmations=a;case 19:return e.abrupt("return",this._wrapTransaction(o));case 20:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this}));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getTransactionReceipt",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,t;case 4:return t=e.sent,r={transactionHash:this.formatter.hash(t,!0)},e.abrupt("return",ou((function(){return Au(n,void 0,void 0,regeneratorRuntime.mark((function e(){var n,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getTransactionReceipt",r);case 2:if(null!=(n=e.sent)){e.next=7;break}if(null!=this._emitted["t:"+t]){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",void 0);case 7:if(null!=n.blockHash){e.next=9;break}return e.abrupt("return",void 0);case 9:if(null!=(o=this.formatter.receipt(n)).blockNumber){e.next=14;break}o.confirmations=0,e.next=21;break;case 14:if(null!=o.confirmations){e.next=21;break}return e.next=17,this._getInternalBlockNumber(100+2*this.pollingInterval);case 17:i=e.sent,(a=i-o.blockNumber+1)<=0&&(a=1),o.confirmations=a;case 21:return e.abrupt("return",o);case 22:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this}));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getLogs",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,j({filter:this._getFilter(t)});case 4:return r=e.sent,e.next=7,this.perform("getLogs",r);case 7:return(n=e.sent).forEach((function(t){null==t.removed&&(t.removed=!1)})),e.abrupt("return",cu.arrayOf(this.formatter.filterLog.bind(this.formatter))(n));case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getEtherPrice",value:function(){return Au(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.abrupt("return",this.perform("getEtherPrice",{}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"_getBlockTag",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:if(!("number"==typeof(t=e.sent)&&t<0)){e.next=11;break}return t%1&&Eu.throwArgumentError("invalid BlockTag","blockTag",t),e.next=7,this._getInternalBlockNumber(100+2*this.pollingInterval);case 7:return r=e.sent,(r+=t)<0&&(r=0),e.abrupt("return",this.formatter.blockTag(r));case 11:return e.abrupt("return",this.formatter.blockTag(t));case 12:case"end":return e.stop()}}),e,this)})))}},{key:"getResolver",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t;case 1:if(""!==r&&"."!==r){e.next=4;break}return e.abrupt("return",null);case 4:if("eth"===t||"eth"!==r){e.next=6;break}return e.abrupt("return",null);case 6:return e.next=8,this._getResolver(r,"getResolver");case 8:if(null==(n=e.sent)){e.next=19;break}if(o=new Hu(this,n,t),e.t0=r!==t,!e.t0){e.next=16;break}return e.next=15,o.supportsWildcard();case 15:e.t0=!e.sent;case 16:if(!e.t0){e.next=18;break}return e.abrupt("return",null);case 18:return e.abrupt("return",o);case 19:r=r.split(".").slice(1).join("."),e.next=1;break;case 22:case"end":return e.stop()}}),e,this)})))}},{key:"_getResolver",value:function(t,e){return Au(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==e&&(e="ENS"),r.next=3,this.getNetwork();case 3:return(n=r.sent).ensAddress||Eu.throwError("network does not support ENS",h.b.errors.UNSUPPORTED_OPERATION,{operation:e,network:n.name}),r.prev=5,r.next=8,this.call({to:n.ensAddress,data:"0x0178b8bf"+Ws(t).substring(2)});case 8:return o=r.sent,r.abrupt("return",this.formatter.callAddress(o));case 12:r.prev=12,r.t0=r.catch(5);case 14:return r.abrupt("return",null);case 15:case"end":return r.stop()}}),r,this,[[5,12]])})))}},{key:"resolveName",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,e.prev=3,e.abrupt("return",Promise.resolve(this.formatter.address(t)));case 7:if(e.prev=7,e.t0=e.catch(3),!Object(c.l)(t)){e.next=11;break}throw e.t0;case 11:return"string"!=typeof t&&Eu.throwArgumentError("invalid ENS name","name",t),e.next=14,this.getResolver(t);case 14:if(r=e.sent){e.next=17;break}return e.abrupt("return",null);case 17:return e.next=19,r.getAddress();case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop()}}),e,this,[[3,7]])})))}},{key:"lookupAddress",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,t=this.formatter.address(t),r=t.substring(2).toLowerCase()+".addr.reverse",e.next=7,this._getResolver(r,"lookupAddress");case 7:if(null!=(n=e.sent)){e.next=10;break}return e.abrupt("return",null);case 10:return e.t0=Fu,e.next=13,this.call({to:n,data:"0x691f3431"+Ws(r).substring(2)});case 13:return e.t1=e.sent,o=(0,e.t0)(e.t1,0),e.next=17,this.resolveName(o);case 17:if(e.sent==t){e.next=20;break}return e.abrupt("return",null);case 20:return e.abrupt("return",o);case 21:case"end":return e.stop()}}),e,this)})))}},{key:"getAvatar",value:function(t){return Au(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o,i,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null,!Object(c.l)(t)){e.next=40;break}return n=this.formatter.address(t),o=n.substring(2).toLowerCase()+".addr.reverse",e.next=6,this._getResolver(o,"getAvatar");case 6:if(i=e.sent){e.next=9;break}return e.abrupt("return",null);case 9:return r=new Hu(this,i,o),e.prev=10,e.next=13,r.getAvatar();case 13:if(!(a=e.sent)){e.next=16;break}return e.abrupt("return",a.url);case 16:e.next=22;break;case 18:if(e.prev=18,e.t0=e.catch(10),e.t0.code===h.b.errors.CALL_EXCEPTION){e.next=22;break}throw e.t0;case 22:return e.prev=22,e.t1=Fu,e.next=26,this.call({to:i,data:"0x691f3431"+Ws(o).substring(2)});case 26:return e.t2=e.sent,s=(0,e.t1)(e.t2,0),e.next=30,this.getResolver(s);case 30:r=e.sent,e.next=38;break;case 33:if(e.prev=33,e.t3=e.catch(22),e.t3.code===h.b.errors.CALL_EXCEPTION){e.next=37;break}throw e.t3;case 37:return e.abrupt("return",null);case 38:e.next=45;break;case 40:return e.next=42,this.getResolver(t);case 42:if(r=e.sent){e.next=45;break}return e.abrupt("return",null);case 45:return e.next=47,r.getAvatar();case 47:if(null!=(u=e.sent)){e.next=50;break}return e.abrupt("return",null);case 50:return e.abrupt("return",u.url);case 51:case"end":return e.stop()}}),e,this,[[10,18],[22,33]])})))}},{key:"perform",value:function(t,e){return Eu.throwError(t+" not implemented",h.b.errors.NOT_IMPLEMENTED,{operation:t})}},{key:"_startEvent",value:function(t){this.polling=this._events.filter((function(t){return t.pollable()})).length>0}},{key:"_stopEvent",value:function(t){this.polling=this._events.filter((function(t){return t.pollable()})).length>0}},{key:"_addEventListener",value:function(t,e,r){var n=new Tu(Su(t),e,r);return this._events.push(n),this._startEvent(n),this}},{key:"on",value:function(t,e){return this._addEventListener(t,e,!1)}},{key:"once",value:function(t,e){return this._addEventListener(t,e,!0)}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=!1,a=[],s=Su(t);return this._events=this._events.filter((function(t){return t.tag!==s||(setTimeout((function(){t.listener.apply(e,n)}),0),i=!0,!t.once||(a.push(t),!1))})),a.forEach((function(t){e._stopEvent(t)})),i}},{key:"listenerCount",value:function(t){if(!t)return this._events.length;var e=Su(t);return this._events.filter((function(t){return t.tag===e})).length}},{key:"listeners",value:function(t){if(null==t)return this._events.map((function(t){return t.listener}));var e=Su(t);return this._events.filter((function(t){return t.tag===e})).map((function(t){return t.listener}))}},{key:"off",value:function(t,e){var r=this;if(null==e)return this.removeAllListeners(t);var n=[],o=!1,i=Su(t);return this._events=this._events.filter((function(t){return t.tag!==i||t.listener!=e||(!!o||(o=!0,n.push(t),!1))})),n.forEach((function(t){r._stopEvent(t)})),this}},{key:"removeAllListeners",value:function(t){var e=this,r=[];if(null==t)r=this._events,this._events=[];else{var n=Su(t);this._events=this._events.filter((function(t){return t.tag!==n||(r.push(t),!1)}))}return r.forEach((function(t){e._stopEvent(t)})),this}}],[{key:"getFormatter",value:function(){return null==qu&&(qu=new cu),qu}},{key:"getNetwork",value:function(t){return ms(null==t?"homestead":t)}}]),r}(wn);function Wu(){return(Wu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Qu(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Qu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=nc(t)););return t}function Ju(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yu(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)}}function Zu(t,e,r){return e&&Yu(t.prototype,e),r&&Yu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xu(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$u(t,e)}function $u(t,e){return($u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function tc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nc(t);if(e){var o=nc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ec(this,r)}}function ec(t,e){if(e&&("object"===oc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return rc(t)}function rc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nc(t){return(nc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function oc(t){return(oc="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)}var ic=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},ac=new h.b("providers/5.7.2"),sc=["call","estimateGas"];function uc(t,e){if(null==t)return null;if("string"==typeof t.message&&t.message.match("reverted")){var r=Object(c.l)(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if("object"===oc(t)){for(var n in t){var o=uc(t[n],e);if(o)return o}return null}if("string"==typeof t)try{return uc(JSON.parse(t),e)}catch(t){}return null}function cc(t,e,r){var n=r.transaction||r.signedTransaction;if("call"===t){var o=uc(e,!0);if(o)return o.data;ac.throwError("missing revert data in call exception; Transaction reverted without a reason string",h.b.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if("estimateGas"===t){var i=uc(e.body,!1);null==i&&(i=uc(e,!1)),i&&ac.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.b.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}var a=e.message;throw e.code===h.b.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?a=e.error.message:"string"==typeof e.body?a=e.body:"string"==typeof e.responseText&&(a=e.responseText),(a=(a||"").toLowerCase()).match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&ac.throwError("insufficient funds for intrinsic transaction cost",h.b.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),a.match(/nonce (is )?too low/i)&&ac.throwError("nonce has already been used",h.b.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),a.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&ac.throwError("replacement fee too low",h.b.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),a.match(/only replay-protected/i)&&ac.throwError("legacy pre-eip-155 transactions not supported",h.b.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),sc.indexOf(t)>=0&&a.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&ac.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function fc(t){return new Promise((function(e){setTimeout(e,t)}))}function lc(t){if(t.error){var e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function hc(t){return t?t.toLowerCase():t}var pc={},dc=function(t){Xu(r,t);var e=tc(r);function r(t,n,o){var i;if(Ju(this,r),i=e.call(this),t!==pc)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return P(rc(i),"provider",n),null==o&&(o=0),"string"==typeof o?(P(rc(i),"_address",i.provider.formatter.address(o)),P(rc(i),"_index",null)):"number"==typeof o?(P(rc(i),"_index",o),P(rc(i),"_address",null)):ac.throwArgumentError("invalid address or index","addressOrIndex",o),i}return Zu(r,[{key:"connect",value:function(t){return ac.throwError("cannot alter JSON-RPC Signer connection",h.b.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new mc(pc,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var t=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(e){return e.length<=t._index&&ac.throwError("unknown account #"+t._index,h.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),t.provider.formatter.address(e[t._index])}))}},{key:"sendUncheckedTransaction",value:function(t){var e=this;t=I(t);var r=this.getAddress().then((function(t){return t&&(t=t.toLowerCase()),t}));if(null==t.gasLimit){var n=I(t);n.from=r,t.gasLimit=this.provider.estimateGas(n)}return null!=t.to&&(t.to=Promise.resolve(t.to).then((function(t){return ic(e,void 0,void 0,regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,this.provider.resolveName(t);case 4:return null==(r=e.sent)&&ac.throwArgumentError("provided ENS name resolves to null","tx.to",t),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})))}))),j({tx:j(t),sender:r}).then((function(r){var n=r.tx,o=r.sender;null!=n.from?n.from.toLowerCase()!==o&&ac.throwArgumentError("from address mismatch","transaction",t):n.from=o;var i=e.provider.constructor.hexlifyTransaction(n,{from:!0});return e.provider.send("eth_sendTransaction",[i]).then((function(t){return t}),(function(t){return"string"==typeof t.message&&t.message.match(/user denied/i)&&ac.throwError("user rejected transaction",h.b.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),cc("sendTransaction",t,i)}))}))}},{key:"signTransaction",value:function(t){return ac.throwError("signing transactions is unsupported",h.b.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(t){return ic(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);case 2:return r=e.sent,e.next=5,this.sendUncheckedTransaction(t);case 5:return n=e.sent,e.prev=6,e.next=9,ou((function(){return ic(o,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider.getTransaction(n);case 2:if(null!==(e=t.sent)){t.next=5;break}return t.abrupt("return",void 0);case 5:return t.abrupt("return",this.provider._wrapTransaction(e,n,r));case 6:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this.provider});case 9:return e.abrupt("return",e.sent);case 12:throw e.prev=12,e.t0=e.catch(6),e.t0.transactionHash=n,e.t0;case 16:case"end":return e.stop()}}),e,this,[[6,12]])})))}},{key:"signMessage",value:function(t){return ic(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="string"==typeof t?bt(t):t,e.next=3,this.getAddress();case 3:return n=e.sent,e.prev=4,e.next=7,this.provider.send("personal_sign",[Object(c.i)(r),n.toLowerCase()]);case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(4),"string"==typeof e.t0.message&&e.t0.message.match(/user denied/i)&&ac.throwError("user rejected signing",h.b.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:t}),e.t0;case 14:case"end":return e.stop()}}),e,this,[[4,10]])})))}},{key:"_legacySignMessage",value:function(t){return ic(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="string"==typeof t?bt(t):t,e.next=3,this.getAddress();case 3:return n=e.sent,e.prev=4,e.next=7,this.provider.send("eth_sign",[n.toLowerCase(),Object(c.i)(r)]);case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(4),"string"==typeof e.t0.message&&e.t0.message.match(/user denied/i)&&ac.throwError("user rejected signing",h.b.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:t}),e.t0;case 14:case"end":return e.stop()}}),e,this,[[4,10]])})))}},{key:"_signTypedData",value:function(t,e,r){return ic(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,bi.resolveNames(t,e,r,(function(t){return a.provider.resolveName(t)}));case 2:return o=n.sent,n.next=5,this.getAddress();case 5:return i=n.sent,n.prev=6,n.next=9,this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(bi.getPayload(o.domain,e,o.value))]);case 9:return n.abrupt("return",n.sent);case 12:throw n.prev=12,n.t0=n.catch(6),"string"==typeof n.t0.message&&n.t0.message.match(/user denied/i)&&ac.throwError("user rejected signing",h.b.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:o.domain,types:e,value:o.value}}),n.t0;case 16:case"end":return n.stop()}}),n,this,[[6,12]])})))}},{key:"unlock",value:function(t){return ic(this,void 0,void 0,regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.provider,e.next=3,this.getAddress();case 3:return n=e.sent,e.abrupt("return",r.send("personal_unlockAccount",[n.toLowerCase(),t,null]));case 5:case"end":return e.stop()}}),e,this)})))}}]),r}(Cn),mc=function(t){Xu(r,t);var e=tc(r);function r(){return Ju(this,r),e.apply(this,arguments)}return Zu(r,[{key:"sendTransaction",value:function(t){var e=this;return this.sendUncheckedTransaction(t).then((function(t){return{hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(r){return e.provider.waitForTransaction(t,r)}}}))}}]),r}(dc),yc={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},vc=function(t){Xu(r,t);var e=tc(r);function r(t,n){var o;Ju(this,r);var i=n;return null==i&&(i=new Promise((function(t,e){setTimeout((function(){o.detectNetwork().then((function(e){t(e)}),(function(t){e(t)}))}),0)}))),o=e.call(this,i),t||(t=R(o.constructor,"defaultUrl")()),P(rc(o),"connection","string"==typeof t?Object.freeze({url:t}):Object.freeze(I(t))),o._nextId=42,o}return Zu(r,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var t=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){t._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return ic(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fc(0);case 2:return e=null,t.prev=3,t.next=6,this.send("eth_chainId",[]);case 6:e=t.sent,t.next=19;break;case 9:return t.prev=9,t.t0=t.catch(3),t.prev=11,t.next=14,this.send("net_version",[]);case 14:e=t.sent,t.next=19;break;case 17:t.prev=17,t.t1=t.catch(11);case 19:if(null==e){t.next=28;break}return r=R(this.constructor,"getNetwork"),t.prev=21,t.abrupt("return",r(g.from(e).toNumber()));case 25:return t.prev=25,t.t2=t.catch(21),t.abrupt("return",ac.throwError("could not detect network",h.b.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t.t2}));case 28:return t.abrupt("return",ac.throwError("could not detect network",h.b.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return t.stop()}}),t,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(t){return new dc(pc,this,t)}},{key:"getUncheckedSigner",value:function(t){return this.getSigner(t).connectUnchecked()}},{key:"listAccounts",value:function(){var t=this;return this.send("eth_accounts",[]).then((function(e){return e.map((function(e){return t.formatter.address(e)}))}))}},{key:"send",value:function(t,e){var r=this,n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:M(n),provider:this});var o=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(o&&this._cache[t])return this._cache[t];var i=nu(this.connection,JSON.stringify(n),lc).then((function(t){return r.emit("debug",{action:"response",request:n,response:t,provider:r}),t}),(function(t){throw r.emit("debug",{action:"response",error:t,request:n,provider:r}),t}));return o&&(this._cache[t]=i,setTimeout((function(){r._cache[t]=null}),0)),i}},{key:"prepareRequest",value:function(t,e){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[hc(e.address),e.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[hc(e.address),e.blockTag]];case"getCode":return["eth_getCode",[hc(e.address),e.blockTag]];case"getStorageAt":return["eth_getStorageAt",[hc(e.address),Object(c.h)(e.position,32),e.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[e.signedTransaction]];case"getBlock":return e.blockTag?["eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]]:e.blockHash?["eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[e.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[e.transactionHash]];case"call":return["eth_call",[R(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0}),e.blockTag]];case"estimateGas":return["eth_estimateGas",[R(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0})]];case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=hc(e.filter.address)),["eth_getLogs",[e.filter]]}return null}},{key:"perform",value:function(t,e){return ic(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("call"!==t&&"estimateGas"!==t){r.next=8;break}if(!(n=e.transaction)||null==n.type||!g.from(n.type).isZero()){r.next=8;break}if(null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas){r.next=8;break}return r.next=6,this.getFeeData();case 6:null==(o=r.sent).maxFeePerGas&&null==o.maxPriorityFeePerGas&&((e=I(e)).transaction=I(n),delete e.transaction.type);case 8:return null==(i=this.prepareRequest(t,e))&&ac.throwError(t+" not implemented",h.b.errors.NOT_IMPLEMENTED,{operation:t}),r.prev=10,r.next=13,this.send(i[0],i[1]);case 13:return r.abrupt("return",r.sent);case 16:return r.prev=16,r.t0=r.catch(10),r.abrupt("return",cc(t,r.t0,e));case 19:case"end":return r.stop()}}),r,this,[[10,16]])})))}},{key:"_startEvent",value:function(t){"pending"===t.tag&&this._startPending(),Wu(nc(r.prototype),"_startEvent",this).call(this,t)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var t=this,e=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=e,e.then((function(r){return function n(){t.send("eth_getFilterChanges",[r]).then((function(r){if(t._pendingFilter!=e)return null;var n=Promise.resolve();return r.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),n.then((function(){return fc(1e3)}))})).then((function(){if(t._pendingFilter==e)return setTimeout((function(){n()}),0),null;t.send("eth_uninstallFilter",[r])})).catch((function(t){}))}(),r})).catch((function(t){}))}}},{key:"_stopEvent",value:function(t){"pending"===t.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),Wu(nc(r.prototype),"_stopEvent",this).call(this,t)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(t,e){var r=I(yc);if(e)for(var n in e)e[n]&&(r[n]=!0);T(t,r);var o={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(e){if(null!=t[e]){var r=Object(c.g)(g.from(t[e]));"gasLimit"===e&&(e="gas"),o[e]=r}})),["from","to","data"].forEach((function(e){null!=t[e]&&(o[e]=Object(c.i)(t[e]))})),t.accessList&&(o.accessList=to(t.accessList)),o}}]),r}(Vu),gc=null;try{if(null==(gc=WebSocket))throw new Error("inject please")}catch(t){var bc=new h.b("providers/5.7.2");gc=function(){bc.throwError("WebSockets not supported in this environment",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}function wc(t){return(wc="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 _c(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)}}function kc(t,e){return(kc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ac(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pc(t);if(e){var o=Pc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ec(this,r)}}function Ec(t,e){if(e&&("object"===wc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xc(t)}function xc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Oc(){return(Oc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Sc(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Sc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Pc(t)););return t}function Pc(t){return(Pc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Rc=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},jc=new h.b("providers/5.7.2"),Tc=1,Ic=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kc(t,e)}(i,t);var e,r,n,o=Ac(i);function i(t,e){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),"any"===e&&jc.throwError("WebSocketProvider does not support 'any' network yet",h.b.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),(n="string"==typeof t?o.call(this,t,e):o.call(this,"_websocket",e))._pollingInterval=-1,n._wsReady=!1,P(xc(n),"_websocket","string"==typeof t?new gc(n.connection.url):t),P(xc(n),"_requests",{}),P(xc(n),"_subs",{}),P(xc(n),"_subIds",{}),P(xc(n),"_detectNetwork",Oc((r=xc(n),Pc(i.prototype)),"detectNetwork",r).call(r)),n.websocket.onopen=function(){n._wsReady=!0,Object.keys(n._requests).forEach((function(t){n.websocket.send(n._requests[t].payload)}))},n.websocket.onmessage=function(t){var e=t.data,r=JSON.parse(e);if(null!=r.id){var o=String(r.id),i=n._requests[o];if(delete n._requests[o],void 0!==r.result)i.callback(null,r.result),n.emit("debug",{action:"response",request:JSON.parse(i.payload),response:r.result,provider:xc(n)});else{var a=null;r.error?(P(a=new Error(r.error.message||"unknown error"),"code",r.error.code||null),P(a,"response",e)):a=new Error("unknown error"),i.callback(a,void 0),n.emit("debug",{action:"response",error:a,request:JSON.parse(i.payload),provider:xc(n)})}}else if("eth_subscription"===r.method){var s=n._subs[r.params.subscription];s&&s.processFunc(r.params.result)}else console.warn("this should not happen")};var a=setInterval((function(){n.emit("poll")}),1e3);return a.unref&&a.unref(),Ec(n)}return e=i,n=[{key:"defaultUrl",value:function(){return"ws://localhost:8546"}}],(r=[{key:"websocket",get:function(){return this._websocket}},{key:"detectNetwork",value:function(){return this._detectNetwork}},{key:"pollingInterval",get:function(){return 0},set:function(t){jc.throwError("cannot set polling interval on WebSocketProvider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}},{key:"resetEventsBlock",value:function(t){jc.throwError("cannot reset events block on WebSocketProvider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}},{key:"poll",value:function(){return Rc(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)})))}},{key:"polling",set:function(t){t&&jc.throwError("cannot set polling on WebSocketProvider",h.b.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}},{key:"send",value:function(t,e){var r=this,n=Tc++;return new Promise((function(o,i){var a=JSON.stringify({method:t,params:e,id:n,jsonrpc:"2.0"});r.emit("debug",{action:"request",request:JSON.parse(a),provider:r}),r._requests[String(n)]={callback:function(t,e){return t?i(t):o(e)},payload:a},r._wsReady&&r.websocket.send(a)}))}},{key:"_subscribe",value:function(t,e,r){return Rc(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==(o=this._subIds[t])&&(o=Promise.all(e).then((function(t){return a.send("eth_subscribe",t)})),this._subIds[t]=o),n.next=4,o;case 4:i=n.sent,this._subs[i]={tag:t,processFunc:r};case 6:case"end":return n.stop()}}),n,this)})))}},{key:"_startEvent",value:function(t){var e=this;switch(t.type){case"block":this._subscribe("block",["newHeads"],(function(t){var r=g.from(t.number).toNumber();e._emitted.block=r,e.emit("block",r)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(function(t){e.emit("pending",t)}));break;case"filter":this._subscribe(t.tag,["logs",this._getFilter(t.filter)],(function(r){null==r.removed&&(r.removed=!1),e.emit(t.filter,e.formatter.filterLog(r))}));break;case"tx":var r=function(t){var r=t.hash;e.getTransactionReceipt(r).then((function(t){t&&e.emit(r,t)}))};r(t),this._subscribe("tx",["newHeads"],(function(t){e._events.filter((function(t){return"tx"===t.type})).forEach(r)}));break;case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",t)}}},{key:"_stopEvent",value:function(t){var e=this,r=t.tag;if("tx"===t.type){if(this._events.filter((function(t){return"tx"===t.type})).length)return;r="tx"}else if(this.listenerCount(t.event))return;var n=this._subIds[r];n&&(delete this._subIds[r],n.then((function(t){e._subs[t]&&(delete e._subs[t],e.send("eth_unsubscribe",[t]))})))}},{key:"destroy",value:function(){return Rc(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.websocket.readyState!==gc.CONNECTING){t.next=3;break}return t.next=3,new Promise((function(t){e.websocket.onopen=function(){t(!0)},e.websocket.onerror=function(){t(!1)}}));case 3:this.websocket.close(1e3);case 4:case"end":return t.stop()}}),t,this)})))}}])&&_c(e.prototype,r),n&&_c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(vc);function Nc(t){return(Nc="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 Cc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mc(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)}}function Bc(t,e,r){return e&&Mc(t.prototype,e),r&&Mc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fc(){return(Fc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Dc(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Dc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qc(t)););return t}function Uc(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lc(t,e)}function Lc(t,e){return(Lc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function zc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=qc(t);if(e){var o=qc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Gc(this,r)}}function Gc(t,e){if(e&&("object"===Nc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hc(t)}function Hc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qc(t){return(qc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Kc=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Vc=new h.b("providers/5.7.2"),Wc=function(t){Uc(r,t);var e=zc(r);function r(){return Cc(this,r),e.apply(this,arguments)}return Bc(r,[{key:"detectNetwork",value:function(){var t=this,e=Object.create(null,{detectNetwork:{get:function(){return Fc(qc(r.prototype),"detectNetwork",t)}}});return Kc(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(r=this.network)){t.next=7;break}return t.next=4,e.detectNetwork.call(this);case 4:(r=t.sent)||Vc.throwError("no network detected",h.b.errors.UNKNOWN_ERROR,{}),null==this._network&&(P(this,"_network",r),this.emit("network",r,null));case 7:return t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)})))}}]),r}(vc),Qc=function(t){Uc(r,t);var e=zc(r);function r(t,n){var o;Cc(this,r),Vc.checkAbstract(this instanceof r?this.constructor:void 0,r),t=R(this instanceof r?this.constructor:void 0,"getNetwork")(t),n=R(this instanceof r?this.constructor:void 0,"getApiKey")(n);var i=R(this instanceof r?this.constructor:void 0,"getUrl")(t,n);return o=e.call(this,i,t),"string"==typeof n?P(Hc(o),"apiKey",n):null!=n&&Object.keys(n).forEach((function(t){P(Hc(o),t,n[t])})),o}return Bc(r,[{key:"_startPending",value:function(){Vc.warn("WARNING: API provider does not support pending filters")}},{key:"isCommunityResource",value:function(){return!1}},{key:"getSigner",value:function(t){return Vc.throwError("API provider does not support signing",h.b.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}},{key:"listAccounts",value:function(){return Promise.resolve([])}}],[{key:"getApiKey",value:function(t){return t}},{key:"getUrl",value:function(t,e){return Vc.throwError("not implemented; sub-classes must override getUrl",h.b.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}]),r}(Wc);function Jc(t){return(Jc="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 Yc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zc(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)}}function Xc(t,e,r){return e&&Zc(t.prototype,e),r&&Zc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tf(t,e)}function tf(t,e){return(tf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ef(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=of(t);if(e){var o=of(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rf(this,r)}}function rf(t,e){if(e&&("object"===Jc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return nf(t)}function nf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function of(t){return(of=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var af=new h.b("providers/5.7.2"),sf="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",uf=function(t){$c(r,t);var e=ef(r);function r(t,n){var o;Yc(this,r);var i=new cf(t,n),a=i.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");return P(nf(o=e.call(this,a,i.network)),"apiKey",i.apiKey),o}return Xc(r,[{key:"isCommunityResource",value:function(){return this.apiKey===sf}}]),r}(Ic),cf=function(t){$c(r,t);var e=ef(r);function r(){return Yc(this,r),e.apply(this,arguments)}return Xc(r,[{key:"isCommunityResource",value:function(){return this.apiKey===sf}}],[{key:"getWebSocketProvider",value:function(t,e){return new uf(t,e)}},{key:"getApiKey",value:function(t){return null==t?sf:(t&&"string"!=typeof t&&af.throwArgumentError("invalid apiKey","apiKey",t),t)}},{key:"getUrl",value:function(t,e){var r=null;switch(t.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:af.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+e,throttleCallback:function(t,r){return e===sf&&pu(),Promise.resolve(!0)}}}}]),r}(Qc);function ff(t){return(ff="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 lf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hf(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)}}function pf(t,e){return(pf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function df(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yf(t);if(e){var o=yf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mf(this,r)}}function mf(t,e){if(e&&("object"===ff(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yf(t){return(yf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vf=new h.b("providers/5.7.2"),gf="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function bf(t){switch(t){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return vf.throwArgumentError("unsupported network","name",t)}var wf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pf(t,e)}(i,t);var e,r,n,o=df(i);function i(){return lf(this,i),o.apply(this,arguments)}return e=i,n=[{key:"getApiKey",value:function(t){return null==t?gf:t}},{key:"getUrl",value:function(t,e){null==e&&(e=gf);var r={allowGzip:!0,url:"https://"+bf(t.name)+e,throttleCallback:function(t,r){return e.apiKey===gf&&pu(),Promise.resolve(!0)}};return null!=e.projectSecret&&(r.user="",r.password=e.projectSecret),r}}],(r=[{key:"isCommunityResource",value:function(){return this.apiKey===gf}}])&&hf(e.prototype,r),n&&hf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qc);function _f(t){return(_f="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 kf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Af(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)}}function Ef(){return(Ef="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=xf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function xf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Rf(t)););return t}function Of(t,e){return(Of=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Sf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Rf(t);if(e){var o=Rf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Pf(this,r)}}function Pf(t,e){if(e&&("object"===_f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Rf(t){return(Rf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jf=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Tf=new h.b("providers/5.7.2"),If=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Of(t,e)}(i,t);var e,r,n,o=Sf(i);function i(){return kf(this,i),o.apply(this,arguments)}return e=i,n=[{key:"getApiKey",value:function(t){return null!=t&&Tf.throwArgumentError("apiKey not supported for cloudflare","apiKey",t),null}},{key:"getUrl",value:function(t,e){var r=null;switch(t.name){case"homestead":r="https://cloudflare-eth.com/";break;default:Tf.throwArgumentError("unsupported network","network",arguments[0])}return r}}],(r=[{key:"perform",value:function(t,e){var r=this,n=Object.create(null,{perform:{get:function(){return Ef(Rf(i.prototype),"perform",r)}}});return jf(this,void 0,void 0,regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("getBlockNumber"!==t){r.next=5;break}return r.next=3,n.perform.call(this,"getBlock",{blockTag:"latest"});case 3:return o=r.sent,r.abrupt("return",o.number);case 5:return r.abrupt("return",n.perform.call(this,t,e));case 6:case"end":return r.stop()}}),r,this)})))}}])&&Af(e.prototype,r),n&&Af(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qc);function Nf(t){return(Nf="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 Cf(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)}}function Mf(){return(Mf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Bf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Bf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zf(t)););return t}function Ff(t,e){return(Ff=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Df(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zf(t);if(e){var o=zf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Uf(this,r)}}function Uf(t,e){if(e&&("object"===Nf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Lf(t)}function Lf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zf(t){return(zf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Gf=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Hf=new h.b("providers/5.7.2");function qf(t){var e={};for(var r in t)if(null!=t[r]){var n=t[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?Object(c.g)(Object(c.i)(n)):"accessList"===r?"["+to(n).map((function(t){return'{address:"'.concat(t.address,'",storageKeys:["').concat(t.storageKeys.join('","'),'"]}')})).join(",")+"]":Object(c.i)(n),e[r]=n)}return e}function Kf(t){if(0==t.status&&("No records found"===t.message||"No transactions found"===t.message))return t.result;if(1!=t.status||"string"!=typeof t.message||!t.message.match(/^OK/)){var e=new Error("invalid response");throw e.result=JSON.stringify(t),(t.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return t.result}function Vf(t){if(t&&0==t.status&&"NOTOK"==t.message&&(t.result||"").toLowerCase().indexOf("rate limit")>=0){var e=new Error("throttled response");throw e.result=JSON.stringify(t),e.throttleRetry=!0,e}if("2.0"!=t.jsonrpc){var r=new Error("invalid response");throw r.result=JSON.stringify(t),r}if(t.error){var n=new Error(t.error.message||"unknown error");throw t.error.code&&(n.code=t.error.code),t.error.data&&(n.data=t.error.data),n}return t.result}function Wf(t){if("pending"===t)throw new Error("pending not supported");return"latest"===t?t:parseInt(t.substring(2),16)}function Qf(t,e,r){if("call"===t&&e.code===h.b.errors.SERVER_ERROR){var n=e.error;if(n&&(n.message.match(/reverted/i)||n.message.match(/VM execution error/i))){var o=n.data;if(o&&(o="0x"+o.replace(/^.*0x/i,"")),Object(c.l)(o))return o;Hf.throwError("missing revert data in call exception",h.b.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}var i=e.message;throw e.code===h.b.errors.SERVER_ERROR&&(e.error&&"string"==typeof e.error.message?i=e.error.message:"string"==typeof e.body?i=e.body:"string"==typeof e.responseText&&(i=e.responseText)),(i=(i||"").toLowerCase()).match(/insufficient funds/)&&Hf.throwError("insufficient funds for intrinsic transaction cost",h.b.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:r}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Hf.throwError("nonce has already been used",h.b.errors.NONCE_EXPIRED,{error:e,method:t,transaction:r}),i.match(/another transaction with same nonce/)&&Hf.throwError("replacement fee too low",h.b.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:r}),i.match(/execution failed due to an exception|execution reverted/)&&Hf.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:r}),e}var Jf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ff(t,e)}(i,t);var e,r,n,o=Df(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),P(Lf(r=o.call(this,t)),"baseUrl",r.getBaseUrl()),P(Lf(r),"apiKey",e||null),r}return e=i,(r=[{key:"getBaseUrl",value:function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return Hf.throwArgumentError("unsupported network","network",this.network.name)}},{key:"getUrl",value:function(t,e){var r=Object.keys(e).reduce((function(t,r){var n=e[r];return null!=n&&(t+="&".concat(r,"=").concat(n)),t}),""),n=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(t).concat(r).concat(n)}},{key:"getPostUrl",value:function(){return"".concat(this.baseUrl,"/api")}},{key:"getPostData",value:function(t,e){return e.module=t,e.apikey=this.apiKey,e}},{key:"fetch",value:function(t,e,r){return Gf(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a,s,u,c,f=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=r?this.getPostUrl():this.getUrl(t,e),i=r?this.getPostData(t,e):null,a="proxy"===t?Vf:Kf,this.emit("debug",{action:"request",request:o,provider:this}),s={url:o,throttleSlotInterval:1e3,throttleCallback:function(t,e){return f.isCommunityResource()&&pu(),Promise.resolve(!0)}},u=null,i&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(i).map((function(t){return"".concat(t,"=").concat(i[t])})).join("&")),n.next=9,nu(s,u,a||Vf);case 9:return c=n.sent,this.emit("debug",{action:"response",request:o,response:M(c),provider:this}),n.abrupt("return",c);case 12:case"end":return n.stop()}}),n,this)})))}},{key:"detectNetwork",value:function(){return Gf(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.network);case 1:case"end":return t.stop()}}),t,this)})))}},{key:"perform",value:function(t,e){var r=this,n=Object.create(null,{perform:{get:function(){return Mf(zf(i.prototype),"perform",r)}}});return Gf(this,void 0,void 0,regeneratorRuntime.mark((function r(){var o,i,a,s,u,c,f,l,p;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=t,r.next="getBlockNumber"===r.t0?3:"getGasPrice"===r.t0?4:"getBalance"===r.t0?5:"getTransactionCount"===r.t0?6:"getCode"===r.t0?7:"getStorageAt"===r.t0?8:"sendTransaction"===r.t0?9:"getBlock"===r.t0?10:"getTransaction"===r.t0?13:"getTransactionReceipt"===r.t0?14:"call"===r.t0?15:"estimateGas"===r.t0?29:"getLogs"===r.t0?41:"getEtherPrice"===r.t0?65:72;break;case 3:return r.abrupt("return",this.fetch("proxy",{action:"eth_blockNumber"}));case 4:return r.abrupt("return",this.fetch("proxy",{action:"eth_gasPrice"}));case 5:return r.abrupt("return",this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag}));case 6:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag}));case 7:return r.abrupt("return",this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag}));case 8:return r.abrupt("return",this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag}));case 9:return r.abrupt("return",this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch((function(t){return Qf("sendTransaction",t,e.signedTransaction)})));case 10:if(!e.blockTag){r.next=12;break}return r.abrupt("return",this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"}));case 12:throw new Error("getBlock by blockHash not implemented");case 13:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.transactionHash}));case 14:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.transactionHash}));case 15:if("latest"===e.blockTag){r.next=17;break}throw new Error("EtherscanProvider does not support blockTag for call");case 17:return(o=qf(e.transaction)).module="proxy",o.action="eth_call",r.prev=20,r.next=23,this.fetch("proxy",o,!0);case 23:return r.abrupt("return",r.sent);case 26:return r.prev=26,r.t1=r.catch(20),r.abrupt("return",Qf("call",r.t1,e.transaction));case 29:return(i=qf(e.transaction)).module="proxy",i.action="eth_estimateGas",r.prev=32,r.next=35,this.fetch("proxy",i,!0);case 35:return r.abrupt("return",r.sent);case 38:return r.prev=38,r.t2=r.catch(32),r.abrupt("return",Qf("estimateGas",r.t2,e.transaction));case 41:return a={action:"getLogs"},e.filter.fromBlock&&(a.fromBlock=Wf(e.filter.fromBlock)),e.filter.toBlock&&(a.toBlock=Wf(e.filter.toBlock)),e.filter.address&&(a.address=e.filter.address),e.filter.topics&&e.filter.topics.length>0&&(e.filter.topics.length>1&&Hf.throwError("unsupported topic count",h.b.errors.UNSUPPORTED_OPERATION,{topics:e.filter.topics}),1===e.filter.topics.length&&("string"==typeof(s=e.filter.topics[0])&&66===s.length||Hf.throwError("unsupported topic format",h.b.errors.UNSUPPORTED_OPERATION,{topic0:s}),a.topic0=s)),r.next=48,this.fetch("logs",a);case 48:u=r.sent,c={},f=0;case 51:if(!(f<u.length)){r.next=64;break}if(null==(l=u[f]).blockHash){r.next=55;break}return r.abrupt("continue",61);case 55:if(null!=c[l.blockNumber]){r.next=60;break}return r.next=58,this.getBlock(l.blockNumber);case 58:(p=r.sent)&&(c[l.blockNumber]=p.hash);case 60:l.blockHash=c[l.blockNumber];case 61:f++,r.next=51;break;case 64:return r.abrupt("return",u);case 65:if("homestead"===this.network.name){r.next=67;break}return r.abrupt("return",0);case 67:return r.t3=parseFloat,r.next=70,this.fetch("stats",{action:"ethprice"});case 70:return r.t4=r.sent.ethusd,r.abrupt("return",(0,r.t3)(r.t4));case 72:return r.abrupt("break",73);case 73:return r.abrupt("return",n.perform.call(this,t,e));case 74:case"end":return r.stop()}}),r,this,[[20,26],[32,38]])})))}},{key:"getHistory",value:function(t,e,r){return Gf(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.resolveName(t);case 2:return n.t0=n.sent,n.t1=null==e?0:e,n.t2=null==r?99999999:r,o={action:"txlist",address:n.t0,startblock:n.t1,endblock:n.t2,sort:"asc"},n.next=8,this.fetch("account",o);case 8:return i=n.sent,n.abrupt("return",i.map((function(t){["contractAddress","to"].forEach((function(e){""==t[e]&&delete t[e]})),null==t.creates&&null!=t.contractAddress&&(t.creates=t.contractAddress);var e=a.formatter.transactionResponse(t);return t.timeStamp&&(e.timestamp=parseInt(t.timeStamp)),e})));case 10:case"end":return n.stop()}}),n,this)})))}},{key:"isCommunityResource",value:function(){return null==this.apiKey}}])&&Cf(e.prototype,r),n&&Cf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Vu);function Yf(t){for(var e=(t=t.slice()).length-1;e>0;e--){var r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}function Zf(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)}}function Xf(t,e){return(Xf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rl(t);if(e){var o=rl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tl(this,r)}}function tl(t,e){if(e&&("object"===nl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return el(t)}function el(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rl(t){return(rl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function nl(t){return(nl="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)}var ol=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},il=new h.b("providers/5.7.2");function al(){return(new Date).getTime()}function sl(t){for(var e=null,r=0;r<t.length;r++){var n=t[r];if(null==n)return null;e?e.name===n.name&&e.chainId===n.chainId&&(e.ensAddress===n.ensAddress||null==e.ensAddress&&null==n.ensAddress)||il.throwArgumentError("provider mismatch","networks",t):e=n}return e}function ul(t,e){t=t.slice().sort();var r=Math.floor(t.length/2);if(t.length%2)return t[r];var n=t[r-1],o=t[r];return null!=e&&Math.abs(n-o)>e?null:(n+o)/2}function cl(t){if(null===t)return"null";if("number"==typeof t||"boolean"==typeof t)return JSON.stringify(t);if("string"==typeof t)return t;if(g.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map((function(t){return cl(t)})));if("object"===nl(t)){var e=Object.keys(t);return e.sort(),"{"+e.map((function(e){var r=t[e];return r="function"==typeof r?"[function]":cl(r),JSON.stringify(e)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+nl(t))}var fl=1;function ll(t){var e=null,r=null,n=new Promise((function(n){e=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(e,t)}));return{cancel:e,getPromise:function(){return n},wait:function(t){return n=n.then(t)}}}var hl=[h.b.errors.CALL_EXCEPTION,h.b.errors.INSUFFICIENT_FUNDS,h.b.errors.NONCE_EXPIRED,h.b.errors.REPLACEMENT_UNDERPRICED,h.b.errors.UNPREDICTABLE_GAS_LIMIT],pl=["address","args","errorArgs","errorSignature","method","transaction"];function dl(t,e){var r={weight:t.weight};return Object.defineProperty(r,"provider",{get:function(){return t.provider}}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function ml(t,e,r){var n=cl;switch(e){case"getBlockNumber":return function(e){var r=e.map((function(t){return t.result})),n=ul(e.map((function(t){return t.result})),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=t._highestBlockNumber&&(t._highestBlockNumber=n),t._highestBlockNumber};case"getGasPrice":return function(t){var e=t.map((function(t){return t.result}));return e.sort(),e[Math.floor(e.length/2)]};case"getEtherPrice":return function(t){return ul(t.map((function(t){return t.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(t){return null==t?null:((t=I(t)).confirmations=-1,cl(t))};break;case"getBlock":n=r.includeTransactions?function(t){return null==t?null:((t=I(t)).transactions=t.transactions.map((function(t){return(t=I(t)).confirmations=-1,t})),cl(t))}:function(t){return null==t?null:cl(t)};break;default:throw new Error("unknown method: "+e)}return function(t,e){return function(r){var n={};r.forEach((function(e){var r=t(e.result);n[r]||(n[r]={count:0,result:e.result}),n[r].count++}));for(var o=Object.keys(n),i=0;i<o.length;i++){var a=n[o[i]];if(a.count>=e)return a.result}}}(n,t.quorum)}function yl(t,e){return ol(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(null!=(n=t.provider).blockNumber&&n.blockNumber>=e||-1===e)){r.next=3;break}return r.abrupt("return",n);case 3:return r.abrupt("return",ou((function(){return new Promise((function(r,o){setTimeout((function(){return n.blockNumber>=e?r(n):t.cancelled?r(null):r(void 0)}),0)}))}),{oncePoll:n}));case 4:case"end":return r.stop()}}),r)})))}function vl(t,e,r,n){return ol(this,void 0,void 0,regeneratorRuntime.mark((function o(){var i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:i=t.provider,o.t0=r,o.next="getBlockNumber"===o.t0||"getGasPrice"===o.t0?4:"getEtherPrice"===o.t0?5:"getBalance"===o.t0||"getTransactionCount"===o.t0||"getCode"===o.t0?8:"getStorageAt"===o.t0?13:"getBlock"===o.t0?18:"call"===o.t0||"estimateGas"===o.t0?23:"getTransaction"===o.t0||"getTransactionReceipt"===o.t0?30:"getLogs"===o.t0?31:37;break;case 4:return o.abrupt("return",i[r]());case 5:if(!i.getEtherPrice){o.next=7;break}return o.abrupt("return",i.getEtherPrice());case 7:return o.abrupt("break",37);case 8:if(!n.blockTag||!Object(c.l)(n.blockTag)){o.next=12;break}return o.next=11,yl(t,e);case 11:i=o.sent;case 12:return o.abrupt("return",i[r](n.address,n.blockTag||"latest"));case 13:if(!n.blockTag||!Object(c.l)(n.blockTag)){o.next=17;break}return o.next=16,yl(t,e);case 16:i=o.sent;case 17:return o.abrupt("return",i.getStorageAt(n.address,n.position,n.blockTag||"latest"));case 18:if(!n.blockTag||!Object(c.l)(n.blockTag)){o.next=22;break}return o.next=21,yl(t,e);case 21:i=o.sent;case 22:return o.abrupt("return",i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash));case 23:if(!n.blockTag||!Object(c.l)(n.blockTag)){o.next=27;break}return o.next=26,yl(t,e);case 26:i=o.sent;case 27:if("call"!==r||!n.blockTag){o.next=29;break}return o.abrupt("return",i[r](n.transaction,n.blockTag));case 29:return o.abrupt("return",i[r](n.transaction));case 30:return o.abrupt("return",i[r](n.transactionHash));case 31:if(!((a=n.filter).fromBlock&&Object(c.l)(a.fromBlock)||a.toBlock&&Object(c.l)(a.toBlock))){o.next=36;break}return o.next=35,yl(t,e);case 35:i=o.sent;case 36:return o.abrupt("return",i.getLogs(a));case 37:return o.abrupt("return",il.throwError("unknown method error",h.b.errors.UNKNOWN_ERROR,{method:r,params:n}));case 38:case"end":return o.stop()}}),o)})))}var gl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xf(t,e)}(i,t);var e,r,n,o=$f(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),0===t.length&&il.throwArgumentError("missing providers","providers",t);var n=t.map((function(t,e){if(wn.isProvider(t)){var r=lu(t)?2e3:750;return Object.freeze({provider:t,weight:1,stallTimeout:r,priority:1})}var n=I(t);null==n.priority&&(n.priority=1),null==n.stallTimeout&&(n.stallTimeout=lu(t)?2e3:750),null==n.weight&&(n.weight=1);var o=n.weight;return(o%1||o>512||o<1)&&il.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(e,"].weight"),o),Object.freeze(n)})),a=n.reduce((function(t,e){return t+e.weight}),0);null==e?e=a/2:e>a&&il.throwArgumentError("quorum will always fail; larger than total weight","quorum",e);var s=sl(n.map((function(t){return t.provider.network})));return null==s&&(s=new Promise((function(t,e){setTimeout((function(){r.detectNetwork().then(t,e)}),0)}))),P(el(r=o.call(this,s)),"providerConfigs",Object.freeze(n)),P(el(r),"quorum",e),r._highestBlockNumber=-1,r}return e=i,(r=[{key:"detectNetwork",value:function(){return ol(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(this.providerConfigs.map((function(t){return t.provider.getNetwork()})));case 2:return e=t.sent,t.abrupt("return",sl(e));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"perform",value:function(t,e){return ol(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i,a,s,u,c,f,l,p,d=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("sendTransaction"!==t){r.next=13;break}return r.next=3,Promise.all(this.providerConfigs.map((function(t){return t.provider.sendTransaction(e.signedTransaction).then((function(t){return t.hash}),(function(t){return t}))})));case 3:n=r.sent,o=0;case 5:if(!(o<n.length)){r.next=12;break}if("string"!=typeof(i=n[o])){r.next=9;break}return r.abrupt("return",i);case 9:o++,r.next=5;break;case 12:throw n[0];case 13:if(-1!==this._highestBlockNumber||"getBlockNumber"===t){r.next=16;break}return r.next=16,this.getBlockNumber();case 16:a=ml(this,t,e),(s=Yf(this.providerConfigs.map(I))).sort((function(t,e){return t.priority-e.priority})),u=this._highestBlockNumber,c=0,f=!0,l=regeneratorRuntime.mark((function r(){var n,o,i,l,h,p,m;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(n=al(),o=s.filter((function(t){return t.runner&&n-t.start<t.stallTimeout})).reduce((function(t,e){return t+e.weight}),0),i=function(){var r=s[c++],n=fl++;r.start=al(),r.staller=ll(r.stallTimeout),r.staller.wait((function(){r.staller=null})),r.runner=vl(r,u,t,e).then((function(o){r.done=!0,r.result=o,d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:n,backend:dl(r,al()),request:{method:t,params:M(e)},provider:d})}),(function(o){r.done=!0,r.error=o,d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:n,backend:dl(r,al()),request:{method:t,params:M(e)},provider:d})})),d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:n,backend:dl(r,null),request:{method:t,params:M(e)},provider:d}),o+=r.weight};o<d.quorum&&c<s.length;)i();if(l=[],s.forEach((function(t){!t.done&&t.runner&&(l.push(t.runner),t.staller&&l.push(t.staller.getPromise()))})),!l.length){r.next=9;break}return r.next=9,Promise.race(l);case 9:if(!((h=s.filter((function(t){return t.done&&null==t.error}))).length>=d.quorum)){r.next=19;break}if(void 0===(p=a(h))){r.next=15;break}return s.forEach((function(t){t.staller&&t.staller.cancel(),t.cancelled=!0})),r.abrupt("return",{v:p});case 15:if(f){r.next=18;break}return r.next=18,ll(100).getPromise();case 18:f=!1;case 19:if(m=s.reduce((function(t,e){if(!e.done||null==e.error)return t;var r=e.error.code;return hl.indexOf(r)>=0&&(t[r]||(t[r]={error:e.error,weight:0}),t[r].weight+=e.weight),t}),{}),Object.keys(m).forEach((function(t){var e=m[t];if(!(e.weight<d.quorum)){s.forEach((function(t){t.staller&&t.staller.cancel(),t.cancelled=!0}));var r=e.error,n={};pl.forEach((function(t){null!=r[t]&&(n[t]=r[t])})),il.throwError(r.reason||r.message,t,n)}})),0!==s.filter((function(t){return!t.done})).length){r.next=23;break}return r.abrupt("return","break");case 23:case"end":return r.stop()}}),r)}));case 23:return r.delegateYield(l(),"t0",25);case 25:if("break"!==(p=r.t0)){r.next=28;break}return r.abrupt("break",32);case 28:if("object"!==nl(p)){r.next=30;break}return r.abrupt("return",p.v);case 30:r.next=23;break;case 32:return s.forEach((function(t){t.staller&&t.staller.cancel(),t.cancelled=!0})),r.abrupt("return",il.throwError("failed to meet quorum",h.b.errors.SERVER_ERROR,{method:t,params:e,results:s.map((function(t){return dl(t)})),provider:this}));case 34:case"end":return r.stop()}}),r,this)})))}}])&&Zf(e.prototype,r),n&&Zf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Vu),bl=null;function wl(t){return(wl="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 _l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kl(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)}}function Al(t,e,r){return e&&kl(t.prototype,e),r&&kl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function El(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xl(t,e)}function xl(t,e){return(xl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ol(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Rl(t);if(e){var o=Rl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Sl(this,r)}}function Sl(t,e){if(e&&("object"===wl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Pl(t)}function Pl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rl(t){return(Rl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jl=new h.b("providers/5.7.2"),Tl="84842078b09946638c03157f83405213",Il=function(t){El(r,t);var e=Ol(r);function r(t,n){var o;_l(this,r);var i=new Nl(t,n),a=i.connection;a.password&&jl.throwError("INFURA WebSocket project secrets unsupported",h.b.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});var s=a.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");return P(Pl(o=e.call(this,s,t)),"apiKey",i.projectId),P(Pl(o),"projectId",i.projectId),P(Pl(o),"projectSecret",i.projectSecret),o}return Al(r,[{key:"isCommunityResource",value:function(){return this.projectId===Tl}}]),r}(Ic),Nl=function(t){El(r,t);var e=Ol(r);function r(){return _l(this,r),e.apply(this,arguments)}return Al(r,[{key:"isCommunityResource",value:function(){return this.projectId===Tl}}],[{key:"getWebSocketProvider",value:function(t,e){return new Il(t,e)}},{key:"getApiKey",value:function(t){var e={apiKey:Tl,projectId:Tl,projectSecret:null};return null==t||("string"==typeof t?e.projectId=t:null!=t.projectSecret?(jl.assertArgument("string"==typeof t.projectId,"projectSecret requires a projectId","projectId",t.projectId),jl.assertArgument("string"==typeof t.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),e.projectId=t.projectId,e.projectSecret=t.projectSecret):t.projectId&&(e.projectId=t.projectId),e.apiKey=e.projectId),e}},{key:"getUrl",value:function(t,e){var r=null;switch(t?t.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:jl.throwError("unsupported network",h.b.errors.INVALID_ARGUMENT,{argument:"network",value:t})}var n={allowGzip:!0,url:"https://"+r+"/v3/"+e.projectId,throttleCallback:function(t,r){return e.projectId===Tl&&pu(),Promise.resolve(!0)}};return null!=e.projectSecret&&(n.user="",n.password=e.projectSecret),n}}]),r}(Qc);function Cl(t){return(Cl="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 Ml(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bl(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)}}function Fl(t,e){return(Fl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Dl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ll(t);if(e){var o=Ll(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ul(this,r)}}function Ul(t,e){if(e&&("object"===Cl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ll(t){return(Ll=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var zl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fl(t,e)}(i,t);var e,r,n,o=Dl(i);function i(){return Ml(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"send",value:function(t,e){var r=this,n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);var o={request:n,resolve:null,reject:null},i=new Promise((function(t,e){o.resolve=t,o.reject=e}));return this._pendingBatch.push(o),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((function(){var t=r._pendingBatch;r._pendingBatch=null,r._pendingBatchAggregator=null;var e=t.map((function(t){return t.request}));return r.emit("debug",{action:"requestBatch",request:M(e),provider:r}),nu(r.connection,JSON.stringify(e)).then((function(n){r.emit("debug",{action:"response",request:e,response:n,provider:r}),t.forEach((function(t,e){var r=n[e];if(r.error){var o=new Error(r.error.message);o.code=r.error.code,o.data=r.error.data,t.reject(o)}else t.resolve(r.result)}))}),(function(n){r.emit("debug",{action:"response",error:n,request:e,provider:r}),t.forEach((function(t){t.reject(n)}))}))}),10)),i}}])&&Bl(e.prototype,r),n&&Bl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(vc);function Gl(t){return(Gl="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 Hl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ql(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)}}function Kl(t,e){return(Kl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ql(t);if(e){var o=Ql(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wl(this,r)}}function Wl(t,e){if(e&&("object"===Gl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ql(t){return(Ql=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jl=new h.b("providers/5.7.2"),Yl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kl(t,e)}(i,t);var e,r,n,o=Vl(i);function i(){return Hl(this,i),o.apply(this,arguments)}return e=i,n=[{key:"getApiKey",value:function(t){return t&&"string"!=typeof t&&Jl.throwArgumentError("invalid apiKey","apiKey",t),t||"ETHERS_JS_SHARED"}},{key:"getUrl",value:function(t,e){Jl.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");var r=null;switch(t.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Jl.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+e}}],(r=null)&&ql(e.prototype,r),n&&ql(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qc);function Zl(t){return(Zl="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 Xl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $l(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)}}function th(t,e){return(th=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function eh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nh(t);if(e){var o=nh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rh(this,r)}}function rh(t,e){if(e&&("object"===Zl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function nh(t){return(nh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var oh=new h.b("providers/5.7.2"),ih=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&th(t,e)}(i,t);var e,r,n,o=eh(i);function i(){return Xl(this,i),o.apply(this,arguments)}return e=i,n=[{key:"getApiKey",value:function(t){var e={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==t?e.applicationId="62e1ad51b37b8e00394bda3b":"string"==typeof t?e.applicationId=t:null!=t.applicationSecretKey?(e.applicationId=t.applicationId,e.applicationSecretKey=t.applicationSecretKey):t.applicationId?e.applicationId=t.applicationId:oh.throwArgumentError("unsupported PocketProvider apiKey","apiKey",t),e}},{key:"getUrl",value:function(t,e){var r=null;switch(t?t.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:oh.throwError("unsupported network",h.b.errors.INVALID_ARGUMENT,{argument:"network",value:t})}var n={headers:{},url:"https://".concat(r,"/v1/lb/").concat(e.applicationId)};return null!=e.applicationSecretKey&&(n.user="",n.password=e.applicationSecretKey),n}}],(r=[{key:"isCommunityResource",value:function(){return"62e1ad51b37b8e00394bda3b"===this.applicationId}}])&&$l(e.prototype,r),n&&$l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qc);function ah(t){return(ah="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 sh(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)}}function uh(t,e){return(uh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ch(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hh(t);if(e){var o=hh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fh(this,r)}}function fh(t,e){if(e&&("object"===ah(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return lh(t)}function lh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hh(t){return(hh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ph=new h.b("providers/5.7.2"),dh=1;function mh(t,e){var r="Web3LegacyFetcher";return function(t,n){var o=this,i={method:t,params:n,id:dh++,jsonrpc:"2.0"};return new Promise((function(t,n){o.emit("debug",{action:"request",fetcher:r,request:M(i),provider:o}),e(i,(function(e,a){if(e)return o.emit("debug",{action:"response",fetcher:r,error:e,request:i,provider:o}),n(e);if(o.emit("debug",{action:"response",fetcher:r,request:i,response:a,provider:o}),a.error){var s=new Error(a.error.message);return s.code=a.error.code,s.data=a.error.data,n(s)}t(a.result)}))}))}}var yh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uh(t,e)}(i,t);var e,r,n,o=ch(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),null==t&&ph.throwArgumentError("missing provider","provider",t);var n=null,a=null,s=null;return"function"==typeof t?(n="unknown:",a=t):(!(n=t.host||t.path||"")&&t.isMetaMask&&(n="metamask"),s=t,t.request?(""===n&&(n="eip-1193:"),a=function(t){return function(e,r){var n=this;null==r&&(r=[]);var o={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:M(o),provider:this}),t.request(o).then((function(t){return n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:o,response:t,provider:n}),t}),(function(t){throw n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:o,error:t,provider:n}),t}))}}(t)):t.sendAsync?a=mh(0,t.sendAsync.bind(t)):t.send?a=mh(0,t.send.bind(t)):ph.throwArgumentError("unsupported provider","provider",t),n||(n="unknown:")),P(lh(r=o.call(this,n,e)),"jsonRpcFetchFunc",a),P(lh(r),"provider",s),r}return e=i,(r=[{key:"send",value:function(t,e){return this.jsonRpcFetchFunc(t,e)}}])&&sh(e.prototype,r),n&&sh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(vc),vh=new h.b("providers/5.7.2");function gh(t,e){if(null==t&&(t="homestead"),"string"==typeof t){var r=t.match(/^(ws|http)s?:/i);if(r)switch(r[1].toLowerCase()){case"http":case"https":return new vc(t);case"ws":case"wss":return new Ic(t);default:vh.throwArgumentError("unsupported URL scheme","network",t)}}var n=ms(t);return n&&n._defaultProvider||vh.throwError("unsupported getDefaultProvider network",h.b.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:t}),n._defaultProvider({FallbackProvider:gl,AlchemyProvider:cf,AnkrProvider:wf,CloudflareProvider:If,EtherscanProvider:Jf,InfuraProvider:Nl,JsonRpcProvider:vc,NodesmithProvider:Yl,PocketProvider:ih,Web3Provider:yh,IpcProvider:bl},e)}function bh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wh(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)}}function _h(t,e,r){return e&&wh(t.prototype,e),r&&wh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var kh=new h.b("abi/5.7.0");function Ah(t){var e=[];return function t(r,n){if(Array.isArray(n))for(var o in n){var i=r.slice();i.push(o);try{t(i,n[o])}catch(t){e.push({path:i,error:t})}}}([],t),e}var Eh=function(){function t(e,r,n,o){bh(this,t),this.name=e,this.type=r,this.localName=n,this.dynamic=o}return _h(t,[{key:"_throwError",value:function(t,e){kh.throwArgumentError(t,this.localName,e)}}]),t}(),xh=function(){function t(e){bh(this,t),P(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}return _h(t,[{key:"data",get:function(){return Object(c.c)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(t){return this._data.push(t),this._dataLength+=t.length,t.length}},{key:"appendWriter",value:function(t){return this._writeData(Object(c.b)(t._data))}},{key:"writeBytes",value:function(t){var e=Object(c.a)(t),r=e.length%this.wordSize;return r&&(e=Object(c.b)([e,this._padding.slice(r)])),this._writeData(e)}},{key:"_getValue",value:function(t){var e=Object(c.a)(g.from(t));return e.length>this.wordSize&&kh.throwError("value out-of-bounds",h.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=Object(c.b)([this._padding.slice(e.length%this.wordSize),e])),e}},{key:"writeValue",value:function(t){return this._writeData(this._getValue(t))}},{key:"writeUpdatableValue",value:function(){var t=this,e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){t._data[e]=t._getValue(r)}}}]),t}(),Oh=function(){function t(e,r,n,o){bh(this,t),P(this,"_data",Object(c.a)(e)),P(this,"wordSize",r||32),P(this,"_coerceFunc",n),P(this,"allowLoose",o),this._offset=0}return _h(t,[{key:"data",get:function(){return Object(c.i)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(e,r){return this._coerceFunc?this._coerceFunc(e,r):t.coerce(e,r)}},{key:"_peekBytes",value:function(t,e,r){var n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:kh.throwError("data out-of-bounds",h.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(e){return new t(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(t,e){var r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}},{key:"readValue",value:function(){return g.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(t,e){var r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}}]),t}();function Sh(t){return(Sh="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 Ph(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)}}function Rh(t,e){return(Rh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function jh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ih(t);if(e){var o=Ih(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Th(this,r)}}function Th(t,e){if(e&&("object"===Sh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ih(t){return(Ih=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Nh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rh(t,e)}(i,t);var e,r,n,o=jh(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"address","address",t,!1)}return e=i,(r=[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(t,e){try{e=ut(e)}catch(t){this._throwError(t.message,e)}return t.writeValue(e)}},{key:"decode",value:function(t){return ut(Object(c.h)(t.readValue().toHexString(),20))}}])&&Ph(e.prototype,r),n&&Ph(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function Ch(t){return(Ch="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 Mh(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)}}function Bh(t,e){return(Bh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Uh(t);if(e){var o=Uh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Dh(this,r)}}function Dh(t,e){if(e&&("object"===Ch(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Uh(t){return(Uh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Lh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bh(t,e)}(i,t);var e,r,n,o=Fh(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t.name,t.type,void 0,t.dynamic)).coder=t,e}return e=i,(r=[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(t,e){return this.coder.encode(t,e)}},{key:"decode",value:function(t){return this.coder.decode(t)}}])&&Mh(e.prototype,r),n&&Mh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function zh(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)}}function Gh(t,e){return(Gh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Kh(t);if(e){var o=Kh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qh(this,r)}}function qh(t,e){if(e&&("object"===Vh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kh(t){return(Kh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Vh(t){return(Vh="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)}var Wh=new h.b("abi/5.7.0");function Qh(t,e,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===Vh(r)){var o={};n=e.map((function(t){var e=t.localName;return e||Wh.throwError("cannot encode object for signature with missing names",h.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),o[e]&&Wh.throwError("cannot encode object for signature with duplicate names",h.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),o[e]=!0,r[e]}))}else Wh.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Wh.throwArgumentError("types/value length mismatch","tuple",r);var i=new xh(t.wordSize),a=new xh(t.wordSize),s=[];e.forEach((function(t,e){var r=n[e];if(t.dynamic){var o=a.length;t.encode(a,r);var u=i.writeUpdatableValue();s.push((function(t){u(t+o)}))}else t.encode(i,r)})),s.forEach((function(t){t(i.length)}));var u=t.appendWriter(i);return u+=t.appendWriter(a)}function Jh(t,e){var r=[],n=t.subReader(0);e.forEach((function(e){var o=null;if(e.dynamic){var i=t.readValue(),a=n.subReader(i.toNumber());try{o=e.decode(a)}catch(t){if(t.code===h.b.errors.BUFFER_OVERRUN)throw t;(o=t).baseType=e.name,o.name=e.localName,o.type=e.type}}else try{o=e.decode(t)}catch(t){if(t.code===h.b.errors.BUFFER_OVERRUN)throw t;(o=t).baseType=e.name,o.name=e.localName,o.type=e.type}null!=o&&r.push(o)}));var o=e.reduce((function(t,e){var r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach((function(t,e){var n=t.localName;if(n&&1===o[n]&&("length"===n&&(n="_length"),null==r[n])){var i=r[e];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw i}}):r[n]=i}}));for(var i=function(t){var e=r[t];e instanceof Error&&Object.defineProperty(r,t,{enumerable:!0,get:function(){throw e}})},a=0;a<r.length;a++)i(a);return Object.freeze(r)}var Yh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gh(t,e)}(i,t);var e,r,n,o=Hh(i);function i(t,e,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var a=t.type+"["+(e>=0?e:"")+"]",s=-1===e||t.dynamic;return(n=o.call(this,"array",a,r,s)).coder=t,n.length=e,n}return e=i,(r=[{key:"defaultValue",value:function(){for(var t=this.coder.defaultValue(),e=[],r=0;r<this.length;r++)e.push(t);return e}},{key:"encode",value:function(t,e){Array.isArray(e)||this._throwError("expected array value",e);var r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),Wh.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));for(var n=[],o=0;o<e.length;o++)n.push(this.coder);return Qh(t,n,e)}},{key:"decode",value:function(t){var e=this.length;-1===e&&32*(e=t.readValue().toNumber())>t._data.length&&Wh.throwError("insufficient data length",h.b.errors.BUFFER_OVERRUN,{length:t._data.length,count:e});for(var r=[],n=0;n<e;n++)r.push(new Lh(this.coder));return t.coerce(this.name,Jh(t,r))}}])&&zh(e.prototype,r),n&&zh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function Zh(t){return(Zh="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 Xh(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)}}function $h(t,e){return($h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function tp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rp(t);if(e){var o=rp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ep(this,r)}}function ep(t,e){if(e&&("object"===Zh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rp(t){return(rp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var np=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$h(t,e)}(i,t);var e,r,n,o=tp(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"bool","bool",t,!1)}return e=i,(r=[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(t,e){return t.writeValue(e?1:0)}},{key:"decode",value:function(t){return t.coerce(this.type,!t.readValue().isZero())}}])&&Xh(e.prototype,r),n&&Xh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function op(t){return(op="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 ip(){return(ip="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ap(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function ap(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=dp(t)););return t}function sp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function up(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)}}function cp(t,e,r){return e&&up(t.prototype,e),r&&up(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function fp(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lp(t,e)}function lp(t,e){return(lp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function hp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=dp(t);if(e){var o=dp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pp(this,r)}}function pp(t,e){if(e&&("object"===op(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function dp(t){return(dp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var mp=function(t){fp(r,t);var e=hp(r);function r(t,n){return sp(this,r),e.call(this,t,t,n,!0)}return cp(r,[{key:"defaultValue",value:function(){return"0x"}},{key:"encode",value:function(t,e){e=Object(c.a)(e);var r=t.writeValue(e.length);return r+=t.writeBytes(e)}},{key:"decode",value:function(t){return t.readBytes(t.readValue().toNumber(),!0)}}]),r}(Eh),yp=function(t){fp(r,t);var e=hp(r);function r(t){return sp(this,r),e.call(this,"bytes",t)}return cp(r,[{key:"decode",value:function(t){return t.coerce(this.name,Object(c.i)(ip(dp(r.prototype),"decode",this).call(this,t)))}}]),r}(mp);function vp(t){return(vp="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 gp(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)}}function bp(t,e){return(bp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=kp(t);if(e){var o=kp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _p(this,r)}}function _p(t,e){if(e&&("object"===vp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kp(t){return(kp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ap=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bp(t,e)}(i,t);var e,r,n,o=wp(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n="bytes"+String(t);return(r=o.call(this,n,n,e,!1)).size=t,r}return e=i,(r=[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(t,e){var r=Object(c.a)(e);return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}},{key:"decode",value:function(t){return t.coerce(this.name,Object(c.i)(t.readBytes(this.size)))}}])&&gp(e.prototype,r),n&&gp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function Ep(t){return(Ep="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 xp(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)}}function Op(t,e){return(Op=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Sp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Rp(t);if(e){var o=Rp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Pp(this,r)}}function Pp(t,e){if(e&&("object"===Ep(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Rp(t){return(Rp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Op(t,e)}(i,t);var e,r,n,o=Sp(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"null","",t,!1)}return e=i,(r=[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}},{key:"decode",value:function(t){return t.readBytes(0),t.coerce(this.name,null)}}])&&xp(e.prototype,r),n&&xp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function Tp(t){return(Tp="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 Ip(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)}}function Np(t,e){return(Np=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Cp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Bp(t);if(e){var o=Bp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mp(this,r)}}function Mp(t,e){if(e&&("object"===Tp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Bp(t){return(Bp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Np(t,e)}(i,t);var e,r,n,o=Cp(i);function i(t,e,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var a=(e?"int":"uint")+8*t;return(n=o.call(this,a,a,r,!1)).size=t,n.signed=e,n}return e=i,(r=[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(t,e){var r=g.from(e),n=Me.mask(8*t.wordSize);if(this.signed){var o=n.mask(8*this.size-1);(r.gt(o)||r.lt(o.add(Ie).mul(je)))&&this._throwError("value out-of-bounds",e)}else(r.lt(Te)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(r)}},{key:"decode",value:function(t){var e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}])&&Ip(e.prototype,r),n&&Ip(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function Dp(t){return(Dp="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 Up(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)}}function Lp(){return(Lp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=zp(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function zp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kp(t)););return t}function Gp(t,e){return(Gp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Kp(t);if(e){var o=Kp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qp(this,r)}}function qp(t,e){if(e&&("object"===Dp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kp(t){return(Kp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Vp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gp(t,e)}(i,t);var e,r,n,o=Hp(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,"string",t)}return e=i,(r=[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(t,e){return Lp(Kp(i.prototype),"encode",this).call(this,t,bt(e))}},{key:"decode",value:function(t){return At(Lp(Kp(i.prototype),"decode",this).call(this,t))}}])&&Up(e.prototype,r),n&&Up(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(mp);function Wp(t){return(Wp="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 Qp(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)}}function Jp(t,e){return(Jp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Yp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xp(t);if(e){var o=Xp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zp(this,r)}}function Zp(t,e){if(e&&("object"===Wp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xp(t){return(Xp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jp(t,e)}(i,t);var e,r,n,o=Yp(i);function i(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n=!1,a=[];t.forEach((function(t){t.dynamic&&(n=!0),a.push(t.type)}));var s="tuple("+a.join(",")+")";return(r=o.call(this,"tuple",s,e,n)).coders=t,r}return e=i,(r=[{key:"defaultValue",value:function(){var t=[];this.coders.forEach((function(e){t.push(e.defaultValue())}));var e=this.coders.reduce((function(t,e){var r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach((function(r,n){var o=r.localName;o&&1===e[o]&&("length"===o&&(o="_length"),null==t[o]&&(t[o]=t[n]))})),Object.freeze(t)}},{key:"encode",value:function(t,e){return Qh(t,this.coders,e)}},{key:"decode",value:function(t){return t.coerce(this.name,Jh(t,this.coders))}}])&&Qp(e.prototype,r),n&&Qp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function td(t){return(td="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 ed(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rd(t,e)}function rd(t,e){return(rd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=id(t);if(e){var o=id(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return od(this,r)}}function od(t,e){if(e&&("object"===td(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function id(t){return(id=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ad(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sd(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)}}function ud(t,e,r){return e&&sd(t.prototype,e),r&&sd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var cd=new h.b("abi/5.7.0"),fd={},ld={calldata:!0,memory:!0,storage:!0},hd={calldata:!0,memory:!0};function pd(t,e){if("bytes"===t||"string"===t){if(ld[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&hd[e])return!0;return(ld[e]||"payable"===e)&&cd.throwArgumentError("invalid modifier","name",e),!1}function dd(t,e){for(var r in e)P(t,r,e[r])}var md=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),yd=new RegExp(/^(.*)\[([0-9]*)\]$/),vd=function(){function t(e,r){ad(this,t),e!==fd&&cd.throwError("use fromString",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),dd(this,r);var n=this.type.match(yd);dd(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:t.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return ud(t,[{key:"format",value:function(t){if(t||(t=md.sighash),md[t]||cd.throwArgumentError("invalid format type","format",t),t===md.json){var e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((function(e){return JSON.parse(e.format(t))}))),JSON.stringify(e)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(t),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==md.sighash&&(r+=this.type),r+="("+this.components.map((function(e){return e.format(t)})).join(t===md.full?", ":",")+")"):r+=this.type,t!==md.sighash&&(!0===this.indexed&&(r+=" indexed"),t===md.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(e,r){return"string"==typeof e?t.fromString(e,r):t.fromObject(e)}},{key:"fromObject",value:function(e){return t.isParamType(e)?e:new t(fd,{name:e.name||null,type:Pd(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(t.fromObject):null})}},{key:"fromString",value:function(e,r){return function(e){return t.fromObject({name:e.name,type:e.type,indexed:e.indexed,components:e.components})}(function(t,e){var r=t;function n(e){cd.throwArgumentError("unexpected character at position ".concat(e),"param",t)}function o(t){var r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},a=i,s=0;s<t.length;s++){var u=t[s];switch(u){case"(":a.state.allowType&&""===a.type?a.type="tuple":a.state.allowParams||n(s),a.state.allowType=!1,a.type=Pd(a.type),a.components=[o(a)],a=a.components[0];break;case")":delete a.state,"indexed"===a.name&&(e||n(s),a.indexed=!0,a.name=""),pd(a.type,a.name)&&(a.name=""),a.type=Pd(a.type);var c=a;(a=a.parent)||n(s),delete c.parent,a.state.allowParams=!1,a.state.allowName=!0,a.state.allowArray=!0;break;case",":delete a.state,"indexed"===a.name&&(e||n(s),a.indexed=!0,a.name=""),pd(a.type,a.name)&&(a.name=""),a.type=Pd(a.type);var f=o(a.parent);a.parent.components.push(f),delete a.parent,a=f;break;case" ":a.state.allowType&&""!==a.type&&(a.type=Pd(a.type),delete a.state.allowType,a.state.allowName=!0,a.state.allowParams=!0),a.state.allowName&&""!==a.name&&("indexed"===a.name?(e||n(s),a.indexed&&n(s),a.indexed=!0,a.name=""):pd(a.type,a.name)?a.name="":a.state.allowName=!1);break;case"[":a.state.allowArray||n(s),a.type+=u,a.state.allowArray=!1,a.state.allowName=!1,a.state.readArray=!0;break;case"]":a.state.readArray||n(s),a.type+=u,a.state.readArray=!1,a.state.allowArray=!0,a.state.allowName=!0;break;default:a.state.allowType?(a.type+=u,a.state.allowParams=!0,a.state.allowArray=!0):a.state.allowName?(a.name+=u,delete a.state.allowArray):a.state.readArray?a.type+=u:n(s)}}return a.parent&&cd.throwArgumentError("unexpected eof","param",t),delete i.state,"indexed"===a.name?(e||n(r.length-7),a.indexed&&n(r.length-7),a.indexed=!0,a.name=""):pd(a.type,a.name)&&(a.name=""),i.type=Pd(i.type),i}(e,!!r))}},{key:"isParamType",value:function(t){return!(null==t||!t._isParamType)}}]),t}();function gd(t,e){return function(t){t=t.trim();for(var e=[],r="",n=0,o=0;o<t.length;o++){var i=t[o];","===i&&0===n?(e.push(r),r=""):(r+=i,"("===i?n++:")"===i&&-1===--n&&cd.throwArgumentError("unbalanced parenthesis","value",t))}r&&e.push(r);return e}(t).map((function(t){return vd.fromString(t,e)}))}var bd=function(){function t(e,r){ad(this,t),e!==fd&&cd.throwError("use a static from method",h.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),dd(this,r),this._isFragment=!0,Object.freeze(this)}return ud(t,null,[{key:"from",value:function(e){return t.isFragment(e)?e:"string"==typeof e?t.fromString(e):t.fromObject(e)}},{key:"fromObject",value:function(e){if(t.isFragment(e))return e;switch(e.type){case"function":return xd.fromObject(e);case"event":return wd.fromObject(e);case"constructor":return Ed.fromObject(e);case"error":return Sd.fromObject(e);case"fallback":case"receive":return null}return cd.throwArgumentError("invalid fragment object","value",e)}},{key:"fromString",value:function(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?wd.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?xd.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?Ed.fromString(t.trim()):"error"===t.split(" ")[0]?Sd.fromString(t.substring(5).trim()):cd.throwArgumentError("unsupported fragment","value",t)}},{key:"isFragment",value:function(t){return!(!t||!t._isFragment)}}]),t}(),wd=function(t){ed(r,t);var e=nd(r);function r(){return ad(this,r),e.apply(this,arguments)}return ud(r,[{key:"format",value:function(t){if(t||(t=md.sighash),md[t]||cd.throwArgumentError("invalid format type","format",t),t===md.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))}))});var e="";return t!==md.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((function(e){return e.format(t)})).join(t===md.full?", ":",")+") ",t!==md.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isEventFragment(t))return t;"event"!==t.type&&cd.throwArgumentError("invalid event object","value",t);var e={name:jd(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(vd.fromObject):[],type:"event"};return new r(fd,e)}},{key:"fromString",value:function(t){var e=t.match(Td);e||cd.throwArgumentError("invalid event string","value",t);var n=!1;return e[3].split(" ").forEach((function(t){switch(t.trim()){case"anonymous":n=!0;break;case"":break;default:cd.warn("unknown modifier: "+t)}})),r.fromObject({name:e[1].trim(),anonymous:n,inputs:gd(e[2],!0),type:"event"})}},{key:"isEventFragment",value:function(t){return t&&t._isFragment&&"event"===t.type}}]),r}(bd);function _d(t,e){e.gas=null;var r=t.split("@");return 1!==r.length?(r.length>2&&cd.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||cd.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=g.from(r[1]),r[0]):t}function kd(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((function(t){switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function Ad(t){var e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&cd.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&cd.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||cd.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&cd.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&cd.throwArgumentError("unable to determine stateMutability","value",t),e}var Ed=function(t){ed(r,t);var e=nd(r);function r(){return ad(this,r),e.apply(this,arguments)}return ud(r,[{key:"format",value:function(t){if(t||(t=md.sighash),md[t]||cd.throwArgumentError("invalid format type","format",t),t===md.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))}))});t===md.sighash&&cd.throwError("cannot format a constructor for sighash",h.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var e="constructor("+this.inputs.map((function(e){return e.format(t)})).join(t===md.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isConstructorFragment(t))return t;"constructor"!==t.type&&cd.throwArgumentError("invalid constructor object","value",t);var e=Ad(t);e.constant&&cd.throwArgumentError("constructor cannot be constant","value",t);var n={name:null,type:t.type,inputs:t.inputs?t.inputs.map(vd.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?g.from(t.gas):null};return new r(fd,n)}},{key:"fromString",value:function(t){var e={type:"constructor"},n=(t=_d(t,e)).match(Td);return n&&"constructor"===n[1].trim()||cd.throwArgumentError("invalid constructor string","value",t),e.inputs=gd(n[2].trim(),!1),kd(n[3].trim(),e),r.fromObject(e)}},{key:"isConstructorFragment",value:function(t){return t&&t._isFragment&&"constructor"===t.type}}]),r}(bd),xd=function(t){ed(r,t);var e=nd(r);function r(){return ad(this,r),e.apply(this,arguments)}return ud(r,[{key:"format",value:function(t){if(t||(t=md.sighash),md[t]||cd.throwArgumentError("invalid format type","format",t),t===md.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))})),outputs:this.outputs.map((function(e){return JSON.parse(e.format(t))}))});var e="";return t!==md.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((function(e){return e.format(t)})).join(t===md.full?", ":",")+") ",t!==md.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((function(e){return e.format(t)})).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isFunctionFragment(t))return t;"function"!==t.type&&cd.throwArgumentError("invalid function object","value",t);var e=Ad(t),n={type:t.type,name:jd(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(vd.fromObject):[],outputs:t.outputs?t.outputs.map(vd.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?g.from(t.gas):null};return new r(fd,n)}},{key:"fromString",value:function(t){var e={type:"function"},n=(t=_d(t,e)).split(" returns ");n.length>2&&cd.throwArgumentError("invalid function string","value",t);var o=n[0].match(Td);if(o||cd.throwArgumentError("invalid function signature","value",t),e.name=o[1].trim(),e.name&&jd(e.name),e.inputs=gd(o[2],!1),kd(o[3].trim(),e),n.length>1){var i=n[1].match(Td);""==i[1].trim()&&""==i[3].trim()||cd.throwArgumentError("unexpected tokens","value",t),e.outputs=gd(i[2],!1)}else e.outputs=[];return r.fromObject(e)}},{key:"isFunctionFragment",value:function(t){return t&&t._isFragment&&"function"===t.type}}]),r}(Ed);function Od(t){var e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||cd.throwArgumentError("cannot specify user defined ".concat(e," error"),"fragment",t),t}var Sd=function(t){ed(r,t);var e=nd(r);function r(){return ad(this,r),e.apply(this,arguments)}return ud(r,[{key:"format",value:function(t){if(t||(t=md.sighash),md[t]||cd.throwArgumentError("invalid format type","format",t),t===md.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(e){return JSON.parse(e.format(t))}))});var e="";return t!==md.sighash&&(e+="error "),(e+=this.name+"("+this.inputs.map((function(e){return e.format(t)})).join(t===md.full?", ":",")+") ").trim()}}],[{key:"from",value:function(t){return"string"==typeof t?r.fromString(t):r.fromObject(t)}},{key:"fromObject",value:function(t){if(r.isErrorFragment(t))return t;"error"!==t.type&&cd.throwArgumentError("invalid error object","value",t);var e={type:t.type,name:jd(t.name),inputs:t.inputs?t.inputs.map(vd.fromObject):[]};return Od(new r(fd,e))}},{key:"fromString",value:function(t){var e={type:"error"},n=t.match(Td);return n||cd.throwArgumentError("invalid error signature","value",t),e.name=n[1].trim(),e.name&&jd(e.name),e.inputs=gd(n[2],!1),Od(r.fromObject(e))}},{key:"isErrorFragment",value:function(t){return t&&t._isFragment&&"error"===t.type}}]),r}(bd);function Pd(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}var Rd=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function jd(t){return t&&t.match(Rd)||cd.throwArgumentError('invalid identifier "'.concat(t,'"'),"value",t),t}var Td=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Id(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)}}var Nd=new h.b("abi/5.7.0"),Cd=new RegExp(/^bytes([0-9]*)$/),Md=new RegExp(/^(u?int)([0-9]*)$/),Bd=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),P(this,"coerceFunc",e||null)}var e,r,n;return e=t,(r=[{key:"_getCoder",value:function(t){var e=this;switch(t.baseType){case"address":return new Nh(t.name);case"bool":return new np(t.name);case"string":return new Vp(t.name);case"bytes":return new yp(t.name);case"array":return new Yh(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new $p((t.components||[]).map((function(t){return e._getCoder(t)})),t.name);case"":return new jp(t.name)}var r=t.type.match(Md);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!=0)&&Nd.throwArgumentError("invalid "+r[1]+" bit length","param",t),new Fp(n/8,"int"===r[1],t.name)}if(r=t.type.match(Cd)){var o=parseInt(r[1]);return(0===o||o>32)&&Nd.throwArgumentError("invalid bytes length","param",t),new Ap(o,t.name)}return Nd.throwArgumentError("invalid type","type",t.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(t,e){return new Oh(t,this._getWordSize(),this.coerceFunc,e)}},{key:"_getWriter",value:function(){return new xh(this._getWordSize())}},{key:"getDefaultValue",value:function(t){var e=this,r=t.map((function(t){return e._getCoder(vd.from(t))}));return new $p(r,"_").defaultValue()}},{key:"encode",value:function(t,e){var r=this;t.length!==e.length&&Nd.throwError("types/values length mismatch",h.b.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});var n=t.map((function(t){return r._getCoder(vd.from(t))})),o=new $p(n,"_"),i=this._getWriter();return o.encode(i,e),i.data}},{key:"decode",value:function(t,e,r){var n=this,o=t.map((function(t){return n._getCoder(vd.from(t))}));return new $p(o,"_").decode(this._getReader(Object(c.a)(e),r))}}])&&Id(e.prototype,r),n&&Id(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Fd=new Bd;function Dd(t){return(Dd="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 Ud(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)}}function Ld(t,e,r){return e&&Ud(t.prototype,e),r&&Ud(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function zd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gd(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hd(t,e)}function Hd(t,e){return(Hd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Vd(t);if(e){var o=Vd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Kd(this,r)}}function Kd(t,e){if(e&&("object"===Dd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Vd(t){return(Vd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wd=new h.b("abi/5.7.0"),Qd=function(t){Gd(r,t);var e=qd(r);function r(){return zd(this,r),e.apply(this,arguments)}return Ld(r)}(B),Jd=function(t){Gd(r,t);var e=qd(r);function r(){return zd(this,r),e.apply(this,arguments)}return Ld(r)}(B),Yd=function(t){Gd(r,t);var e=qd(r);function r(){return zd(this,r),e.apply(this,arguments)}return Ld(r)}(B),Zd=function(t){Gd(r,t);var e=qd(r);function r(){return zd(this,r),e.apply(this,arguments)}return Ld(r,null,[{key:"isIndexed",value:function(t){return!(!t||!t._isIndexed)}}]),r}(B),Xd={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function $d(t,e){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(t));return r.error=e,r}var tm=function(){function t(e){var r=this;zd(this,t);P(this,"fragments",("string"==typeof e?JSON.parse(e):e).map((function(t){return bd.from(t)})).filter((function(t){return null!=t}))),P(this,"_abiCoder",R(this instanceof t?this.constructor:void 0,"getAbiCoder")()),P(this,"functions",{}),P(this,"errors",{}),P(this,"events",{}),P(this,"structs",{}),this.fragments.forEach((function(t){var e=null;switch(t.type){case"constructor":return r.deploy?void Wd.warn("duplicate definition - constructor"):void P(r,"deploy",t);case"function":e=r.functions;break;case"event":e=r.events;break;case"error":e=r.errors;break;default:return}var n=t.format();e[n]?Wd.warn("duplicate definition - "+n):e[n]=t})),this.deploy||P(this,"deploy",Ed.from({payable:!1,type:"constructor"})),P(this,"_isInterface",!0)}return Ld(t,[{key:"format",value:function(t){t||(t=md.full),t===md.sighash&&Wd.throwArgumentError("interface does not support formatting sighash","format",t);var e=this.fragments.map((function(e){return e.format(t)}));return t===md.json?JSON.stringify(e.map((function(t){return JSON.parse(t)}))):e}},{key:"getFunction",value:function(t){if(Object(c.l)(t)){for(var e in this.functions)if(t===this.getSighash(e))return this.functions[e];Wd.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){var r=t.trim(),n=Object.keys(this.functions).filter((function(t){return t.split("(")[0]===r}));return 0===n.length?Wd.throwArgumentError("no matching function","name",r):n.length>1&&Wd.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var o=this.functions[xd.fromString(t).format()];return o||Wd.throwArgumentError("no matching function","signature",t),o}},{key:"getEvent",value:function(t){if(Object(c.l)(t)){var e=t.toLowerCase();for(var r in this.events)if(e===this.getEventTopic(r))return this.events[r];Wd.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){var n=t.trim(),o=Object.keys(this.events).filter((function(t){return t.split("(")[0]===n}));return 0===o.length?Wd.throwArgumentError("no matching event","name",n):o.length>1&&Wd.throwArgumentError("multiple matching events","name",n),this.events[o[0]]}var i=this.events[wd.fromString(t).format()];return i||Wd.throwArgumentError("no matching event","signature",t),i}},{key:"getError",value:function(t){if(Object(c.l)(t)){var e=R(this.constructor,"getSighash");for(var r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}Wd.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){var n=t.trim(),o=Object.keys(this.errors).filter((function(t){return t.split("(")[0]===n}));return 0===o.length?Wd.throwArgumentError("no matching error","name",n):o.length>1&&Wd.throwArgumentError("multiple matching errors","name",n),this.errors[o[0]]}var i=this.errors[xd.fromString(t).format()];return i||Wd.throwArgumentError("no matching error","signature",t),i}},{key:"getSighash",value:function(t){if("string"==typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(t){throw e}}return R(this.constructor,"getSighash")(t)}},{key:"getEventTopic",value:function(t){return"string"==typeof t&&(t=this.getEvent(t)),R(this.constructor,"getEventTopic")(t)}},{key:"_decodeParams",value:function(t,e){return this._abiCoder.decode(t,e)}},{key:"_encodeParams",value:function(t,e){return this._abiCoder.encode(t,e)}},{key:"encodeDeploy",value:function(t){return this._encodeParams(this.deploy.inputs,t||[])}},{key:"decodeErrorResult",value:function(t,e){"string"==typeof t&&(t=this.getError(t));var r=Object(c.a)(e);return Object(c.i)(r.slice(0,4))!==this.getSighash(t)&&Wd.throwArgumentError("data signature does not match error ".concat(t.name,"."),"data",Object(c.i)(r)),this._decodeParams(t.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(t,e){return"string"==typeof t&&(t=this.getError(t)),Object(c.i)(Object(c.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}},{key:"decodeFunctionData",value:function(t,e){"string"==typeof t&&(t=this.getFunction(t));var r=Object(c.a)(e);return Object(c.i)(r.slice(0,4))!==this.getSighash(t)&&Wd.throwArgumentError("data signature does not match function ".concat(t.name,"."),"data",Object(c.i)(r)),this._decodeParams(t.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(t,e){return"string"==typeof t&&(t=this.getFunction(t)),Object(c.i)(Object(c.b)([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}},{key:"decodeFunctionResult",value:function(t,e){"string"==typeof t&&(t=this.getFunction(t));var r=Object(c.a)(e),n=null,o="",i=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(l){}break;case 4:var u=Object(c.i)(r.slice(0,4)),f=Xd[u];if(f)i=this._abiCoder.decode(f.inputs,r.slice(4)),a=f.name,s=f.signature,f.reason&&(n=i[0]),"Error"===a?o="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(i[0])):"Panic"===a&&(o="; VM Exception while processing transaction: reverted with panic code ".concat(i[0]));else try{var l=this.getError(u);i=this._abiCoder.decode(l.inputs,r.slice(4)),a=l.name,s=l.format()}catch(l){}}return Wd.throwError("call revert exception"+o,h.b.errors.CALL_EXCEPTION,{method:t.format(),data:Object(c.i)(e),errorArgs:i,errorName:a,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(t,e){return"string"==typeof t&&(t=this.getFunction(t)),Object(c.i)(this._abiCoder.encode(t.outputs,e||[]))}},{key:"encodeFilterTopics",value:function(t,e){var r=this;"string"==typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&Wd.throwError("too many arguments for "+t.format(),h.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});var n=[];t.anonymous||n.push(this.getEventTopic(t));var o=function(t,e){return"string"===t.type?xt(e):"bytes"===t.type?V(Object(c.i)(e)):("bool"===t.type&&"boolean"==typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=g.from(e).toHexString()),"address"===t.type&&r._abiCoder.encode(["address"],[e]),Object(c.h)(Object(c.i)(e),32))};for(e.forEach((function(e,r){var i=t.inputs[r];i.indexed?null==e?n.push(null):"array"===i.baseType||"tuple"===i.baseType?Wd.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,e):Array.isArray(e)?n.push(e.map((function(t){return o(i,t)}))):n.push(o(i,e)):null!=e&&Wd.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,e)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(t,e){var r=this;"string"==typeof t&&(t=this.getEvent(t));var n=[],o=[],i=[];return t.anonymous||n.push(this.getEventTopic(t)),e.length!==t.inputs.length&&Wd.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach((function(t,a){var s=e[a];if(t.indexed)if("string"===t.type)n.push(xt(s));else if("bytes"===t.type)n.push(V(s));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([t.type],[s]))}else o.push(t),i.push(s)})),{data:this._abiCoder.encode(o,i),topics:n}}},{key:"decodeEventLog",value:function(t,e,r){if("string"==typeof t&&(t=this.getEvent(t)),null!=r&&!t.anonymous){var n=this.getEventTopic(t);Object(c.l)(r[0],32)&&r[0].toLowerCase()===n||Wd.throwError("fragment/topic mismatch",h.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var o=[],i=[],a=[];t.inputs.forEach((function(t,e){t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(o.push(vd.fromObject({type:"bytes32",name:t.name})),a.push(!0)):(o.push(t),a.push(!1)):(i.push(t),a.push(!1))}));var s=null!=r?this._abiCoder.decode(o,Object(c.b)(r)):null,u=this._abiCoder.decode(i,e,!0),f=[],l=0,p=0;t.inputs.forEach((function(t,e){if(t.indexed)if(null==s)f[e]=new Zd({_isIndexed:!0,hash:null});else if(a[e])f[e]=new Zd({_isIndexed:!0,hash:s[p++]});else try{f[e]=s[p++]}catch(t){f[e]=t}else try{f[e]=u[l++]}catch(t){f[e]=t}if(t.name&&null==f[t.name]){var r=f[e];r instanceof Error?Object.defineProperty(f,t.name,{enumerable:!0,get:function(){throw $d("property ".concat(JSON.stringify(t.name)),r)}}):f[t.name]=r}}));for(var d=function(t){var e=f[t];e instanceof Error&&Object.defineProperty(f,t,{enumerable:!0,get:function(){throw $d("index ".concat(t),e)}})},m=0;m<f.length;m++)d(m);return Object.freeze(f)}},{key:"parseTransaction",value:function(t){var e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new Jd({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:g.from(t.value||"0")}):null}},{key:"parseLog",value:function(t){var e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new Qd({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}},{key:"parseError",value:function(t){var e=Object(c.i)(t),r=this.getError(e.substring(0,10).toLowerCase());return r?new Yd({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}}],[{key:"getAbiCoder",value:function(){return Fd}},{key:"getAddress",value:function(t){return ut(t)}},{key:"getSighash",value:function(t){return Object(c.e)(xt(t.format()),0,4)}},{key:"getEventTopic",value:function(t){return xt(t.format())}},{key:"isInterface",value:function(t){return!(!t||!t._isInterface)}}]),t}(),em=new RegExp("^bytes([0-9]+)$"),rm=new RegExp("^(u?int)([0-9]*)$"),nm=new RegExp("^(.*)\\[([0-9]*)\\]$"),om=new h.b("solidity/5.7.0");function im(t,e){t.length!=e.length&&om.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);var r=[];return t.forEach((function(t,n){r.push(function t(e,r,n){switch(e){case"address":return n?Object(c.p)(r,32):Object(c.a)(r);case"string":return bt(r);case"bytes":return Object(c.a)(r);case"bool":return r=r?"0x01":"0x00",n?Object(c.p)(r,32):Object(c.a)(r)}var o=e.match(rm);if(o){var i=parseInt(o[2]||"256");return(o[2]&&String(i)!==o[2]||i%8!=0||0===i||i>256)&&om.throwArgumentError("invalid number type","type",e),n&&(i=256),r=g.from(r).toTwos(i),Object(c.p)(r,i/8)}if(o=e.match(em)){var a=parseInt(o[1]);return(String(a)!==o[1]||0===a||a>32)&&om.throwArgumentError("invalid bytes type","type",e),Object(c.a)(r).byteLength!==a&&om.throwArgumentError("invalid value for ".concat(e),"value",r),n?Object(c.a)((r+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):r}if((o=e.match(nm))&&Array.isArray(r)){var s=o[1];parseInt(o[2]||String(r.length))!=r.length&&om.throwArgumentError("invalid array length for ".concat(e),"value",r);var u=[];return r.forEach((function(e){u.push(t(s,e,!0))})),Object(c.b)(u)}return om.throwArgumentError("invalid type","type",e)}(t,e[n]))})),Object(c.i)(Object(c.b)(r))}function am(t,e){return V(im(t,e))}function sm(t,e){return Pi(im(t,e))}function um(t,e){e||(e=function(t){return[parseInt(t,16)]});var r=0,n={};return t.split(",").forEach((function(t){var o=t.split(":");r+=parseInt(o[0],16),n[r]=e(o[1])})),n}function cm(t){var e=0;return t.split(",").map((function(t){var r=t.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:e+parseInt(r[0],16),h:e=parseInt(r[1],16)}}))}function fm(t,e){for(var r=0,n=0;n<e.length;n++){var o=e[n];if(t>=(r+=o.l)&&t<=r+o.h&&(t-r)%(o.d||1)==0){if(o.e&&-1!==o.e.indexOf(t-r))continue;return o}}return null}var lm=cm("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),hm="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(t){return parseInt(t,16)})),pm=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],dm=um("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),mm=um("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),ym=um("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(t){if(t.length%4!=0)throw new Error("bad data");for(var e=[],r=0;r<t.length;r+=4)e.push(parseInt(t.substring(r,r+4),16));return e})),vm=cm("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function gm(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();var e,r=Et(t);e=r.map((function(t){if(hm.indexOf(t)>=0)return[];if(t>=65024&&t<=65039)return[];var e=function(t){var e=fm(t,pm);if(e)return[t+e.s];var r=dm[t];if(r)return r;var n=mm[t];if(n)return[t+n[0]];var o=ym[t];return o||null}(t);return e||[t]})),(r=Et(kt(r=e.reduce((function(t,e){return e.forEach((function(e){t.push(e)})),t}),[])),pt.NFKC)).forEach((function(t){if(fm(t,vm))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(t){if(fm(t,lm))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var n=kt(r);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}function bm(t){var e=bt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Object(c.i)(Object(c.b)([e,as]).slice(0,32))}function wm(t){var e=Object(c.a)(t);if(32!==e.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==e[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===e[r-1];)r--;return At(e.slice(0,r))}var _m=new h.b("units/5.7.0"),km=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Am(t){var e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||"."===t||"-."===t)&&_m.throwArgumentError("invalid value","value",t);var r=e[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");var o="";for(2===e.length&&(o="."+(e[1]||"0"));o.length>2&&"0"===o[o.length-1];)o=o.substring(0,o.length-1);for(var i=[];r.length;){if(r.length<=3){i.unshift(r);break}var a=r.length-3;i.unshift(r.substring(a)),r=r.substring(0,a)}return n+i.join(",")+o}function Em(t,e){if("string"==typeof e){var r=km.indexOf(e);-1!==r&&(e=3*r)}return Yo(t,null!=e?e:18)}function xm(t,e){if("string"!=typeof t&&_m.throwArgumentError("value must be a string","value",t),"string"==typeof e){var r=km.indexOf(e);-1!==r&&(e=3*r)}return Zo(t,null!=e?e:18)}function Om(t){return Em(t,18)}function Sm(t){return xm(t,18)}var Pm="ethers/5.7.2",Rm=new h.b(Pm);try{var jm=window;null==jm._ethers&&(jm._ethers=u)}catch(t){}},,,function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(0),o=r(1),i=r(34),a=new o.b(i.a);var s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}(),u=s.crypto||s.msCrypto;function c(t){(t<=0||t>1024||t%1||t!=t)&&a.throwArgumentError("invalid length","length",t);var e=new Uint8Array(t);return u.getRandomValues(e),Object(n.a)(e)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(t){return a.throwError("no secure random source avaialble",o.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(9))}])}));
|