parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"EW12":[function(require,module,exports) {
"use strict";let e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;class t{constructor(t){e=t}get(t){return e("pub(accounts.list)",{anyType:t})}subscribe(t){return e("pub(accounts.subscribe)",null,t).catch(e=>console.error(e)),()=>{}}}exports.default=t;
},{}],"adMO":[function(require,module,exports) {
"use strict";let e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;class t{constructor(t){e=t}get(){return e("pub(metadata.list)")}provide(t){return e("pub(metadata.provide)",t)}}exports.default=t;
},{}],"VCN6":[function(require,module,exports) {
"use strict";function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"HsZ4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;var e=0;function t(t){return"__private_"+e+++"_"+t}
},{}],"JJlS":[function(require,module,exports) {
"use strict";var e=Object.prototype.hasOwnProperty,t="~";function n(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,n,o,s,i){if("function"!=typeof o)throw new TypeError("The listener must be a function");var c=new r(o,s||e,i),f=t?t+n:n;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],c]:e._events[f].push(c):(e._events[f]=c,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function i(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(t=!1)),i.prototype.eventNames=function(){var n,r,o=[];if(0===this._eventsCount)return o;for(r in n=this._events)e.call(n,r)&&o.push(t?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(n)):o},i.prototype.listeners=function(e){var n=t?t+e:e,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,i=new Array(s);o<s;o++)i[o]=r[o].fn;return i},i.prototype.listenerCount=function(e){var n=t?t+e:e,r=this._events[n];return r?r.fn?1:r.length:0},i.prototype.emit=function(e,n,r,o,s,i){var c=t?t+e:e;if(!this._events[c])return!1;var f,u,a=this._events[c],l=arguments.length;if(a.fn){switch(a.once&&this.removeListener(e,a.fn,void 0,!0),l){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,n),!0;case 3:return a.fn.call(a.context,n,r),!0;case 4:return a.fn.call(a.context,n,r,o),!0;case 5:return a.fn.call(a.context,n,r,o,s),!0;case 6:return a.fn.call(a.context,n,r,o,s,i),!0}for(u=1,f=new Array(l-1);u<l;u++)f[u-1]=arguments[u];a.fn.apply(a.context,f)}else{var v,h=a.length;for(u=0;u<h;u++)switch(a[u].once&&this.removeListener(e,a[u].fn,void 0,!0),l){case 1:a[u].fn.call(a[u].context);break;case 2:a[u].fn.call(a[u].context,n);break;case 3:a[u].fn.call(a[u].context,n,r);break;case 4:a[u].fn.call(a[u].context,n,r,o);break;default:if(!f)for(v=1,f=new Array(l-1);v<l;v++)f[v-1]=arguments[v];a[u].fn.apply(a[u].context,f)}}return!0},i.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},i.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},i.prototype.removeListener=function(e,n,r,o){var i=t?t+e:e;if(!this._events[i])return this;if(!n)return s(this,i),this;var c=this._events[i];if(c.fn)c.fn!==n||o&&!c.once||r&&c.context!==r||s(this,i);else{for(var f=0,u=[],a=c.length;f<a;f++)(c[f].fn!==n||o&&!c[f].once||r&&c[f].context!==r)&&u.push(c[f]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},i.prototype.removeAllListeners=function(e){var r;return e?(r=t?t+e:e,this._events[r]&&s(this,r)):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=t,i.EventEmitter=i,"undefined"!=typeof module&&(module.exports=i);
},{}],"Z5FL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.packageInfo=void 0;var e={name:"@polkadot/x-global",version:"6.11.1"};exports.packageInfo=e;
},{}],"c2D8":[function(require,module,exports) {
var global = arguments[3];
var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"packageInfo",{enumerable:!0,get:function(){return o.packageInfo}}),exports.xglobal=void 0;var o=require("./packageInfo.js"),n="undefined"!=typeof globalThis?globalThis:void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;exports.xglobal=n;
},{"./packageInfo.js":"Z5FL"}],"gMZg":[function(require,module,exports) {
"use strict";function e(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function r(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextDecoder=void 0;var n=function(){function r(t){e(this,r)}return t(r,[{key:"decode",value:function(e){return e.reduce(function(e,r){return e+String.fromCharCode(r)},"")}}]),r}();exports.TextDecoder=n;
},{}],"OKf9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.packageInfo=void 0;var e={name:"@polkadot/x-textdecoder",version:"6.11.1"};exports.packageInfo=e;
},{}],"BOVF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextDecoder=void 0,Object.defineProperty(exports,"packageInfo",{enumerable:!0,get:function(){return o.packageInfo}});var e=require("@polkadot/x-global"),r=require("./fallback.js"),o=require("./packageInfo.js"),t=void 0===e.xglobal.TextDecoder?r.TextDecoder:e.xglobal.TextDecoder;exports.TextDecoder=t;
},{"@polkadot/x-global":"c2D8","./fallback.js":"gMZg","./packageInfo.js":"OKf9"}],"Sc5f":[function(require,module,exports) {
"use strict";function e(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function r(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextEncoder=void 0;var n=function(){function r(){e(this,r)}return t(r,[{key:"encode",value:function(e){for(var r=new Uint8Array(e.length),t=0;t<e.length;t++)r[t]=e.charCodeAt(t);return r}}]),r}();exports.TextEncoder=n;
},{}],"Bvg4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.packageInfo=void 0;var e={name:"@polkadot/x-textencoder",version:"6.11.1"};exports.packageInfo=e;
},{}],"wmao":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextEncoder=void 0,Object.defineProperty(exports,"packageInfo",{enumerable:!0,get:function(){return o.packageInfo}});var e=require("@polkadot/x-global"),r=require("./fallback.js"),o=require("./packageInfo.js"),t=void 0===e.xglobal.TextEncoder?r.TextEncoder:e.xglobal.TextEncoder;exports.TextEncoder=t;
},{"@polkadot/x-global":"c2D8","./fallback.js":"Sc5f","./packageInfo.js":"Bvg4"}],"WiBo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.packageInfo=void 0;var e={name:"@polkadot/util",version:"6.11.1"};exports.packageInfo=e;
},{}],"XXEF":[function(require,module,exports) {
"use strict";function e(e){return"function"==typeof e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isFunction=e;
},{}],"zz6S":[function(require,module,exports) {
"use strict";function e(e){return"string"==typeof e||e instanceof String}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isString=e;
},{}],"QCwi":[function(require,module,exports) {
"use strict";function e(e){return void 0===e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isUndefined=e;
},{}],"ICoQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assert=n,exports.assertReturn=s;var e=require("./is/function.js"),r=require("./is/undefined.js");function n(r,n){if(!r)throw new Error((0,e.isFunction)(n)?n():n)}function s(e,s){return n(!(0,r.isUndefined)(e),s),e}
},{"./is/function.js":"XXEF","./is/undefined.js":"QCwi"}],"AgAp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.detectPackage=l;var n=require("@polkadot/x-global"),t=require("./is/function.js"),e=require("./is/string.js"),r=require("./assert.js"),o="Either remove and explicitly install matching versions or dedupe using your package manager.\nThe following conflicting packages were found:";function a(t){var e=n.xglobal;return e.__polkadotjs||(e.__polkadotjs={}),e.__polkadotjs[t]||(e.__polkadotjs[t]=[]),e.__polkadotjs[t]}function i(n){return n.reduce(function(n,t){var e=t.version;return Math.max(n,e.length)},0)}function c(n){var t=i(n);return n.map(function(n){var e=n.name,r=n.version;return"\t".concat(r.padEnd(t),"\t").concat(e)}).join("\n")}function s(n){var t=n.map(function(n){return(0,e.isString)(n)?{version:n}:n}),r=i(t);return t.map(function(n){var t=n.path,e=n.version;return"\t".concat(e.padEnd(r),"\t").concat(!t||t.length<5?"<unknown>":t)}).join("\n")}function u(n){if((0,t.isFunction)(n))try{return n()||""}catch(e){return""}return n||""}function l(n,t){var e=n.name,i=n.version,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];(0,r.assert)(e.startsWith("@polkadot"),function(){return"Invalid package descriptor ".concat(e)});var d=a(e);if(d.push({path:u(t),version:i}),1!==d.length)console.warn("".concat(e," has multiple versions, ensure that there is only one installed.\n").concat(o,"\n").concat(s(d)));else{var p=l.filter(function(n){return n&&n.version!==i});p.length&&console.warn("".concat(e," requires direct dependencies exactly matching version ").concat(i,".\n").concat(o,"\n").concat(c(p)))}}
},{"@polkadot/x-global":"c2D8","./is/function.js":"XXEF","./is/string.js":"zz6S","./assert.js":"ICoQ"}],"Hxmh":[function(require,module,exports) {
var __dirname = "/Users/valentun/StudioProjects/pezkuwi-wallet-android/pezkuwi-wallet-dapp-js/node_modules/@polkadot/util";
var e="/Users/valentun/StudioProjects/pezkuwi-wallet-android/pezkuwi-wallet-dapp-js/node_modules/@polkadot/util",a=require("@polkadot/x-textdecoder"),o=require("@polkadot/x-textencoder"),t=require("./packageInfo.js"),r=require("./versionDetect.js");(0,r.detectPackage)(t.packageInfo,void 0!==e&&e,[a.packageInfo,o.packageInfo]);
},{"@polkadot/x-textdecoder":"BOVF","@polkadot/x-textencoder":"wmao","./packageInfo.js":"WiBo","./versionDetect.js":"AgAp"}],"r9p2":[function(require,module,exports) {
"use strict";function e(e,r){for(var t=Math.ceil(e.length/r),a=Array(t),n=0;n<t;n++){var o=n*r;a[n]=e.slice(o,o+r)}return a}Object.defineProperty(exports,"__esModule",{value:!0}),exports.arrayChunk=e;
},{}],"RBCU":[function(require,module,exports) {
"use strict";function e(e){return null===e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isNull=e;
},{}],"q4T2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.arrayFilter=i;var e=require("../is/null.js"),r=require("../is/undefined.js");function i(i){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i.filter(function(i){return!(0,r.isUndefined)(i)&&(n||!(0,e.isNull)(i))})}
},{"../is/null.js":"RBCU","../is/undefined.js":"QCwi"}],"Glt8":[function(require,module,exports) {
"use strict";function e(e){for(var r=new Array(e.reduce(function(e,r){return e+r.length},0)),t=-1,n=0;n<e.length;n++)for(var o=e[n],u=0;u<o.length;u++)r[++t]=o[u];return r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.arrayFlatten=e;
},{}],"S0YT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.arrayRange=r;var e=require("../assert.js");function r(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,e.assert)(r>0,"Expected non-zero, positive number as a range size"),new Array(r).fill(0).map(function(e,r){return r+t})}
},{"../assert.js":"ICoQ"}],"uc3G":[function(require,module,exports) {
"use strict";function r(r){return o(r)||n(r)||e(r)||t()}function t(){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 e(r,t){if(r){if("string"==typeof r)return a(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?a(r,t):void 0}}function n(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function o(r){if(Array.isArray(r))return a(r)}function a(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function i(t){var e=r(t),n=e.length;if(1===n)return e;for(;0!==n;){var o=Math.floor(Math.random()*n);n--;var a=[e[o],e[n]];e[n]=a[0],e[o]=a[1]}return e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.arrayShuffle=i;
},{}],"BQEL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"arrayChunk",{enumerable:!0,get:function(){return e.arrayChunk}}),Object.defineProperty(exports,"arrayFilter",{enumerable:!0,get:function(){return r.arrayFilter}}),Object.defineProperty(exports,"arrayFlatten",{enumerable:!0,get:function(){return t.arrayFlatten}}),Object.defineProperty(exports,"arrayRange",{enumerable:!0,get:function(){return n.arrayRange}}),Object.defineProperty(exports,"arrayShuffle",{enumerable:!0,get:function(){return a.arrayShuffle}});var e=require("./chunk.js"),r=require("./filter.js"),t=require("./flatten.js"),n=require("./range.js"),a=require("./shuffle.js");
},{"./chunk.js":"r9p2","./filter.js":"q4T2","./flatten.js":"Glt8","./range.js":"S0YT","./shuffle.js":"uc3G"}],"rDCW":[function(require,module,exports) {

},{}],"BOxy":[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
var t=require("buffer").Buffer;!function(t,i){"use strict";function r(t,i){if(!t)throw new Error(i||"Assertion failed")}function n(t,i){t.super_=i;var r=function(){};r.prototype=i.prototype,t.prototype=new r,t.prototype.constructor=t}function h(t,i,r){if(h.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==i&&"be"!==i||(r=i,i=10),this._init(t||0,i||10,r||"be"))}var e;"object"==typeof t?t.exports=h:i.BN=h,h.BN=h,h.wordSize=26;try{e="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(A){}function o(t,i){var r=t.charCodeAt(i);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(t,i,r){var n=o(t,r);return r-1>=i&&(n|=o(t,r-1)<<4),n}function u(t,i,r,n){for(var h=0,e=Math.min(t.length,r),o=i;o<e;o++){var s=t.charCodeAt(o)-48;h*=n,h+=s>=49?s-49+10:s>=17?s-17+10:s}return h}h.isBN=function(t){return t instanceof h||null!==t&&"object"==typeof t&&t.constructor.wordSize===h.wordSize&&Array.isArray(t.words)},h.max=function(t,i){return t.cmp(i)>0?t:i},h.min=function(t,i){return t.cmp(i)<0?t:i},h.prototype._init=function(t,i,n){if("number"==typeof t)return this._initNumber(t,i,n);if("object"==typeof t)return this._initArray(t,i,n);"hex"===i&&(i=16),r(i===(0|i)&&i>=2&&i<=36);var h=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h<t.length&&(16===i?this._parseHex(t,h,n):(this._parseBase(t,i,h),"le"===n&&this._initArray(this.toArray(),i,n)))},h.prototype._initNumber=function(t,i,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),i,n)},h.prototype._initArray=function(t,i,n){if(r("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 h=0;h<this.length;h++)this.words[h]=0;var e,o,s=0;if("be"===n)for(h=t.length-1,e=0;h>=0;h-=3)o=t[h]|t[h-1]<<8|t[h-2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);else if("le"===n)for(h=0,e=0;h<t.length;h+=3)o=t[h]|t[h+1]<<8|t[h+2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);return this.strip()},h.prototype._parseHex=function(t,i,r){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var h,e=0,o=0;if("be"===r)for(n=t.length-1;n>=i;n-=2)h=s(t,i,n)<<e,this.words[o]|=67108863&h,e>=18?(e-=18,o+=1,this.words[o]|=h>>>26):e+=8;else for(n=(t.length-i)%2==0?i+1:i;n<t.length;n+=2)h=s(t,i,n)<<e,this.words[o]|=67108863&h,e>=18?(e-=18,o+=1,this.words[o]|=h>>>26):e+=8;this.strip()},h.prototype._parseBase=function(t,i,r){this.words=[0],this.length=1;for(var n=0,h=1;h<=67108863;h*=i)n++;n--,h=h/i|0;for(var e=t.length-r,o=e%n,s=Math.min(e,e-o)+r,a=0,l=r;l<s;l+=n)a=u(t,l,l+n,i),this.imuln(h),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a);if(0!==o){var m=1;for(a=u(t,l,t.length,i),l=0;l<o;l++)m*=i;this.imuln(m),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a)}this.strip()},h.prototype.copy=function(t){t.words=new Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},h.prototype.clone=function(){var t=new h(null);return this.copy(t),t},h.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},h.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},h.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},h.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var a=["","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"],l=[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];function f(t,i,r){r.negative=i.negative^t.negative;var n=t.length+i.length|0;r.length=n,n=n-1|0;var h=0|t.words[0],e=0|i.words[0],o=h*e,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var a=1;a<n;a++){for(var l=u>>>26,m=67108863&u,f=Math.min(a,i.length-1),d=Math.max(0,a-t.length+1);d<=f;d++){var p=a-d|0;l+=(o=(h=0|t.words[p])*(e=0|i.words[d])+m)/67108864|0,m=67108863&o}r.words[a]=0|m,u=0|l}return 0!==u?r.words[a]=0|u:r.length--,r.strip()}h.prototype.toString=function(t,i){var n;if(i=0|i||1,16===(t=t||10)||"hex"===t){n="";for(var h=0,e=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<h|e)).toString(16);n=0!==(e=s>>>24-h&16777215)||o!==this.length-1?a[6-u.length]+u+n:u+n,(h+=2)>=26&&(h-=26,o--)}for(0!==e&&(n=e.toString(16)+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var f=l[t],d=m[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var M=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?M+n:a[f-M.length]+M+n}for(this.isZero()&&(n="0"+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},h.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},h.prototype.toJSON=function(){return this.toString(16)},h.prototype.toBuffer=function(t,i){return r(void 0!==e),this.toArrayLike(e,t,i)},h.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},h.prototype.toArrayLike=function(t,i,n){var h=this.byteLength(),e=n||Math.max(1,h);r(h<=e,"byte array longer than desired length"),r(e>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===i,a=new t(e),l=this.clone();if(u){for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),a[s]=o;for(;s<e;s++)a[s]=0}else{for(s=0;s<e-h;s++)a[s]=0;for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),a[e-s-1]=o}return a},Math.clz32?h.prototype._countBits=function(t){return 32-Math.clz32(t)}:h.prototype._countBits=function(t){var i=t,r=0;return i>=4096&&(r+=13,i>>>=13),i>=64&&(r+=7,i>>>=7),i>=8&&(r+=4,i>>>=4),i>=2&&(r+=2,i>>>=2),r+i},h.prototype._zeroBits=function(t){if(0===t)return 26;var i=t,r=0;return 0==(8191&i)&&(r+=13,i>>>=13),0==(127&i)&&(r+=7,i>>>=7),0==(15&i)&&(r+=4,i>>>=4),0==(3&i)&&(r+=2,i>>>=2),0==(1&i)&&r++,r},h.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return 26*(this.length-1)+i},h.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,i=0;i<this.length;i++){var r=this._zeroBits(this.words[i]);if(t+=r,26!==r)break}return t},h.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},h.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},h.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},h.prototype.isNeg=function(){return 0!==this.negative},h.prototype.neg=function(){return this.clone().ineg()},h.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},h.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this.strip()},h.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},h.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},h.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},h.prototype.iuand=function(t){var i;i=this.length>t.length?t:this;for(var r=0;r<i.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=i.length,this.strip()},h.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},h.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},h.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},h.prototype.iuxor=function(t){var i,r;this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=i.words[n]^r.words[n];if(this!==i)for(;n<i.length;n++)this.words[n]=i.words[n];return this.length=i.length,this.strip()},h.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},h.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},h.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},h.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var i=0|Math.ceil(t/26),n=t%26;this._expand(i),n>0&&i--;for(var h=0;h<i;h++)this.words[h]=67108863&~this.words[h];return n>0&&(this.words[h]=~this.words[h]&67108863>>26-n),this.strip()},h.prototype.notn=function(t){return this.clone().inotn(t)},h.prototype.setn=function(t,i){r("number"==typeof t&&t>=0);var n=t/26|0,h=t%26;return this._expand(n+1),this.words[n]=i?this.words[n]|1<<h:this.words[n]&~(1<<h),this.strip()},h.prototype.iadd=function(t){var i,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var h=0,e=0;e<n.length;e++)i=(0|r.words[e])+(0|n.words[e])+h,this.words[e]=67108863&i,h=i>>>26;for(;0!==h&&e<r.length;e++)i=(0|r.words[e])+h,this.words[e]=67108863&i,h=i>>>26;if(this.length=r.length,0!==h)this.words[this.length]=h,this.length++;else if(r!==this)for(;e<r.length;e++)this.words[e]=r.words[e];return this},h.prototype.add=function(t){var i;return 0!==t.negative&&0===this.negative?(t.negative=0,i=this.sub(t),t.negative^=1,i):0===t.negative&&0!==this.negative?(this.negative=0,i=t.sub(this),this.negative=1,i):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},h.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,h=this.cmp(t);if(0===h)return this.negative=0,this.length=1,this.words[0]=0,this;h>0?(r=this,n=t):(r=t,n=this);for(var e=0,o=0;o<n.length;o++)e=(i=(0|r.words[o])-(0|n.words[o])+e)>>26,this.words[o]=67108863&i;for(;0!==e&&o<r.length;o++)e=(i=(0|r.words[o])+e)>>26,this.words[o]=67108863&i;if(0===e&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},h.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,i,r){var n,h,e,o=t.words,s=i.words,u=r.words,a=0,l=0|o[0],m=8191&l,f=l>>>13,d=0|o[1],p=8191&d,M=d>>>13,v=0|o[2],g=8191&v,c=v>>>13,w=0|o[3],y=8191&w,b=w>>>13,_=0|o[4],k=8191&_,A=_>>>13,x=0|o[5],S=8191&x,q=x>>>13,B=0|o[6],Z=8191&B,R=B>>>13,N=0|o[7],L=8191&N,I=N>>>13,z=0|o[8],T=8191&z,E=z>>>13,O=0|o[9],j=8191&O,K=O>>>13,P=0|s[0],F=8191&P,C=P>>>13,D=0|s[1],H=8191&D,J=D>>>13,U=0|s[2],G=8191&U,Q=U>>>13,V=0|s[3],W=8191&V,X=V>>>13,Y=0|s[4],$=8191&Y,tt=Y>>>13,it=0|s[5],rt=8191&it,nt=it>>>13,ht=0|s[6],et=8191&ht,ot=ht>>>13,st=0|s[7],ut=8191&st,at=st>>>13,lt=0|s[8],mt=8191&lt,ft=lt>>>13,dt=0|s[9],pt=8191&dt,Mt=dt>>>13;r.negative=t.negative^i.negative,r.length=19;var vt=(a+(n=Math.imul(m,F))|0)+((8191&(h=(h=Math.imul(m,C))+Math.imul(f,F)|0))<<13)|0;a=((e=Math.imul(f,C))+(h>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(p,F),h=(h=Math.imul(p,C))+Math.imul(M,F)|0,e=Math.imul(M,C);var gt=(a+(n=n+Math.imul(m,H)|0)|0)+((8191&(h=(h=h+Math.imul(m,J)|0)+Math.imul(f,H)|0))<<13)|0;a=((e=e+Math.imul(f,J)|0)+(h>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,F),h=(h=Math.imul(g,C))+Math.imul(c,F)|0,e=Math.imul(c,C),n=n+Math.imul(p,H)|0,h=(h=h+Math.imul(p,J)|0)+Math.imul(M,H)|0,e=e+Math.imul(M,J)|0;var ct=(a+(n=n+Math.imul(m,G)|0)|0)+((8191&(h=(h=h+Math.imul(m,Q)|0)+Math.imul(f,G)|0))<<13)|0;a=((e=e+Math.imul(f,Q)|0)+(h>>>13)|0)+(ct>>>26)|0,ct&=67108863,n=Math.imul(y,F),h=(h=Math.imul(y,C))+Math.imul(b,F)|0,e=Math.imul(b,C),n=n+Math.imul(g,H)|0,h=(h=h+Math.imul(g,J)|0)+Math.imul(c,H)|0,e=e+Math.imul(c,J)|0,n=n+Math.imul(p,G)|0,h=(h=h+Math.imul(p,Q)|0)+Math.imul(M,G)|0,e=e+Math.imul(M,Q)|0;var wt=(a+(n=n+Math.imul(m,W)|0)|0)+((8191&(h=(h=h+Math.imul(m,X)|0)+Math.imul(f,W)|0))<<13)|0;a=((e=e+Math.imul(f,X)|0)+(h>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,F),h=(h=Math.imul(k,C))+Math.imul(A,F)|0,e=Math.imul(A,C),n=n+Math.imul(y,H)|0,h=(h=h+Math.imul(y,J)|0)+Math.imul(b,H)|0,e=e+Math.imul(b,J)|0,n=n+Math.imul(g,G)|0,h=(h=h+Math.imul(g,Q)|0)+Math.imul(c,G)|0,e=e+Math.imul(c,Q)|0,n=n+Math.imul(p,W)|0,h=(h=h+Math.imul(p,X)|0)+Math.imul(M,W)|0,e=e+Math.imul(M,X)|0;var yt=(a+(n=n+Math.imul(m,$)|0)|0)+((8191&(h=(h=h+Math.imul(m,tt)|0)+Math.imul(f,$)|0))<<13)|0;a=((e=e+Math.imul(f,tt)|0)+(h>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(S,F),h=(h=Math.imul(S,C))+Math.imul(q,F)|0,e=Math.imul(q,C),n=n+Math.imul(k,H)|0,h=(h=h+Math.imul(k,J)|0)+Math.imul(A,H)|0,e=e+Math.imul(A,J)|0,n=n+Math.imul(y,G)|0,h=(h=h+Math.imul(y,Q)|0)+Math.imul(b,G)|0,e=e+Math.imul(b,Q)|0,n=n+Math.imul(g,W)|0,h=(h=h+Math.imul(g,X)|0)+Math.imul(c,W)|0,e=e+Math.imul(c,X)|0,n=n+Math.imul(p,$)|0,h=(h=h+Math.imul(p,tt)|0)+Math.imul(M,$)|0,e=e+Math.imul(M,tt)|0;var bt=(a+(n=n+Math.imul(m,rt)|0)|0)+((8191&(h=(h=h+Math.imul(m,nt)|0)+Math.imul(f,rt)|0))<<13)|0;a=((e=e+Math.imul(f,nt)|0)+(h>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(Z,F),h=(h=Math.imul(Z,C))+Math.imul(R,F)|0,e=Math.imul(R,C),n=n+Math.imul(S,H)|0,h=(h=h+Math.imul(S,J)|0)+Math.imul(q,H)|0,e=e+Math.imul(q,J)|0,n=n+Math.imul(k,G)|0,h=(h=h+Math.imul(k,Q)|0)+Math.imul(A,G)|0,e=e+Math.imul(A,Q)|0,n=n+Math.imul(y,W)|0,h=(h=h+Math.imul(y,X)|0)+Math.imul(b,W)|0,e=e+Math.imul(b,X)|0,n=n+Math.imul(g,$)|0,h=(h=h+Math.imul(g,tt)|0)+Math.imul(c,$)|0,e=e+Math.imul(c,tt)|0,n=n+Math.imul(p,rt)|0,h=(h=h+Math.imul(p,nt)|0)+Math.imul(M,rt)|0,e=e+Math.imul(M,nt)|0;var _t=(a+(n=n+Math.imul(m,et)|0)|0)+((8191&(h=(h=h+Math.imul(m,ot)|0)+Math.imul(f,et)|0))<<13)|0;a=((e=e+Math.imul(f,ot)|0)+(h>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,F),h=(h=Math.imul(L,C))+Math.imul(I,F)|0,e=Math.imul(I,C),n=n+Math.imul(Z,H)|0,h=(h=h+Math.imul(Z,J)|0)+Math.imul(R,H)|0,e=e+Math.imul(R,J)|0,n=n+Math.imul(S,G)|0,h=(h=h+Math.imul(S,Q)|0)+Math.imul(q,G)|0,e=e+Math.imul(q,Q)|0,n=n+Math.imul(k,W)|0,h=(h=h+Math.imul(k,X)|0)+Math.imul(A,W)|0,e=e+Math.imul(A,X)|0,n=n+Math.imul(y,$)|0,h=(h=h+Math.imul(y,tt)|0)+Math.imul(b,$)|0,e=e+Math.imul(b,tt)|0,n=n+Math.imul(g,rt)|0,h=(h=h+Math.imul(g,nt)|0)+Math.imul(c,rt)|0,e=e+Math.imul(c,nt)|0,n=n+Math.imul(p,et)|0,h=(h=h+Math.imul(p,ot)|0)+Math.imul(M,et)|0,e=e+Math.imul(M,ot)|0;var kt=(a+(n=n+Math.imul(m,ut)|0)|0)+((8191&(h=(h=h+Math.imul(m,at)|0)+Math.imul(f,ut)|0))<<13)|0;a=((e=e+Math.imul(f,at)|0)+(h>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(T,F),h=(h=Math.imul(T,C))+Math.imul(E,F)|0,e=Math.imul(E,C),n=n+Math.imul(L,H)|0,h=(h=h+Math.imul(L,J)|0)+Math.imul(I,H)|0,e=e+Math.imul(I,J)|0,n=n+Math.imul(Z,G)|0,h=(h=h+Math.imul(Z,Q)|0)+Math.imul(R,G)|0,e=e+Math.imul(R,Q)|0,n=n+Math.imul(S,W)|0,h=(h=h+Math.imul(S,X)|0)+Math.imul(q,W)|0,e=e+Math.imul(q,X)|0,n=n+Math.imul(k,$)|0,h=(h=h+Math.imul(k,tt)|0)+Math.imul(A,$)|0,e=e+Math.imul(A,tt)|0,n=n+Math.imul(y,rt)|0,h=(h=h+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,e=e+Math.imul(b,nt)|0,n=n+Math.imul(g,et)|0,h=(h=h+Math.imul(g,ot)|0)+Math.imul(c,et)|0,e=e+Math.imul(c,ot)|0,n=n+Math.imul(p,ut)|0,h=(h=h+Math.imul(p,at)|0)+Math.imul(M,ut)|0,e=e+Math.imul(M,at)|0;var At=(a+(n=n+Math.imul(m,mt)|0)|0)+((8191&(h=(h=h+Math.imul(m,ft)|0)+Math.imul(f,mt)|0))<<13)|0;a=((e=e+Math.imul(f,ft)|0)+(h>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,F),h=(h=Math.imul(j,C))+Math.imul(K,F)|0,e=Math.imul(K,C),n=n+Math.imul(T,H)|0,h=(h=h+Math.imul(T,J)|0)+Math.imul(E,H)|0,e=e+Math.imul(E,J)|0,n=n+Math.imul(L,G)|0,h=(h=h+Math.imul(L,Q)|0)+Math.imul(I,G)|0,e=e+Math.imul(I,Q)|0,n=n+Math.imul(Z,W)|0,h=(h=h+Math.imul(Z,X)|0)+Math.imul(R,W)|0,e=e+Math.imul(R,X)|0,n=n+Math.imul(S,$)|0,h=(h=h+Math.imul(S,tt)|0)+Math.imul(q,$)|0,e=e+Math.imul(q,tt)|0,n=n+Math.imul(k,rt)|0,h=(h=h+Math.imul(k,nt)|0)+Math.imul(A,rt)|0,e=e+Math.imul(A,nt)|0,n=n+Math.imul(y,et)|0,h=(h=h+Math.imul(y,ot)|0)+Math.imul(b,et)|0,e=e+Math.imul(b,ot)|0,n=n+Math.imul(g,ut)|0,h=(h=h+Math.imul(g,at)|0)+Math.imul(c,ut)|0,e=e+Math.imul(c,at)|0,n=n+Math.imul(p,mt)|0,h=(h=h+Math.imul(p,ft)|0)+Math.imul(M,mt)|0,e=e+Math.imul(M,ft)|0;var xt=(a+(n=n+Math.imul(m,pt)|0)|0)+((8191&(h=(h=h+Math.imul(m,Mt)|0)+Math.imul(f,pt)|0))<<13)|0;a=((e=e+Math.imul(f,Mt)|0)+(h>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,H),h=(h=Math.imul(j,J))+Math.imul(K,H)|0,e=Math.imul(K,J),n=n+Math.imul(T,G)|0,h=(h=h+Math.imul(T,Q)|0)+Math.imul(E,G)|0,e=e+Math.imul(E,Q)|0,n=n+Math.imul(L,W)|0,h=(h=h+Math.imul(L,X)|0)+Math.imul(I,W)|0,e=e+Math.imul(I,X)|0,n=n+Math.imul(Z,$)|0,h=(h=h+Math.imul(Z,tt)|0)+Math.imul(R,$)|0,e=e+Math.imul(R,tt)|0,n=n+Math.imul(S,rt)|0,h=(h=h+Math.imul(S,nt)|0)+Math.imul(q,rt)|0,e=e+Math.imul(q,nt)|0,n=n+Math.imul(k,et)|0,h=(h=h+Math.imul(k,ot)|0)+Math.imul(A,et)|0,e=e+Math.imul(A,ot)|0,n=n+Math.imul(y,ut)|0,h=(h=h+Math.imul(y,at)|0)+Math.imul(b,ut)|0,e=e+Math.imul(b,at)|0,n=n+Math.imul(g,mt)|0,h=(h=h+Math.imul(g,ft)|0)+Math.imul(c,mt)|0,e=e+Math.imul(c,ft)|0;var St=(a+(n=n+Math.imul(p,pt)|0)|0)+((8191&(h=(h=h+Math.imul(p,Mt)|0)+Math.imul(M,pt)|0))<<13)|0;a=((e=e+Math.imul(M,Mt)|0)+(h>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,G),h=(h=Math.imul(j,Q))+Math.imul(K,G)|0,e=Math.imul(K,Q),n=n+Math.imul(T,W)|0,h=(h=h+Math.imul(T,X)|0)+Math.imul(E,W)|0,e=e+Math.imul(E,X)|0,n=n+Math.imul(L,$)|0,h=(h=h+Math.imul(L,tt)|0)+Math.imul(I,$)|0,e=e+Math.imul(I,tt)|0,n=n+Math.imul(Z,rt)|0,h=(h=h+Math.imul(Z,nt)|0)+Math.imul(R,rt)|0,e=e+Math.imul(R,nt)|0,n=n+Math.imul(S,et)|0,h=(h=h+Math.imul(S,ot)|0)+Math.imul(q,et)|0,e=e+Math.imul(q,ot)|0,n=n+Math.imul(k,ut)|0,h=(h=h+Math.imul(k,at)|0)+Math.imul(A,ut)|0,e=e+Math.imul(A,at)|0,n=n+Math.imul(y,mt)|0,h=(h=h+Math.imul(y,ft)|0)+Math.imul(b,mt)|0,e=e+Math.imul(b,ft)|0;var qt=(a+(n=n+Math.imul(g,pt)|0)|0)+((8191&(h=(h=h+Math.imul(g,Mt)|0)+Math.imul(c,pt)|0))<<13)|0;a=((e=e+Math.imul(c,Mt)|0)+(h>>>13)|0)+(qt>>>26)|0,qt&=67108863,n=Math.imul(j,W),h=(h=Math.imul(j,X))+Math.imul(K,W)|0,e=Math.imul(K,X),n=n+Math.imul(T,$)|0,h=(h=h+Math.imul(T,tt)|0)+Math.imul(E,$)|0,e=e+Math.imul(E,tt)|0,n=n+Math.imul(L,rt)|0,h=(h=h+Math.imul(L,nt)|0)+Math.imul(I,rt)|0,e=e+Math.imul(I,nt)|0,n=n+Math.imul(Z,et)|0,h=(h=h+Math.imul(Z,ot)|0)+Math.imul(R,et)|0,e=e+Math.imul(R,ot)|0,n=n+Math.imul(S,ut)|0,h=(h=h+Math.imul(S,at)|0)+Math.imul(q,ut)|0,e=e+Math.imul(q,at)|0,n=n+Math.imul(k,mt)|0,h=(h=h+Math.imul(k,ft)|0)+Math.imul(A,mt)|0,e=e+Math.imul(A,ft)|0;var Bt=(a+(n=n+Math.imul(y,pt)|0)|0)+((8191&(h=(h=h+Math.imul(y,Mt)|0)+Math.imul(b,pt)|0))<<13)|0;a=((e=e+Math.imul(b,Mt)|0)+(h>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,$),h=(h=Math.imul(j,tt))+Math.imul(K,$)|0,e=Math.imul(K,tt),n=n+Math.imul(T,rt)|0,h=(h=h+Math.imul(T,nt)|0)+Math.imul(E,rt)|0,e=e+Math.imul(E,nt)|0,n=n+Math.imul(L,et)|0,h=(h=h+Math.imul(L,ot)|0)+Math.imul(I,et)|0,e=e+Math.imul(I,ot)|0,n=n+Math.imul(Z,ut)|0,h=(h=h+Math.imul(Z,at)|0)+Math.imul(R,ut)|0,e=e+Math.imul(R,at)|0,n=n+Math.imul(S,mt)|0,h=(h=h+Math.imul(S,ft)|0)+Math.imul(q,mt)|0,e=e+Math.imul(q,ft)|0;var Zt=(a+(n=n+Math.imul(k,pt)|0)|0)+((8191&(h=(h=h+Math.imul(k,Mt)|0)+Math.imul(A,pt)|0))<<13)|0;a=((e=e+Math.imul(A,Mt)|0)+(h>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,n=Math.imul(j,rt),h=(h=Math.imul(j,nt))+Math.imul(K,rt)|0,e=Math.imul(K,nt),n=n+Math.imul(T,et)|0,h=(h=h+Math.imul(T,ot)|0)+Math.imul(E,et)|0,e=e+Math.imul(E,ot)|0,n=n+Math.imul(L,ut)|0,h=(h=h+Math.imul(L,at)|0)+Math.imul(I,ut)|0,e=e+Math.imul(I,at)|0,n=n+Math.imul(Z,mt)|0,h=(h=h+Math.imul(Z,ft)|0)+Math.imul(R,mt)|0,e=e+Math.imul(R,ft)|0;var Rt=(a+(n=n+Math.imul(S,pt)|0)|0)+((8191&(h=(h=h+Math.imul(S,Mt)|0)+Math.imul(q,pt)|0))<<13)|0;a=((e=e+Math.imul(q,Mt)|0)+(h>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(j,et),h=(h=Math.imul(j,ot))+Math.imul(K,et)|0,e=Math.imul(K,ot),n=n+Math.imul(T,ut)|0,h=(h=h+Math.imul(T,at)|0)+Math.imul(E,ut)|0,e=e+Math.imul(E,at)|0,n=n+Math.imul(L,mt)|0,h=(h=h+Math.imul(L,ft)|0)+Math.imul(I,mt)|0,e=e+Math.imul(I,ft)|0;var Nt=(a+(n=n+Math.imul(Z,pt)|0)|0)+((8191&(h=(h=h+Math.imul(Z,Mt)|0)+Math.imul(R,pt)|0))<<13)|0;a=((e=e+Math.imul(R,Mt)|0)+(h>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(j,ut),h=(h=Math.imul(j,at))+Math.imul(K,ut)|0,e=Math.imul(K,at),n=n+Math.imul(T,mt)|0,h=(h=h+Math.imul(T,ft)|0)+Math.imul(E,mt)|0,e=e+Math.imul(E,ft)|0;var Lt=(a+(n=n+Math.imul(L,pt)|0)|0)+((8191&(h=(h=h+Math.imul(L,Mt)|0)+Math.imul(I,pt)|0))<<13)|0;a=((e=e+Math.imul(I,Mt)|0)+(h>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(j,mt),h=(h=Math.imul(j,ft))+Math.imul(K,mt)|0,e=Math.imul(K,ft);var It=(a+(n=n+Math.imul(T,pt)|0)|0)+((8191&(h=(h=h+Math.imul(T,Mt)|0)+Math.imul(E,pt)|0))<<13)|0;a=((e=e+Math.imul(E,Mt)|0)+(h>>>13)|0)+(It>>>26)|0,It&=67108863;var zt=(a+(n=Math.imul(j,pt))|0)+((8191&(h=(h=Math.imul(j,Mt))+Math.imul(K,pt)|0))<<13)|0;return a=((e=Math.imul(K,Mt))+(h>>>13)|0)+(zt>>>26)|0,zt&=67108863,u[0]=vt,u[1]=gt,u[2]=ct,u[3]=wt,u[4]=yt,u[5]=bt,u[6]=_t,u[7]=kt,u[8]=At,u[9]=xt,u[10]=St,u[11]=qt,u[12]=Bt,u[13]=Zt,u[14]=Rt,u[15]=Nt,u[16]=Lt,u[17]=It,u[18]=zt,0!==a&&(u[19]=a,r.length++),r};function p(t,i,r){return(new M).mulp(t,i,r)}function M(t,i){this.x=t,this.y=i}Math.imul||(d=f),h.prototype.mulTo=function(t,i){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,i):r<63?f(this,t,i):r<1024?function(t,i,r){r.negative=i.negative^t.negative,r.length=t.length+i.length;for(var n=0,h=0,e=0;e<r.length-1;e++){var o=h;h=0;for(var s=67108863&n,u=Math.min(e,i.length-1),a=Math.max(0,e-t.length+1);a<=u;a++){var l=e-a,m=(0|t.words[l])*(0|i.words[a]),f=67108863&m;s=67108863&(f=f+s|0),h+=(o=(o=o+(m/67108864|0)|0)+(f>>>26)|0)>>>26,o&=67108863}r.words[e]=s,n=o,o=h}return 0!==n?r.words[e]=n:r.length--,r.strip()}(this,t,i):p(this,t,i)},M.prototype.makeRBT=function(t){for(var i=new Array(t),r=h.prototype._countBits(t)-1,n=0;n<t;n++)i[n]=this.revBin(n,r,t);return i},M.prototype.revBin=function(t,i,r){if(0===t||t===r-1)return t;for(var n=0,h=0;h<i;h++)n|=(1&t)<<i-h-1,t>>=1;return n},M.prototype.permute=function(t,i,r,n,h,e){for(var o=0;o<e;o++)n[o]=i[t[o]],h[o]=r[t[o]]},M.prototype.transform=function(t,i,r,n,h,e){this.permute(e,t,i,r,n,h);for(var o=1;o<h;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),a=Math.sin(2*Math.PI/s),l=0;l<h;l+=s)for(var m=u,f=a,d=0;d<o;d++){var p=r[l+d],M=n[l+d],v=r[l+d+o],g=n[l+d+o],c=m*v-f*g;g=m*g+f*v,v=c,r[l+d]=p+v,n[l+d]=M+g,r[l+d+o]=p-v,n[l+d+o]=M-g,d!==s&&(c=u*m-a*f,f=u*f+a*m,m=c)}},M.prototype.guessLen13b=function(t,i){var r=1|Math.max(i,t),n=1&r,h=0;for(r=r/2|0;r;r>>>=1)h++;return 1<<h+1+n},M.prototype.conjugate=function(t,i,r){if(!(r<=1))for(var n=0;n<r/2;n++){var h=t[n];t[n]=t[r-n-1],t[r-n-1]=h,h=i[n],i[n]=-i[r-n-1],i[r-n-1]=-h}},M.prototype.normalize13b=function(t,i){for(var r=0,n=0;n<i/2;n++){var h=8192*Math.round(t[2*n+1]/i)+Math.round(t[2*n]/i)+r;t[n]=67108863&h,r=h<67108864?0:h/67108864|0}return t},M.prototype.convert13b=function(t,i,n,h){for(var e=0,o=0;o<i;o++)e+=0|t[o],n[2*o]=8191&e,e>>>=13,n[2*o+1]=8191&e,e>>>=13;for(o=2*i;o<h;++o)n[o]=0;r(0===e),r(0==(-8192&e))},M.prototype.stub=function(t){for(var i=new Array(t),r=0;r<t;r++)i[r]=0;return i},M.prototype.mulp=function(t,i,r){var n=2*this.guessLen13b(t.length,i.length),h=this.makeRBT(n),e=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),a=new Array(n),l=new Array(n),m=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(i.words,i.length,a,n),this.transform(o,e,s,u,n,h),this.transform(a,e,l,m,n,h);for(var d=0;d<n;d++){var p=s[d]*l[d]-u[d]*m[d];u[d]=s[d]*m[d]+u[d]*l[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,f,e,n,h),this.conjugate(f,e,n),this.normalize13b(f,n),r.negative=t.negative^i.negative,r.length=t.length+i.length,r.strip()},h.prototype.mul=function(t){var i=new h(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},h.prototype.mulf=function(t){var i=new h(null);return i.words=new Array(this.length+t.length),p(this,t,i)},h.prototype.imul=function(t){return this.clone().mulTo(t,this)},h.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var i=0,n=0;n<this.length;n++){var h=(0|this.words[n])*t,e=(67108863&h)+(67108863&i);i>>=26,i+=h/67108864|0,i+=e>>>26,this.words[n]=67108863&e}return 0!==i&&(this.words[n]=i,this.length++),this},h.prototype.muln=function(t){return this.clone().imuln(t)},h.prototype.sqr=function(){return this.mul(this)},h.prototype.isqr=function(){return this.imul(this.clone())},h.prototype.pow=function(t){var i=function(t){for(var i=new Array(t.bitLength()),r=0;r<i.length;r++){var n=r/26|0,h=r%26;i[r]=(t.words[n]&1<<h)>>>h}return i}(t);if(0===i.length)return new h(1);for(var r=this,n=0;n<i.length&&0===i[n];n++,r=r.sqr());if(++n<i.length)for(var e=r.sqr();n<i.length;n++,e=e.sqr())0!==i[n]&&(r=r.mul(e));return r},h.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var i,n=t%26,h=(t-n)/26,e=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(i=0;i<this.length;i++){var s=this.words[i]&e,u=(0|this.words[i])-s<<n;this.words[i]=u|o,o=s>>>26-n}o&&(this.words[i]=o,this.length++)}if(0!==h){for(i=this.length-1;i>=0;i--)this.words[i+h]=this.words[i];for(i=0;i<h;i++)this.words[i]=0;this.length+=h}return this.strip()},h.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},h.prototype.iushrn=function(t,i,n){var h;r("number"==typeof t&&t>=0),h=i?(i-i%26)/26:0;var e=t%26,o=Math.min((t-e)/26,this.length),s=67108863^67108863>>>e<<e,u=n;if(h-=o,h=Math.max(0,h),u){for(var a=0;a<o;a++)u.words[a]=this.words[a];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,a=0;a<this.length;a++)this.words[a]=this.words[a+o];else this.words[0]=0,this.length=1;var l=0;for(a=this.length-1;a>=0&&(0!==l||a>=h);a--){var m=0|this.words[a];this.words[a]=l<<26-e|m>>>e,l=m&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},h.prototype.ishrn=function(t,i,n){return r(0===this.negative),this.iushrn(t,i,n)},h.prototype.shln=function(t){return this.clone().ishln(t)},h.prototype.ushln=function(t){return this.clone().iushln(t)},h.prototype.shrn=function(t){return this.clone().ishrn(t)},h.prototype.ushrn=function(t){return this.clone().iushrn(t)},h.prototype.testn=function(t){r("number"==typeof t&&t>=0);var i=t%26,n=(t-i)/26,h=1<<i;return!(this.length<=n)&&!!(this.words[n]&h)},h.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var i=t%26,n=(t-i)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==i&&n++,this.length=Math.min(n,this.length),0!==i){var h=67108863^67108863>>>i<<i;this.words[this.length-1]&=h}return this.strip()},h.prototype.maskn=function(t){return this.clone().imaskn(t)},h.prototype.iaddn=function(t){return r("number"==typeof t),r(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)},h.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},h.prototype.isubn=function(t){if(r("number"==typeof t),r(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 i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},h.prototype.addn=function(t){return this.clone().iaddn(t)},h.prototype.subn=function(t){return this.clone().isubn(t)},h.prototype.iabs=function(){return this.negative=0,this},h.prototype.abs=function(){return this.clone().iabs()},h.prototype._ishlnsubmul=function(t,i,n){var h,e,o=t.length+n;this._expand(o);var s=0;for(h=0;h<t.length;h++){e=(0|this.words[h+n])+s;var u=(0|t.words[h])*i;s=((e-=67108863&u)>>26)-(u/67108864|0),this.words[h+n]=67108863&e}for(;h<this.length-n;h++)s=(e=(0|this.words[h+n])+s)>>26,this.words[h+n]=67108863&e;if(0===s)return this.strip();for(r(-1===s),s=0,h=0;h<this.length;h++)s=(e=-(0|this.words[h])+s)>>26,this.words[h]=67108863&e;return this.negative=1,this.strip()},h.prototype._wordDiv=function(t,i){var r=(this.length,t.length),n=this.clone(),e=t,o=0|e.words[e.length-1];0!==(r=26-this._countBits(o))&&(e=e.ushln(r),n.iushln(r),o=0|e.words[e.length-1]);var s,u=n.length-e.length;if("mod"!==i){(s=new h(null)).length=u+1,s.words=new Array(s.length);for(var a=0;a<s.length;a++)s.words[a]=0}var l=n.clone()._ishlnsubmul(e,1,u);0===l.negative&&(n=l,s&&(s.words[u]=1));for(var m=u-1;m>=0;m--){var f=67108864*(0|n.words[e.length+m])+(0|n.words[e.length+m-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(e,f,m);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(e,1,m),n.isZero()||(n.negative^=1);s&&(s.words[m]=f)}return s&&s.strip(),n.strip(),"div"!==i&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},h.prototype.divmod=function(t,i,n){return r(!t.isZero()),this.isZero()?{div:new h(0),mod:new h(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,i),"mod"!==i&&(e=s.div.neg()),"div"!==i&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:e,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),i),"mod"!==i&&(e=s.div.neg()),{div:e,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),i),"div"!==i&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new h(0),mod:this}:1===t.length?"div"===i?{div:this.divn(t.words[0]),mod:null}:"mod"===i?{div:null,mod:new h(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new h(this.modn(t.words[0]))}:this._wordDiv(t,i);var e,o,s},h.prototype.div=function(t){return this.divmod(t,"div",!1).div},h.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},h.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},h.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var r=0!==i.div.negative?i.mod.isub(t):i.mod,n=t.ushrn(1),h=t.andln(1),e=r.cmp(n);return e<0||1===h&&0===e?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},h.prototype.modn=function(t){r(t<=67108863);for(var i=(1<<26)%t,n=0,h=this.length-1;h>=0;h--)n=(i*n+(0|this.words[h]))%t;return n},h.prototype.idivn=function(t){r(t<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var h=(0|this.words[n])+67108864*i;this.words[n]=h/t|0,i=h%t}return this.strip()},h.prototype.divn=function(t){return this.clone().idivn(t)},h.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var i=this,n=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var e=new h(1),o=new h(0),s=new h(0),u=new h(1),a=0;i.isEven()&&n.isEven();)i.iushrn(1),n.iushrn(1),++a;for(var l=n.clone(),m=i.clone();!i.isZero();){for(var f=0,d=1;0==(i.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(i.iushrn(f);f-- >0;)(e.isOdd()||o.isOdd())&&(e.iadd(l),o.isub(m)),e.iushrn(1),o.iushrn(1);for(var p=0,M=1;0==(n.words[0]&M)&&p<26;++p,M<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(m)),s.iushrn(1),u.iushrn(1);i.cmp(n)>=0?(i.isub(n),e.isub(s),o.isub(u)):(n.isub(i),s.isub(e),u.isub(o))}return{a:s,b:u,gcd:n.iushln(a)}},h.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var i=this,n=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var e,o=new h(1),s=new h(0),u=n.clone();i.cmpn(1)>0&&n.cmpn(1)>0;){for(var a=0,l=1;0==(i.words[0]&l)&&a<26;++a,l<<=1);if(a>0)for(i.iushrn(a);a-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var m=0,f=1;0==(n.words[0]&f)&&m<26;++m,f<<=1);if(m>0)for(n.iushrn(m);m-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);i.cmp(n)>=0?(i.isub(n),o.isub(s)):(n.isub(i),s.isub(o))}return(e=0===i.cmpn(1)?o:s).cmpn(0)<0&&e.iadd(t),e},h.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),r=t.clone();i.negative=0,r.negative=0;for(var n=0;i.isEven()&&r.isEven();n++)i.iushrn(1),r.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;r.isEven();)r.iushrn(1);var h=i.cmp(r);if(h<0){var e=i;i=r,r=e}else if(0===h||0===r.cmpn(1))break;i.isub(r)}return r.iushln(n)},h.prototype.invm=function(t){return this.egcd(t).a.umod(t)},h.prototype.isEven=function(){return 0==(1&this.words[0])},h.prototype.isOdd=function(){return 1==(1&this.words[0])},h.prototype.andln=function(t){return this.words[0]&t},h.prototype.bincn=function(t){r("number"==typeof t);var i=t%26,n=(t-i)/26,h=1<<i;if(this.length<=n)return this._expand(n+1),this.words[n]|=h,this;for(var e=h,o=n;0!==e&&o<this.length;o++){var s=0|this.words[o];e=(s+=e)>>>26,s&=67108863,this.words[o]=s}return 0!==e&&(this.words[o]=e,this.length++),this},h.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},h.prototype.cmpn=function(t){var i,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)i=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var h=0|this.words[0];i=h===t?0:h<t?-1:1}return 0!==this.negative?0|-i:i},h.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var i=this.ucmp(t);return 0!==this.negative?0|-i:i},h.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var i=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],h=0|t.words[r];if(n!==h){n<h?i=-1:n>h&&(i=1);break}}return i},h.prototype.gtn=function(t){return 1===this.cmpn(t)},h.prototype.gt=function(t){return 1===this.cmp(t)},h.prototype.gten=function(t){return this.cmpn(t)>=0},h.prototype.gte=function(t){return this.cmp(t)>=0},h.prototype.ltn=function(t){return-1===this.cmpn(t)},h.prototype.lt=function(t){return-1===this.cmp(t)},h.prototype.lten=function(t){return this.cmpn(t)<=0},h.prototype.lte=function(t){return this.cmp(t)<=0},h.prototype.eqn=function(t){return 0===this.cmpn(t)},h.prototype.eq=function(t){return 0===this.cmp(t)},h.red=function(t){return new _(t)},h.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},h.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},h.prototype._forceRed=function(t){return this.red=t,this},h.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},h.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},h.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},h.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},h.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},h.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},h.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},h.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},h.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},h.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},h.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},h.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},h.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},h.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(t,i){this.name=t,this.p=new h(i,16),this.n=this.p.bitLength(),this.k=new h(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function c(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function y(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function b(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var i=h._prime(t);this.m=i.p,this.prime=i}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new h(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)}g.prototype._tmp=function(){var t=new h(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var i,r=t;do{this.split(r,this.tmp),i=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(i>this.n);var n=i<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},g.prototype.split=function(t,i){t.iushrn(this.n,0,i)},g.prototype.imulK=function(t){return t.imul(this.k)},n(c,g),c.prototype.split=function(t,i){for(var r=Math.min(t.length,9),n=0;n<r;n++)i.words[n]=t.words[n];if(i.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var h=t.words[9];for(i.words[i.length++]=4194303&h,n=10;n<t.length;n++){var e=0|t.words[n];t.words[n-10]=(4194303&e)<<4|h>>>22,h=e}h>>>=22,t.words[n-10]=h,0===h&&t.length>10?t.length-=10:t.length-=9},c.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var i=0,r=0;r<t.length;r++){var n=0|t.words[r];i+=977*n,t.words[r]=67108863&i,i=64*n+(i/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,g),n(y,g),n(b,g),b.prototype.imulK=function(t){for(var i=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+i,h=67108863&n;n>>>=26,t.words[r]=h,i=n}return 0!==i&&(t.words[t.length++]=i),t},h._prime=function(t){if(v[t])return v[t];var i;if("k256"===t)i=new c;else if("p224"===t)i=new w;else if("p192"===t)i=new y;else{if("p25519"!==t)throw new Error("Unknown prime "+t);i=new b}return v[t]=i,i},_.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,i){r(0==(t.negative|i.negative),"red works only with positives"),r(t.red&&t.red===i.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,i){this._verify2(t,i);var r=t.add(i);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(t,i){this._verify2(t,i);var r=t.iadd(i);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(t,i){this._verify2(t,i);var r=t.sub(i);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(t,i){this._verify2(t,i);var r=t.isub(i);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},_.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},_.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(r(i%2==1),3===i){var n=this.m.add(new h(1)).iushrn(2);return this.pow(t,n)}for(var e=this.m.subn(1),o=0;!e.isZero()&&0===e.andln(1);)o++,e.iushrn(1);r(!e.isZero());var s=new h(1).toRed(this),u=s.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new h(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var m=this.pow(l,e),f=this.pow(t,e.addn(1).iushrn(1)),d=this.pow(t,e),p=o;0!==d.cmp(s);){for(var M=d,v=0;0!==M.cmp(s);v++)M=M.redSqr();r(v<p);var g=this.pow(m,new h(1).iushln(p-v-1));f=f.redMul(g),m=g.redSqr(),d=d.redMul(m),p=v}return f},_.prototype.invm=function(t){var i=t._invmp(this.m);return 0!==i.negative?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},_.prototype.pow=function(t,i){if(i.isZero())return new h(1).toRed(this);if(0===i.cmpn(1))return t.clone();var r=new Array(16);r[0]=new h(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var e=r[0],o=0,s=0,u=i.bitLength()%26;for(0===u&&(u=26),n=i.length-1;n>=0;n--){for(var a=i.words[n],l=u-1;l>=0;l--){var m=a>>l&1;e!==r[0]&&(e=this.sqr(e)),0!==m||0!==o?(o<<=1,o|=m,(4===++s||0===n&&0===l)&&(e=this.mul(e,r[o]),s=0,o=0)):s=0}u=26}return e},_.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},_.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},h.mont=function(t){return new k(t)},n(k,_),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},k.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(i),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=r.isub(n).iushrn(this.shift),e=h;return h.cmp(this.m)>=0?e=h.isub(this.m):h.cmpn(0)<0&&(e=h.iadd(this.m)),e._forceRed(this)},k.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new h(0)._forceRed(this);var r=t.mul(i),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=r.isub(n).iushrn(this.shift),o=e;return e.cmp(this.m)>=0?o=e.isub(this.m):e.cmpn(0)<0&&(o=e.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}("undefined"==typeof module||module,this);
},{"buffer":"rDCW"}],"SLso":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"BN",{enumerable:!0,get:function(){return e.default}});var e=r(require("bn.js"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"bn.js":"BOxy"}],"HNIg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BN_ZERO=exports.BN_TWO=exports.BN_THREE=exports.BN_THOUSAND=exports.BN_TEN=exports.BN_SIX=exports.BN_SEVEN=exports.BN_QUINTILL=exports.BN_ONE=exports.BN_NINE=exports.BN_MILLION=exports.BN_MAX_INTEGER=exports.BN_HUNDRED=exports.BN_FOUR=exports.BN_FIVE=exports.BN_EIGHT=exports.BN_BILLION=void 0;var N=require("./bn.js"),e=new N.BN(0);exports.BN_ZERO=e;var r=new N.BN(1);exports.BN_ONE=r;var B=new N.BN(2);exports.BN_TWO=B;var _=new N.BN(3);exports.BN_THREE=_;var s=new N.BN(4);exports.BN_FOUR=s;var t=new N.BN(5);exports.BN_FIVE=t;var o=new N.BN(6);exports.BN_SIX=o;var p=new N.BN(7);exports.BN_SEVEN=p;var x=new N.BN(8);exports.BN_EIGHT=x;var E=new N.BN(9);exports.BN_NINE=E;var I=new N.BN(10);exports.BN_TEN=I;var v=new N.BN(100);exports.BN_HUNDRED=v;var a=new N.BN(1e3);exports.BN_THOUSAND=a;var n=new N.BN(1e6);exports.BN_MILLION=n;var w=new N.BN(1e9);exports.BN_BILLION=w;var O=w.mul(w);exports.BN_QUINTILL=O;var T=new N.BN(Number.MAX_SAFE_INTEGER);exports.BN_MAX_INTEGER=T;
},{"./bn.js":"SLso"}],"Glli":[function(require,module,exports) {
"use strict";function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"Eabu":[function(require,module,exports) {
"use strict";function e(e){return"boolean"==typeof e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isBoolean=e;
},{}],"vZtg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isHex=t;var e=/^0x[a-fA-F0-9]+$/;function t(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!("string"!=typeof t||"0x"!==t&&!e.test(t))&&(-1===r?t.length%2==0||n:t.length===2+Math.ceil(r/4))}
},{}],"fYf8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexHasPrefix=r;var e=require("../is/hex.js");function r(r){return!(!r||!(0,e.isHex)(r,-1,!0)||"0x"!==r.substr(0,2))}
},{"../is/hex.js":"vZtg"}],"XjK7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexStripPrefix=t;var e=require("./hasPrefix.js"),r=/^[a-fA-F0-9]+$/;function t(t){if(!t)return"";if((0,e.hexHasPrefix)(t))return t.substr(2);if(r.test(t))return t;throw new Error("Invalid hex ".concat(t," passed to hexStripPrefix"))}
},{"./hasPrefix.js":"fYf8"}],"DJg4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexToBn=c;var e=i(require("@babel/runtime/helpers/esm/defineProperty")),r=require("../bn/bn.js"),t=require("../is/boolean.js"),n=require("./stripPrefix.js");function i(e){return e&&e.__esModule?e:{default:e}}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function s(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){(0,e.default)(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function u(e){return(e.match(/.{1,2}/g)||[]).reverse().join("")}function c(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{isLe:!1,isNegative:!1};if(!e)return new r.BN(0);var o=s({isLe:!1,isNegative:!1},(0,t.isBoolean)(i)?{isLe:i}:i),c=(0,n.hexStripPrefix)(e),f=new r.BN((o.isLe?u(c):c)||"00",16);return o.isNegative?f.fromTwos(4*c.length):f}
},{"@babel/runtime/helpers/esm/defineProperty":"Glli","../bn/bn.js":"SLso","../is/boolean.js":"Eabu","./stripPrefix.js":"XjK7"}],"y3fw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"bnFromHex",{enumerable:!0,get:function(){return e.hexToBn}});var e=require("../hex/toBn.js");
},{"../hex/toBn.js":"DJg4"}],"AZ7P":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkMaxMin=t;var e=require("../assert.js"),r=require("./bn.js");function t(t,s){return(0,e.assert)(s.length>=1,"Must provide one or more BN arguments"),s.reduce(function(e,s){return r.BN[t](e,s)},s[0])}
},{"../assert.js":"ICoQ","./bn.js":"SLso"}],"FOwf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bnMax=r;var e=require("./util.js");function r(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return(0,e.checkMaxMin)("max",t)}
},{"./util.js":"AZ7P"}],"x612":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bnMin=r;var e=require("./util.js");function r(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];return(0,e.checkMaxMin)("min",n)}
},{"./util.js":"AZ7P"}],"vLlJ":[function(require,module,exports) {
"use strict";function e(e){return"bigint"==typeof e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isBigInt=e;
},{}],"jl98":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isToBn=t;var e=require("./function.js");function t(t){return!!t&&(0,e.isFunction)(t.toBn)}
},{"./function.js":"XXEF"}],"FiF3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bnToBn=t;var e=require("../hex/toBn.js"),r=require("../is/bigInt.js"),i=require("../is/hex.js"),n=require("../is/toBn.js"),s=require("./bn.js");function t(t){return t?(0,i.isHex)(t)?(0,e.hexToBn)(t.toString()):(0,r.isBigInt)(t)?new s.BN(t.toString()):s.BN.isBN(t)?t:(0,n.isToBn)(t)?t.toBn():new s.BN(t):new s.BN(0)}
},{"../hex/toBn.js":"DJg4","../is/bigInt.js":"vLlJ","../is/hex.js":"vZtg","../is/toBn.js":"jl98","./bn.js":"SLso"}],"Mnhm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bnSqrt=o;var e=require("../assert.js"),r=require("./bn.js"),t=require("./consts.js"),s=require("./toBn.js"),n=new r.BN(94906265);function o(o){var u=(0,s.bnToBn)(o);if((0,e.assert)(u.gte(t.BN_ZERO),"square root of negative numbers is not supported"),u.lte(t.BN_MAX_INTEGER))return new r.BN(Math.floor(Math.sqrt(u.toNumber())));for(var i=n.clone();;){var a=u.div(i).iadd(i).ishrn(1);if(i.eq(a)||i.eq(a.sub(t.BN_ONE)))return i;i=a}}
},{"../assert.js":"ICoQ","./bn.js":"SLso","./consts.js":"HNIg","./toBn.js":"FiF3"}],"Bfwc":[function(require,module,exports) {
"use strict";function e(e){return"number"==typeof e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isNumber=e;
},{}],"fXDs":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexToU8a=i;var e=require("../assert.js"),r=require("../is/hex.js"),t=require("./stripPrefix.js");function i(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(!i)return new Uint8Array;(0,e.assert)((0,r.isHex)(i),function(){return"Expected hex value to convert, found '".concat(i,"'")});for(var s=(0,t.hexStripPrefix)(i),a=s.length/2,u=Math.ceil(-1===n?a:n/8),o=new Uint8Array(u),x=Math.max(0,u-a),c=0;c<u;c++)o[c+x]=parseInt(s.substr(2*c,2),16);return o}
},{"../assert.js":"ICoQ","../is/hex.js":"vZtg","./stripPrefix.js":"XjK7"}],"yh9p":[function(require,module,exports) {
"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;
},{}],"JgNJ":[function(require,module,exports) {
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
},{}],"REa7":[function(require,module,exports) {
var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
},{}],"dskh":[function(require,module,exports) {

var global = arguments[3];
var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){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(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(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 a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.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 e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.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}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.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 r=0;r<t;r+=2)b(this,r,r+1);return this},f.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 r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.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 r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=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-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t}
},{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"REa7","buffer":"dskh"}],"af3X":[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
var e=require("buffer").Buffer;function r(r){return e.isBuffer(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isBuffer=r;
},{"buffer":"dskh"}],"oQUU":[function(require,module,exports) {
"use strict";function e(e,t){return e instanceof t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isInstanceOf=e;
},{}],"FEok":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isU8a=r;var e=require("./instanceOf.js");function r(r){return(0,e.isInstanceOf)(r,Uint8Array)}
},{"./instanceOf.js":"oQUU"}],"BrUJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringToU8a=t;var e=require("@polkadot/x-textencoder"),r=new e.TextEncoder;function t(e){return e?r.encode(e.toString()):new Uint8Array}
},{"@polkadot/x-textencoder":"wmao"}],"WdNx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aToU8a=a;var r=require("../assert.js"),e=require("../hex/toU8a.js"),t=require("../is/buffer.js"),o=require("../is/hex.js"),n=require("../is/string.js"),i=require("../is/u8a.js"),s=require("../string/toU8a.js");function u(r){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function a(a){return a?(0,o.isHex)(a)?(0,e.hexToU8a)(a):(0,n.isString)(a)?(0,s.stringToU8a)(a):Array.isArray(a)||(0,t.isBuffer)(a)?new Uint8Array(a):((0,r.assert)((0,i.isU8a)(a),function(){return"Unable to convert ".concat(a.toString()," (typeof ").concat(u(a),") to a Uint8Array")}),a):new Uint8Array}
},{"../assert.js":"ICoQ","../hex/toU8a.js":"fXDs","../is/buffer.js":"af3X","../is/hex.js":"vZtg","../is/string.js":"zz6S","../is/u8a.js":"FEok","../string/toU8a.js":"BrUJ"}],"OzYD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aCmp=t;var r=require("./toU8a.js");function e(r,e){for(var t=0;;){var u=t>=r.length,n=t>=e.length;if(u&&n)return 0;if(u)return-1;if(n)return 1;if(r[t]!==e[t])return r[t]>e[t]?1:-1;t++}}function t(t,u){return e((0,r.u8aToU8a)(t),(0,r.u8aToU8a)(u))}
},{"./toU8a.js":"WdNx"}],"IlAx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aConcat=r;var e=require("./toU8a.js");function r(){for(var r=0,t=0,n=new Array(arguments.length),a=0;a<arguments.length;a++)n[a]=(0,e.u8aToU8a)(a<0||arguments.length<=a?void 0:arguments[a]),r+=n[a].length;for(var o=new Uint8Array(r),l=0;l<n.length;l++)o.set(n[l],t),t+=n[l].length;return o}
},{"./toU8a.js":"WdNx"}],"skdh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aEq=u;var e=require("./cmp.js"),r=require("./toU8a.js");function t(r,t){return r.length===t.length&&0===(0,e.u8aCmp)(r,t)}function u(e,u){return t((0,r.u8aToU8a)(e),(0,r.u8aToU8a)(u))}
},{"./cmp.js":"OzYD","./toU8a.js":"WdNx"}],"lb65":[function(require,module,exports) {
"use strict";function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Math.ceil(t/8);if(-1===t||e.length===n)return e;if(e.length>n)return e.subarray(0,n);var i=new Uint8Array(n);return r?i.set(e,0):i.set(e,n-e.length),i}Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aFixLength=e;
},{}],"KDN7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aSorted=r;var e=require("./cmp.js");function r(r){return r.sort(e.u8aCmp)}
},{"./cmp.js":"OzYD"}],"wFuH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aToHex=a;var r=require("../array/index.js"),e=(0,r.arrayRange)(256).map(function(r){return r.toString(16).padStart(2,"0")});function t(r){for(var t=new Array(r.length),n=0;n<r.length;n++)t[n]=e[r[n]];return t.join("")}function n(r,e){return"".concat(a(r.subarray(0,e),-1,!1),"…").concat(a(r.subarray(r.length-e),-1,!1))}function a(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?"0x":"";if(null==r||!r.length)return a;var u=Math.ceil(e/8);return a+(u>0&&r.length>u?n(r,Math.ceil(u/2)):t(r))}
},{"../array/index.js":"BQEL"}],"R761":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aToBn=t;var e=require("../hex/toBn.js"),r=require("./toHex.js");function t(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{isLe:!0,isNegative:!1};return(0,e.hexToBn)((0,r.u8aToHex)(t),o)}
},{"../hex/toBn.js":"DJg4","./toHex.js":"wFuH"}],"wz28":[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
var e=require("buffer").Buffer;function r(r){return e.from(r||[])}Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aToBuffer=r;
},{"buffer":"dskh"}],"p6zv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.u8aToString=r;var e=require("@polkadot/x-textdecoder"),t=new e.TextDecoder("utf-8");function r(e){return null!=e&&e.length?t.decode(e):""}
},{"@polkadot/x-textdecoder":"BOVF"}],"WDYB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"u8aCmp",{enumerable:!0,get:function(){return e.u8aCmp}}),Object.defineProperty(exports,"u8aConcat",{enumerable:!0,get:function(){return r.u8aConcat}}),Object.defineProperty(exports,"u8aEq",{enumerable:!0,get:function(){return t.u8aEq}}),Object.defineProperty(exports,"u8aFixLength",{enumerable:!0,get:function(){return u.u8aFixLength}}),Object.defineProperty(exports,"u8aSorted",{enumerable:!0,get:function(){return n.u8aSorted}}),Object.defineProperty(exports,"u8aToBn",{enumerable:!0,get:function(){return o.u8aToBn}}),Object.defineProperty(exports,"u8aToBuffer",{enumerable:!0,get:function(){return a.u8aToBuffer}}),Object.defineProperty(exports,"u8aToHex",{enumerable:!0,get:function(){return i.u8aToHex}}),Object.defineProperty(exports,"u8aToString",{enumerable:!0,get:function(){return f.u8aToString}}),Object.defineProperty(exports,"u8aToU8a",{enumerable:!0,get:function(){return c.u8aToU8a}});var e=require("./cmp.js"),r=require("./concat.js"),t=require("./eq.js"),u=require("./fixLength.js"),n=require("./sorted.js"),o=require("./toBn.js"),a=require("./toBuffer.js"),i=require("./toHex.js"),f=require("./toString.js"),c=require("./toU8a.js");
},{"./cmp.js":"OzYD","./concat.js":"IlAx","./eq.js":"skdh","./fixLength.js":"lb65","./sorted.js":"KDN7","./toBn.js":"R761","./toBuffer.js":"wz28","./toHex.js":"wFuH","./toString.js":"p6zv","./toU8a.js":"WdNx"}],"Tpcg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bnToU8a=c;var e=n(require("@babel/runtime/helpers/esm/defineProperty")),t=require("../is/number.js"),r=require("./toBn.js");function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?i(Object(n),!0).forEach(function(r){(0,e.default)(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(e,t){return-1===t.bitLength?new Uint8Array:new Uint8Array(e)}function u(e,t,r){var n=r.isLe,i=r.isNegative,o=new Uint8Array(t),s=i?e.toTwos(8*t):e;return o.set(s.toArray(n?"le":"be",t),0),o}function c(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{bitLength:-1,isLe:!0,isNegative:!1},i=arguments.length>2?arguments[2]:void 0,c=o({bitLength:-1,isLe:!0,isNegative:!1},(0,t.isNumber)(n)?{bitLength:n,isLe:i}:n),b=(0,r.bnToBn)(e),a=-1===c.bitLength?Math.ceil(b.bitLength()/8):Math.ceil((c.bitLength||0)/8);return e?u(b,a,c):s(a,c)}
},{"@babel/runtime/helpers/esm/defineProperty":"Glli","../is/number.js":"Bfwc","./toBn.js":"FiF3"}],"Slop":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bnToHex=c;var e=i(require("@babel/runtime/helpers/esm/defineProperty")),r=require("../is/number.js"),t=require("../u8a/index.js"),n=require("./toU8a.js");function i(e){return e&&e.__esModule?e:{default:e}}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function u(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){(0,e.default)(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var s="0x00";function c(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{bitLength:-1,isLe:!1,isNegative:!1},o=arguments.length>2?arguments[2]:void 0;if(!e)return s;var c=u({isLe:!1,isNegative:!1},(0,r.isNumber)(i)?{bitLength:i,isLe:o}:i);return(0,t.u8aToHex)((0,n.bnToU8a)(e,c))}
},{"@babel/runtime/helpers/esm/defineProperty":"Glli","../is/number.js":"Bfwc","../u8a/index.js":"WDYB","./toU8a.js":"Tpcg"}],"DIBQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={BN:!0,bnFromHex:!0,bnMax:!0,bnMin:!0,bnSqrt:!0,bnToBn:!0,bnToHex:!0,bnToU8a:!0};Object.defineProperty(exports,"BN",{enumerable:!0,get:function(){return n.BN}}),Object.defineProperty(exports,"bnFromHex",{enumerable:!0,get:function(){return t.bnFromHex}}),Object.defineProperty(exports,"bnMax",{enumerable:!0,get:function(){return o.bnMax}}),Object.defineProperty(exports,"bnMin",{enumerable:!0,get:function(){return b.bnMin}}),Object.defineProperty(exports,"bnSqrt",{enumerable:!0,get:function(){return u.bnSqrt}}),Object.defineProperty(exports,"bnToBn",{enumerable:!0,get:function(){return i.bnToBn}}),Object.defineProperty(exports,"bnToHex",{enumerable:!0,get:function(){return s.bnToHex}}),Object.defineProperty(exports,"bnToU8a",{enumerable:!0,get:function(){return c.bnToU8a}});var r=require("./consts.js");Object.keys(r).forEach(function(n){"default"!==n&&"__esModule"!==n&&(Object.prototype.hasOwnProperty.call(e,n)||n in exports&&exports[n]===r[n]||Object.defineProperty(exports,n,{enumerable:!0,get:function(){return r[n]}}))});var n=require("./bn.js"),t=require("./fromHex.js"),o=require("./max.js"),b=require("./min.js"),u=require("./sqrt.js"),i=require("./toBn.js"),s=require("./toHex.js"),c=require("./toU8a.js");
},{"./consts.js":"HNIg","./bn.js":"SLso","./fromHex.js":"y3fw","./max.js":"FOwf","./min.js":"x612","./sqrt.js":"Mnhm","./toBn.js":"FiF3","./toHex.js":"Slop","./toU8a.js":"Tpcg"}],"c1aJ":[function(require,module,exports) {
"use strict";function e(e){return new Uint8Array(e||[])}Object.defineProperty(exports,"__esModule",{value:!0}),exports.bufferToU8a=e;
},{}],"ekuN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"bufferToU8a",{enumerable:!0,get:function(){return e.bufferToU8a}});var e=require("./toU8a.js");
},{"./toU8a.js":"c1aJ"}],"fzOr":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compactToU8a=u;var e=require("../assert.js"),n=require("../bn/index.js"),r=require("../u8a/index.js"),t=new n.BN(2).pow(new n.BN(6)).subn(1),a=new n.BN(2).pow(new n.BN(14)).subn(1),s=new n.BN(2).pow(new n.BN(30)).subn(1);function u(u){var o=(0,n.bnToBn)(u);if(o.lte(t))return new Uint8Array([o.toNumber()<<2]);if(o.lte(a))return(0,n.bnToU8a)(o.shln(2).iadd(n.BN_ONE),16,!0);if(o.lte(s))return(0,n.bnToU8a)(o.shln(2).iadd(n.BN_TWO),32,!0);for(var i=(0,n.bnToU8a)(o),b=i.length;0===i[b-1];)b--;return(0,e.assert)(b>=4,"Invalid length, previous checks match anything less than 2^30"),(0,r.u8aConcat)([3+(b-4<<2)],i.subarray(0,b))}
},{"../assert.js":"ICoQ","../bn/index.js":"DIBQ","../u8a/index.js":"WDYB"}],"qop7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compactAddLength=r;var e=require("../u8a/index.js"),t=require("./toU8a.js");function r(r){return(0,e.u8aConcat)((0,t.compactToU8a)(r.length),r)}
},{"../u8a/index.js":"WDYB","./toU8a.js":"fzOr"}],"H6CZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compactFromU8a=n;var r=require("../bn/index.js"),e=require("../u8a/index.js");function n(n){var i=(0,e.u8aToU8a)(n),u=3&i[0];if(0===u)return[1,new r.BN(i[0]).ishrn(2)];if(1===u)return[2,(0,e.u8aToBn)(i.slice(0,2),!0).ishrn(2)];if(2===u)return[4,(0,e.u8aToBn)(i.slice(0,4),!0).ishrn(2)];var a=1+new r.BN(i[0]).ishrn(2).iadd(r.BN_FOUR).toNumber();return[a,(0,e.u8aToBn)(i.subarray(1,a),!0)]}
},{"../bn/index.js":"DIBQ","../u8a/index.js":"WDYB"}],"P2jl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compactStripLength=i;var r=require("./fromU8a.js");function t(r,t){return u(r)||a(r,t)||n(r,t)||e()}function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(r,t){if(r){if("string"==typeof r)return o(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(r,t):void 0}}function o(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function a(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var n,o,a=[],u=!0,i=!1;try{for(e=e.call(r);!(u=(n=e.next()).done)&&(a.push(n.value),!t||a.length!==t);u=!0);}catch(l){i=!0,o=l}finally{try{u||null==e.return||e.return()}finally{if(i)throw o}}return a}}function u(r){if(Array.isArray(r))return r}function i(e){var n=t((0,r.compactFromU8a)(e),2),o=n[0],a=o+n[1].toNumber();return[a,e.subarray(o,a)]}
},{"./fromU8a.js":"H6CZ"}],"BXdb":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"compactAddLength",{enumerable:!0,get:function(){return e.compactAddLength}}),Object.defineProperty(exports,"compactFromU8a",{enumerable:!0,get:function(){return r.compactFromU8a}}),Object.defineProperty(exports,"compactStripLength",{enumerable:!0,get:function(){return t.compactStripLength}}),Object.defineProperty(exports,"compactToU8a",{enumerable:!0,get:function(){return o.compactToU8a}});var e=require("./addLength.js"),t=require("./stripLength.js"),r=require("./fromU8a.js"),o=require("./toU8a.js");
},{"./addLength.js":"qop7","./stripLength.js":"P2jl","./fromU8a.js":"H6CZ","./toU8a.js":"fzOr"}],"bCFD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.extractTime=d;var e=r(require("@babel/runtime/helpers/esm/defineProperty"));function r(e){return e&&e.__esModule?e:{default:e}}function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function n(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach(function(t){(0,e.default)(r,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}var o=3600,s=24*o;function u(e,r){return{days:e.days+r.days,hours:e.hours+r.hours,milliseconds:e.milliseconds+r.milliseconds,minutes:e.minutes+r.minutes,seconds:e.seconds+r.seconds}}var i={days:0,hours:0,milliseconds:0,minutes:0,seconds:0};function c(e,r){var t=Math.floor(r/24);return u(n(n({},i),{},{days:t}),d(e-t*s*1e3))}function a(e,r){var t=r/60;if(t<24){var s=Math.floor(t);return u(n(n({},i),{},{hours:s}),d(e-s*o*1e3))}return c(e,t)}function f(e,r){var t=r/60;if(t<60){var o=Math.floor(t);return u(n(n({},i),{},{minutes:o}),d(e-60*o*1e3))}return a(e,t)}function l(e){var r=e/1e3;if(r<60){var t=Math.floor(r);return u(n(n({},i),{},{seconds:t}),d(e-1e3*t))}return f(e,r)}function d(e){return e?e<1e3?n(n({},i),{},{milliseconds:e}):l(e):i}
},{"@babel/runtime/helpers/esm/defineProperty":"Glli"}],"KAR8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatDecimal=e;var t=new RegExp("(\\d+?)(?=(\\d{3})+(?!\\d)|$)","g");function e(e){var r=e[0].startsWith("-"),a=r?e.substr(1).match(t):e.match(t);return a?"".concat(r?"-":"").concat(a.join(",")):e}
},{}],"BzLf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SI_MID=exports.SI=void 0,exports.calcSi=o,exports.findSi=r;var e=8;exports.SI_MID=e;var t=[{power:-24,text:"yocto",value:"y"},{power:-21,text:"zepto",value:"z"},{power:-18,text:"atto",value:"a"},{power:-15,text:"femto",value:"f"},{power:-12,text:"pico",value:"p"},{power:-9,text:"nano",value:"n"},{power:-6,text:"micro",value:"µ"},{power:-3,text:"milli",value:"m"},{power:0,text:"Unit",value:"-"},{power:3,text:"Kilo",value:"k"},{power:6,text:"Mill",value:"M"},{power:9,text:"Bill",value:"B"},{power:12,text:"Tril",value:"T"},{power:15,text:"Peta",value:"P"},{power:18,text:"Exa",value:"E"},{power:21,text:"Zeta",value:"Z"},{power:24,text:"Yotta",value:"Y"}];function r(r){for(var o=0;o<t.length;o++)if(t[o].value===r)return t[o];return t[e]}function o(o,l,a){if(a)return r(a);var p=e-1+Math.ceil((o.length-l)/3);return t[p]||t[p<0?0:t.length-1]}exports.SI=t;
},{}],"VArF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatBalance=void 0;var t=require("../bn/toBn.js"),e=require("../is/boolean.js"),i=require("../is/undefined.js"),n=require("./formatDecimal.js"),r=require("./si.js"),o=0,a=r.SI[r.SI_MID].text,c=o,s=a;function u(i){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,s=(0,t.bnToBn)(i).toString();if(0===s.length||"0"===s)return"0";var u=s[0].startsWith("-");u&&(s=s.substr(1));var l=(0,e.isBoolean)(o)?{withSi:o}:o,d=l.decimals,v=void 0===d?a:d,f=l.forceUnit,S=void 0===f?void 0:f,h=l.withSi,I=void 0===h||h,g=l.withSiFull,m=void 0!==g&&g,b=l.withUnit,x=void 0===b||b,j=(0,r.calcSi)(s,v,S),p=s.length-(v+j.power),w=s.substr(0,p),B="".concat("".concat(new Array((p<0?0-p:0)+1).join("0")).concat(s).substr(p<0?0:p),"0000").substr(0,4),D=I||m?"-"===j.value?x?" ".concat((0,e.isBoolean)(x)?j.text:x):"":" ".concat(m?j.text:j.value).concat(x?"".concat(m?" ":"").concat((0,e.isBoolean)(x)?r.SI[r.SI_MID].text:x):""):"";return"".concat(u?"-":"").concat((0,n.formatDecimal)(w||"0"),".").concat(B).concat(D)}var l=u;exports.formatBalance=l,l.calcSi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return(0,r.calcSi)(t,e)},l.findSi=r.findSi,l.getDefaults=function(){return{decimals:c,unit:s}},l.getOptions=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;return r.SI.filter(function(e){var i=e.power;return!(i<0)||t+i>=0})},l.setDefaults=function(t){var e=t.decimals,n=t.unit;c=(0,i.isUndefined)(e)?c:Array.isArray(e)?e[0]:e,s=(0,i.isUndefined)(n)?s:Array.isArray(n)?n[0]:n,r.SI[r.SI_MID].text=s};
},{"../bn/toBn.js":"FiF3","../is/boolean.js":"Eabu","../is/undefined.js":"QCwi","./formatDecimal.js":"KAR8","./si.js":"BzLf"}],"Eb3q":[function(require,module,exports) {
"use strict";function t(t){return t.toString().padStart(2,"0")}function e(e){var n=e.getFullYear().toString(),o=t(e.getMonth()+1),c=t(e.getDate()),r=t(e.getHours()),a=t(e.getMinutes()),u=t(e.getSeconds());return"".concat(n,"-").concat(o,"-").concat(c," ").concat(r,":").concat(a,":").concat(u)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatDate=e;
},{}],"Yq1t":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatElapsed=n;var e=require("../bn/toBn.js");function t(e){return e<15?"".concat(e.toFixed(1),"s"):e<60?"".concat(0|e,"s"):e<3600?"".concat(e/60|0,"m"):"".concat(e/3600|0,"h")}function n(n,o){var a=n&&n.getTime()||0,r=o instanceof Date?o.getTime():(0,e.bnToBn)(o).toNumber();return a&&r?t(Math.max(Math.abs(a-r),0)/1e3):"0.0s"}
},{"../bn/toBn.js":"FiF3"}],"KO6u":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatNumber=t;var e=require("../bn/toBn.js"),r=require("./formatDecimal.js");function t(t){return(0,r.formatDecimal)((0,e.bnToBn)(t).toString())}
},{"../bn/toBn.js":"FiF3","./formatDecimal.js":"KAR8"}],"tBzw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"calcSi",{enumerable:!0,get:function(){return o.calcSi}}),Object.defineProperty(exports,"findSi",{enumerable:!0,get:function(){return o.findSi}}),Object.defineProperty(exports,"formatBalance",{enumerable:!0,get:function(){return e.formatBalance}}),Object.defineProperty(exports,"formatDate",{enumerable:!0,get:function(){return r.formatDate}}),Object.defineProperty(exports,"formatDecimal",{enumerable:!0,get:function(){return t.formatDecimal}}),Object.defineProperty(exports,"formatElapsed",{enumerable:!0,get:function(){return a.formatElapsed}}),Object.defineProperty(exports,"formatNumber",{enumerable:!0,get:function(){return n.formatNumber}});var e=require("./formatBalance.js"),r=require("./formatDate.js"),t=require("./formatDecimal.js"),a=require("./formatElapsed.js"),n=require("./formatNumber.js"),o=require("./si.js");
},{"./formatBalance.js":"VArF","./formatDate.js":"Eb3q","./formatDecimal.js":"KAR8","./formatElapsed.js":"Yq1t","./formatNumber.js":"KO6u","./si.js":"BzLf"}],"hBNt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexAddPrefix=r;var e=require("./hasPrefix.js");function r(r){return r&&(0,e.hexHasPrefix)(r)?r:"0x".concat(r&&r.length%2==1?"0":"").concat(r||"")}
},{"./hasPrefix.js":"fYf8"}],"fwEw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexFixLength=t;var e=require("./addPrefix.js"),r=require("./stripPrefix.js");function t(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,x=arguments.length>2&&void 0!==arguments[2]&&arguments[2],h=Math.ceil(i/4),n=h+2;return(0,e.hexAddPrefix)(-1===i||t.length===n||!x&&t.length<n?(0,r.hexStripPrefix)(t):t.length>n?(0,r.hexStripPrefix)(t).slice(-1*h):"".concat("0".repeat(h)).concat((0,r.hexStripPrefix)(t)).slice(-1*h))}
},{"./addPrefix.js":"hBNt","./stripPrefix.js":"XjK7"}],"KVKy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexToNumber=r;var e=require("./toBn.js");function r(r){return r?(0,e.hexToBn)(r).toNumber():NaN}
},{"./toBn.js":"DJg4"}],"gOOL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexToString=t;var e=require("../u8a/toString.js"),r=require("./toU8a.js");function t(t){return(0,e.u8aToString)((0,r.hexToU8a)(t))}
},{"../u8a/toString.js":"p6zv","./toU8a.js":"fXDs"}],"csge":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"hexAddPrefix",{enumerable:!0,get:function(){return e.hexAddPrefix}}),Object.defineProperty(exports,"hexFixLength",{enumerable:!0,get:function(){return r.hexFixLength}}),Object.defineProperty(exports,"hexHasPrefix",{enumerable:!0,get:function(){return t.hexHasPrefix}}),Object.defineProperty(exports,"hexStripPrefix",{enumerable:!0,get:function(){return n.hexStripPrefix}}),Object.defineProperty(exports,"hexToBn",{enumerable:!0,get:function(){return i.hexToBn}}),Object.defineProperty(exports,"hexToNumber",{enumerable:!0,get:function(){return o.hexToNumber}}),Object.defineProperty(exports,"hexToString",{enumerable:!0,get:function(){return u.hexToString}}),Object.defineProperty(exports,"hexToU8a",{enumerable:!0,get:function(){return x.hexToU8a}});var e=require("./addPrefix.js"),r=require("./fixLength.js"),t=require("./hasPrefix.js"),n=require("./stripPrefix.js"),i=require("./toBn.js"),o=require("./toNumber.js"),u=require("./toString.js"),x=require("./toU8a.js");
},{"./addPrefix.js":"hBNt","./fixLength.js":"fwEw","./hasPrefix.js":"fYf8","./stripPrefix.js":"XjK7","./toBn.js":"DJg4","./toNumber.js":"KVKy","./toString.js":"gOOL","./toU8a.js":"fXDs"}],"PgmC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isAscii=s;var e=require("../u8a/toU8a.js"),r=require("./string.js"),i=[9,10,13];function s(s){return s?!(0,e.u8aToU8a)(s).some(function(e){return e>=127||e<32&&!i.includes(e)}):(0,r.isString)(s)}
},{"../u8a/toU8a.js":"WdNx","./string.js":"zz6S"}],"HDq7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isBn=r;var e=require("../bn/bn.js");function r(r){return e.BN.isBN(r)}
},{"../bn/bn.js":"SLso"}],"qfag":[function(require,module,exports) {
"use strict";function e(e,t){return!!t&&(e===t||e.isPrototypeOf(t))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isChildClass=e;
},{}],"MZrA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isError=e;var r=require("./instanceOf.js");function e(e){return(0,r.isInstanceOf)(e,Error)}
},{"./instanceOf.js":"oQUU"}],"IxS2":[function(require,module,exports) {
"use strict";var c="[a-fA-F\\d:]",n=function(n){return n&&n.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(c,")|(?<=").concat(c,")(?=\\s|$))"):""},t="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",a="[a-fA-F\\d]{1,4}",o="\n(?:\n(?:".concat(a,":){7}(?:").concat(a,"|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8\n(?:").concat(a,":){6}(?:").concat(t,"|:").concat(a,"|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4\n(?:").concat(a,":){5}(?::").concat(t,"|(?::").concat(a,"){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4\n(?:").concat(a,":){4}(?:(?::").concat(a,"){0,1}:").concat(t,"|(?::").concat(a,"){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4\n(?:").concat(a,":){3}(?:(?::").concat(a,"){0,2}:").concat(t,"|(?::").concat(a,"){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4\n(?:").concat(a,":){2}(?:(?::").concat(a,"){0,3}:").concat(t,"|(?::").concat(a,"){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4\n(?:").concat(a,":){1}(?:(?::").concat(a,"){0,4}:").concat(t,"|(?::").concat(a,"){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::").concat(a,"){0,5}:").concat(t,"|(?::").concat(a,"){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),e=new RegExp("(?:^".concat(t,"$)|(?:^").concat(o,"$)")),d=new RegExp("^".concat(t,"$")),r=new RegExp("^".concat(o,"$")),u=function(c){return c&&c.exact?e:new RegExp("(?:".concat(n(c)).concat(t).concat(n(c),")|(?:").concat(n(c)).concat(o).concat(n(c),")"),"g")};u.v4=function(c){return c&&c.exact?d:new RegExp("".concat(n(c)).concat(t).concat(n(c)),"g")},u.v6=function(c){return c&&c.exact?r:new RegExp("".concat(n(c)).concat(o).concat(n(c)),"g")},module.exports=u;
},{}],"UnXv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isIp=r;var e=t(require("ip-regex"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t,r){return"v4"===r?e.default.v4({exact:!0}).test(t):"v6"===r?e.default.v6({exact:!0}).test(t):(0,e.default)({exact:!0}).test(t)}
},{"ip-regex":"IxS2"}],"AbVj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringify=r;var t=require("./is/bigInt.js");function r(r,e){return JSON.stringify(r,function(r,e){return(0,t.isBigInt)(e)?e.toString():e},e)}
},{"./is/bigInt.js":"vLlJ"}],"pOta":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isJsonObject=r;var t=require("../stringify.js");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 r(r){var e="string"!=typeof r?(0,t.stringify)(r):r;try{var n=JSON.parse(e);return"object"===o(n)&&null!==n}catch(y){return!1}}
},{"../stringify.js":"AbVj"}],"fT4F":[function(require,module,exports) {
"use strict";function t(o){return(t="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})(o)}function o(o){return"object"===t(o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isObject=o;
},{}],"X33k":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isObservable=t;var e=require("./function.js"),r=require("./object.js");function t(t){return(0,r.isObject)(t)&&(0,e.isFunction)(t.next)}
},{"./function.js":"XXEF","./object.js":"fT4F"}],"eI5u":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isTestChain=t;var e=/(Development|Local Testnet)$/;function t(t){return!!t&&!!e.test(t.toString())}
},{}],"wkhl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isUtf8=i;var r=require("../u8a/toU8a.js"),e=require("./string.js");function i(i){if(!i)return(0,e.isString)(i);for(var t=(0,r.u8aToU8a)(i),f=t.length,u=0;u<f;)if(t[u]<=127)u+=1;else if(t[u]>=194&&t[u]<=223){if(!(u+1<f))return!1;if(t[u+1]<128||t[u+1]>191)return!1;u+=2}else if(224===t[u]){if(!(u+2<f))return!1;if(t[u+1]<160||t[u+1]>191)return!1;if(t[u+2]<128||t[u+2]>191)return!1;u+=3}else if(t[u]>=225&&t[u]<=236){if(!(u+2<f))return!1;if(t[u+1]<128||t[u+1]>191)return!1;if(t[u+2]<128||t[u+2]>191)return!1;u+=3}else if(237===t[u]){if(!(u+2<f))return!1;if(t[u+1]<128||t[u+1]>159)return!1;if(t[u+2]<128||t[u+2]>191)return!1;u+=3}else if(t[u]>=238&&t[u]<=239){if(!(u+2<f))return!1;if(t[u+1]<128||t[u+1]>191)return!1;if(t[u+2]<128||t[u+2]>191)return!1;u+=3}else if(240===t[u]){if(!(u+3<f))return!1;if(t[u+1]<144||t[u+1]>191)return!1;if(t[u+2]<128||t[u+2]>191)return!1;if(t[u+3]<128||t[u+3]>191)return!1;u+=4}else if(t[u]>=241&&t[u]<=243){if(!(u+3<f))return!1;if(t[u+1]<128||t[u+1]>191)return!1;if(t[u+2]<128||t[u+2]>191)return!1;if(t[u+3]<128||t[u+3]>191)return!1;u+=4}else{if(244!==t[u])return!1;if(!(u+3<f))return!1;if(t[u+1]<128||t[u+1]>143)return!1;if(t[u+2]<128||t[u+2]>191)return!1;if(t[u+3]<128||t[u+3]>191)return!1;u+=4}return!0}
},{"../u8a/toU8a.js":"WdNx","./string.js":"zz6S"}],"wIe6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isWasm=s;var e=require("../u8a/eq.js"),r=new Uint8Array([0,97,115,109]);function s(s){return!!s&&(0,e.u8aEq)(s.subarray(0,4),r)}
},{"../u8a/eq.js":"skdh"}],"PVwn":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"isAscii",{enumerable:!0,get:function(){return e.isAscii}}),Object.defineProperty(exports,"isBigInt",{enumerable:!0,get:function(){return r.isBigInt}}),Object.defineProperty(exports,"isBn",{enumerable:!0,get:function(){return t.isBn}}),Object.defineProperty(exports,"isBoolean",{enumerable:!0,get:function(){return i.isBoolean}}),Object.defineProperty(exports,"isBuffer",{enumerable:!0,get:function(){return n.isBuffer}}),Object.defineProperty(exports,"isChildClass",{enumerable:!0,get:function(){return s.isChildClass}}),Object.defineProperty(exports,"isError",{enumerable:!0,get:function(){return u.isError}}),Object.defineProperty(exports,"isFunction",{enumerable:!0,get:function(){return o.isFunction}}),Object.defineProperty(exports,"isHex",{enumerable:!0,get:function(){return b.isHex}}),Object.defineProperty(exports,"isInstanceOf",{enumerable:!0,get:function(){return c.isInstanceOf}}),Object.defineProperty(exports,"isIp",{enumerable:!0,get:function(){return f.isIp}}),Object.defineProperty(exports,"isJsonObject",{enumerable:!0,get:function(){return j.isJsonObject}}),Object.defineProperty(exports,"isNull",{enumerable:!0,get:function(){return p.isNull}}),Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return a.isNumber}}),Object.defineProperty(exports,"isObject",{enumerable:!0,get:function(){return l.isObject}}),Object.defineProperty(exports,"isObservable",{enumerable:!0,get:function(){return d.isObservable}}),Object.defineProperty(exports,"isString",{enumerable:!0,get:function(){return O.isString}}),Object.defineProperty(exports,"isTestChain",{enumerable:!0,get:function(){return g.isTestChain}}),Object.defineProperty(exports,"isToBn",{enumerable:!0,get:function(){return m.isToBn}}),Object.defineProperty(exports,"isU8a",{enumerable:!0,get:function(){return x.isU8a}}),Object.defineProperty(exports,"isUndefined",{enumerable:!0,get:function(){return y.isUndefined}}),Object.defineProperty(exports,"isUtf8",{enumerable:!0,get:function(){return P.isUtf8}}),Object.defineProperty(exports,"isWasm",{enumerable:!0,get:function(){return q.isWasm}});var e=require("./ascii.js"),r=require("./bigInt.js"),t=require("./bn.js"),n=require("./buffer.js"),i=require("./boolean.js"),s=require("./childClass.js"),u=require("./error.js"),o=require("./function.js"),b=require("./hex.js"),c=require("./instanceOf.js"),f=require("./ip.js"),j=require("./jsonObject.js"),p=require("./null.js"),a=require("./number.js"),l=require("./object.js"),d=require("./observable.js"),O=require("./string.js"),g=require("./testChain.js"),m=require("./toBn.js"),x=require("./u8a.js"),y=require("./undefined.js"),P=require("./utf8.js"),q=require("./wasm.js");
},{"./ascii.js":"PgmC","./bigInt.js":"vLlJ","./bn.js":"HDq7","./buffer.js":"af3X","./boolean.js":"Eabu","./childClass.js":"qfag","./error.js":"MZrA","./function.js":"XXEF","./hex.js":"vZtg","./instanceOf.js":"oQUU","./ip.js":"UnXv","./jsonObject.js":"pOta","./null.js":"RBCU","./number.js":"Bfwc","./object.js":"fT4F","./observable.js":"X33k","./string.js":"zz6S","./testChain.js":"eI5u","./toBn.js":"jl98","./u8a.js":"FEok","./undefined.js":"QCwi","./utf8.js":"wkhl","./wasm.js":"wIe6"}],"pBGv":[function(require,module,exports) {

var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0};
},{}],"v4Ne":[function(require,module,exports) {
var process = require("process");
var r=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.logger=x,exports.loggerFormat=w;var t=require("./format/formatDate.js"),e=require("./is/bn.js"),n=require("./is/buffer.js"),o=require("./is/function.js"),a=require("./is/object.js"),i=require("./is/u8a.js"),u=require("./u8a/toHex.js"),c=require("./u8a/toU8a.js");function l(r,t){return y(r)||s(r,t)||d(r,t)||f()}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var n,o,a=[],i=!0,u=!1;try{for(e=e.call(r);!(i=(n=e.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(c){u=!0,o=c}finally{try{i||null==e.return||e.return()}finally{if(u)throw o}}return a}}function y(r){if(Array.isArray(r))return r}function p(r){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function b(r){return v(r)||g(r)||d(r)||m()}function m(){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 d(r,t){if(r){if("string"==typeof r)return h(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?h(r,t):void 0}}function g(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function v(r){if(Array.isArray(r))return h(r)}function h(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var j={debug:"log",error:"error",log:"log",warn:"warn"};function A(r){return r&&(0,a.isObject)(r)&&r.constructor===Object?Object.keys(r).reduce(function(t,e){return t[e]=w(r[e]),t},{}):r}function w(r){return Array.isArray(r)?r.map(w):(0,e.isBn)(r)?r.toString():(0,i.isU8a)(r)||(0,n.isBuffer)(r)?(0,u.u8aToHex)((0,c.u8aToU8a)(r)):A(r)}function S(r,e,n){var a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;if(1===n.length&&(0,o.isFunction)(n[0])){var u=n[0]();return S(r,e,Array.isArray(u)?u:[u],i)}(a=console)[j[r]].apply(a,[(0,t.formatDate)(new Date),e].concat(b(n.map(w).map(function(r){if(i<=0)return r;var t="".concat(r);return t.length<i?r:"".concat(t.substr(0,i)," ...")}))))}function q(){}function U(t){var e=("object"===(void 0===r?"undefined":p(r))?r:{}).env||{},n=parseInt(e.DEBUG_MAX||"-1",10),o=!1;return(e.DEBUG||"").toLowerCase().split(",").forEach(function(r){r&&("*"===r||t===r||r.endsWith("*")&&t.startsWith(r.slice(0,-1)))&&(o=!0),r&&r.startsWith("-")&&(t===r.slice(1)||r.endsWith("*")&&t.startsWith(r.slice(1,-1)))&&(o=!1)}),[o,isNaN(n)?-1:n]}function x(r){var t="".concat(r.toUpperCase(),":").padStart(16),e=l(U(r.toLowerCase()),2),n=e[0],o=e[1];return{debug:n?function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return S("debug",t,e,o)}:q,error:function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return S("error",t,e)},log:function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return S("log",t,e)},noop:q,warn:function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return S("warn",t,e)}}}
},{"./format/formatDate.js":"Eb3q","./is/bn.js":"HDq7","./is/buffer.js":"af3X","./is/function.js":"XXEF","./is/object.js":"fT4F","./is/u8a.js":"FEok","./u8a/toHex.js":"wFuH","./u8a/toU8a.js":"WdNx","process":"pBGv"}],"hmMX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.memoize=i;var e=require("./is/undefined.js"),n=require("./stringify.js");function r(){return"none"}function i(i){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).getInstanceId,o=void 0===t?r:t,s={},u=function(){for(var r=arguments.length,t=new Array(r),u=0;u<r;u++)t[u]=arguments[u];var d=(0,n.stringify)(t),f=o();return s[f]||(s[f]={}),(0,e.isUndefined)(s[f][d])&&(s[f][d]=i.apply(void 0,t)),s[f][d]};return u.unmemoize=function(){for(var r=arguments.length,i=new Array(r),t=0;t<r;t++)i[t]=arguments[t];var u=(0,n.stringify)(i),d=o();s[d]&&!(0,e.isUndefined)(s[d][u])&&delete s[d][u]},u}
},{"./is/undefined.js":"QCwi","./stringify.js":"AbVj"}],"uwVQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.numberToHex=n;var e=require("../hex/fixLength.js"),i=require("../is/null.js"),r=require("../is/undefined.js");function n(n){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return(0,r.isUndefined)(n)||(0,i.isNull)(n)||isNaN(n)?"0x":(0,e.hexFixLength)(n.toString(16),s,!0)}
},{"../hex/fixLength.js":"fwEw","../is/null.js":"RBCU","../is/undefined.js":"QCwi"}],"Zyxl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.numberToU8a=s;var e=require("../hex/toU8a.js"),r=require("../is/null.js"),i=require("../is/undefined.js"),n=require("./toHex.js");function s(s){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return(0,i.isUndefined)(s)||(0,r.isNull)(s)||isNaN(s)?new Uint8Array:(0,e.hexToU8a)((0,n.numberToHex)(s,u))}
},{"../hex/toU8a.js":"fXDs","../is/null.js":"RBCU","../is/undefined.js":"QCwi","./toHex.js":"uwVQ"}],"mPG8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"numberToHex",{enumerable:!0,get:function(){return e.numberToHex}}),Object.defineProperty(exports,"numberToU8a",{enumerable:!0,get:function(){return r.numberToU8a}});var e=require("./toHex.js"),r=require("./toU8a.js");
},{"./toHex.js":"uwVQ","./toU8a.js":"Zyxl"}],"DzOR":[function(require,module,exports) {
"use strict";function e(e,r){for(var n=arguments.length,t=new Array(n>2?n-2:0),o=2;o<n;o++)t[o-2]=arguments[o];return new Promise(function(n,o){r.apply(e,t.concat(function(e,r){e?o(e):n(r)}))})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.promisify=e;
},{}],"DdPz":[function(require,module,exports) {
"use strict";var e=function(e){for(var r=!1,t=!1,a=!1,s=0;s<e.length;s++){var o=e[s];r&&/[a-zA-Z]/.test(o)&&o.toUpperCase()===o?(e=e.slice(0,s)+"-"+e.slice(s),r=!1,a=t,t=!0,s++):t&&a&&/[a-zA-Z]/.test(o)&&o.toLowerCase()===o?(e=e.slice(0,s-1)+"-"+e.slice(s-1),a=t,t=!1,r=!0):(r=o.toLowerCase()===o&&o.toUpperCase()!==o,a=t,t=o.toUpperCase()===o&&o.toLowerCase()!==o)}return e},r=function(r,t){if("string"!=typeof r&&!Array.isArray(r))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);var a;return 0===(r=Array.isArray(r)?r.map(function(e){return e.trim()}).filter(function(e){return e.length}).join("-"):r.trim()).length?"":1===r.length?t.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=e(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,function(e,r){return r.toUpperCase()}).replace(/\d+(\w|$)/g,function(e){return e.toUpperCase()}),a=r,t.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a)};module.exports=r,module.exports.default=r;
},{}],"VIH3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringCamelCase=r;var e=t(require("camelcase"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t){return(0,e.default)(t.toString())}
},{"camelcase":"DdPz"}],"JDz0":[function(require,module,exports) {
"use strict";function e(e){return e?e.charAt(0).toLowerCase()+e.slice(1):""}Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringLowerFirst=e;
},{}],"Ovop":[function(require,module,exports) {
"use strict";function t(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6;return t.length<=2+2*e?t.toString():"".concat(t.substr(0,e),"…").concat(t.slice(-e))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringShorten=t;
},{}],"zhUw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringToHex=t;var e=require("../u8a/toHex.js"),r=require("./toU8a.js");function t(t){return(0,e.u8aToHex)((0,r.stringToU8a)(t))}
},{"../u8a/toHex.js":"wFuH","./toU8a.js":"BrUJ"}],"u8uV":[function(require,module,exports) {
"use strict";function e(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringUpperFirst=e;
},{}],"N5b4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"stringCamelCase",{enumerable:!0,get:function(){return e.stringCamelCase}}),Object.defineProperty(exports,"stringLowerFirst",{enumerable:!0,get:function(){return r.stringLowerFirst}}),Object.defineProperty(exports,"stringShorten",{enumerable:!0,get:function(){return t.stringShorten}}),Object.defineProperty(exports,"stringToHex",{enumerable:!0,get:function(){return n.stringToHex}}),Object.defineProperty(exports,"stringToU8a",{enumerable:!0,get:function(){return i.stringToU8a}}),Object.defineProperty(exports,"stringUpperFirst",{enumerable:!0,get:function(){return s.stringUpperFirst}});var e=require("./camelCase.js"),r=require("./lowerFirst.js"),t=require("./shorten.js"),n=require("./toHex.js"),i=require("./toU8a.js"),s=require("./upperFirst.js");
},{"./camelCase.js":"VIH3","./lowerFirst.js":"JDz0","./shorten.js":"Ovop","./toHex.js":"zhUw","./toU8a.js":"BrUJ","./upperFirst.js":"u8uV"}],"mm3z":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={packageInfo:!0};Object.defineProperty(exports,"packageInfo",{enumerable:!0,get:function(){return r.packageInfo}}),require("./detectPackage.js");var r=require("./packageInfo.js"),t=require("./array/index.js");Object.keys(t).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===t[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return t[r]}}))});var o=require("./assert.js");Object.keys(o).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===o[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return o[r]}}))});var n=require("./bn/index.js");Object.keys(n).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===n[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return n[r]}}))});var c=require("./buffer/index.js");Object.keys(c).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===c[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return c[r]}}))});var s=require("./compact/index.js");Object.keys(s).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===s[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return s[r]}}))});var u=require("./extractTime.js");Object.keys(u).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===u[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return u[r]}}))});var p=require("./format/index.js");Object.keys(p).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===p[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return p[r]}}))});var a=require("./hex/index.js");Object.keys(a).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===a[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return a[r]}}))});var i=require("./is/index.js");Object.keys(i).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===i[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return i[r]}}))});var f=require("./logger.js");Object.keys(f).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===f[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return f[r]}}))});var l=require("./memoize.js");Object.keys(l).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===l[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return l[r]}}))});var b=require("./number/index.js");Object.keys(b).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===b[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return b[r]}}))});var y=require("./promisify.js");Object.keys(y).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===y[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return y[r]}}))});var j=require("./string/index.js");Object.keys(j).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===j[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return j[r]}}))});var O=require("./stringify.js");Object.keys(O).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===O[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return O[r]}}))});var d=require("./u8a/index.js");Object.keys(d).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===d[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return d[r]}}))});var x=require("./versionDetect.js");Object.keys(x).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===x[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return x[r]}}))});
},{"./detectPackage.js":"Hxmh","./packageInfo.js":"WiBo","./array/index.js":"BQEL","./assert.js":"ICoQ","./bn/index.js":"DIBQ","./buffer/index.js":"ekuN","./compact/index.js":"BXdb","./extractTime.js":"bCFD","./format/index.js":"tBzw","./hex/index.js":"csge","./is/index.js":"PVwn","./logger.js":"v4Ne","./memoize.js":"hmMX","./number/index.js":"mPG8","./promisify.js":"DzOR","./string/index.js":"N5b4","./stringify.js":"AbVj","./u8a/index.js":"WDYB","./versionDetect.js":"AgAp"}],"Jwvg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("@babel/runtime/helpers/esm/classPrivateFieldLooseBase")),t=i(require("@babel/runtime/helpers/esm/classPrivateFieldLooseKey")),s=i(require("eventemitter3")),r=require("@polkadot/util");function i(e){return e&&e.__esModule?e:{default:e}}const n=(0,r.logger)("PostMessageProvider");let a;var o=(0,t.default)("eventemitter"),d=(0,t.default)("isConnected"),u=(0,t.default)("subscriptions");class l{constructor(t){Object.defineProperty(this,o,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:!1}),Object.defineProperty(this,u,{writable:!0,value:{}}),(0,e.default)(this,o)[o]=new s.default,a=t}clone(){return new l(a)}async connect(){console.error("PostMessageProvider.disconnect() is not implemented.")}async disconnect(){console.error("PostMessageProvider.disconnect() is not implemented.")}get hasSubscriptions(){return!0}get isConnected(){return(0,e.default)(this,d)[d]}listProviders(){return a("pub(rpc.listProviders)",void 0)}on(t,s){return(0,e.default)(this,o)[o].on(t,s),()=>{(0,e.default)(this,o)[o].removeListener(t,s)}}async send(t,s,r){if(r){const{callback:i,type:n}=r,o=await a("pub(rpc.subscribe)",{method:t,params:s,type:n},e=>{r.callback(null,e)});return(0,e.default)(this,u)[u][`${n}::${o}`]=i,o}return a("pub(rpc.send)",{method:t,params:s})}async startProvider(t){(0,e.default)(this,d)[d]=!1,(0,e.default)(this,o)[o].emit("disconnected");const s=await a("pub(rpc.startProvider)",t);return a("pub(rpc.subscribeConnected)",null,t=>((0,e.default)(this,d)[d]=t,t?(0,e.default)(this,o)[o].emit("connected"):(0,e.default)(this,o)[o].emit("disconnected"),!0)),s}subscribe(e,t,s,r){return this.send(t,s,{callback:r,type:e})}async unsubscribe(t,s,i){const a=`${t}::${i}`;return(0,r.isUndefined)((0,e.default)(this,u)[u][a])?(n.debug(()=>`Unable to find active subscription=${a}`),!1):(delete(0,e.default)(this,u)[u][a],this.send(s,[i]))}}exports.default=l;
},{"@babel/runtime/helpers/esm/classPrivateFieldLooseBase":"VCN6","@babel/runtime/helpers/esm/classPrivateFieldLooseKey":"HsZ4","eventemitter3":"JJlS","@polkadot/util":"mm3z"}],"j58w":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/esm/defineProperty"));function t(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach(function(r){(0,e.default)(t,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}let o,c=0;class s{constructor(e){o=e}async signPayload(e){const t=++c;return n(n({},await o("pub(extrinsic.sign)",e)),{},{id:t})}async signRaw(e){const t=++c;return n(n({},await o("pub(bytes.sign)",e)),{},{id:t})}}exports.default=s;
},{"@babel/runtime/helpers/esm/defineProperty":"Glli"}],"vUJC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("./Accounts.js")),t=i(require("./Metadata.js")),s=i(require("./PostMessageProvider.js")),r=i(require("./Signer.js"));function i(e){return e&&e.__esModule?e:{default:e}}class a{constructor(i){this.accounts=void 0,this.metadata=void 0,this.provider=void 0,this.signer=void 0,this.accounts=new e.default(i),this.metadata=new t.default(i),this.provider=new s.default(i),this.signer=new r.default(i)}}exports.default=a;
},{"./Accounts.js":"EW12","./Metadata.js":"adMO","./PostMessageProvider.js":"Jwvg","./Signer.js":"j58w"}],"q70l":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.enable=o,exports.handleResponse=u,exports.redirectIfPhishing=i,exports.sendMessage=t;var e=r(require("./Injected.js"));function r(e){return e&&e.__esModule?e:{default:e}}const s={};let n=0;function t(e,r,t){return new Promise((o,i)=>{const u=`${Date.now()}.${++n}`;s[u]={reject:i,resolve:o,subscriber:t};const c={id:u,message:e,origin:"page",request:r||null};window.postMessage(c,"*")})}async function o(r){return await t("pub(authorize.tab)",{origin:r}),new e.default(t)}async function i(){return await t("pub(phishing.redirectIfDenied)")}function u(e){const r=s[e.id];r?(r.subscriber||delete s[e.id],e.subscription?r.subscriber(e.subscription):e.error?r.reject(new Error(e.error)):r.resolve(e.response)):console.error(`Unknown response: ${JSON.stringify(e)}`)}
},{"./Injected.js":"vUJC"}],"ZSaT":[function(require,module,exports) {
"use strict";function e(e,{name:n,version:t}){const i=window;i.injectedWeb3=i.injectedWeb3||{},i.injectedWeb3[n]={enable:n=>e(n),version:t}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.injectExtension=e;
},{}],"GzV5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){return function(){var e=this;this.addHandler=function(t,s,r){e._messageHandlers.set(t,{resolve:s,reject:r})},this.getHandler=function(t){return e._messageHandlers.get(t)},this._messageHandlers=new Map}}();exports.default=e;
},{}],"EHrm":[function(require,module,exports) {
module.exports={name:"@pezkuwi/extension",description:"A Novawallet signer for the @polkadot/api",version:"0.1.0",author:"Ruslan Rezin <ruslan@pezkuwi.io>",license:"Apache-2",scripts:{clean:"rm -rf dist .cache",build:"rm -rf dist && parcel build src/index.ts --no-source-maps -o nova_min.js -d dist",lint:"prettier --write 'src/**/*.ts'",test:"env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register -r jsdom-global/register 'src/test/**/*.ts' --timeout 20000","jest-init":"jest --init"},dependencies:{"@babel/plugin-transform-modules-commonjs":"^7.16.5","@babel/preset-typescript":"^7.16.5","@babel/runtime":"^7.11.2","@polkadot/extension-base":"^0.38.4","@polkadot/extension-dapp":"^0.38.4","@polkadot/extension-inject":"^0.38.4","@types/chai":"^4.3.0","@types/mocha":"^9.0.0","babel-jest":"^27.4.5",chai:"^4.3.4","jest-cli":"^27.4.5","jsdom-global":"^3.0.2",mocha:"^9.1.3",parcel:"^2.14.4","ts-jest":"^27.1.2","ts-node":"^10.4.0"},devDependencies:{"@babel/core":"^7.8.3","@babel/preset-env":"^7.8.3","babel-loader":"^8.0.6",jest:"^27.4.5","parcel-bundler":"^1.12.4","parcel-plugin-static-files-copy":"^2.6.0",prettier:"^1.19.1",typescript:"^4.5.4"},staticFiles:{staticPath:["extension"]},jest:{transform:{"^.+\\.(t|j)s?$":"ts-jest"}}};
},{}],"QCba":[function(require,module,exports) {
"use strict";var e=this&&this.__assign||function(){return(e=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},t=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,r){function i(e){try{u(s.next(e))}catch(t){r(t)}}function a(e){try{u(s.throw(e))}catch(t){r(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,a)}u((s=s.apply(e,t||[])).next())})},n=this&&this.__generator||function(e,t){var n,s,o,r,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,s&&(o=2&r[0]?s.return:r[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,r[1])).done)return o;switch(s=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,s=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){i=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){i.label=r[1];break}if(6===r[0]&&i.label<o[1]){i.label=o[1],o=r;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(r);break}o[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(a){r=[6,a],s=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var o=require("@polkadot/extension-base/page"),r=require("@polkadot/extension-inject"),i=s(require("./handlers")),a=s(require("../package.json"));function u(){(0,r.injectExtension)(o.enable,{name:"polkadot-js",version:a.default.version}),window.injectedWeb3["pezkuwi-wallet"]=window.injectedWeb3["polkadot-js"],window.injectedWeb3["pezkuwi-js"]=window.injectedWeb3["polkadot-js"]}var c=function(){function s(){var e=this;this.handlers=new i.default,window.send=this.sendRequest,window.addEventListener("message",function(t){var n=t.data;t.source===window&&("content"===n.origin?n.id?(0,o.handleResponse)(n):console.error("Missing id for response."):"page"===n.origin&&e.handleMessage(n))}),u(),window.walletExtension={onAppResponse:this.onAppResponse.bind(this),onAppSubscription:this.onAppSubscription.bind(this),isPezkuwiWallet:!0}}return s.prototype.postResponse=function(e){this._postMessage("content",e)},s.prototype.sendRequest=function(e){this._postMessage("dapp-request",e)},s.prototype._postMessage=function(t,n){window.postMessage(e(e({},n),{origin:t}),"*")},s.prototype.sendAppRequest=function(e){var s=e.id,o=e.message,r=e.request;return t(this,void 0,void 0,function(){var e=this;return n(this,function(t){return[2,new Promise(function(t,n){e.handlers.addHandler(s,t,n),console.log("Saved handler for id: {id}"),e.sendRequest({id:s,msgType:o,request:r,url:window.location.href})})]})})},s.prototype.onAppResponse=function(e,t,n){var s=this.handlers.getHandler(e);console.log("Got handler for id: {id}"),s&&(n?s.reject(n):s.resolve(t))},s.prototype.onAppSubscription=function(e,t){this.postResponse({id:e,subscription:t})},s.prototype.handleMessage=function(e){return t(this,void 0,void 0,function(){var t,s;return n(this,function(n){switch(n.label){case 0:switch(e.message){case"pub(authorize.tab)":case"pub(metadata.list)":case"pub(metadata.provide)":case"pub(accounts.list)":case"pub(accounts.subscribe)":case"pub(bytes.sign)":case"pub(extrinsic.sign)":return[3,1]}return[3,4];case 1:return n.trys.push([1,3,,4]),[4,this.sendAppRequest(e)];case 2:return t=n.sent(),[2,this.postResponse({id:e.id,response:t})];case 3:return s=n.sent(),[2,this.postResponse({id:e.id,error:s.message})];case 4:throw new Error("Unable to handle message: ".concat(e.message))}})})},s}(),p=new c;exports.default=p;
},{"@polkadot/extension-base/page":"q70l","@polkadot/extension-inject":"ZSaT","./handlers":"GzV5","../package.json":"EHrm"}]},{},["QCba"], null)