@dcl/explorer-website 0.1.0-7350656702.commit-73b787e → 0.1.0-7356822947.commit-3ba8f9c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset-manifest.json +43 -42
- package/index.html +1 -1
- package/package.json +3 -3
- package/static/css/2.83af3e14.chunk.css +65 -0
- package/static/css/2.83af3e14.chunk.css.map +1 -0
- package/static/css/main.31dac7ef.chunk.css +2 -0
- package/static/css/main.31dac7ef.chunk.css.map +1 -0
- package/static/js/2.c7b2e3c4.chunk.js +9 -0
- package/static/js/{2.96dba9bc.chunk.js.LICENSE.txt → 2.c7b2e3c4.chunk.js.LICENSE.txt} +37 -12
- package/static/js/2.c7b2e3c4.chunk.js.map +1 -0
- package/static/js/3.8193ec10.chunk.js +3 -0
- package/static/js/3.8193ec10.chunk.js.map +1 -0
- package/static/js/4.693228e1.chunk.js +3 -0
- package/static/js/{4.d0826fe3.chunk.js.LICENSE.txt → 4.693228e1.chunk.js.LICENSE.txt} +12 -0
- package/static/js/4.693228e1.chunk.js.map +1 -0
- package/static/js/5.254a29b0.chunk.js +2 -0
- package/static/js/5.254a29b0.chunk.js.map +1 -0
- package/static/js/6.edc69014.chunk.js +2 -0
- package/static/js/{6.f88c5c16.chunk.js.map → 6.edc69014.chunk.js.map} +1 -1
- package/static/js/main.401d150b.chunk.js +2 -0
- package/static/js/main.401d150b.chunk.js.map +1 -0
- package/static/js/{runtime-main.9ee1b48a.js → runtime-main.36223e30.js} +2 -2
- package/static/js/{runtime-main.9ee1b48a.js.map → runtime-main.36223e30.js.map} +1 -1
- package/static/media/back.77e04801.svg +3 -0
- package/static/media/index.41331bdf.cjs +1 -0
- package/static/media/party.dd992607.png +0 -0
- package/static/css/2.f35738d5.chunk.css +0 -65
- package/static/css/2.f35738d5.chunk.css.map +0 -1
- package/static/css/main.b17e4bad.chunk.css +0 -2
- package/static/css/main.b17e4bad.chunk.css.map +0 -1
- package/static/js/2.96dba9bc.chunk.js +0 -3
- package/static/js/2.96dba9bc.chunk.js.map +0 -1
- package/static/js/3.d008a063.chunk.js +0 -3
- package/static/js/3.d008a063.chunk.js.map +0 -1
- package/static/js/4.d0826fe3.chunk.js +0 -3
- package/static/js/4.d0826fe3.chunk.js.map +0 -1
- package/static/js/5.7be1a099.chunk.js +0 -2
- package/static/js/5.7be1a099.chunk.js.map +0 -1
- package/static/js/6.f88c5c16.chunk.js +0 -2
- package/static/js/main.cee4e8a4.chunk.js +0 -2
- package/static/js/main.cee4e8a4.chunk.js.map +0 -1
- /package/static/js/{3.d008a063.chunk.js.LICENSE.txt → 3.8193ec10.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 3.8193ec10.chunk.js.LICENSE.txt */
|
|
2
|
+
(this["webpackJsonp@dcl/explorer-website"]=this["webpackJsonp@dcl/explorer-website"]||[]).push([[3],{1037:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const r=n(1138),i=n(1103);var o=n(1138);Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return o.CoinbaseWalletSDK}});var s=n(1103);Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return s.CoinbaseWalletProvider}}),e.default=r.CoinbaseWalletSDK,"undefined"!==typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},1048:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(81),i=n(1077),o=n(1141),s=n(1051),a=n(1110),u=n(1076),c=n(1109),l=function(t){function e(n,r,i){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=o.a;break;case 1:if(!n){s.destination=o.a;break}if("object"===typeof n){n instanceof e?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new h(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new h(s,n,r,i)}return s}return r.__extends(e,t),e.prototype[a.a]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(s.a),h=function(t){function e(e,n,r,s){var a,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return Object(i.a)(n)?a=n:n&&(a=n.next,r=n.error,s=n.complete,n!==o.a&&(c=Object.create(n),Object(i.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=r,u._complete=s,u}return r.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=u.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(c.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(c.a)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};u.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),u.a.useDeprecatedSynchronousErrorHandling)throw n;Object(c.a)(n)}},e.prototype.__tryOrSetError=function(t,e,n){if(!u.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return u.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(Object(c.a)(r),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},1049:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1113),i=n(1048),o=n(1110),s=n(1141);var a=n(1062),u=n(1088),c=n(1076),l=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,a=function(t,e,n){if(t){if(t instanceof i.a)return t;if(t[o.a])return t[o.a]()}return t||e||n?new i.a(t,e,n):new i.a(s.a)}(t,e,n);if(r?a.add(r.call(a,this.source)):a.add(this.source||c.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),c.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){c.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),Object(r.a)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=h(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(n){r(n),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[a.a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:Object(u.b)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=h(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function h(t){if(t||(t=c.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},1050:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return c}));var r=n(81),i=n(1048),o=n(1049),s=n(1101),a=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return r.__extends(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(i.a),u=(i.a,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(i.a));i.a;function c(t,e){if(!e.closed){if(t instanceof o.a)return t.subscribe(e);var n;try{n=Object(s.a)(t)(e)}catch(r){e.error(r)}return n}}},1051:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(1054),i=n(1112),o=n(1077),s=n(1111),a=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this,a=n._parentOrParents,c=n._ctorUnsubscribe,l=n._unsubscribe,h=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,a instanceof t)a.remove(this);else if(null!==a)for(var d=0;d<a.length;++d){a[d].remove(this)}if(Object(o.a)(l)){c&&(this._unsubscribe=void 0);try{l.call(this)}catch(b){e=b instanceof s.a?u(b.errors):[b]}}if(Object(r.a)(h)){d=-1;for(var f=h.length;++d<f;){var p=h[d];if(Object(i.a)(p))try{p.unsubscribe()}catch(b){e=e||[],b instanceof s.a?e=e.concat(u(b.errors)):e.push(b)}}}if(e)throw new s.a(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!==typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=n._parentOrParents;if(null===i)n._parentOrParents=this;else if(i instanceof t){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function u(t){return t.reduce((function(t,e){return t.concat(e instanceof s.a?e.errors:e)}),[])}},1052:function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(81),i=n(1049),o=n(1048),s=n(1051),a=n(1078),u=n(1142),c=n(1110),l=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.__extends(e,t),e}(o.a),h=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.__extends(e,t),e.prototype[c.a]=function(){return new l(this)},e.prototype.lift=function(t){var e=new d(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new a.a;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new a.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new a.a;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new a.a;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new a.a;return this.hasError?(t.error(this.thrownError),s.a.EMPTY):this.isStopped?(t.complete(),s.a.EMPTY):(this.observers.push(t),new u.a(this,t))},e.prototype.asObservable=function(){var t=new i.a;return t.source=this,t},e.create=function(t,e){return new d(t,e)},e}(i.a),d=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return r.__extends(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):s.a.EMPTY},e}(h)},1053:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=n(1086),i=new(n(1081).a)(r.a),o=i},1054:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return Array.isArray||function(t){return t&&"number"===typeof t.length}}()},1055:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(81),i=n(1048);function o(t,e){return function(n){if("function"!==typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},t}(),a=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(i.a)},1056:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(1049),i=new r.a((function(t){return t.complete()}));function o(t){return t?function(t){return new r.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},1057:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1049),i=n(1101),o=n(1136);function s(t,e){return e?Object(o.a)(t,e):t instanceof r.a?t:new r.a(Object(i.a)(t))}},1059:function(t,e,n){"use strict";function r(t){return t&&"function"===typeof t.schedule}n.d(e,"a",(function(){return r}))},1060:function(t,e,n){"use strict";function r(t){return t}n.d(e,"a",(function(){return r}))},1061:function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createQrUrl=e.getFavicon=e.range=e.isBigNumber=e.ensureParsedJSONObject=e.ensureBN=e.ensureRegExpString=e.ensureIntNumber=e.ensureBuffer=e.ensureAddressString=e.ensureEvenLengthHexString=e.ensureHexString=e.isHexString=e.prepend0x=e.strip0x=e.has0xPrefix=e.hexStringFromIntNumber=e.intNumberFromHexString=e.bigIntStringFromBN=e.hexStringFromBuffer=e.hexStringToUint8Array=e.uint8ArrayToHex=e.randomBytesHex=void 0;const i=r(n(17)),o=n(1174),s=n(1127),a=/^[0-9]*$/,u=/^[a-f0-9]*$/;function c(t){return[...t].map((t=>t.toString(16).padStart(2,"0"))).join("")}function l(t){return t.startsWith("0x")||t.startsWith("0X")}function h(t){return l(t)?t.slice(2):t}function d(t){return l(t)?"0x"+t.slice(2):"0x"+t}function f(t){if("string"!==typeof t)return!1;const e=h(t).toLowerCase();return u.test(e)}function p(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof t){const n=h(t).toLowerCase();if(u.test(n))return(0,s.HexString)(e?"0x"+n:n)}throw new Error(`"${String(t)}" is not a hexadecimal string`)}function b(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=p(t,!1);return n.length%2===1&&(n=(0,s.HexString)("0"+n)),e?(0,s.HexString)("0x"+n):n}function y(t){if("number"===typeof t&&Number.isInteger(t))return(0,s.IntNumber)(t);if("string"===typeof t){if(a.test(t))return(0,s.IntNumber)(Number(t));if(f(t))return(0,s.IntNumber)(new i.default(b(t,!1),16).toNumber())}throw new Error(`Not an integer: ${String(t)}`)}function g(t){if(null==t||"function"!==typeof t.constructor)return!1;const{constructor:e}=t;return"function"===typeof e.config&&"number"===typeof e.EUCLID}e.randomBytesHex=function(t){return c(crypto.getRandomValues(new Uint8Array(t)))},e.uint8ArrayToHex=c,e.hexStringToUint8Array=function(t){return new Uint8Array(t.match(/.{1,2}/g).map((t=>parseInt(t,16))))},e.hexStringFromBuffer=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=t.toString("hex");return(0,s.HexString)(e?"0x"+n:n)},e.bigIntStringFromBN=function(t){return(0,s.BigIntString)(t.toString(10))},e.intNumberFromHexString=function(t){return(0,s.IntNumber)(new i.default(b(t,!1),16).toNumber())},e.hexStringFromIntNumber=function(t){return(0,s.HexString)("0x"+new i.default(t).toString(16))},e.has0xPrefix=l,e.strip0x=h,e.prepend0x=d,e.isHexString=f,e.ensureHexString=p,e.ensureEvenLengthHexString=b,e.ensureAddressString=function(t){if("string"===typeof t){const e=h(t).toLowerCase();if(f(e)&&40===e.length)return(0,s.AddressString)(d(e))}throw new Error(`Invalid Ethereum address: ${String(t)}`)},e.ensureBuffer=function(e){if(t.isBuffer(e))return e;if("string"===typeof e){if(f(e)){const n=b(e,!1);return t.from(n,"hex")}return t.from(e,"utf8")}throw new Error(`Not binary data: ${String(e)}`)},e.ensureIntNumber=y,e.ensureRegExpString=function(t){if(t instanceof RegExp)return(0,s.RegExpString)(t.toString());throw new Error(`Not a RegExp: ${String(t)}`)},e.ensureBN=function(t){if(null!==t&&(i.default.isBN(t)||g(t)))return new i.default(t.toString(10),10);if("number"===typeof t)return new i.default(y(t));if("string"===typeof t){if(a.test(t))return new i.default(t,10);if(f(t))return new i.default(b(t,!1),16)}throw new Error(`Not an integer: ${String(t)}`)},e.ensureParsedJSONObject=function(t){if("string"===typeof t)return JSON.parse(t);if("object"===typeof t)return t;throw new Error(`Not a JSON string or an object: ${String(t)}`)},e.isBigNumber=g,e.range=function(t,e){return Array.from({length:e-t},((e,n)=>t+n))},e.getFavicon=function(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:n}=document.location,r=t?t.getAttribute("href"):null;return!r||r.startsWith("javascript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?e+r:`${e}//${n}${r}`},e.createQrUrl=function(t,e,n,r){const i=r?"parent-id":"id";return`${n}/#/link?${(0,o.stringify)({[i]:t,secret:e,server:n,v:"1"})}`}}).call(this,n(294).Buffer)},1062:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"===typeof Symbol&&Symbol.observable||"@@observable"}()},1063:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(81),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(1048).a)},1064:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(81),i=n(1048);function o(t,e){return function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)},e}(i.a)},1067:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(81),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(1048).a),o=n(1101),s=n(1049);function a(t,e,n,r,a){if(void 0===a&&(a=new i(t,n,r)),!a.closed)return e instanceof s.a?e.subscribe(a):Object(o.a)(e)(a)}},1068:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return a}));var r,i=n(1056),o=n(1079),s=n(1092);r||(r={});var a=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"===typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Object(o.a)(this.value);case"E":return Object(s.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return"undefined"!==typeof e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},1069:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},1070:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}()},1071:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return l}));var r=n(81),i=n(1055),o=n(1057),s=n(1050);function a(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof e?function(r){return r.pipe(a((function(n,r){return Object(o.a)(t(n,r)).pipe(Object(i.a)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"===typeof e&&(n=e),function(e){return e.lift(new u(t,n))})}var u=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.concurrent))},t}(),c=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this.active++,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new s.a(this),n=this.destination;n.add(e);var r=Object(s.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(s.b),l=a},1072:function(t,e,n){"use strict";var r={};function i(t,e,n){n||(n=Error);var i=function(t){var n,r;function i(n,r,i){return t.call(this,function(t,n,r){return"string"===typeof e?e:e(t,n,r)}(n,r,i))||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function o(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,s,a;if("string"===typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))a="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var u=function(t,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},1073:function(t,e,n){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(1151),o=n(1155);n(463)(c,i);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,n(101))},1074:function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return v})),n.d(e,"Fragment",(function(){return m})),n.d(e,"cloneElement",(function(){return H})),n.d(e,"createContext",(function(){return U})),n.d(e,"createElement",(function(){return b})),n.d(e,"createRef",(function(){return g})),n.d(e,"h",(function(){return b})),n.d(e,"hydrate",(function(){return F})),n.d(e,"isValidElement",(function(){return s})),n.d(e,"options",(function(){return i})),n.d(e,"render",(function(){return B})),n.d(e,"toChildArray",(function(){return C}));var r,i,o,s,a,u,c,l={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function f(t,e){for(var n in e)t[n]=e[n];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,n){var i,o,s,a={};for(s in e)"key"==s?i=e[s]:"ref"==s?o=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return y(t,a,i,o,null)}function y(t,e,n,r,s){var a={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++o:s};return null==s&&null!=i.vnode&&i.vnode(a),a}function g(){return{current:null}}function m(t){return t.children}function v(t,e){this.props=t,this.context=e}function _(t,e){if(null==e)return t.__?_(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?_(t):null}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function S(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!E.__r++||u!==i.debounceRendering)&&((u=i.debounceRendering)||setTimeout)(E)}function E(){for(var t;E.__r=a.length;)t=a.sort((function(t,e){return t.__v.__b-e.__v.__b})),a=[],t.some((function(t){var e,n,r,i,o,s;t.__d&&(o=(i=(e=t).__v).__e,(s=e.__P)&&(n=[],(r=f({},i)).__v=i.__v+1,I(s,i,r,e.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?_(i):o,i.__h),N(n,i),i.__e!=o&&w(i)))}))}function x(t,e,n,r,i,o,s,a,u,c){var d,f,p,b,g,v,w,S=r&&r.__k||h,E=S.length;for(n.__k=[],d=0;d<e.length;d++)if(null!=(b=n.__k[d]=null==(b=e[d])||"boolean"==typeof b?null:"string"==typeof b||"number"==typeof b||"bigint"==typeof b?y(null,b,null,null,b):Array.isArray(b)?y(m,{children:b},null,null,null):b.__b>0?y(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)){if(b.__=n,b.__b=n.__b+1,null===(p=S[d])||p&&b.key==p.key&&b.type===p.type)S[d]=void 0;else for(f=0;f<E;f++){if((p=S[f])&&b.key==p.key&&b.type===p.type){S[f]=void 0;break}p=null}I(t,b,p=p||l,i,o,s,a,u,c),g=b.__e,(f=b.ref)&&p.ref!=f&&(w||(w=[]),p.ref&&w.push(p.ref,null,b),w.push(f,b.__c||g,b)),null!=g?(null==v&&(v=g),"function"==typeof b.type&&b.__k===p.__k?b.__d=u=k(b,u,t):u=A(t,b,p,S,g,u),"function"==typeof n.type&&(n.__d=u)):u&&p.__e==u&&u.parentNode!=t&&(u=_(p))}for(n.__e=v,d=E;d--;)null!=S[d]&&L(S[d],S[d]);if(w)for(d=0;d<w.length;d++)P(w[d],w[++d],w[++d])}function k(t,e,n){for(var r,i=t.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=t,e="function"==typeof r.type?k(r,e,n):A(n,r,r,i,r.__e,e));return e}function C(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){C(t,e)})):e.push(t)),e}function A(t,e,n,r,i,o){var s,a,u;if(void 0!==e.__d)s=e.__d,e.__d=void 0;else if(null==n||i!=o||null==i.parentNode)t:if(null==o||o.parentNode!==t)t.appendChild(i),s=null;else{for(a=o,u=0;(a=a.nextSibling)&&u<r.length;u+=1)if(a==i)break t;t.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function R(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||d.test(e)?n:n+"px"}function O(t,e,n,r,i){var o;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||R(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||R(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r||t.addEventListener(e,o?j:M,o):t.removeEventListener(e,o?j:M,o);else if("dangerouslySetInnerHTML"!==e){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&-1==e.indexOf("-")?t.removeAttribute(e):t.setAttribute(e,n))}}function M(t){this.l[t.type+!1](i.event?i.event(t):t)}function j(t){this.l[t.type+!0](i.event?i.event(t):t)}function I(t,e,n,r,o,s,a,u,c){var l,h,d,p,b,y,g,_,w,S,E,k,C,A,R,O=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(c=n.__h,u=e.__e=n.__e,e.__h=null,s=[u]),(l=i.__b)&&l(e);try{t:if("function"==typeof O){if(_=e.props,w=(l=O.contextType)&&r[l.__c],S=l?w?w.props.value:l.__:r,n.__c?g=(h=e.__c=n.__c).__=h.__E:("prototype"in O&&O.prototype.render?e.__c=h=new O(_,S):(e.__c=h=new v(_,S),h.constructor=O,h.render=D),w&&w.sub(h),h.props=_,h.state||(h.state={}),h.context=S,h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=O.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=f({},h.__s)),f(h.__s,O.getDerivedStateFromProps(_,h.__s))),p=h.props,b=h.state,d)null==O.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==O.getDerivedStateFromProps&&_!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(_,S),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(_,h.__s,S)||e.__v===n.__v){for(h.props=_,h.state=h.__s,e.__v!==n.__v&&(h.__d=!1),h.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),E=0;E<h._sb.length;E++)h.__h.push(h._sb[E]);h._sb=[],h.__h.length&&a.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(_,h.__s,S),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,b,y)}))}if(h.context=S,h.props=_,h.__v=e,h.__P=t,k=i.__r,C=0,"prototype"in O&&O.prototype.render){for(h.state=h.__s,h.__d=!1,k&&k(e),l=h.render(h.props,h.state,h.context),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[]}else do{h.__d=!1,k&&k(e),l=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++C<25);h.state=h.__s,null!=h.getChildContext&&(r=f(f({},r),h.getChildContext())),d||null==h.getSnapshotBeforeUpdate||(y=h.getSnapshotBeforeUpdate(p,b)),R=null!=l&&l.type===m&&null==l.key?l.props.children:l,x(t,Array.isArray(R)?R:[R],e,n,r,o,s,a,u,c),h.base=e.__e,e.__h=null,h.__h.length&&a.push(h),g&&(h.__E=h.__=null),h.__e=!1}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=T(n.__e,e,n,r,o,s,a,c);(l=i.diffed)&&l(e)}catch(t){e.__v=null,(c||null!=s)&&(e.__e=u,e.__h=!!c,s[s.indexOf(u)]=null),i.__e(t,e,n)}}function N(t,e){i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function T(t,e,n,i,o,s,a,u){var c,h,d,f=n.props,b=e.props,y=e.type,g=0;if("svg"===y&&(o=!0),null!=s)for(;g<s.length;g++)if((c=s[g])&&"setAttribute"in c==!!y&&(y?c.localName===y:3===c.nodeType)){t=c,s[g]=null;break}if(null==t){if(null===y)return document.createTextNode(b);t=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,b.is&&b),s=null,u=!1}if(null===y)f===b||u&&t.data===b||(t.data=b);else{if(s=s&&r.call(t.childNodes),h=(f=n.props||l).dangerouslySetInnerHTML,d=b.dangerouslySetInnerHTML,!u){if(null!=s)for(f={},g=0;g<t.attributes.length;g++)f[t.attributes[g].name]=t.attributes[g].value;(d||h)&&(d&&(h&&d.__html==h.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(function(t,e,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in e||O(t,o,null,n[o],r);for(o in e)i&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===e[o]||O(t,o,e[o],n[o],r)}(t,b,f,o,u),d)e.__k=[];else if(g=e.props.children,x(t,Array.isArray(g)?g:[g],e,n,i,o&&"foreignObject"!==y,s,a,s?s[0]:n.__k&&_(n,0),u),null!=s)for(g=s.length;g--;)null!=s[g]&&p(s[g]);u||("value"in b&&void 0!==(g=b.value)&&(g!==t.value||"progress"===y&&!g||"option"===y&&g!==f.value)&&O(t,"value",g,f.value,!1),"checked"in b&&void 0!==(g=b.checked)&&g!==t.checked&&O(t,"checked",g,f.checked,!1))}return t}function P(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function L(t,e,n){var r,o;if(i.unmount&&i.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||P(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){i.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],e,n||"function"!=typeof t.type);n||null==t.__e||p(t.__e),t.__=t.__e=t.__d=void 0}function D(t,e,n){return this.constructor(t,n)}function B(t,e,n){var o,s,a;i.__&&i.__(t,e),s=(o="function"==typeof n)?null:n&&n.__k||e.__k,a=[],I(e,t=(!o&&n||e).__k=b(m,null,[t]),s||l,l,void 0!==e.ownerSVGElement,!o&&n?[n]:s?null:e.firstChild?r.call(e.childNodes):null,a,!o&&n?n:s?s.__e:e.firstChild,o),N(a,t)}function F(t,e){B(t,e,F)}function H(t,e,n){var i,o,s,a=f({},t.props);for(s in e)"key"==s?i=e[s]:"ref"==s?o=e[s]:a[s]=e[s];return arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),y(t.type,a,i||t.key,o||t.ref,null)}function U(t,e){var n={__c:e="__cC"+c++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(S)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}r=h.slice,i={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(e){t=e}throw t}},o=0,s=function(t){return null!=t&&void 0===t.constructor},v.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof t&&(t=t(f({},n),this.props)),t&&f(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),S(this))},v.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),S(this))},v.prototype.render=m,a=[],E.__r=0,c=0},1075:function(t,e,n){"use strict";n.r(e),n.d(e,"Observable",(function(){return r.a})),n.d(e,"ConnectableObservable",(function(){return i.a})),n.d(e,"GroupedObservable",(function(){return o.a})),n.d(e,"observable",(function(){return s.a})),n.d(e,"Subject",(function(){return a.a})),n.d(e,"BehaviorSubject",(function(){return u.a})),n.d(e,"ReplaySubject",(function(){return c.a})),n.d(e,"AsyncSubject",(function(){return l.a})),n.d(e,"asap",(function(){return h.a})),n.d(e,"asapScheduler",(function(){return h.b})),n.d(e,"async",(function(){return d.a})),n.d(e,"asyncScheduler",(function(){return d.b})),n.d(e,"queue",(function(){return f.a})),n.d(e,"queueScheduler",(function(){return f.b})),n.d(e,"animationFrame",(function(){return _})),n.d(e,"animationFrameScheduler",(function(){return v})),n.d(e,"VirtualTimeScheduler",(function(){return w})),n.d(e,"VirtualAction",(function(){return S})),n.d(e,"Scheduler",(function(){return E.a})),n.d(e,"Subscription",(function(){return x.a})),n.d(e,"Subscriber",(function(){return k.a})),n.d(e,"Notification",(function(){return C.a})),n.d(e,"NotificationKind",(function(){return C.b})),n.d(e,"pipe",(function(){return A.a})),n.d(e,"noop",(function(){return R.a})),n.d(e,"identity",(function(){return O.a})),n.d(e,"isObservable",(function(){return M})),n.d(e,"ArgumentOutOfRangeError",(function(){return j.a})),n.d(e,"EmptyError",(function(){return I.a})),n.d(e,"ObjectUnsubscribedError",(function(){return N.a})),n.d(e,"UnsubscriptionError",(function(){return T.a})),n.d(e,"TimeoutError",(function(){return P.a})),n.d(e,"bindCallback",(function(){return H})),n.d(e,"bindNodeCallback",(function(){return z})),n.d(e,"combineLatest",(function(){return J.b})),n.d(e,"concat",(function(){return Y.a})),n.d(e,"defer",(function(){return $.a})),n.d(e,"empty",(function(){return K.b})),n.d(e,"forkJoin",(function(){return Z})),n.d(e,"from",(function(){return X.a})),n.d(e,"fromEvent",(function(){return nt})),n.d(e,"fromEventPattern",(function(){return it})),n.d(e,"generate",(function(){return ot})),n.d(e,"iif",(function(){return at})),n.d(e,"interval",(function(){return ct})),n.d(e,"merge",(function(){return ht.a})),n.d(e,"never",(function(){return ft})),n.d(e,"of",(function(){return pt.a})),n.d(e,"onErrorResumeNext",(function(){return bt})),n.d(e,"pairs",(function(){return yt})),n.d(e,"partition",(function(){return wt})),n.d(e,"race",(function(){return St.a})),n.d(e,"range",(function(){return Et})),n.d(e,"throwError",(function(){return kt.a})),n.d(e,"timer",(function(){return Ct.a})),n.d(e,"using",(function(){return At})),n.d(e,"zip",(function(){return Rt.b})),n.d(e,"scheduled",(function(){return Ot.a})),n.d(e,"EMPTY",(function(){return K.a})),n.d(e,"NEVER",(function(){return dt})),n.d(e,"config",(function(){return Mt.a}));var r=n(1049),i=n(1114),o=n(1090),s=n(1062),a=n(1052),u=n(1115),c=n(1091),l=n(1082),h=n(1100),d=n(1053),f=n(1102),p=n(81),b=n(1086),y=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return p.__extends(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(b.a),g=n(1081),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(g.a),v=new m(y),_=v,w=function(t){function e(e,n){void 0===e&&(e=S),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return p.__extends(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(g.a),S=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return p.__extends(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(b.a),E=n(1118),x=n(1051),k=n(1048),C=n(1068),A=n(1088),R=n(1093),O=n(1060);function M(t){return!!t&&(t instanceof r.a||"function"===typeof t.lift&&"function"===typeof t.subscribe)}var j=n(1069),I=n(1070),N=n(1078),T=n(1111),P=n(1119),L=n(1055),D=n(1113),B=n(1054),F=n(1059);function H(t,e,n){if(e){if(!Object(F.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return H(t,n).apply(void 0,r).pipe(Object(L.a)((function(t){return Object(B.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o,s=this,a={context:s,subject:o,callbackFunc:t,scheduler:n};return new r.a((function(r){if(n){var i={args:e,subscriber:r,params:a};return n.schedule(U,0,i)}if(!o){o=new l.a;try{t.apply(s,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o.next(t.length<=1?t[0]:t),o.complete()}]))}catch(u){Object(D.a)(o)?o.error(u):console.warn(u)}}return o.subscribe(r)}))}}function U(t){var e=this,n=t.args,r=t.subscriber,i=t.params,o=i.callbackFunc,s=i.context,a=i.scheduler,u=i.subject;if(!u){u=i.subject=new l.a;try{o.apply(s,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(a.schedule(W,0,{value:r,subject:u}))}]))}catch(c){u.error(c)}}this.add(u.subscribe(r))}function W(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function z(t,e,n){if(e){if(!Object(F.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return z(t,n).apply(void 0,r).pipe(Object(L.a)((function(t){return Object(B.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a((function(r){var i=o.context,s=o.subject;if(n)return n.schedule(q,0,{params:o,subscriber:r,context:i});if(!s){s=o.subject=new l.a;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?s.error(n):(s.next(t.length<=1?t[0]:t),s.complete())}]))}catch(a){Object(D.a)(s)?s.error(a):console.warn(a)}}return s.subscribe(r)}))}}function q(t){var e=this,n=t.params,r=t.subscriber,i=t.context,o=n.callbackFunc,s=n.args,a=n.scheduler,u=n.subject;if(!u){u=n.subject=new l.a;try{o.apply(i,s.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(a.schedule(G,0,{err:r,subject:u}));else{var i=t.length<=1?t[0]:t;e.add(a.schedule(V,0,{value:i,subject:u}))}}]))}catch(c){this.add(a.schedule(G,0,{err:c,subject:u}))}}this.add(u.subscribe(r))}function V(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function G(t){var e=t.err;t.subject.error(e)}var J=n(1094),Y=n(1084),$=n(1096),K=n(1056),Q=n(1112),X=n(1057);function Z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if(Object(B.a)(n))return tt(n,null);if(Object(Q.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return tt(r.map((function(t){return n[t]})),r)}}if("function"===typeof t[t.length-1]){var i=t.pop();return tt(t=1===t.length&&Object(B.a)(t[0])?t[0]:t,null).pipe(Object(L.a)((function(t){return i.apply(void 0,t)})))}return tt(t,null)}function tt(t,e){return new r.a((function(n){var r=t.length;if(0!==r)for(var i=new Array(r),o=0,s=0,a=function(a){var u=Object(X.a)(t[a]),c=!1;n.add(u.subscribe({next:function(t){c||(c=!0,s++),i[a]=t},error:function(t){return n.error(t)},complete:function(){++o!==r&&c||(s===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=i[n],t}),{}):i),n.complete())}}))},u=0;u<r;u++)a(u);else n.complete()}))}var et=n(1077);function nt(t,e,n,i){return Object(et.a)(n)&&(i=n,n=void 0),i?nt(t,e,n).pipe(Object(L.a)((function(t){return Object(B.a)(t)?i.apply(void 0,t):i(t)}))):new r.a((function(r){rt(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function rt(t,e,n,r,i){var o;if(function(t){return t&&"function"===typeof t.addEventListener&&"function"===typeof t.removeEventListener}(t)){var s=t;t.addEventListener(e,n,i),o=function(){return s.removeEventListener(e,n,i)}}else if(function(t){return t&&"function"===typeof t.on&&"function"===typeof t.off}(t)){var a=t;t.on(e,n),o=function(){return a.off(e,n)}}else if(function(t){return t&&"function"===typeof t.addListener&&"function"===typeof t.removeListener}(t)){var u=t;t.addListener(e,n),o=function(){return u.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var c=0,l=t.length;c<l;c++)rt(t[c],e,n,r,i)}r.add(o)}function it(t,e,n){return n?it(t,e).pipe(Object(L.a)((function(t){return Object(B.a)(t)?n.apply(void 0,t):n(t)}))):new r.a((function(n){var r,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(i)}catch(o){return void n.error(o)}if(Object(et.a)(e))return function(){return e(i,r)}}))}function ot(t,e,n,i,o){var s,a;if(1==arguments.length){var u=t;a=u.initialState,e=u.condition,n=u.iterate,s=u.resultSelector||O.a,o=u.scheduler}else void 0===i||Object(F.a)(i)?(a=t,s=O.a,o=i):(a=t,s=i);return new r.a((function(t){var r=a;if(o)return o.schedule(st,0,{subscriber:t,iterate:n,condition:e,resultSelector:s,state:r});for(;;){if(e){var i=void 0;try{i=e(r)}catch(c){return void t.error(c)}if(!i){t.complete();break}}var u=void 0;try{u=s(r)}catch(c){return void t.error(c)}if(t.next(u),t.closed)break;try{r=n(r)}catch(c){return void t.error(c)}}}))}function st(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(o){return void e.error(o)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(o){return void e.error(o)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(o){return void e.error(o)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function at(t,e,n){return void 0===e&&(e=K.a),void 0===n&&(n=K.a),Object($.a)((function(){return t()?e:n}))}var ut=n(1097);function ct(t,e){return void 0===t&&(t=0),void 0===e&&(e=d.a),(!Object(ut.a)(t)||t<0)&&(t=0),e&&"function"===typeof e.schedule||(e=d.a),new r.a((function(n){return n.add(e.schedule(lt,t,{subscriber:n,counter:0,period:t})),n}))}function lt(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}var ht=n(1121),dt=new r.a(R.a);function ft(){return dt}var pt=n(1079);function bt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return K.a;var n=t[0],i=t.slice(1);return 1===t.length&&Object(B.a)(n)?bt.apply(void 0,n):new r.a((function(t){var e=function(){return t.add(bt.apply(void 0,i).subscribe(t))};return Object(X.a)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function yt(t,e){return e?new r.a((function(n){var r=Object.keys(t),i=new x.a;return i.add(e.schedule(gt,0,{keys:r,index:0,subscriber:n,subscription:i,obj:t})),i})):new r.a((function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var i=n[r];t.hasOwnProperty(i)&&e.next([i,t[i]])}e.complete()}))}function gt(t){var e=t.keys,n=t.index,r=t.subscriber,i=t.subscription,o=t.obj;if(!r.closed)if(n<e.length){var s=e[n];r.next([s,o[s]]),i.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:i,obj:o}))}else r.complete()}var mt=n(1146),vt=n(1101),_t=n(1064);function wt(t,e,n){return[Object(_t.a)(e,n)(new r.a(Object(vt.a)(t))),Object(_t.a)(Object(mt.a)(e,n))(new r.a(Object(vt.a)(t)))]}var St=n(1122);function Et(t,e,n){return void 0===t&&(t=0),new r.a((function(r){void 0===e&&(e=t,t=0);var i=0,o=t;if(n)return n.schedule(xt,0,{index:i,count:e,start:t,subscriber:r});for(;;){if(i++>=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function xt(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var kt=n(1092),Ct=n(1123);function At(t,e){return new r.a((function(n){var r,i;try{r=t()}catch(s){return void n.error(s)}try{i=e(r)}catch(s){return void n.error(s)}var o=(i?Object(X.a)(i):K.a).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))}var Rt=n(1098),Ot=n(1136),Mt=n(1076)},1076:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},1077:function(t,e,n){"use strict";function r(t){return"function"===typeof t}n.d(e,"a",(function(){return r}))},1078:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},1079:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1059),i=n(1080),o=n(1117);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(r.a)(n)?(t.pop(),Object(o.a)(t,n)):Object(i.a)(t)}},1080:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1049),i=n(1143),o=n(1117);function s(t,e){return e?Object(o.a)(t,e):new r.a(Object(i.a)(t))}},1081:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(81),i=n(1118),o=function(t){function e(n,r){void 0===r&&(r=i.a.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.__extends(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.a)},1082:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(81),i=n(1052),o=n(1051),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.a.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(i.a)},1083:function(t,e,n){"use strict";function r(){return"function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return i}));var i=r()},1084:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1079),i=n(1120);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(i.a)()(r.a.apply(void 0,t))}},1085:function(t,e){function n(t){return t.sort(((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:r(t)-r(e)))}function r(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function i(t){if(void 0===t||null===t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function o(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const i=n(e);return i[0]},maxBlockRef:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const i=n(e);return i[i.length-1]},sortBlockRefs:n,bnToHex:function(t){return"0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:r,incrementHexInt:function(t){if(void 0===t||null===t)return t;return i(r(t)+1)},intToHex:i,unsafeRandomBytes:function(t){let e="0x";for(let n=0;n<t;n++)e+=o(),e+=o();return e}}},1086:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(81),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.__extends(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(1051).a))},1087:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(32);function i(t,e,n){try{Reflect.apply(t,e,n)}catch(r){setTimeout((()=>{throw r}))}}class o extends r.EventEmitter{emit(t){let e="error"===t;const n=this._events;if(void 0!==n)e=e&&void 0===n.error;else if(!e)return!1;for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];if(e){let t;if(o.length>0&&([t]=o),t instanceof Error)throw t;const e=new Error("Unhandled error."+(t?` (${t.message})`:""));throw e.context=t,e}const a=n[t];if(void 0===a)return!1;if("function"===typeof a)i(a,this,o);else{const t=a.length,e=function(t){const e=t.length,n=new Array(e);for(let r=0;r<e;r+=1)n[r]=t[r];return n}(a);for(let n=0;n<t;n+=1)i(e[n],this,o)}return!0}}e.default=o},1088:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(1060);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}function o(t){return 0===t.length?r.a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}},1089:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(81),i=n(1048);function o(){return function(t){return t.lift(new s(t))}}var s=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new a(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.__extends(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.a)},1090:function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return d}));var r=n(81),i=n(1048),o=n(1051),s=n(1049),a=n(1052);function u(t,e,n,r){return function(i){return i.lift(new c(t,e,n,r))}}var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(n){return void this.error(n)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(u){this.error(u)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new a.a,n.set(e,i);var o=new d(e,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new d(e,i))}catch(u){return void this.error(u)}this.add(s.subscribe(new h(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(i.a),h=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.__extends(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(i.a),d=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.__extends(e,t),e.prototype._subscribe=function(t){var e=new o.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new f(n)),e.add(r.subscribe(t)),e},e}(s.a),f=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.__extends(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(o.a)},1091:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(81),i=n(1052),o=n(1102),s=n(1051),a=n(1116),u=n(1078),c=n(1142),l=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.__extends(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new h(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new u.a;if(this.isStopped||this.hasError?e=s.a.EMPTY:(this.observers.push(t),e=new c.a(this,t)),i&&t.add(t=new a.a(t,i)),n)for(var l=0;l<o&&!t.closed;l++)t.next(r[l]);else for(l=0;l<o&&!t.closed;l++)t.next(r[l].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||o.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.a),h=function(){return function(t,e){this.time=t,this.value=e}}()},1092:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1049);function i(t,e){return e?new r.a((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e)}},1093:function(t,e,n){"use strict";function r(){}n.d(e,"a",(function(){return r}))},1094:function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(81),i=n(1059),o=n(1054),s=n(1063),a=n(1067),u=n(1080),c={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return Object(i.a)(t[t.length-1])&&(r=t.pop()),"function"===typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(o.a)(t[0])&&(t=t[0]),Object(u.a)(t,r).lift(new h(n))}var h=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.resultSelector))},t}(),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.__extends(e,t),e.prototype._next=function(t){this.values.push(c),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(a.a)(this,r,void 0,n))}}},e.prototype.notifyComplete=function(t){0===(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n){var r=this.values,i=r[n],o=this.toRespond?i===c?--this.toRespond:this.toRespond:0;r[n]=e,0===o&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(s.a)},1095:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1071),i=n(1060);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.b)(i.a,t)}},1096:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1049),i=n(1057),o=n(1056);function s(t){return new r.a((function(e){var n;try{n=t()}catch(r){return void e.error(r)}return(n?Object(i.a)(n):Object(o.b)()).subscribe(e)}))}},1097:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1054);function i(t){return!Object(r.a)(t)&&t-parseFloat(t)+1>=0}},1098:function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var r=n(81),i=n(1080),o=n(1054),s=n(1048),a=n(1083),u=n(1050);function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"===typeof n&&t.pop(),Object(i.a)(t,void 0).lift(new l(n))}var l=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},t}(),h=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var i=t.call(this,e)||this;return i.resultSelector=n,i.iterators=[],i.active=0,i.resultSelector="function"===typeof n?n:void 0,i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;Object(o.a)(t)?e.push(new f(t)):"function"===typeof t[a.a]?e.push(new d(t[a.a]())):e.push(new p(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe());else this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"===typeof(s=t[r]).hasValue&&!s.hasValue())return}var i=!1,o=[];for(r=0;r<e;r++){var s,a=(s=t[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(s.a),d=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),f=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[a.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),p=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.__extends(e,t),e.prototype[a.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return Object(u.c)(this.observable,new u.a(this))},e}(u.b)},1099:function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return o})),n.d(e,"auditTime",(function(){return l})),n.d(e,"buffer",(function(){return h})),n.d(e,"bufferCount",(function(){return b})),n.d(e,"bufferTime",(function(){return _})),n.d(e,"bufferToggle",(function(){return M})),n.d(e,"bufferWhen",(function(){return N})),n.d(e,"catchError",(function(){return L})),n.d(e,"combineAll",(function(){return H})),n.d(e,"combineLatest",(function(){return z})),n.d(e,"concat",(function(){return V})),n.d(e,"concatAll",(function(){return G.a})),n.d(e,"concatMap",(function(){return Y})),n.d(e,"concatMapTo",(function(){return $})),n.d(e,"count",(function(){return K})),n.d(e,"debounce",(function(){return Z})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return st})),n.d(e,"delay",(function(){return ht})),n.d(e,"delayWhen",(function(){return yt})),n.d(e,"dematerialize",(function(){return wt})),n.d(e,"distinct",(function(){return xt})),n.d(e,"distinctUntilChanged",(function(){return At})),n.d(e,"distinctUntilKeyChanged",(function(){return Mt})),n.d(e,"elementAt",(function(){return Wt})),n.d(e,"endWith",(function(){return qt})),n.d(e,"every",(function(){return Vt})),n.d(e,"exhaust",(function(){return Yt})),n.d(e,"exhaustMap",(function(){return Xt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return It.a})),n.d(e,"finalize",(function(){return ie})),n.d(e,"find",(function(){return ae})),n.d(e,"findIndex",(function(){return le})),n.d(e,"first",(function(){return de})),n.d(e,"groupBy",(function(){return fe.b})),n.d(e,"ignoreElements",(function(){return pe})),n.d(e,"isEmpty",(function(){return ge})),n.d(e,"last",(function(){return Ee})),n.d(e,"map",(function(){return Qt.a})),n.d(e,"mapTo",(function(){return xe})),n.d(e,"materialize",(function(){return Ae})),n.d(e,"max",(function(){return Pe})),n.d(e,"merge",(function(){return De})),n.d(e,"mergeAll",(function(){return Be.a})),n.d(e,"mergeMap",(function(){return J.b})),n.d(e,"flatMap",(function(){return J.a})),n.d(e,"mergeMapTo",(function(){return Fe})),n.d(e,"mergeScan",(function(){return He})),n.d(e,"min",(function(){return ze})),n.d(e,"multicast",(function(){return Ve})),n.d(e,"observeOn",(function(){return Je.b})),n.d(e,"onErrorResumeNext",(function(){return Ye})),n.d(e,"pairwise",(function(){return Qe})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return sn})),n.d(e,"publishBehavior",(function(){return un})),n.d(e,"publishLast",(function(){return ln})),n.d(e,"publishReplay",(function(){return dn})),n.d(e,"race",(function(){return pn})),n.d(e,"reduce",(function(){return Te})),n.d(e,"repeat",(function(){return bn})),n.d(e,"repeatWhen",(function(){return mn})),n.d(e,"retry",(function(){return wn})),n.d(e,"retryWhen",(function(){return xn})),n.d(e,"refCount",(function(){return An.a})),n.d(e,"sample",(function(){return Rn})),n.d(e,"sampleTime",(function(){return jn})),n.d(e,"scan",(function(){return Me})),n.d(e,"sequenceEqual",(function(){return Pn})),n.d(e,"share",(function(){return Hn})),n.d(e,"shareReplay",(function(){return Un})),n.d(e,"single",(function(){return Wn})),n.d(e,"skip",(function(){return Vn})),n.d(e,"skipLast",(function(){return Yn})),n.d(e,"skipUntil",(function(){return Qn})),n.d(e,"skipWhile",(function(){return tr})),n.d(e,"startWith",(function(){return rr})),n.d(e,"subscribeOn",(function(){return ar})),n.d(e,"switchAll",(function(){return dr})),n.d(e,"switchMap",(function(){return cr})),n.d(e,"switchMapTo",(function(){return fr})),n.d(e,"take",(function(){return Ft})),n.d(e,"takeLast",(function(){return _e})),n.d(e,"takeUntil",(function(){return pr})),n.d(e,"takeWhile",(function(){return gr})),n.d(e,"tap",(function(){return Sr})),n.d(e,"throttle",(function(){return Cr})),n.d(e,"throttleTime",(function(){return Or})),n.d(e,"throwIfEmpty",(function(){return Tt})),n.d(e,"timeInterval",(function(){return Tr})),n.d(e,"timeout",(function(){return Ur})),n.d(e,"timeoutWith",(function(){return Dr})),n.d(e,"timestamp",(function(){return Wr})),n.d(e,"toArray",(function(){return Vr})),n.d(e,"window",(function(){return Gr})),n.d(e,"windowCount",(function(){return $r})),n.d(e,"windowTime",(function(){return Xr})),n.d(e,"windowToggle",(function(){return oi})),n.d(e,"windowWhen",(function(){return ui})),n.d(e,"withLatestFrom",(function(){return hi})),n.d(e,"zip",(function(){return bi})),n.d(e,"zipAll",(function(){return yi}));var r=n(81),i=n(1050);function o(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(r){return this.destination.error(r)}var n=Object(i.c)(e,new i.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this,e=t.value,n=t.hasValue,r=t.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.b),u=n(1053),c=n(1123);function l(t,e){return void 0===e&&(e=u.a),o((function(){return Object(c.a)(t,e)}))}function h(t){return function(e){return e.lift(new d(t))}}var d=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.closingNotifier))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(Object(i.c)(n,new i.a(r))),r}return r.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(i.b),p=n(1048);function b(t,e){return void 0===e&&(e=null),function(n){return n.lift(new y(t,e))}}var y=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?m:g}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),g=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(p.a),m=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e=this,n=e.bufferSize,r=e.startBufferEvery,i=e.buffers,o=e.count;this.count++,o%r===0&&i.push([]);for(var s=i.length;s--;){var a=i[s];a.push(t),a.length===n&&(i.splice(s,1),this.destination.next(a))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(p.a),v=n(1059);function _(t){var e=arguments.length,n=u.a;Object(v.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new w(t,r,i,n))}}var w=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new E(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),S=function(){return function(){this.buffer=[]}}(),E=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var u={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=o.schedule(x,n,u))}else{var c={subscriber:s,context:a},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(C,n,c)),s.add(o.schedule(k,r,l))}return s}return r.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(x,n,r))}},e.prototype.openContext=function(){var t=new S;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(p.a);function x(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function k(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(C,n,{subscriber:r,context:o})),this.schedule(t,e))}function C(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var A=n(1051),R=n(1067),O=n(1063);function M(t,e){return function(n){return n.lift(new j(t,e))}}var j=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new I(t,this.openings,this.closingSelector))},t}(),I=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add(Object(R.a)(i,n)),i}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(n){this._error(n)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new A.a,r={buffer:[],subscription:n};e.push(r);var i=Object(R.a)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(O.a);function N(t){return function(e){return e.lift(new T(t))}}var T=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new P(t,this.closingSelector))},t}(),P=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(r){return this.error(r)}t=new A.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(i.c)(e,new i.a(this))),this.subscribing=!1},e}(i.b);function L(t){return function(e){var n=new D(t),r=e.lift(n);return n.caught=r}}var D=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new B(t,this.selector,this.caught))},t}(),B=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(s){return void t.prototype.error.call(this,s)}this._unsubscribeAndRecycle();var r=new i.a(this);this.add(r);var o=Object(i.c)(n,r);o!==r&&this.add(o)}},e}(i.b),F=n(1094);function H(t){return function(e){return e.lift(new F.a(t))}}var U=n(1054),W=n(1057);function z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"===typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(U.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(W.a)([e].concat(t)),new F.a(n))}}var q=n(1084);function V(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(q.a.apply(void 0,[e].concat(t)))}}var G=n(1120),J=n(1071);function Y(t,e){return Object(J.b)(t,e,1)}function $(t,e){return Y((function(){return t}),e)}function K(t){return function(e){return e.lift(new Q(t,e))}}var Q=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new X(t,this.predicate,this.source))},t}(),X=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(p.a);function Z(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(i.c)(e,new i.a(this)))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(i.b);function nt(t,e){return void 0===e&&(e=u.a),function(n){return n.lift(new rt(t,e))}}var rt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.dueTime,this.scheduler))},t}(),it=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.__extends(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(ot,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(p.a);function ot(t){t.debouncedNext()}function st(t){return void 0===t&&(t=null),function(e){return e.lift(new at(t))}}var at=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new ut(t,this.defaultValue))},t}(),ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.__extends(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(p.a);function ct(t){return t instanceof Date&&!isNaN(+t)}var lt=n(1068);function ht(t,e){void 0===e&&(e=u.a);var n=ct(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new dt(n,e))}}var dt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ft(t,this.delay,this.scheduler))},t}(),ft=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return r.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new pt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(lt.a.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(lt.a.createComplete()),this.unsubscribe()},e}(p.a),pt=function(){return function(t,e){this.time=t,this.notification=e}}(),bt=n(1049);function yt(t,e){return e?function(n){return new vt(n,e).lift(new gt(t))}:function(e){return e.lift(new gt(t))}}var gt=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new mt(t,this.delayDurationSelector))},t}(),mt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(r){this.destination.error(r)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(R.a)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(O.a),vt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new _t(t,this.source))},e}(bt.a),_t=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.__extends(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(p.a);function wt(){return function(t){return t.lift(new St)}}var St=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Et(t))},t}(),Et=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(p.a);function xt(t,e){return function(n){return n.lift(new kt(t,e))}}var kt=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Ct(t,this.keySelector,this.flushes))},t}(),Ct=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add(Object(i.c)(r,new i.a(o))),o}return r.__extends(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(r){return void n.error(r)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(i.b);function At(t,e){return function(n){return n.lift(new Rt(t,e))}}var Rt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Ot(t,this.compare,this.keySelector))},t}(),Ot=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"===typeof n&&(i.compare=n),i}return r.__extends(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(i){return this.destination.error(i)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(i){return this.destination.error(i)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(p.a);function Mt(t,e){return At((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var jt=n(1069),It=n(1064),Nt=n(1070);function Tt(t){return void 0===t&&(t=Dt),function(e){return e.lift(new Pt(t))}}var Pt=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Lt(t,this.errorFactory))},t}(),Lt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.__extends(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(p.a);function Dt(){return new Nt.a}var Bt=n(1056);function Ft(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new Ht(t))}}var Ht=function(){function t(t){if(this.total=t,this.total<0)throw new jt.a}return t.prototype.call=function(t,e){return e.subscribe(new Ut(t,this.total))},t}(),Ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(p.a);function Wt(t,e){if(t<0)throw new jt.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(It.a)((function(e,n){return n===t})),Ft(1),n?st(e):Tt((function(){return new jt.a})))}}var zt=n(1079);function qt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Object(q.a)(e,zt.a.apply(void 0,t))}}function Vt(t,e){return function(n){return n.lift(new Gt(t,e,n))}}var Gt=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new Jt(t,this.predicate,this.thisArg,this.source))},t}(),Jt=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return r.__extends(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.a);function Yt(){return function(t){return t.lift(new $t)}}var $t=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Kt(t))},t}(),Kt=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(i.c)(t,new i.a(this))))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.b),Qt=n(1055);function Xt(t,e){return e?function(n){return n.pipe(Xt((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Qt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new Zt(t))}}var Zt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this.hasSubscription=!0,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.b);function ee(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new ne(t,e,n))}}var ne=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new re(t,this.project,this.concurrent,this.scheduler))},t}(),re=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return r.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,i=t.index;e.subscribeToProjection(n,r,i)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var i=(0,this.project)(t,r);if(this.scheduler){var o={subscriber:this,result:i,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,o))}else this.subscribeToProjection(i,t,r)}catch(s){n.error(s)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(i.c)(t,new i.a(this)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this._next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.b);function ie(t){return function(e){return e.lift(new oe(t))}}var oe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.callback))},t}(),se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new A.a(n)),r}return r.__extends(e,t),e}(p.a);function ae(t,e){if("function"!==typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ue(t,n,!1,e))}}var ue=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=i,s.thisArg=o,s.index=0,s}return r.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(p.a);function le(t,e){return function(n){return n.lift(new ue(t,n,!0,e))}}var he=n(1060);function de(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(It.a)((function(e,n){return t(e,n,r)})):he.a,Ft(1),n?st(e):Tt((function(){return new Nt.a})))}}var fe=n(1090);function pe(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ye(t))},t}(),ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype._next=function(t){},e}(p.a);function ge(){return function(t){return t.lift(new me)}}var me=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.a);function _e(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new we(t))}}var we=function(){function t(t){if(this.total=t,this.total<0)throw new jt.a}return t.prototype.call=function(t,e){return e.subscribe(new Se(t,this.total))},t}(),Se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o])}t.complete()},e}(p.a);function Ee(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(It.a)((function(e,n){return t(e,n,r)})):he.a,_e(1),n?st(e):Tt((function(){return new Nt.a})))}}function xe(t){return function(e){return e.lift(new ke(t))}}var ke=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t,this.value))},t}(),Ce=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(p.a);function Ae(){return function(t){return t.lift(new Re)}}var Re=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Oe(t))},t}(),Oe=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(lt.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(lt.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(lt.a.createComplete()),t.complete()},e}(p.a);function Me(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new je(t,e,n))}}var je=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Ie(t,this.accumulator,this.seed,this.hasSeed))},t}(),Ie=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.__extends(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(r){this.destination.error(r)}this.seed=e,this.destination.next(e)},e}(p.a),Ne=n(1088);function Te(t,e){return arguments.length>=2?function(n){return Object(Ne.a)(Me(t,e),_e(1),st(e))(n)}:function(e){return Object(Ne.a)(Me((function(e,n,r){return t(e,n,r+1)})),_e(1))(e)}}function Pe(t){return Te("function"===typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Le=n(1121);function De(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Le.a.apply(void 0,[e].concat(t)))}}var Be=n(1095);function Fe(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof e?Object(J.b)((function(){return t}),e,n):("number"===typeof e&&(n=e),Object(J.b)((function(){return t}),n))}function He(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Ue(t,e,n))}}var Ue=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new We(t,this.accumulator,this.seed,this.concurrent))},t}(),We=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=r,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.__extends(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e)}catch(i){return n.error(i)}this.active++,this._innerSub(r)}else this.buffer.push(t)},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.b);function ze(t){return Te("function"===typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var qe=n(1114);function Ve(t,e){return function(n){var r;if(r="function"===typeof t?t:function(){return t},"function"===typeof e)return n.lift(new Ge(r,e));var i=Object.create(n,qe.b);return i.source=n,i.subjectFactory=r,i}}var Ge=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),Je=n(1116);function Ye(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),function(e){return e.lift(new $e(t))}}var $e=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new Ke(t,this.nextSources))},t}(),Ke=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.__extends(e,t),e.prototype.notifyError=function(){this.subscribeToNextSource()},e.prototype.notifyComplete=function(){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)}else this.destination.complete()},e}(i.b);function Qe(){return function(t){return t.lift(new Xe)}}var Xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t))},t}(),Ze=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.__extends(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},e}(p.a),tn=n(1146);function en(t,e){return function(n){return[Object(It.a)(t,e)(n),Object(It.a)(Object(tn.a)(t,e))(n)]}}function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(Qt.a)(rn(t,n))(e)}}function rn(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=null!=r?r[t[i]]:void 0;if(void 0===o)return;r=o}return r}}var on=n(1052);function sn(t){return t?Ve((function(){return new on.a}),t):Ve(new on.a)}var an=n(1115);function un(t){return function(e){return Ve(new an.a(t))(e)}}var cn=n(1082);function ln(){return function(t){return Ve(new cn.a)(t)}}var hn=n(1091);function dn(t,e,n,r){n&&"function"!==typeof n&&(r=n);var i="function"===typeof n?n:void 0,o=new hn.a(t,e,r);return function(t){return Ve((function(){return o}),i)(t)}}var fn=n(1122);function pn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),e.lift.call(fn.a.apply(void 0,[e].concat(t)))}}function bn(t){return void 0===t&&(t=-1),function(e){return 0===t?Object(Bt.b)():t<0?e.lift(new yn(-1,e)):e.lift(new yn(t-1,e))}}var yn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new gn(t,this.count,this.source))},t}(),gn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.__extends(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(p.a);function mn(t){return function(e){return e.lift(new vn(t))}}var vn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new _n(t,this.notifier,e))},t}(),_n=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.__extends(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new on.a;try{e=(0,this.notifier)(this.notifications)}catch(n){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.c)(e,new i.a(this))},e}(i.b);function wn(t){return void 0===t&&(t=-1),function(e){return e.lift(new Sn(t,e))}}var Sn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.count,this.source))},t}(),En=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(p.a);function xn(t){return function(e){return e.lift(new kn(t,e))}}var kn=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Cn(t,this.notifier,this.source))},t}(),Cn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new on.a;try{r=(0,this.notifier)(n)}catch(s){return t.prototype.error.call(this,s)}o=Object(i.c)(r,new i.a(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(i.b),An=n(1089);function Rn(t){return function(e){return e.lift(new On(t))}}var On=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Mn(t),r=e.subscribe(n);return r.add(Object(i.c)(this.notifier,new i.a(n))),r},t}(),Mn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.__extends(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.b);function jn(t,e){return void 0===e&&(e=u.a),function(n){return n.lift(new In(t,e))}}var In=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t,this.period,this.scheduler))},t}(),Nn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Tn,n,{subscriber:i,period:n})),i}return r.__extends(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(p.a);function Tn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Pn(t,e){return function(n){return n.lift(new Ln(t,e))}}var Ln=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Dn(t,this.compareTo,this.comparator))},t}(),Dn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Bn(e,i))),i}return r.__extends(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this,e=t._a,n=t._b,r=t.comparator;e.length>0&&n.length>0;){var i=e.shift(),o=n.shift(),s=!1;try{s=r?r(i,o):i===o}catch(a){this.destination.error(a)}s||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(p.a),Bn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.__extends(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(p.a);function Fn(){return new on.a}function Hn(){return function(t){return Object(An.a)()(Ve(Fn)(t))}}function Un(t,e,n){var r;return r=t&&"object"===typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,a=t.refCount,u=t.scheduler,c=0,l=!1,h=!1;return function(t){var r;c++,!e||l?(l=!1,e=new hn.a(i,s,u),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){h=!0,n=void 0,e.complete()}}),h&&(n=void 0)):r=e.subscribe(this),this.add((function(){c--,r.unsubscribe(),r=void 0,n&&!h&&a&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Wn(t){return function(e){return e.lift(new zn(t,e))}}var zn=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new qn(t,this.predicate,this.source))},t}(),qn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.__extends(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Nt.a)},e}(p.a);function Vn(t){return function(e){return e.lift(new Gn(t))}}var Gn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Jn(t,this.total))},t}(),Jn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(p.a);function Yn(t){return function(e){return e.lift(new $n(t))}}var $n=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new jt.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.a(t)):e.subscribe(new Kn(t,this._skipCount))},t}(),Kn=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,i=this._ring,o=i[r];i[r]=t,this.destination.next(o)}},e}(p.a);function Qn(t){return function(e){return e.lift(new Xn(t))}}var Xn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Zn(t,this.notifier))},t}(),Zn=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var o=new i.a(r);r.add(o),r.innerSubscription=o;var s=Object(i.c)(n,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return r.__extends(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(i.b);function tr(t){return function(e){return e.lift(new er(t))}}var er=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new nr(t,this.predicate))},t}(),nr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(n){this.destination.error(n)}},e}(p.a);function rr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(v.a)(n)?(t.pop(),function(e){return Object(q.a)(t,e,n)}):function(e){return Object(q.a)(t,e)}}var ir=n(1100),or=n(1097),sr=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=ir.a);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!Object(or.a)(n)||n<0)&&(i.delayTime=0),r&&"function"===typeof r.schedule||(i.scheduler=ir.a),i}return r.__extends(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=ir.a),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(bt.a);function ar(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ur(t,e))}}var ur=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new sr(e,this.delay,this.scheduler).subscribe(t)},t}();function cr(t,e){return"function"===typeof e?function(n){return n.pipe(cr((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Qt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new lr(t))}}var lr=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new hr(t,this.project))},t}(),hr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e)},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new i.a(this),r=this.destination;r.add(n),this.innerSubscription=Object(i.c)(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t){this.destination.next(t)},e}(i.b);function dr(){return cr(he.a)}function fr(t,e){return e?cr((function(){return t}),e):cr((function(){return t}))}function pr(t){return function(e){return e.lift(new br(t))}}var br=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new yr(t),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),yr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.__extends(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(i.b);function gr(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new mr(t,e))}}var mr=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new vr(t,this.predicate,this.inclusive))},t}(),vr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(r){return void n.error(r)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(p.a),_r=n(1093),wr=n(1077);function Sr(t,e,n){return function(r){return r.lift(new Er(t,e,n))}}var Er=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new xr(t,this.nextOrObserver,this.error,this.complete))},t}(),xr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=_r.a,o._tapError=_r.a,o._tapComplete=_r.a,o._tapError=r||_r.a,o._tapComplete=i||_r.a,Object(wr.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||_r.a,o._tapError=n.error||_r.a,o._tapComplete=n.complete||_r.a),o}return r.__extends(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(p.a),kr={leading:!0,trailing:!1};function Cr(t,e){return void 0===e&&(e=kr),function(n){return n.lift(new Ar(t,!!e.leading,!!e.trailing))}}var Ar=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new Rr(t,this.durationSelector,this.leading,this.trailing))},t}(),Rr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}return r.__extends(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(i.c)(e,new i.a(this)))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(e){return this.destination.error(e),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send()},e.prototype.notifyNext=function(){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(i.b);function Or(t,e,n){return void 0===e&&(e=u.a),void 0===n&&(n=kr),function(r){return r.lift(new Mr(t,e,n.leading,n.trailing))}}var Mr=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new jr(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),jr=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=i,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return r.__extends(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Ir,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(p.a);function Ir(t){t.subscriber.clearThrottle()}var Nr=n(1096);function Tr(t){return void 0===t&&(t=u.a),function(e){return Object(Nr.a)((function(){return e.pipe(Me((function(e,n){var r=e.current;return{value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),Object(Qt.a)((function(t){var e=t.current,n=t.last,r=t.value;return new Pr(r,e-n)})))}))}}var Pr=function(){return function(t,e){this.value=t,this.interval=e}}(),Lr=n(1119);function Dr(t,e,n){return void 0===n&&(n=u.a),function(r){var i=ct(t),o=i?+t-n.now():Math.abs(t);return r.lift(new Br(o,i,e,n))}}var Br=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new Fr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Fr=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=i,s.scheduler=o,s.scheduleTimeout(),s}return r.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(i.c)(e,new i.a(t)))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},e}(i.b),Hr=n(1092);function Ur(t,e){return void 0===e&&(e=u.a),Dr(t,Object(Hr.a)(new Lr.a),e)}function Wr(t){return void 0===t&&(t=u.a),Object(Qt.a)((function(e){return new zr(e,t.now())}))}var zr=function(){return function(t,e){this.value=t,this.timestamp=e}}();function qr(t,e,n){return 0===n?[e]:(t.push(e),t)}function Vr(){return Te(qr,[])}function Gr(t){return function(e){return e.lift(new Jr(t))}}var Jr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new Yr(t),r=e.subscribe(n);return r.closed||n.add(Object(i.c)(this.windowBoundaries,new i.a(n))),r},t}(),Yr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new on.a,e.next(n.window),n}return r.__extends(e,t),e.prototype.notifyNext=function(){this.openWindow()},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new on.a;e.next(n)},e}(i.b);function $r(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Kr(t,e))}}var Kr=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Qr(t,this.windowSize,this.startWindowEvery))},t}(),Qr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new on.a],i.count=0,e.next(i.windows[0]),i}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(t);var a=this.count-r+1;if(a>=0&&a%e===0&&!this.closed&&i.shift().complete(),++this.count%e===0&&!this.closed){var u=new on.a;i.push(u),n.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(p.a);function Xr(t){var e=u.a,n=null,r=Number.POSITIVE_INFINITY;return Object(v.a)(arguments[3])&&(e=arguments[3]),Object(v.a)(arguments[2])?e=arguments[2]:Object(or.a)(arguments[2])&&(r=Number(arguments[2])),Object(v.a)(arguments[1])?e=arguments[1]:Object(or.a)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Zr(t,n,r,e))}}var Zr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new ei(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),ti=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.__extends(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(on.a),ei=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var u={subscriber:s,window:a,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:o};s.add(o.schedule(ii,n,u)),s.add(o.schedule(ri,r,c))}else{var l={subscriber:s,window:a,windowTimeSpan:n};s.add(o.schedule(ni,n,l))}return s}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new ti;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(p.a);function ni(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function ri(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),s=this,a={action:s,subscription:null},u={subscriber:n,window:o,context:a};a.subscription=r.schedule(ii,e,u),s.add(a.subscription),s.schedule(t,i)}function ii(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function oi(t,e){return function(n){return n.lift(new si(t,e))}}var si=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new ai(t,this.openings,this.closingSelector))},t}(),ai=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=Object(R.a)(i,n,n)),i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var o=n[i];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var o=void 0;try{o=(0,this.closingSelector)(e)}catch(l){return this.error(l)}var s=new on.a,a=new A.a,u={window:s,subscription:a};this.contexts.push(u);var c=Object(R.a)(this,o,u);c.closed?this.closeWindow(this.contexts.length-1):(c.context=u,a.add(c)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe()}},e}(O.a);function ui(t){return function(e){return e.lift(new ci(t))}}var ci=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new li(t,this.closingSelector))},t}(),li=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i)},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new on.a;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(i){return this.destination.error(i),void this.window.error(i)}this.add(this.closingNotification=Object(R.a)(this,n))},e}(O.a);function hi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"===typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new di(r,n))}}var di=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new fi(t,this.observables,this.project))},t}(),fi=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var o=n.length;i.values=new Array(o);for(var s=0;s<o;s++)i.toRespond.push(s);for(s=0;s<o;s++){var a=n[s];i.add(Object(R.a)(i,a,void 0,s))}return i}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n){this.values[n]=e;var r=this.toRespond;if(r.length>0){var i=r.indexOf(n);-1!==i&&r.splice(i,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(O.a),pi=n(1098);function bi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(pi.b.apply(void 0,[e].concat(t)))}}function yi(t){return function(e){return e.lift(new pi.a(t))}}},1100:function(t,e,n){"use strict";n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return f}));var r=n(81),i=1,o=function(){return Promise.resolve()}(),s={};function a(t){return t in s&&(delete s[t],!0)}var u=function(t){var e=i++;return s[e]=!0,o.then((function(){return a(e)&&t()})),e},c=function(t){a(t)},l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.__extends(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=u(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(c(n),e.scheduled=void 0)},e}(n(1086).a),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(1081).a),d=new h(l),f=d},1101:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1143),i=n(1109),o=n(1083),s=n(1062),a=n(1144),u=n(1145),c=n(1112),l=function(t){if(t&&"function"===typeof t[s.a])return l=t,function(t){var e=l[s.a]();if("function"!==typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(a.a)(t))return Object(r.a)(t);if(Object(u.a)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,i.a),t};if(t&&"function"===typeof t[o.a])return e=t,function(t){for(var n=e[o.a]();;){var r=void 0;try{r=n.next()}catch(i){return t.error(i),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"===typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,l,h=Object(c.a)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+h+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},1102:function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return a}));var r=n(81),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.__extends(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(1086).a),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(n(1081).a),s=new o(i),a=s},1103:function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=void 0;const i=r(n(1087)),o=r(n(17)),s=n(1104),a=n(1107),u=n(1108),c=n(1148),l=n(1061),h=r(n(1186)),d=n(1203),f=n(1204),p=n(1205),b="DefaultChainId",y="DefaultJsonRpcUrl",g="HasChainBeenSwitched",m="HasChainOverriddenFromRelay";class v extends i.default{constructor(t){var e,n;super(),this._filterPolyfill=new d.FilterPolyfill(this),this._subscriptionManager=new p.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this._send=this.send.bind(this),this._sendAsync=this.sendAsync.bind(this),this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._jsonRpcUrlFromOpts=t.jsonRpcUrl,this._overrideIsMetaMask=t.overrideIsMetaMask,this._relayProvider=t.relayProvider,this._storage=t.storage,this._relayEventManager=t.relayEventManager,this._eventListener=t.eventListener,this.isCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this.isCoinbaseBrowser=null!==(n=t.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this.qrUrl=t.qrUrl,this.supportsAddressSwitching=t.supportsAddressSwitching;const r=this.getChainId(),i=(0,l.prepend0x)(r.toString(16));this.emit("connect",{chainIdStr:i});const o=this._storage.getItem(c.LOCAL_STORAGE_ADDRESSES_KEY);if(o){const t=o.split(" ");""!==t[0]&&(this._addresses=t.map((t=>(0,l.ensureAddressString)(t))),this.emit("accountsChanged",t))}this._subscriptionManager.events.on("notification",(t=>{this.emit("message",{type:t.method,data:t.params})})),this._addresses.length>0&&this.initializeRelay(),window.addEventListener("message",(t=>{var e;if("walletLinkMessage"===t.data.type&&"defaultChainChanged"===t.data.data.action){const n=t.data.data.chainId,r=null!==(e=t.data.data.jsonRpcUrl)&&void 0!==e?e:this.jsonRpcUrl;this.updateProviderInfo(r,Number(n),!0)}}))}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,l.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var t;return null!==(t=this._storage.getItem(y))&&void 0!==t?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem(y,t)}get isChainOverridden(){return"true"===this._storage.getItem(m)}set isChainOverridden(t){this._storage.setItem(m,t.toString())}setProviderInfo(t,e){this.isChainOverridden||this.updateProviderInfo(t,this.getChainId(),!1)}updateProviderInfo(t,e,n){if("true"===this._storage.getItem(g)&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=t;const r=this.getChainId();this._storage.setItem(b,e.toString(10));!((0,l.ensureIntNumber)(e)!==r)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(t,e,n,r,i,o){const s=await this.initializeRelay();return!!(await s.watchAsset(t,e,n,r,i,null===o||void 0===o?void 0:o.toString()).promise).result}async addEthereumChain(t,e,n,r,i,o){var s,a;if((0,l.ensureIntNumber)(t)===this.getChainId())return!1;const u=await this.initializeRelay(),c=u.inlineAddEthereumChain(t.toString());this._isAuthorized()||c||await u.requestEthereumAccounts().promise;const h=await u.addEthereumChain(t.toString(),e,i,n,r,o).promise;return!0===(null===(s=h.result)||void 0===s?void 0:s.isApproved)&&(this._storage.setItem(g,"true"),this.updateProviderInfo(e[0],t,!1)),!0===(null===(a=h.result)||void 0===a?void 0:a.isApproved)}async switchEthereumChain(t){if((0,l.ensureIntNumber)(t)===this.getChainId())return;const e=await this.initializeRelay(),n=await e.switchEthereumChain(t.toString(10)).promise;if(n.errorCode)throw s.ethErrors.provider.custom({code:n.errorCode});const r=n.result;r.isApproved&&r.rpcUrl.length>0&&(this._storage.setItem(g,"true"),this.updateProviderInfo(r.rpcUrl,t,!1))}setAppInfo(t,e){this.initializeRelay().then((n=>n.setAppInfo(t,e)))}async enable(){var t;return null===(t=this._eventListener)||void 0===t||t.onEvent(a.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0?[...this._addresses]:await this._send(f.JSONRPCMethod.eth_requestAccounts)}async close(){(await this.initializeRelay()).resetAndReload()}send(t,e){if("string"===typeof t){const n={jsonrpc:"2.0",id:0,method:t,params:Array.isArray(e)?e:void 0!==e?[e]:[]};return this._sendRequestAsync(n).then((t=>t.result))}if("function"===typeof e){const n=t,r=e;return this._sendAsync(n,r)}if(Array.isArray(t)){return t.map((t=>this._sendRequest(t)))}const n=t;return this._sendRequest(n)}async sendAsync(t,e){if("function"!==typeof e)throw new Error("callback is required");if(Array.isArray(t)){const n=e;return void this._sendMultipleRequestsAsync(t).then((t=>n(null,t))).catch((t=>n(t,null)))}const n=e;return this._sendRequestAsync(t).then((t=>n(null,t))).catch((t=>n(t,null)))}async request(t){if(!t||"object"!==typeof t||Array.isArray(t))throw s.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});const{method:e,params:n}=t;if("string"!==typeof e||0===e.length)throw s.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});if(void 0!==n&&!Array.isArray(n)&&("object"!==typeof n||null===n))throw s.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});const r=void 0===n?[]:n,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:e,params:r,jsonrpc:"2.0",id:i})).result}async scanQRCode(t){const e=await this.initializeRelay(),n=await e.scanQRCode((0,l.ensureRegExpString)(t)).promise;if("string"!==typeof n.result)throw new Error("result was not a string");return n.result}async genericRequest(t,e){const n=await this.initializeRelay(),r=await n.genericRequest(t,e).promise;if("string"!==typeof r.result)throw new Error("result was not a string");return r.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(t){const e={jsonrpc:"2.0",id:t.id},{method:n}=t;if(e.result=this._handleSynchronousMethods(t),void 0===e.result)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return e}_setAddresses(t){if(!Array.isArray(t))throw new Error("addresses is not an array");const e=t.map((t=>(0,l.ensureAddressString)(t)));JSON.stringify(e)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching||(this._addresses=e,this.emit("accountsChanged",this._addresses),this._storage.setItem(c.LOCAL_STORAGE_ADDRESSES_KEY,e.join(" "))))}_sendRequestAsync(t){return new Promise(((e,n)=>{try{const r=this._handleSynchronousMethods(t);if(void 0!==r)return e({jsonrpc:"2.0",id:t.id,result:r});const i=this._handleAsynchronousFilterMethods(t);if(void 0!==i)return void i.then((n=>e(Object.assign(Object.assign({},n),{id:t.id})))).catch((t=>n(t)));const o=this._handleSubscriptionMethods(t);if(void 0!==o)return void o.then((n=>e({jsonrpc:"2.0",id:t.id,result:n.result}))).catch((t=>n(t)))}catch(r){return n(r)}this._handleAsynchronousMethods(t).then((n=>n&&e(Object.assign(Object.assign({},n),{id:t.id})))).catch((t=>n(t)))}))}_sendMultipleRequestsAsync(t){return Promise.all(t.map((t=>this._sendRequestAsync(t))))}_handleSynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_accounts:return this._eth_accounts();case f.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case f.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case f.JSONRPCMethod.net_version:return this._net_version();case f.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case f.JSONRPCMethod.eth_sign:return this._eth_sign(n);case f.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case f.JSONRPCMethod.personal_sign:return this._personal_sign(n);case f.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case f.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case f.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case f.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case f.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case f.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case f.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case f.JSONRPCMethod.eth_signTypedData_v4:case f.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case f.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(n);case f.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case f.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n);case f.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(t,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case f.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case f.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case f.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case f.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(t){switch(t.method){case f.JSONRPCMethod.eth_subscribe:case f.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(t)}}_isKnownAddress(t){try{const e=(0,l.ensureAddressString)(t);return this._addresses.map((t=>(0,l.ensureAddressString)(t))).includes(e)}catch(e){}return!1}_ensureKnownAddress(t){var e;if(!this._isKnownAddress(t))throw null===(e=this._eventListener)||void 0===e||e.onEvent(a.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const n=e.from?(0,l.ensureAddressString)(e.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(n);return{fromAddress:n,toAddress:e.to?(0,l.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,l.ensureBN)(e.value):new o.default(0),data:e.data?(0,l.ensureBuffer)(e.data):t.alloc(0),nonce:null!=e.nonce?(0,l.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,l.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,l.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,l.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,l.ensureBN)(e.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw s.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw s.ethErrors.provider.unsupportedMethod({})}async _signEthereumMessage(t,e,n,r){this._ensureKnownAddress(e);try{const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(t,e,n,r).promise).result}}catch(i){if("string"===typeof i.message&&i.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied message signature");throw i}}async _ethereumAddressFromSignedMessage(t,e,n){const r=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await r.ethereumAddressFromSignedMessage(t,e,n).promise).result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,l.hexStringFromIntNumber)(this.getChainId())}getChainId(){const t=this._storage.getItem(b)||"1",e=parseInt(t,10);return(0,l.ensureIntNumber)(e)}async _eth_requestAccounts(){var t;if(null===(t=this._eventListener)||void 0===t||t.onEvent(a.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0)return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{const t=await this.initializeRelay();e=await t.requestEthereumAccounts().promise}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied account authorization");throw n}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(t){this._requireAuthorization();const e=(0,l.ensureAddressString)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._signEthereumMessage(n,e,!1)}_eth_ecRecover(t){const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!1)}_personal_sign(t){this._requireAuthorization();const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureAddressString)(t[1]);return this._signEthereumMessage(e,n,!0)}_personal_ecRecover(t){const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!0)}async _eth_signTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await t.signEthereumTransaction(e).promise).result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_sendRawTransaction(t){const e=(0,l.ensureBuffer)(t[0]),n=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await n.submitEthereumTransaction(e,this.getChainId()).promise).result}}async _eth_sendTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await t.signAndSubmitEthereumTransaction(e).promise).result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_signTypedData_v1(t){this._requireAuthorization();const e=(0,l.ensureParsedJSONObject)(t[0]),n=(0,l.ensureAddressString)(t[1]);this._ensureKnownAddress(n);const r=h.default.hashForSignTypedDataLegacy({data:e}),i=JSON.stringify(e,null,2);return this._signEthereumMessage(r,n,!1,i)}async _eth_signTypedData_v3(t){this._requireAuthorization();const e=(0,l.ensureAddressString)(t[0]),n=(0,l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v3({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _eth_signTypedData_v4(t){this._requireAuthorization();const e=(0,l.ensureAddressString)(t[0]),n=(0,l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v4({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _cbwallet_arbitrary(t){const e=t[0],n=t[1];if("string"!==typeof n)throw new Error("parameter must be a string");if("object"!==typeof e||null===e)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(e,n)}}async _wallet_addEthereumChain(t){var e,n,r,i;const o=t[0];if(0===(null===(e=o.rpcUrls)||void 0===e?void 0:e.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||""===o.chainName.trim())throw s.ethErrors.provider.custom({code:0,message:"chainName is a required field"});if(!o.nativeCurrency)throw s.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});const a=parseInt(o.chainId,16);return await this.addEthereumChain(a,null!==(n=o.rpcUrls)&&void 0!==n?n:[],null!==(r=o.blockExplorerUrls)&&void 0!==r?r:[],o.chainName,null!==(i=o.iconUrls)&&void 0!==i?i:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(t){const e=t[0];return await this.switchEthereumChain(parseInt(e.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(t){var e;const n=Array.isArray(t)?t[0]:t;if(0===(null===(e=n.type)||void 0===e?void 0:e.length))throw s.ethErrors.rpc.invalidParams({message:"type is a required field"});if("ERC20"!==n.type)throw s.ethErrors.rpc.invalidParams({message:`Asset of type '${n.type}' not supported`});if(!(null===n||void 0===n?void 0:n.options))throw s.ethErrors.rpc.invalidParams({message:"options is a required field"});if(!n.options.address)throw s.ethErrors.rpc.invalidParams({message:"option address is a required option"});const r=this.getChainId(),{address:i,symbol:o,image:a,decimals:u}=n.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(n.type,i,o,u,a,r)}}_eth_uninstallFilter(t){const e=(0,l.ensureHexString)(t[0]);return this._filterPolyfill.uninstallFilter(e)}async _eth_newFilter(t){const e=t[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(e)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(t){const e=(0,l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterChanges(e)}_eth_getFilterLogs(t){const e=(0,l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterLogs(e)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then((t=>(t.setAccountsCallback((t=>this._setAddresses(t))),t.setChainCallback(((t,e)=>{this.updateProviderInfo(e,parseInt(t,10),!0)})),this._relay=t,t)))}}e.CoinbaseWalletProvider=v}).call(this,n(294).Buffer)},1104:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(1105);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(1140);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(1172);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=n(1106);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})},1105:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(1139);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!==typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}e.EthereumRpcError=i;function o(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n)}}},1106:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},1107:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},1108:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;const r=n(1173),i=n(1075),o=n(1099),s=n(1061),a="session:id",u="session:secret",c="session:linked";class l{constructor(t,e,n,i){this._storage=t,this._id=e||(0,s.randomBytesHex)(16),this._secret=n||(0,s.randomBytesHex)(32);const o=r.sha256.create();o.update(`${this._id}, ${this._secret} WalletLink`),this._key=o.hex(),this._linked=!!i}static load(t){const e=t.getItem(a),n=t.getItem(c),r=t.getItem(u);return e&&r?new l(t,e,r,"1"===n):null}static get persistedSessionIdChange$(){return(0,i.fromEvent)(window,"storage").pipe((0,o.filter)((t=>t.key===a)),(0,o.map)((t=>({oldValue:t.oldValue||null,newValue:t.newValue||null}))))}static hash(t){return r.sha256.create().update(t).hex()}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked()}save(){return this._storage.setItem(a,this._id),this._storage.setItem(u,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(c,this._linked?"1":"0")}}e.Session=l},1109:function(t,e,n){"use strict";function r(t){setTimeout((function(){throw t}),0)}n.d(e,"a",(function(){return r}))},1110:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"===typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},1111:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},1112:function(t,e,n){"use strict";function r(t){return null!==t&&"object"===typeof t}n.d(e,"a",(function(){return r}))},1113:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1048);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.a?i:null}return!0}},1114:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var r=n(81),i=n(1052),o=n(1049),s=n(1048),a=n(1051),u=n(1089),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new a.a).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=a.a.EMPTY)),t},e.prototype.refCount=function(){return Object(u.a)()(this)},e}(o.a),l=function(){var t=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),h=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.__extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.b);s.a},1115:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(81),i=n(1052),o=n(1078),s=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.a)},1116:function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return u}));var r=n(81),i=n(1048),o=n(1068);function s(t,e){return void 0===e&&(e=0),function(n){return n.lift(new a(t,e))}}var a=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}(),u=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.__extends(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.a.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.a.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(o.a.createComplete()),this.unsubscribe()},e}(i.a),c=function(){return function(t,e){this.notification=t,this.destination=e}}()},1117:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1049),i=n(1051);function o(t,e){return new r.a((function(n){var r=new i.a,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},1118:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},1119:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},1120:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1095);function i(){return Object(r.a)(1)}},1121:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(1049),i=n(1059),o=n(1095),s=n(1080);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,a=null,u=t[t.length-1];return Object(i.a)(u)?(a=t.pop(),t.length>1&&"number"===typeof t[t.length-1]&&(n=t.pop())):"number"===typeof u&&(n=t.pop()),null===a&&1===t.length&&t[0]instanceof r.a?t[0]:Object(o.a)(n)(Object(s.a)(t,a))}},1122:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(81),i=n(1054),o=n(1080),s=n(1063),a=n(1067);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(i.a)(t[0]))return t[0];t=t[0]}return Object(o.a)(t,void 0).lift(new c)}var c=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}(),l=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.__extends(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=Object(a.a)(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var i=this.subscriptions[r];i.unsubscribe(),this.remove(i)}this.subscriptions=null}this.destination.next(e)},e}(s.a)},1123:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(1049),i=n(1053),o=n(1097),s=n(1059);function a(t,e,n){void 0===t&&(t=0);var a=-1;return Object(o.a)(e)?a=Number(e)<1?1:Number(e):Object(s.a)(e)&&(n=e),Object(s.a)(n)||(n=i.a),new r.a((function(e){var r=Object(o.a)(t)?t:+t-n.now();return n.schedule(u,r,{index:0,period:a,subscriber:e})}))}function u(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}},1124:function(t,e,n){"use strict";var r,i=SyntaxError,o=Function,s=TypeError,a=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(M){u=null}var c=function(){throw new s},l=u?function(){try{return c}catch(t){try{return u(arguments,"callee").get}catch(e){return c}}}():c,h=n(1177)(),d=Object.getPrototypeOf||function(t){return t.__proto__},f={},p="undefined"===typeof Uint8Array?r:d(Uint8Array),b={"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":h?d([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":f,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?d(d([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&h?d((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&h?d((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?d(""[Symbol.iterator]()):r,"%Symbol%":h?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":p,"%TypeError%":s,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};try{null.error}catch(M){var y=d(d(M));b["%Error.prototype%"]=y}var g=function t(e){var n;if("%AsyncFunction%"===e)n=a("async function () {}");else if("%GeneratorFunction%"===e)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=a("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(n=d(i.prototype))}return b[e]=n,n},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=n(1125),_=n(1180),w=v.call(Function.call,Array.prototype.concat),S=v.call(Function.apply,Array.prototype.splice),E=v.call(Function.call,String.prototype.replace),x=v.call(Function.call,String.prototype.slice),k=v.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,R=function(t){var e=x(t,0,1),n=x(t,-1);if("%"===e&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return E(t,C,(function(t,e,n,i){r[r.length]=n?E(i,A,"$1"):e||t})),r},O=function(t,e){var n,r=t;if(_(m,r)&&(r="%"+(n=m[r])[0]+"%"),_(b,r)){var o=b[r];if(o===f&&(o=g(r)),"undefined"===typeof o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!==typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,t))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(t),r=n.length>0?n[0]:"",o=O("%"+r+"%",e),a=o.name,c=o.value,l=!1,h=o.alias;h&&(r=h[0],S(n,w([0,1],h)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],y=x(p,0,1),g=x(p,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&f||(l=!0),_(b,a="%"+(r+="."+p)+"%"))c=b[a];else if(null!=c){if(!(p in c)){if(!e)throw new s("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&d+1>=n.length){var m=u(c,p);c=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[p]}else f=_(c,p),c=c[p];f&&!l&&(b[a]=c)}}return c}},1125:function(t,e,n){"use strict";var r=n(1179);t.exports=Function.prototype.bind||r},1126:function(t,e,n){"use strict";var r=String.prototype.replace,i=/%20/g,o="RFC1738",s="RFC3986";t.exports={default:s,formatters:{RFC1738:function(t){return r.call(t,i,"+")},RFC3986:function(t){return String(t)}},RFC1738:o,RFC3986:s}},1127:function(t,e,n){"use strict";function r(){return t=>t}Object.defineProperty(e,"__esModule",{value:!0}),e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=r,e.HexString=t=>t,e.AddressString=t=>t,e.BigIntString=t=>t,e.IntNumber=function(t){return Math.floor(t)},e.RegExpString=t=>t},1128:function(t,e,n){"use strict";var r=n(1072).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"===typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r)}}}(o||i);var s=n.readable||!1!==n.readable&&e.readable,a=n.writable||!1!==n.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,d=function(){s=!1,h=!0,a||o.call(e)},f=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new r),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new r),o.call(e,t)):void 0},b=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"===typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?b():e.on("request",b)),e.on("end",d),e.on("finish",l),!1!==n.error&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",b),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",d),e.removeListener("error",f),e.removeListener("close",p)}}},1129:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(1139);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!==typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}e.EthereumRpcError=i;function o(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n)}}},1130:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},1131:function(t,e,n){const r=n(1087).default;t.exports=class extends r{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach((t=>this.emit("update",t)))}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}}},1132:function(t,e){function n(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function r(t){if(void 0===t||null===t)return t;return"0x"+t.toString(16)}t.exports=async function(t){let{provider:e,fromBlock:i,toBlock:o}=t;i||(i=o);const s=n(i),a=n(o),u=Array(a-s+1).fill().map(((t,e)=>s+e)).map(r);return await Promise.all(u.map((t=>function(t,e,n){return new Promise(((r,i)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:e,params:n},((t,e)=>{if(t)return i(t);r(e.result)}))}))}(e,"eth_getBlockByNumber",[t,!1]))))}},1133:function(t,e,n){"use strict";n.r(e),n.d(e,"useCallback",(function(){return x})),n.d(e,"useContext",(function(){return k})),n.d(e,"useDebugValue",(function(){return C})),n.d(e,"useEffect",(function(){return v})),n.d(e,"useErrorBoundary",(function(){return A})),n.d(e,"useId",(function(){return R})),n.d(e,"useImperativeHandle",(function(){return S})),n.d(e,"useLayoutEffect",(function(){return _})),n.d(e,"useMemo",(function(){return E})),n.d(e,"useReducer",(function(){return m})),n.d(e,"useRef",(function(){return w})),n.d(e,"useState",(function(){return g}));var r,i,o,s,a=n(1074),u=0,c=[],l=[],h=a.options.__b,d=a.options.__r,f=a.options.diffed,p=a.options.__c,b=a.options.unmount;function y(t,e){a.options.__h&&a.options.__h(i,t,u||e),u=0;var n=i.__H||(i.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:l}),n.__[t]}function g(t){return u=1,m(P,t)}function m(t,e,n){var o=y(r++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):P(void 0,e),function(t){var e=o.__N?o.__N[0]:o.__[0],n=o.t(e,t);e!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.u)){i.u=!0;var s=i.shouldComponentUpdate;i.shouldComponentUpdate=function(t,e,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(t){return t.__c}));if(r.every((function(t){return!t.__N})))return!s||s.call(this,t,e,n);var i=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(i=!0)}})),!(!i&&o.__c.props===t)&&(!s||s.call(this,t,e,n))}}return o.__N||o.__}function v(t,e){var n=y(r++,3);!a.options.__s&&T(n.__H,e)&&(n.__=t,n.i=e,i.__H.__h.push(n))}function _(t,e){var n=y(r++,4);!a.options.__s&&T(n.__H,e)&&(n.__=t,n.i=e,i.__h.push(n))}function w(t){return u=5,E((function(){return{current:t}}),[])}function S(t,e,n){u=6,_((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function E(t,e){var n=y(r++,7);return T(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function x(t,e){return u=8,E((function(){return t}),e)}function k(t){var e=i.context[t.__c],n=y(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(i)),e.props.value):t.__}function C(t,e){a.options.useDebugValue&&a.options.useDebugValue(e?e(t):t)}function A(t){var e=y(r++,10),n=g();return e.__=t,i.componentDidCatch||(i.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function R(){var t=y(r++,11);if(!t.__){for(var e=i.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function O(){for(var t;t=c.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(I),t.__H.__h.forEach(N),t.__H.__h=[]}catch(i){t.__H.__h=[],a.options.__e(i,t.__v)}}a.options.__b=function(t){i=null,h&&h(t)},a.options.__r=function(t){d&&d(t),r=0;var e=(i=t.__c).__H;e&&(o===i?(e.__h=[],i.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=l,t.__N=t.i=void 0}))):(e.__h.forEach(I),e.__h.forEach(N),e.__h=[])),o=i},a.options.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==c.push(e)&&s===a.options.requestAnimationFrame||((s=a.options.requestAnimationFrame)||j)(O)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==l&&(t.__=t.__V),t.i=void 0,t.__V=l}))),o=i=null},a.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(I),t.__h=t.__h.filter((function(t){return!t.__||N(t)}))}catch(o){e.some((function(t){t.__h&&(t.__h=[])})),e=[],a.options.__e(o,t.__v)}})),p&&p(t,e)},a.options.unmount=function(t){b&&b(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{I(t)}catch(t){e=t}})),n.__H=void 0,e&&a.options.__e(e,n.__v))};var M="function"==typeof requestAnimationFrame;function j(t){var e,n=function(){clearTimeout(r),M&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);M&&(e=requestAnimationFrame(n))}function I(t){var e=i,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),i=e}function N(t){var e=i;t.__c=t.__(),i=e}function T(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function P(t,e){return"function"==typeof e?e(t):e}},1134:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelayMessageType=void 0,function(t){t.SESSION_ID_REQUEST="SESSION_ID_REQUEST",t.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",t.LINKED="LINKED",t.UNLINKED="UNLINKED",t.WEB3_REQUEST="WEB3_REQUEST",t.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",t.WEB3_RESPONSE="WEB3_RESPONSE"}(e.RelayMessageType||(e.RelayMessageType={}))},1136:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1049),i=n(1051),o=n(1062);var s=n(1117),a=n(1083);var u=n(1145),c=n(1144);function l(t,e){if(null!=t){if(function(t){return t&&"function"===typeof t[o.a]}(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){var i=t[o.a]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if(Object(u.a)(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if(Object(c.a)(t))return Object(s.a)(t,e);if(function(t){return t&&"function"===typeof t[a.a]}(t)||"string"===typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.a((function(n){var r,o=new i.a;return o.add((function(){r&&"function"===typeof r.return&&r.return()})),o.add(e.schedule((function(){r=t[a.a](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(o){return void n.error(o)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},1138:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;const r=n(1171),i=n(1103),o=n(1228),s=n(1245),a=n(1257),u=n(1061),c=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7356822947.commit-3ba8f9c",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7356822947.commit-3ba8f9c",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).LINK_API_URL||"https://www.walletlink.org",l=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7356822947.commit-3ba8f9c",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7356822947.commit-3ba8f9c",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).SDK_VERSION||n(1258).version||"unknown";class h{constructor(t){var e,n;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const i=t.linkAPIUrl||c;let u;u=t.uiConstructor?t.uiConstructor:t=>new o.WalletSDKUI(t),"undefined"===typeof t.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this._overrideIsCoinbaseBrowser=null!==(n=t.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this._eventListener=t.eventListener;const d=new URL(i),f=`${d.protocol}//${d.host}`;this._storage=new r.ScopedLocalStorage(`-walletlink:${f}`),this._storage.setItem("version",h.VERSION),this.walletExtension||(this._relayEventManager=new a.WalletSDKRelayEventManager,this._relay=new s.WalletSDKRelay({linkAPIUrl:i,version:l,darkMode:!!t.darkMode,uiConstructor:u,storage:this._storage,relayEventManager:this._relayEventManager,eventListener:this._eventListener}),this.setAppInfo(t.appName,t.appLogoUrl),t.headlessMode||this._relay.attachUI())}makeWeb3Provider(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(t,e),n;const r=this._relay;if(!r||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return t||r.setConnectDisabled(!0),new i.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(r),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:e,qrUrl:this.getQrUrl(),eventListener:this._eventListener,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(t,e){var n;this._appName=t||"DApp",this._appLogoUrl=e||(0,u.getFavicon)();const r=this.walletExtension;r?this.isCipherProvider(r)||r.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var t;const e=this.walletExtension;e?e.close():null===(t=this._relay)||void 0===t||t.resetAndReload()}getQrUrl(){var t,e;return null!==(e=null===(t=this._relay)||void 0===t?void 0:t.getQRCodeUrl())&&void 0!==e?e:null}get walletExtension(){var t;return null!==(t=window.coinbaseWalletExtension)&&void 0!==t?t:window.walletLinkExtension}isCipherProvider(t){return"boolean"===typeof t.isCipher&&t.isCipher}}e.CoinbaseWalletSDK=h,h.VERSION=l},1139:function(t,e){t.exports=i,i.default=i,i.stable=a,i.stableStringify=a;var n=[],r=[];function i(t,e,i){var s;o(t,"",[],void 0);try{s=0===r.length?JSON.stringify(t,e,i):JSON.stringify(t,c(e),i)}catch(u){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var a=n.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return s}function o(t,e,i,s){var a;if("object"===typeof t&&null!==t){for(a=0;a<i.length;a++)if(i[a]===t){var u=Object.getOwnPropertyDescriptor(s,e);return void(void 0!==u.get?u.configurable?(Object.defineProperty(s,e,{value:"[Circular]"}),n.push([s,e,t,u])):r.push([t,e]):(s[e]="[Circular]",n.push([s,e,t])))}if(i.push(t),Array.isArray(t))for(a=0;a<t.length;a++)o(t[a],a,i,t);else{var c=Object.keys(t);for(a=0;a<c.length;a++){var l=c[a];o(t[l],l,i,t)}}i.pop()}}function s(t,e){return t<e?-1:t>e?1:0}function a(t,e,i){var o,s=u(t,"",[],void 0)||t;try{o=0===r.length?JSON.stringify(s,e,i):JSON.stringify(s,c(e),i)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var a=n.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return o}function u(t,e,i,o){var a;if("object"===typeof t&&null!==t){for(a=0;a<i.length;a++)if(i[a]===t){var c=Object.getOwnPropertyDescriptor(o,e);return void(void 0!==c.get?c.configurable?(Object.defineProperty(o,e,{value:"[Circular]"}),n.push([o,e,t,c])):r.push([t,e]):(o[e]="[Circular]",n.push([o,e,t])))}try{if("function"===typeof t.toJSON)return}catch(f){return}if(i.push(t),Array.isArray(t))for(a=0;a<t.length;a++)u(t[a],a,i,t);else{var l={},h=Object.keys(t).sort(s);for(a=0;a<h.length;a++){var d=h[a];u(t[d],d,i,t),l[d]=t[d]}if(void 0===o)return l;n.push([o,e,t]),o[e]=l}i.pop()}}function c(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var i=0;i<r.length;i++){var o=r[i];if(o[1]===e&&o[0]===n){n="[Circular]",r.splice(i,1);break}}return t.call(this,e,n)}}},1140:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(1106),i=n(1105),o=r.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",a={code:o,message:u(o)};function u(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if(Number.isInteger(t)){const n=t.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(l(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function c(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!r.errorValues[e]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function h(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=u,e.isValidCode=c,e.serializeError=function(t){let{fallbackError:e=a,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,o;if(!e||!Number.isInteger(e.code)||"string"!==typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const s={};if(t&&"object"===typeof t&&!Array.isArray(t)&&d(t,"code")&&c(t.code)){const e=t;s.code=e.code,e.message&&"string"===typeof e.message?(s.message=e.message,d(e,"data")&&(s.data=e.data)):(s.message=u(s.code),s.data={originalError:h(t)})}else{s.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;s.message=n&&"string"===typeof n?n:e.message,s.data={originalError:h(t)}}const l=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&l&&"string"===typeof l&&(s.stack=l),s}},1141:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1076),i=n(1109),o={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(i.a)(t)},complete:function(){}}},1142:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(81),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.__extends(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(1051).a)},1143:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}}},1144:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return t&&"number"===typeof t.length&&"function"!==typeof t}},1145:function(t,e,n){"use strict";function r(t){return!!t&&"function"!==typeof t.subscribe&&"function"===typeof t.then}n.d(e,"a",(function(){return r}))},1146:function(t,e,n){"use strict";function r(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,"a",(function(){return r}))},1147:function(t,e,n){"use strict";var r=n(1126),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)"undefined"!==typeof t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:a,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var i=e[r],s=i.obj[i.prop],a=Object.keys(s),u=0;u<a.length;++u){var c=a[u],l=s[c];"object"===typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:s,prop:c}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)"undefined"!==typeof n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(i){return r}},encode:function(t,e,n,i,o){if(0===t.length)return t;var a=t;if("symbol"===typeof t?a=Symbol.prototype.toString.call(t):"string"!==typeof t&&(a=String(t)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var u="",c=0;c<a.length;++c){var l=a.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===r.RFC1738&&(40===l||41===l)?u+=a.charAt(c):l<128?u+=s[l]:l<2048?u+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?u+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(c)),u+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return u},isBuffer:function(t){return!(!t||"object"!==typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!==typeof n){if(o(e))e.push(n);else{if(!e||"object"!==typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!==typeof e)return[e].concat(n);var s=e;return o(e)&&!o(n)&&(s=a(e,r)),o(e)&&o(n)?(n.forEach((function(n,o){if(i.call(e,o)){var s=e[o];s&&"object"===typeof s&&n&&"object"===typeof n?e[o]=t(s,n,r):e.push(n)}else e[o]=n})),e):Object.keys(n).reduce((function(e,o){var s=n[o];return i.call(e,o)?e[o]=t(e[o],s,r):e[o]=s,e}),s)}}},1148:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;const r=n(1104);e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion";e.WalletSDKRelayAbstract=class{async makeEthereumJSONRPCRequest(t,e){if(!e)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(e,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>{if(!t)throw r.ethErrors.rpc.parse({});const e=t,{error:n}=e;if(n)throw(0,r.serializeError)(n);return e}))}}},1149:function(t,e,n){(function(e){const r=n(1187),i=n(17);function o(t){return e.allocUnsafe(t).fill(0)}function s(t,e,n){const r=o(e);return t=a(t),n?t.length<e?(t.copy(r),r):t.slice(0,e):t.length<e?(t.copy(r,e-t.length),r):t.slice(-e)}function a(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"===typeof t)t=u(t)?e.from((n=c(t)).length%2?"0"+n:n,"hex"):e.from(t);else if("number"===typeof t)t=intToBuffer(t);else if(null===t||void 0===t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}var n;return t}function u(t){return"string"===typeof t&&t.match(/^0x[0-9A-Fa-f]*$/)}function c(t){return"string"===typeof t&&t.startsWith("0x")?t.slice(2):t}t.exports={zeros:o,setLength:s,setLengthRight:function(t,e){return s(t,e,!0)},isHexString:u,stripHexPrefix:c,toBuffer:a,bufferToHex:function(t){return"0x"+(t=a(t)).toString("hex")},keccak:function(t,e){return t=a(t),e||(e=256),r("keccak"+e).update(t).digest()}}}).call(this,n(294).Buffer)},1150:function(t,e,n){(e=t.exports=n(1151)).Stream=e,e.Readable=e,e.Writable=n(1155),e.Duplex=n(1073),e.Transform=n(1157),e.PassThrough=n(1197),e.finished=n(1128),e.pipeline=n(1198)},1151:function(t,e,n){"use strict";(function(e,r){var i;t.exports=k,k.ReadableState=x;n(32).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=n(1152),a=n(294).Buffer,u=e.Uint8Array||function(){};var c,l=n(1190);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,d,f,p=n(1191),b=n(1153),y=n(1154).getHighWaterMark,g=n(1072).codes,m=g.ERR_INVALID_ARG_TYPE,v=g.ERR_STREAM_PUSH_AFTER_EOF,_=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(463)(k,s);var S=b.errorOrDestroy,E=["error","close","destroy","pause","resume"];function x(t,e,r){i=i||n(1073),t=t||{},"boolean"!==typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=n(1156).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function k(t){if(i=i||n(1073),!(this instanceof k))return new k(t);var e=this instanceof i;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function C(t,e,n,r,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?M(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,j(t)))}(t,s);else if(i||(o=function(t,e){var n;r=e,a.isBuffer(r)||r instanceof u||"string"===typeof e||void 0===e||t.objectMode||(n=new m("chunk",["string","Buffer","Uint8Array"],e));var r;return n}(s,e)),o)S(t,o);else if(s.objectMode||e&&e.length>0)if("string"===typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),r)s.endEmitted?S(t,new w):A(t,s,e,!0);else if(s.ended)S(t,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?A(t,s,e,!1):I(t,s)):A(t,s,e,!1)}else r||(s.reading=!1,I(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function A(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&M(t)),I(t,e)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),k.prototype.destroy=b.destroy,k.prototype._undestroy=b.undestroy,k.prototype._destroy=function(t,e){e(t)},k.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=a.from(t,e),e=""),n=!0),C(this,t,e,!1,n)},k.prototype.unshift=function(t){return C(this,t,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(t){h||(h=n(1156).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function O(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=R?t=R:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function M(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(j,t))}function j(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,D(t)}function I(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(N,t,e))}function N(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var n=e.length;if(c("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1}function T(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function B(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function F(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(H,e,t))}function H(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function U(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}k.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):M(this),null;if(0===(t=O(t,e))&&e.ended)return 0===e.length&&F(this),null;var r,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=O(n,e))),null===(r=t>0?B(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&F(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(t){S(this,new _("_read()"))},k.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:y;function a(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",b),t.removeListener("drain",l),t.removeListener("error",f),t.removeListener("unpipe",a),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",d),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?r.nextTick(s):n.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,D(t))}}(n);t.on("drain",l);var h=!1;function d(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==U(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function f(e){c("onerror",e),y(),t.removeListener("error",f),0===o(t,"error")&&S(t,e)}function p(){t.removeListener("finish",b),y()}function b(){c("onfinish"),t.removeListener("close",p),y()}function y(){c("unpipe"),n.unpipe(t)}return n.on("data",d),function(t,e,n){if("function"===typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",f),t.once("close",p),t.once("finish",b),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},k.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=U(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},k.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?M(this):i.reading||r.nextTick(P,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(t,e){var n=s.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(T,this),n},k.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(T,this),e},k.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(L,t,e))}(this,t)),t.paused=!1,this},k.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<E.length;o++)t.on(E[o],this.emit.bind(this,E[o]));return this._read=function(e){c("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"===typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(1195)),d(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),k._fromList=B,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(k.from=function(t,e){return void 0===f&&(f=n(1196)),f(k,t,e)})}).call(this,n(40),n(101))},1152:function(t,e,n){t.exports=n(32).EventEmitter},1153:function(t,e,n){"use strict";(function(e){function n(t,e){i(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(r,s):(s._writableState.errorEmitted=!0,e.nextTick(n,s,t)):e.nextTick(n,s,t):o?(e.nextTick(r,s),o(t)):e.nextTick(r,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,n(101))},1154:function(t,e,n){"use strict";var r=n(1072).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},1155:function(t,e,n){"use strict";(function(e,r){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=k,k.WritableState=x;var s={deprecate:n(1193)},a=n(1152),u=n(294).Buffer,c=e.Uint8Array||function(){};var l,h=n(1153),d=n(1154).getHighWaterMark,f=n(1072).codes,p=f.ERR_INVALID_ARG_TYPE,b=f.ERR_METHOD_NOT_IMPLEMENTED,y=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,m=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,_=f.ERR_STREAM_WRITE_AFTER_END,w=f.ERR_UNKNOWN_ENCODING,S=h.errorOrDestroy;function E(){}function x(t,e,s){o=o||n(1073),t=t||{},"boolean"!==typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,o=n.writecb;if("function"!==typeof o)throw new y;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,o){--e.pendingcb,n?(r.nextTick(o,i),r.nextTick(j,t,e),t._writableState.errorEmitted=!0,S(t,i)):(o(i),t._writableState.errorEmitted=!0,S(t,i),j(t,e))}(t,n,i,e,o);else{var s=O(n)||t.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||R(t,n),i?r.nextTick(A,t,n,s,o):A(t,n,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function k(t){var e=this instanceof(o=o||n(1073));if(!e&&!l.call(k,this))return new k(t);this._writableState=new x(t,this,e),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),a.call(this)}function C(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new m("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),j(t,e)}function R(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,o=new Array(r),s=e.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,C(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,h=n.callback;if(C(t,e,!1,e.objectMode?1:c.length,c,l,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function O(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final((function(n){e.pendingcb--,n&&S(t,n),e.prefinished=!0,t.emit("prefinish"),j(t,e)}))}function j(t,e){var n=O(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!==typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(M,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return n}n(463)(k,a),x.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===k&&(t&&t._writableState instanceof x)}})):l=function(t){return t instanceof this},k.prototype.pipe=function(){S(this,new g)},k.prototype.write=function(t,e,n){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"===typeof e&&(n=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!==typeof n&&(n=E),o.ending?function(t,e){var n=new _;S(t,n),r.nextTick(e,n)}(this,n):(a||function(t,e,n,i){var o;return null===n?o=new v:"string"===typeof n||e.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(S(t,o),r.nextTick(i,o),!1)}(this,o,t,n))&&(o.pendingcb++,s=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=u.from(e,n));return e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else C(t,e,!1,a,r,i,o);return c}(this,o,a,t,e,n)),s},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},k.prototype.setDefaultEncoding=function(t){if("string"===typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(t,e,n){n(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(t,e,n){var i=this._writableState;return"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,j(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),k.prototype.destroy=h.destroy,k.prototype._undestroy=h.undestroy,k.prototype._destroy=function(t,e){e(t)}}).call(this,n(40),n(101))},1156:function(t,e,n){"use strict";var r=n(1194).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2===0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\ufffd":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=s(e[r]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=s(e[r]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},1157:function(t,e,n){"use strict";t.exports=l;var r=n(1072).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(1073);function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"===typeof t.transform&&(this._transform=t.transform),"function"===typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!==typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(e,n){d(t,e,n)}))}function d(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}n(463)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,n){n(new i("_transform()"))},l.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},1158:function(t,e,n){"use strict";const r=(t,e)=>function(){const n=e.promiseModule,r=new Array(arguments.length);for(let t=0;t<arguments.length;t++)r[t]=arguments[t];return new n(((n,i)=>{e.errorFirst?r.push((function(t,r){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t<arguments.length;t++)e[t-1]=arguments[t];t?(e.unshift(t),i(e)):n(e)}else t?i(t):n(r)})):r.push((function(t){if(e.multiArgs){const t=new Array(arguments.length-1);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];n(t)}else n(t)})),t.apply(this,r)}))};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const n=t=>{const n=e=>"string"===typeof e?t===e:e.test(t);return e.include?e.include.some(n):!e.exclude.some(n)};let i;i="function"===typeof t?function(){return e.excludeMain?t.apply(this,arguments):r(t,e).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const o in t){const s=t[o];i[o]="function"===typeof s&&n(o)?r(s,e):s}return i}},1159:function(t,e,n){const r=n(1208),i=n(1209)();function o(t){this.currentProvider=t}function s(t){return function(){const e=this;var n=[].slice.call(arguments),r=n.pop();e.sendAsync({method:t,params:n},r)}}function a(t,e){return function(){const n=this;var r=[].slice.call(arguments),i=r.pop();r.length<t&&r.push("latest"),n.sendAsync({method:e,params:r},i)}}t.exports=o,o.prototype.getBalance=a(2,"eth_getBalance"),o.prototype.getCode=a(2,"eth_getCode"),o.prototype.getTransactionCount=a(2,"eth_getTransactionCount"),o.prototype.getStorageAt=a(3,"eth_getStorageAt"),o.prototype.call=a(2,"eth_call"),o.prototype.protocolVersion=s("eth_protocolVersion"),o.prototype.syncing=s("eth_syncing"),o.prototype.coinbase=s("eth_coinbase"),o.prototype.mining=s("eth_mining"),o.prototype.hashrate=s("eth_hashrate"),o.prototype.gasPrice=s("eth_gasPrice"),o.prototype.accounts=s("eth_accounts"),o.prototype.blockNumber=s("eth_blockNumber"),o.prototype.getBlockTransactionCountByHash=s("eth_getBlockTransactionCountByHash"),o.prototype.getBlockTransactionCountByNumber=s("eth_getBlockTransactionCountByNumber"),o.prototype.getUncleCountByBlockHash=s("eth_getUncleCountByBlockHash"),o.prototype.getUncleCountByBlockNumber=s("eth_getUncleCountByBlockNumber"),o.prototype.sign=s("eth_sign"),o.prototype.sendTransaction=s("eth_sendTransaction"),o.prototype.sendRawTransaction=s("eth_sendRawTransaction"),o.prototype.estimateGas=s("eth_estimateGas"),o.prototype.getBlockByHash=s("eth_getBlockByHash"),o.prototype.getBlockByNumber=s("eth_getBlockByNumber"),o.prototype.getTransactionByHash=s("eth_getTransactionByHash"),o.prototype.getTransactionByBlockHashAndIndex=s("eth_getTransactionByBlockHashAndIndex"),o.prototype.getTransactionByBlockNumberAndIndex=s("eth_getTransactionByBlockNumberAndIndex"),o.prototype.getTransactionReceipt=s("eth_getTransactionReceipt"),o.prototype.getUncleByBlockHashAndIndex=s("eth_getUncleByBlockHashAndIndex"),o.prototype.getUncleByBlockNumberAndIndex=s("eth_getUncleByBlockNumberAndIndex"),o.prototype.getCompilers=s("eth_getCompilers"),o.prototype.compileLLL=s("eth_compileLLL"),o.prototype.compileSolidity=s("eth_compileSolidity"),o.prototype.compileSerpent=s("eth_compileSerpent"),o.prototype.newFilter=s("eth_newFilter"),o.prototype.newBlockFilter=s("eth_newBlockFilter"),o.prototype.newPendingTransactionFilter=s("eth_newPendingTransactionFilter"),o.prototype.uninstallFilter=s("eth_uninstallFilter"),o.prototype.getFilterChanges=s("eth_getFilterChanges"),o.prototype.getFilterLogs=s("eth_getFilterLogs"),o.prototype.getLogs=s("eth_getLogs"),o.prototype.getWork=s("eth_getWork"),o.prototype.submitWork=s("eth_submitWork"),o.prototype.submitHashrate=s("eth_submitHashrate"),o.prototype.sendAsync=function(t,e){var n;this.currentProvider.sendAsync((n=t,r({id:i(),jsonrpc:"2.0",params:[]},n)),(function(t,n){if(!t&&n.error&&(t=new Error("EthQuery - RPC Error - "+n.error.message)),t)return e(t);e(null,n.result)}))}},1160:function(t,e,n){t.exports=n(1215)},1161:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(1216),e),i(n(1217),e),i(n(1218),e),i(n(1162),e),i(n(1163),e),i(n(1221),e)},1162:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;const r=4294967295;let i=Math.floor(Math.random()*r);e.getUniqueId=function(){return i=(i+1)%r,i}},1163:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;const i=r(n(1087)),o=n(1219);class s extends i.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,e){if(e&&"function"!==typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,n,r)=>{try{const[i,o,a]=await s._runAllMiddleware(t,e,this._middleware);return o?(await s._runReturnHandlers(a),r(i)):n((async t=>{try{await s._runReturnHandlers(a)}catch(e){return t(e)}return t()}))}catch(i){return r(i)}}}async _handleBatch(t,e){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,n):n}catch(n){if(e)return e(n);throw n}}_promiseHandle(t){return new Promise((e=>{this._handle(t,((t,n)=>{e(n)}))}))}async _handle(t,e){if(!t||Array.isArray(t)||"object"!==typeof t){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof t,{request:t});return e(n,{id:void 0,jsonrpc:"2.0",error:n})}if("string"!==typeof t.method){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof t.method,{request:t});return e(n,{id:t.id,jsonrpc:"2.0",error:n})}const n=Object.assign({},t),r={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,r)}catch(s){i=s}return i&&(delete r.result,r.error||(r.error=o.serializeError(i))),e(i,r)}async _processRequest(t,e){const[n,r,i]=await s._runAllMiddleware(t,e,this._middleware);if(s._checkForCompletion(t,e,r),await s._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,e,n){const r=[];let i=null,o=!1;for(const a of n)if([i,o]=await s._runMiddleware(t,e,a,r),o)break;return[i,o,r.reverse()]}static _runMiddleware(t,e,n,r){return new Promise((i=>{const s=t=>{const n=t||e.error;n&&(e.error=o.serializeError(n)),i([n,!0])},u=n=>{e.error?s(e.error):(n&&("function"!==typeof n&&s(new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${a(t)}`,{request:t})),r.push(n)),i([null,!1]))};try{n(t,e,u,s)}catch(c){s(c)}}))}static async _runReturnHandlers(t){for(const e of t)await new Promise(((t,n)=>{e((e=>e?n(e):t()))}))}static _checkForCompletion(t,e,n){if(!("result"in e)&&!("error"in e))throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(t)}`,{request:t});if(!n)throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(t)}`,{request:t})}}function a(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=s},1164:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(1130),i=n(1129),o=r.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",a={code:o,message:u(o)};function u(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if(Number.isInteger(t)){const n=t.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(l(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function c(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!r.errorValues[e]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function h(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=u,e.isValidCode=c,e.serializeError=function(t){let{fallbackError:e=a,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,o;if(!e||!Number.isInteger(e.code)||"string"!==typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const s={};if(t&&"object"===typeof t&&!Array.isArray(t)&&d(t,"code")&&c(t.code)){const e=t;s.code=e.code,e.message&&"string"===typeof e.message?(s.message=e.message,d(e,"data")&&(s.data=e.data)):(s.message=u(s.code),s.data={originalError:h(t)})}else{s.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;s.message=n&&"string"===typeof n?n:e.message,s.data={originalError:h(t)}}const l=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&l&&"string"===typeof l&&(s.stack=l),s}},1165:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3Method=void 0,function(t){t.requestEthereumAccounts="requestEthereumAccounts",t.signEthereumMessage="signEthereumMessage",t.signEthereumTransaction="signEthereumTransaction",t.submitEthereumTransaction="submitEthereumTransaction",t.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",t.scanQRCode="scanQRCode",t.generic="generic",t.childRequestEthereumAccounts="childRequestEthereumAccounts",t.addEthereumChain="addEthereumChain",t.switchEthereumChain="switchEthereumChain",t.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",t.watchAsset="watchAsset"}(e.Web3Method||(e.Web3Method={}))},1171:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScopedLocalStorage=void 0;e.ScopedLocalStorage=class{constructor(t){this.scope=t}setItem(t,e){localStorage.setItem(this.scopedKey(t),e)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),e=[];for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);"string"===typeof r&&r.startsWith(t)&&e.push(r)}e.forEach((t=>localStorage.removeItem(t)))}scopedKey(t){return`${this.scope}:${t}`}}},1172:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(1105),i=n(1140),o=n(1106);function s(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function a(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"===typeof t)return[t];if("object"===typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!==typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>s(o.errorCodes.rpc.parse,t),invalidRequest:t=>s(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>s(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>s(o.errorCodes.rpc.methodNotFound,t),internal:t=>s(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(e,t)},invalidInput:t=>s(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>s(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>s(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>s(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>s(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>s(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>a(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>a(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>a(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>a(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>a(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!==typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},1173:function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&"object"===typeof module&&module.exports,AMD=__webpack_require__(223),ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"===typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t,e){return function(n){return new Sha256(e,!0).update(n)[t]()}},createMethod=function(t){var e=createOutputMethod("hex",t);NODE_JS&&(e=nodeWrap(e,t)),e.create=function(){return new Sha256(t)},e.update=function(t){return e.create().update(t)};for(var n=0;n<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];e[r]=createOutputMethod(r,t)}return e},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(t){if("string"===typeof t)return crypto.createHash(algorithm).update(t,"utf8").digest("hex");if(null===t||void 0===t)throw new Error(ERROR);return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod},createHmacOutputMethod=function(t,e){return function(n,r){return new HmacSha256(n,e,!0).update(r)[t]()}},createHmacMethod=function(t){var e=createHmacOutputMethod("hex",t);e.create=function(e){return new HmacSha256(e,t)},e.update=function(t,n){return e.create(t).update(n)};for(var n=0;n<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];e[r]=createHmacOutputMethod(r,t)}return e};function Sha256(t,e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function HmacSha256(t,e,n){var r,i=typeof t;if("string"===i){var o,s=[],a=t.length,u=0;for(r=0;r<a;++r)(o=t.charCodeAt(r))<128?s[u++]=o:o<2048?(s[u++]=192|o>>6,s[u++]=128|63&o):o<55296||o>=57344?(s[u++]=224|o>>12,s[u++]=128|o>>6&63,s[u++]=128|63&o):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++r)),s[u++]=240|o>>18,s[u++]=128|o>>12&63,s[u++]=128|o>>6&63,s[u++]=128|63&o);t=s}else{if("object"!==i)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw new Error(ERROR)}t.length>64&&(t=new Sha256(e,!0).update(t).array());var c=[],l=[];for(r=0;r<64;++r){var h=t[r]||0;c[r]=92^h,l[r]=54^h}Sha256.call(this,e,n),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=n}Sha256.prototype.update=function(t){if(!this.finalized){var e,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw new Error(ERROR);e=!0}for(var r,i,o=0,s=t.length,a=this.blocks;o<s;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),e)for(i=this.start;o<s&&i<64;++o)a[i>>2]|=t[o]<<SHIFT[3&i++];else for(i=this.start;o<s&&i<64;++o)(r=t.charCodeAt(o))<128?a[i>>2]|=r<<SHIFT[3&i++]:r<2048?(a[i>>2]|=(192|r>>6)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]):r<55296||r>=57344?(a[i>>2]|=(224|r>>12)<<SHIFT[3&i++],a[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++o)),a[i>>2]|=(240|r>>18)<<SHIFT[3&i++],a[i>>2]|=(128|r>>12&63)<<SHIFT[3&i++],a[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=a[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=EXTRA[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var t,e,n,r,i,o,s,a,u,c=this.h0,l=this.h1,h=this.h2,d=this.h3,f=this.h4,p=this.h5,b=this.h6,y=this.h7,g=this.blocks;for(t=16;t<64;++t)e=((i=g[t-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,n=((i=g[t-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,g[t]=g[t-16]+e+g[t-7]+n<<0;for(u=l&h,t=0;t<64;t+=4)this.first?(this.is224?(o=300032,y=(i=g[0]-1413257819)-150054599<<0,d=i+24177077<<0):(o=704751109,y=(i=g[0]-210244248)-1521486534<<0,d=i+143694565<<0),this.first=!1):(e=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(o=c&l)^c&h^u,y=d+(i=y+(n=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&p^~f&b)+K[t]+g[t])<<0,d=i+(e+r)<<0),e=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(s=d&c)^d&l^o,b=h+(i=b+(n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&f^~y&p)+K[t+1]+g[t+1])<<0,e=((h=i+(e+r)<<0)>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),r=(a=h&d)^h&c^s,p=l+(i=p+(n=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&y^~b&f)+K[t+2]+g[t+2])<<0,e=((l=i+(e+r)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(u=l&h)^l&d^a,f=c+(i=f+(n=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&b^~p&y)+K[t+3]+g[t+3])<<0,c=i+(e+r)<<0;this.h0=this.h0+c<<0,this.h1=this.h1+l<<0,this.h2=this.h2+h<<0,this.h3=this.h3+d<<0,this.h4=this.h4+f<<0,this.h5=this.h5+p<<0,this.h6=this.h6+b<<0,this.h7=this.h7+y<<0},Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s];return this.is224||(u+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]),u},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s];return this.is224||u.push(a>>24&255,a>>16&255,a>>8&255,255&a),u},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(101),__webpack_require__(40))},1174:function(t,e,n){"use strict";var r=n(1175),i=n(1185),o=n(1126);t.exports={formats:o,parse:i,stringify:r}},1175:function(t,e,n){"use strict";var r=n(1176),i=n(1147),o=n(1126),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,h=function(t,e){l.apply(t,u(e)?e:[e])},d=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(t){return d.call(t)},skipNulls:!1,strictNullHandling:!1},b={},y=function t(e,n,o,s,a,l,d,f,y,g,m,v,_,w,S,E){for(var x,k=e,C=E,A=0,R=!1;void 0!==(C=C.get(b))&&!R;){var O=C.get(e);if(A+=1,"undefined"!==typeof O){if(O===A)throw new RangeError("Cyclic object value");R=!0}"undefined"===typeof C.get(b)&&(A=0)}if("function"===typeof f?k=f(n,k):k instanceof Date?k=m(k):"comma"===o&&u(k)&&(k=i.maybeMap(k,(function(t){return t instanceof Date?m(t):t}))),null===k){if(a)return d&&!w?d(n,p.encoder,S,"key",v):n;k=""}if("string"===typeof(x=k)||"number"===typeof x||"boolean"===typeof x||"symbol"===typeof x||"bigint"===typeof x||i.isBuffer(k)){if(d){var M=w?n:d(n,p.encoder,S,"key",v);if("comma"===o&&w){for(var j=c.call(String(k),","),I="",N=0;N<j.length;++N)I+=(0===N?"":",")+_(d(j[N],p.encoder,S,"value",v));return[_(M)+(s&&u(k)&&1===j.length?"[]":"")+"="+I]}return[_(M)+"="+_(d(k,p.encoder,S,"value",v))]}return[_(n)+"="+_(String(k))]}var T,P=[];if("undefined"===typeof k)return P;if("comma"===o&&u(k))T=[{value:k.length>0?k.join(",")||null:void 0}];else if(u(f))T=f;else{var L=Object.keys(k);T=y?L.sort(y):L}for(var D=s&&u(k)&&1===k.length?n+"[]":n,B=0;B<T.length;++B){var F=T[B],H="object"===typeof F&&"undefined"!==typeof F.value?F.value:k[F];if(!l||null!==H){var U=u(k)?"function"===typeof o?o(D,F):D:D+(g?"."+F:"["+F+"]");E.set(e,A);var W=r();W.set(b,E),h(P,t(H,U,o,s,a,l,d,f,y,g,m,v,_,w,S,W))}}return P};t.exports=function(t,e){var n,i=t,c=function(t){if(!t)return p;if(null!==t.encoder&&"undefined"!==typeof t.encoder&&"function"!==typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if("undefined"!==typeof t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if("undefined"!==typeof t.format){if(!s.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=o.formatters[n],i=p.filter;return("function"===typeof t.filter||u(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"===typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:"undefined"===typeof t.allowDots?p.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"===typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,delimiter:"undefined"===typeof t.delimiter?p.delimiter:t.delimiter,encode:"boolean"===typeof t.encode?t.encode:p.encode,encoder:"function"===typeof t.encoder?t.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof t.encodeValuesOnly?t.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"===typeof t.serializeDate?t.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof t.skipNulls?t.skipNulls:p.skipNulls,sort:"function"===typeof t.sort?t.sort:null,strictNullHandling:"boolean"===typeof t.strictNullHandling?t.strictNullHandling:p.strictNullHandling}}(e);"function"===typeof c.filter?i=(0,c.filter)("",i):u(c.filter)&&(n=c.filter);var l,d=[];if("object"!==typeof i||null===i)return"";l=e&&e.arrayFormat in a?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=a[l];if(e&&"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var b="comma"===f&&e&&e.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var g=r(),m=0;m<n.length;++m){var v=n[m];c.skipNulls&&null===i[v]||h(d,y(i[v],v,f,b,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var _=d.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),_.length>0?w+_:""}},1176:function(t,e,n){"use strict";var r=n(1124),i=n(1181),o=n(1183),s=r("%TypeError%"),a=r("%WeakMap%",!0),u=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),f=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),b=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n};t.exports=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new s("Side channel does not contain "+o(t))},get:function(r){if(a&&r&&("object"===typeof r||"function"===typeof r)){if(t)return c(t,r)}else if(u){if(e)return d(e,r)}else if(n)return function(t,e){var n=b(t,e);return n&&n.value}(n,r)},has:function(r){if(a&&r&&("object"===typeof r||"function"===typeof r)){if(t)return h(t,r)}else if(u){if(e)return p(e,r)}else if(n)return function(t,e){return!!b(t,e)}(n,r);return!1},set:function(r,i){a&&r&&("object"===typeof r||"function"===typeof r)?(t||(t=new a),l(t,r,i)):u?(e||(e=new u),f(e,r,i)):(n||(n={key:{},next:null}),function(t,e,n){var r=b(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,i))}};return r}},1177:function(t,e,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(1178);t.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},1178:function(t,e,n){"use strict";t.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"===typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"===typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1179:function(t,e,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString,s="[object Function]";t.exports=function(t){var e=this;if("function"!==typeof e||o.call(e)!==s)throw new TypeError(r+e);for(var n,a=i.call(arguments,1),u=function(){if(this instanceof n){var r=e.apply(this,a.concat(i.call(arguments)));return Object(r)===r?r:this}return e.apply(t,a.concat(i.call(arguments)))},c=Math.max(0,e.length-a.length),l=[],h=0;h<c;h++)l.push("$"+h);if(n=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(u),e.prototype){var d=function(){};d.prototype=e.prototype,n.prototype=new d,d.prototype=null}return n}},1180:function(t,e,n){"use strict";var r=n(1125);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},1181:function(t,e,n){"use strict";var r=n(1124),i=n(1182),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"===typeof n&&o(t,".prototype.")>-1?i(n):n}},1182:function(t,e,n){"use strict";var r=n(1125),i=n(1124),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||r.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}t.exports=function(t){var e=a(r,s,arguments);if(u&&c){var n=u(e,"length");n.configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))})}return e};var h=function(){return a(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},1183:function(t,e,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,s=r&&Map.prototype.forEach,a="function"===typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&u&&"function"===typeof u.get?u.get:null,l=a&&Set.prototype.forEach,h="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,b=Object.prototype.toString,y=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,_=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,x=Array.prototype.join,k=Array.prototype.slice,C=Math.floor,A="function"===typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,O="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"===typeof Symbol&&"object"===typeof Symbol.iterator,j="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||"symbol")?Symbol.toStringTag:null,I=Object.prototype.propertyIsEnumerable,N=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function T(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof t){var r=t<0?-C(-t):C(t);if(r!==t){var i=String(r),o=m.call(e,i.length+1);return v.call(i,n,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,n,"$&_")}var P=n(1184),L=P.custom,D=W(L)?L:null;function B(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function F(t){return v.call(String(t),/"/g,""")}function H(t){return"[object Array]"===V(t)&&(!j||!("object"===typeof t&&j in t))}function U(t){return"[object RegExp]"===V(t)&&(!j||!("object"===typeof t&&j in t))}function W(t){if(M)return t&&"object"===typeof t&&t instanceof Symbol;if("symbol"===typeof t)return!0;if(!t||"object"!==typeof t||!O)return!1;try{return O.call(t),!0}catch(e){}return!1}t.exports=function t(e,n,r,i){var a=n||{};if(q(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(a,"maxStringLength")&&("number"===typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!q(a,"customInspect")||a.customInspect;if("boolean"!==typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(a,"numericSeparator")&&"boolean"!==typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=a.numericSeparator;if("undefined"===typeof e)return"undefined";if(null===e)return"null";if("boolean"===typeof e)return e?"true":"false";if("string"===typeof e)return J(e,a);if("number"===typeof e){if(0===e)return 1/0/e>0?"0":"-0";var _=String(e);return b?T(e,_):_}if("bigint"===typeof e){var S=String(e)+"n";return b?T(e,S):S}var C="undefined"===typeof a.depth?5:a.depth;if("undefined"===typeof r&&(r=0),r>=C&&C>0&&"object"===typeof e)return H(e)?"[Array]":"[Object]";var R=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"===typeof t.indent&&t.indent>0))return null;n=x.call(Array(t.indent+1)," ")}return{base:n,prev:x.call(Array(e+1),n)}}(a,r);if("undefined"===typeof i)i=[];else if(G(i,e)>=0)return"[Circular]";function L(e,n,o){if(n&&(i=k.call(i)).push(n),o){var s={depth:a.depth};return q(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),t(e,s,r+1,i)}return t(e,a,r+1,i)}if("function"===typeof e&&!U(e)){var z=function(t){if(t.name)return t.name;var e=g.call(y.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),Y=Z(e,L);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(Y.length>0?" { "+x.call(Y,", ")+" }":"")}if(W(e)){var tt=M?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(e);return"object"!==typeof e||M?tt:$(tt)}if(function(t){if(!t||"object"!==typeof t)return!1;if("undefined"!==typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"===typeof t.nodeName&&"function"===typeof t.getAttribute}(e)){for(var et="<"+w.call(String(e.nodeName)),nt=e.attributes||[],rt=0;rt<nt.length;rt++)et+=" "+nt[rt].name+"="+B(F(nt[rt].value),"double",a);return et+=">",e.childNodes&&e.childNodes.length&&(et+="..."),et+="</"+w.call(String(e.nodeName))+">"}if(H(e)){if(0===e.length)return"[]";var it=Z(e,L);return R&&!function(t){for(var e=0;e<t.length;e++)if(G(t[e],"\n")>=0)return!1;return!0}(it)?"["+X(it,R)+"]":"[ "+x.call(it,", ")+" ]"}if(function(t){return"[object Error]"===V(t)&&(!j||!("object"===typeof t&&j in t))}(e)){var ot=Z(e,L);return"cause"in Error.prototype||!("cause"in e)||I.call(e,"cause")?0===ot.length?"["+String(e)+"]":"{ ["+String(e)+"] "+x.call(ot,", ")+" }":"{ ["+String(e)+"] "+x.call(E.call("[cause]: "+L(e.cause),ot),", ")+" }"}if("object"===typeof e&&u){if(D&&"function"===typeof e[D]&&P)return P(e,{depth:C-r});if("symbol"!==u&&"function"===typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!==typeof t)return!1;try{o.call(t);try{c.call(t)}catch(et){return!0}return t instanceof Map}catch(e){}return!1}(e)){var st=[];return s&&s.call(e,(function(t,n){st.push(L(n,e,!0)+" => "+L(t,e))})),Q("Map",o.call(e),st,R)}if(function(t){if(!c||!t||"object"!==typeof t)return!1;try{c.call(t);try{o.call(t)}catch(e){return!0}return t instanceof Set}catch(n){}return!1}(e)){var at=[];return l&&l.call(e,(function(t){at.push(L(t,e))})),Q("Set",c.call(e),at,R)}if(function(t){if(!h||!t||"object"!==typeof t)return!1;try{h.call(t,h);try{d.call(t,d)}catch(et){return!0}return t instanceof WeakMap}catch(e){}return!1}(e))return K("WeakMap");if(function(t){if(!d||!t||"object"!==typeof t)return!1;try{d.call(t,d);try{h.call(t,h)}catch(et){return!0}return t instanceof WeakSet}catch(e){}return!1}(e))return K("WeakSet");if(function(t){if(!f||!t||"object"!==typeof t)return!1;try{return f.call(t),!0}catch(e){}return!1}(e))return K("WeakRef");if(function(t){return"[object Number]"===V(t)&&(!j||!("object"===typeof t&&j in t))}(e))return $(L(Number(e)));if(function(t){if(!t||"object"!==typeof t||!A)return!1;try{return A.call(t),!0}catch(e){}return!1}(e))return $(L(A.call(e)));if(function(t){return"[object Boolean]"===V(t)&&(!j||!("object"===typeof t&&j in t))}(e))return $(p.call(e));if(function(t){return"[object String]"===V(t)&&(!j||!("object"===typeof t&&j in t))}(e))return $(L(String(e)));if(!function(t){return"[object Date]"===V(t)&&(!j||!("object"===typeof t&&j in t))}(e)&&!U(e)){var ut=Z(e,L),ct=N?N(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",ht=!ct&&j&&Object(e)===e&&j in e?m.call(V(e),8,-1):lt?"Object":"",dt=(ct||"function"!==typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ht||lt?"["+x.call(E.call([],ht||[],lt||[]),": ")+"] ":"");return 0===ut.length?dt+"{}":R?dt+"{"+X(ut,R)+"}":dt+"{ "+x.call(ut,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function q(t,e){return z.call(t,e)}function V(t){return b.call(t)}function G(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function J(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return J(m.call(t,0,e.maxStringLength),e)+r}return B(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",e)}function Y(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+_.call(e.toString(16))}function $(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function Q(t,e,n,r){return t+" ("+e+") {"+(r?X(n,r):x.call(n,", "))+"}"}function X(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+x.call(t,","+n)+"\n"+e.prev}function Z(t,e){var n=H(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=q(t,i)?e(t[i],t):""}var o,s="function"===typeof R?R(t):[];if(M){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var u in t)q(t,u)&&(n&&String(Number(u))===u&&u<t.length||M&&o["$"+u]instanceof Symbol||(S.call(/[^\w$]/,u)?r.push(e(u,t)+": "+e(t[u],t)):r.push(u+": "+e(t[u],t))));if("function"===typeof R)for(var c=0;c<s.length;c++)I.call(t,s[c])&&r.push("["+e(s[c])+"]: "+e(t[s[c]],t));return r}},1185:function(t,e,n){"use strict";var r=n(1147),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&"string"===typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},c=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=a?o.slice(0,a.index):o,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var h=0;n.depth>0&&null!==(a=s.exec(o))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+o.slice(a.index)+"]"),function(t,e,n,r){for(var i=r?e:u(e,n),o=t.length-1;o>=0;--o){var s,a=t[o];if("[]"===a&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(s=[])[l]=i:"__proto__"!==c&&(s[c]=i):s={0:i}}i=s}return i}(l,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return s;if(null!==t.decoder&&void 0!==t.decoder&&"function"!==typeof t.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e="undefined"===typeof t.charset?s.charset:t.charset;return{allowDots:"undefined"===typeof t.allowDots?s.allowDots:!!t.allowDots,allowPrototypes:"boolean"===typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"===typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:"number"===typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:"boolean"===typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:"boolean"===typeof t.comma?t.comma:s.comma,decoder:"function"===typeof t.decoder?t.decoder:s.decoder,delimiter:"string"===typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:"number"===typeof t.depth||!1===t.depth?+t.depth:s.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"===typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"===typeof t.plainObjects?t.plainObjects:s.plainObjects,strictNullHandling:"boolean"===typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(""===t||null===t||"undefined"===typeof t)return n.plainObjects?Object.create(null):{};for(var l="string"===typeof t?function(t,e){var n,c={},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,d=l.split(e.delimiter,h),f=-1,p=e.charset;if(e.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?p="utf-8":"utf8=%26%2310003%3B"===d[n]&&(p="iso-8859-1"),f=n,n=d.length);for(n=0;n<d.length;++n)if(n!==f){var b,y,g=d[n],m=g.indexOf("]="),v=-1===m?g.indexOf("="):m+1;-1===v?(b=e.decoder(g,s.decoder,p,"key"),y=e.strictNullHandling?null:""):(b=e.decoder(g.slice(0,v),s.decoder,p,"key"),y=r.maybeMap(u(g.slice(v+1),e),(function(t){return e.decoder(t,s.decoder,p,"value")}))),y&&e.interpretNumericEntities&&"iso-8859-1"===p&&(y=a(y)),g.indexOf("[]=")>-1&&(y=o(y)?[y]:y),i.call(c,b)?c[b]=r.combine(c[b],y):c[b]=y}return c}(t,n):t,h=n.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],b=c(p,l[p],n,"string"===typeof t);h=r.merge(h,b,n)}return!0===n.allowSparse?h:r.compact(h)}},1186:function(t,e,n){(function(e){const r=n(1149),i=n(1202),o={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},s={encodeData(t,n,o){let s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a=["bytes32"],u=[this.hashType(t,o)];if(s){const c=(t,n,a)=>{if(void 0!==o[n])return["bytes32",null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(n,a,o,s))];if(void 0===a)throw new Error(`missing value for field ${t} of type ${n}`);if("bytes"===n)return["bytes32",r.keccak(a)];if("string"===n)return"string"===typeof a&&(a=e.from(a,"utf8")),["bytes32",r.keccak(a)];if(n.lastIndexOf("]")===n.length-1){const e=n.slice(0,n.lastIndexOf("[")),o=a.map((n=>c(t,e,n)));return["bytes32",r.keccak(i.rawEncode(o.map((t=>{let[e]=t;return e})),o.map((t=>{let[,e]=t;return e}))))]}return[n,a]};for(const e of o[t]){const[t,r]=c(e.name,e.type,n[e.name]);a.push(t),u.push(r)}}else for(const i of o[t]){let t=n[i.name];if(void 0!==t)if("bytes"===i.type)a.push("bytes32"),t=r.keccak(t),u.push(t);else if("string"===i.type)a.push("bytes32"),"string"===typeof t&&(t=e.from(t,"utf8")),t=r.keccak(t),u.push(t);else if(void 0!==o[i.type])a.push("bytes32"),t=r.keccak(this.encodeData(i.type,t,o,s)),u.push(t);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");a.push(i.type),u.push(t)}}return i.rawEncode(a,u)},encodeType(t,e){let n="",r=this.findTypeDependencies(t,e).filter((e=>e!==t));r=[t].concat(r.sort());for(const i of r){if(!e[i])throw new Error("No type definition specified: "+i);n+=i+"("+e[i].map((t=>{let{name:e,type:n}=t;return n+" "+e})).join(",")+")"}return n},findTypeDependencies(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(t=t.match(/^\w*/)[0],n.includes(t)||void 0===e[t])return n;n.push(t);for(const r of e[t])for(const t of this.findTypeDependencies(r.type,e,n))!n.includes(t)&&n.push(t);return n},hashStruct(t,e,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return r.keccak(this.encodeData(t,e,n,i))},hashType(t,e){return r.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const n in o.properties)t[n]&&(e[n]=t[n]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=this.sanitizeData(t),o=[e.from("1901","hex")];return o.push(this.hashStruct("EIP712Domain",i.domain,i.types,n)),"EIP712Domain"!==i.primaryType&&o.push(this.hashStruct(i.primaryType,i.message,i.types,n)),r.keccak(e.concat(o))}};t.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:s,hashForSignTypedDataLegacy:function(t){return function(t){const e=new Error("Expect argument to be non-empty array");if("object"!==typeof t||!t.length)throw e;const n=t.map((function(t){return"bytes"===t.type?r.toBuffer(t.value):t.value})),o=t.map((function(t){return t.type})),s=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(t.length).fill("string"),s),i.soliditySHA3(o,n)])}(t.data)},hashForSignTypedData_v3:function(t){return s.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return s.hash(t.data)}}}).call(this,n(294).Buffer)},1187:function(t,e,n){t.exports=n(1188)(n(1200))},1188:function(t,e,n){const r=n(1189),i=n(1199);t.exports=function(t){const e=r(t),n=i(t);return function(t,r){switch("string"===typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,r);case"keccak256":return new e(1088,512,null,256,r);case"keccak384":return new e(832,768,null,384,r);case"keccak512":return new e(576,1024,null,512,r);case"sha3-224":return new e(1152,448,6,224,r);case"sha3-256":return new e(1088,512,6,256,r);case"sha3-384":return new e(832,768,6,384,r);case"sha3-512":return new e(576,1024,6,512,r);case"shake128":return new n(1344,256,31,r);case"shake256":return new n(1088,512,31,r);default:throw new Error("Invald algorithm: "+t)}}}},1189:function(t,e,n){(function(e){const{Transform:r}=n(1150);t.exports=t=>class n extends r{constructor(e,n,r,i,o){super(o),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=o,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(i){r=i}n(r)}_flush(t){let e=null;try{this.push(this.digest())}catch(n){e=n}t(e)}update(t,n){if(!e.isBuffer(t)&&"string"!==typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return e.isBuffer(t)||(t=e.from(t,n)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(294).Buffer)},1191:function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=n(294).Buffer,a=n(1192).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,n,c;return e=t,n=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,n,r,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,n=i,r=a,s.prototype.copy.call(e,n,r),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):n=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,n=1,r=e.data;for(t-=r.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0===(t-=o)){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0===(t-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],n&&o(e.prototype,n),c&&o(e,c),t}()},1193:function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(r){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(40))},1194:function(t,e,n){var r=n(294),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),o(i,s),s.from=function(t,e,n){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"===typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},1195:function(t,e,n){"use strict";(function(e){var r;function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(1128),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var n=t[d].read();null!==n&&(t[l]=null,t[s]=null,t[a]=null,e(f(n,!1)))}}function b(t){e.nextTick(p,t)}var y=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var t=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(n,r){e.nextTick((function(){t[u]?r(t[u]):n(f(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(t,e){return function(n,r){t.then((function(){e[c]?n(f(void 0,!0)):e[h](n,r)}),r)}}(i,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(f(o,!1));r=new Promise(this[h])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var t=this;return new Promise((function(e,n){t[d].destroy(null,(function(t){t?n(t):e(f(void 0,!0))}))}))})),r),y);t.exports=function(t){var e,n=Object.create(g,(i(e={},d,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var r=n[d].read();r?(n[l]=null,n[s]=null,n[a]=null,t(f(r,!1))):(n[s]=t,n[a]=e)},writable:!0}),e));return n[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[a];return null!==e&&(n[l]=null,n[s]=null,n[a]=null,e(t)),void(n[u]=t)}var r=n[s];null!==r&&(n[l]=null,n[s]=null,n[a]=null,r(f(void 0,!0))),n[c]=!0})),t.on("readable",b.bind(null,n)),n}}).call(this,n(101))},1196:function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},1197:function(t,e,n){"use strict";t.exports=i;var r=n(1157);function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n(463)(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},1198:function(t,e,n){"use strict";var r;var i=n(1072).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===r&&(r=n(1128)),r(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"===typeof t.abort}(t)?t.abort():"function"===typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!==typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,n){var o=n<e.length-1;return u(t,o,n>0,(function(t){r||(r=t),t&&s.forEach(c),o||(s.forEach(c),i(r))}))}));return e.reduce(l)}},1199:function(t,e,n){(function(e){const{Transform:r}=n(1150);t.exports=t=>class n extends r{constructor(e,n,r,i){super(i),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(i){r=i}n(r)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!e.isBuffer(t)&&"string"!==typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return e.isBuffer(t)||(t=e.from(t,n)),this._state.absorb(t),this}squeeze(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(t);return void 0!==e&&(n=n.toString(e)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(294).Buffer)},1200:function(t,e,n){(function(e){const r=n(1201);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(t,e){for(let n=0;n<50;++n)this.state[n]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!==(128&t)&&this.count===this.blockSize-1&&r.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,r.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const n=e.alloc(t);for(let e=0;e<t;++e)n[e]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0);return n},i.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=i}).call(this,n(294).Buffer)},1201:function(t,e){const n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];e.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=h^(o<<1|s>>>31),p=d^(s<<1|o>>>31);const b=t[0]^f,y=t[1]^p,g=t[10]^f,m=t[11]^p,v=t[20]^f,_=t[21]^p,w=t[30]^f,S=t[31]^p,E=t[40]^f,x=t[41]^p;f=r^(a<<1|u>>>31),p=i^(u<<1|a>>>31);const k=t[2]^f,C=t[3]^p,A=t[12]^f,R=t[13]^p,O=t[22]^f,M=t[23]^p,j=t[32]^f,I=t[33]^p,N=t[42]^f,T=t[43]^p;f=o^(c<<1|l>>>31),p=s^(l<<1|c>>>31);const P=t[4]^f,L=t[5]^p,D=t[14]^f,B=t[15]^p,F=t[24]^f,H=t[25]^p,U=t[34]^f,W=t[35]^p,z=t[44]^f,q=t[45]^p;f=a^(h<<1|d>>>31),p=u^(d<<1|h>>>31);const V=t[6]^f,G=t[7]^p,J=t[16]^f,Y=t[17]^p,$=t[26]^f,K=t[27]^p,Q=t[36]^f,X=t[37]^p,Z=t[46]^f,tt=t[47]^p;f=c^(r<<1|i>>>31),p=l^(i<<1|r>>>31);const et=t[8]^f,nt=t[9]^p,rt=t[18]^f,it=t[19]^p,ot=t[28]^f,st=t[29]^p,at=t[38]^f,ut=t[39]^p,ct=t[48]^f,lt=t[49]^p,ht=b,dt=y,ft=m<<4|g>>>28,pt=g<<4|m>>>28,bt=v<<3|_>>>29,yt=_<<3|v>>>29,gt=S<<9|w>>>23,mt=w<<9|S>>>23,vt=E<<18|x>>>14,_t=x<<18|E>>>14,wt=k<<1|C>>>31,St=C<<1|k>>>31,Et=R<<12|A>>>20,xt=A<<12|R>>>20,kt=O<<10|M>>>22,Ct=M<<10|O>>>22,At=I<<13|j>>>19,Rt=j<<13|I>>>19,Ot=N<<2|T>>>30,Mt=T<<2|N>>>30,jt=L<<30|P>>>2,It=P<<30|L>>>2,Nt=D<<6|B>>>26,Tt=B<<6|D>>>26,Pt=H<<11|F>>>21,Lt=F<<11|H>>>21,Dt=U<<15|W>>>17,Bt=W<<15|U>>>17,Ft=q<<29|z>>>3,Ht=z<<29|q>>>3,Ut=V<<28|G>>>4,Wt=G<<28|V>>>4,zt=Y<<23|J>>>9,qt=J<<23|Y>>>9,Vt=$<<25|K>>>7,Gt=K<<25|$>>>7,Jt=Q<<21|X>>>11,Yt=X<<21|Q>>>11,$t=tt<<24|Z>>>8,Kt=Z<<24|tt>>>8,Qt=et<<27|nt>>>5,Xt=nt<<27|et>>>5,Zt=rt<<20|it>>>12,te=it<<20|rt>>>12,ee=st<<7|ot>>>25,ne=ot<<7|st>>>25,re=at<<8|ut>>>24,ie=ut<<8|at>>>24,oe=ct<<14|lt>>>18,se=lt<<14|ct>>>18;t[0]=ht^~Et&Pt,t[1]=dt^~xt&Lt,t[10]=Ut^~Zt&bt,t[11]=Wt^~te&yt,t[20]=wt^~Nt&Vt,t[21]=St^~Tt&Gt,t[30]=Qt^~ft&kt,t[31]=Xt^~pt&Ct,t[40]=jt^~zt&ee,t[41]=It^~qt&ne,t[2]=Et^~Pt&Jt,t[3]=xt^~Lt&Yt,t[12]=Zt^~bt&At,t[13]=te^~yt&Rt,t[22]=Nt^~Vt&re,t[23]=Tt^~Gt&ie,t[32]=ft^~kt&Dt,t[33]=pt^~Ct&Bt,t[42]=zt^~ee>,t[43]=qt^~ne&mt,t[4]=Pt^~Jt&oe,t[5]=Lt^~Yt&se,t[14]=bt^~At&Ft,t[15]=yt^~Rt&Ht,t[24]=Vt^~re&vt,t[25]=Gt^~ie&_t,t[34]=kt^~Dt&$t,t[35]=Ct^~Bt&Kt,t[44]=ee^~gt&Ot,t[45]=ne^~mt&Mt,t[6]=Jt^~oe&ht,t[7]=Yt^~se&dt,t[16]=At^~Ft&Ut,t[17]=Rt^~Ht&Wt,t[26]=re^~vt&wt,t[27]=ie^~_t&St,t[36]=Dt^~$t&Qt,t[37]=Bt^~Kt&Xt,t[46]=gt^~Ot&jt,t[47]=mt^~Mt&It,t[8]=oe^~ht&Et,t[9]=se^~dt&xt,t[18]=Ft^~Ut&Zt,t[19]=Ht^~Wt&te,t[28]=vt^~wt&Nt,t[29]=_t^~St&Tt,t[38]=$t^~Qt&ft,t[39]=Kt^~Xt&pt,t[48]=Ot^~jt&zt,t[49]=Mt^~It&qt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},1202:function(t,e,n){(function(e){const r=n(1149),i=n(17);function o(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function s(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function a(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function u(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function c(t){var e=typeof t;if("string"===e)return r.isHexString(t)?new i(r.stripHexPrefix(t),16):new i(t,10);if("number"===e)return new i(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function l(t,n){var o,h,d,f;if("address"===t)return l("uint160",c(n));if("bool"===t)return l("uint8",n?1:0);if("string"===t)return l("bytes",new e(n,"utf8"));if(function(t){return t.lastIndexOf("]")===t.length-1}(t)){if("undefined"===typeof n.length)throw new Error("Not an array?");if("dynamic"!==(o=u(t))&&0!==o&&n.length>o)throw new Error("Elements exceed array size: "+o);for(f in d=[],t=t.slice(0,t.lastIndexOf("[")),"string"===typeof n&&(n=JSON.parse(n)),n)d.push(l(t,n[f]));if("dynamic"===o){var p=l("uint256",n.length);d.unshift(p)}return e.concat(d)}if("bytes"===t)return n=new e(n),d=e.concat([l("uint256",n.length),n]),n.length%32!==0&&(d=e.concat([d,r.zeros(32-n.length%32)])),d;if(t.startsWith("bytes")){if((o=s(t))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return r.setLengthRight(n,32)}if(t.startsWith("uint")){if((o=s(t))%8||o<8||o>256)throw new Error("Invalid uint<N> width: "+o);if((h=c(n)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+h.bitLength());if(h<0)throw new Error("Supplied uint is negative");return h.toArrayLike(e,"be",32)}if(t.startsWith("int")){if((o=s(t))%8||o<8||o>256)throw new Error("Invalid int<N> width: "+o);if((h=c(n)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+h.bitLength());return h.toTwos(256).toArrayLike(e,"be",32)}if(t.startsWith("ufixed")){if(o=a(t),(h=c(n))<0)throw new Error("Supplied ufixed is negative");return l("uint256",h.mul(new i(2).pow(new i(o[1]))))}if(t.startsWith("fixed"))return o=a(t),l("int256",c(n).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+t)}function h(t){return"string"===t||"bytes"===t||"dynamic"===u(t)}function d(t,n){if(t.length!==n.length)throw new Error("Number of types are not matching the values");for(var i,a,u=[],l=0;l<t.length;l++){var h=o(t[l]),d=n[l];if("bytes"===h)u.push(d);else if("string"===h)u.push(new e(d,"utf8"));else if("bool"===h)u.push(new e(d?"01":"00","hex"));else if("address"===h)u.push(r.setLength(d,20));else if(h.startsWith("bytes")){if((i=s(h))<1||i>32)throw new Error("Invalid bytes<N> width: "+i);u.push(r.setLengthRight(d,i))}else if(h.startsWith("uint")){if((i=s(h))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((a=c(d)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+a.bitLength());u.push(a.toArrayLike(e,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=s(h))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((a=c(d)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+a.bitLength());u.push(a.toTwos(i).toArrayLike(e,"be",i/8))}}return e.concat(u)}t.exports={rawEncode:function(t,n){var r=[],i=[],s=32*t.length;for(var a in t){var u=o(t[a]),c=l(u,n[a]);h(u)?(r.push(l("uint256",s)),i.push(c),s+=c.length):r.push(c)}return e.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(t,e){return r.keccak(d(t,e))}}}).call(this,n(294).Buffer)},1203:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const r=n(1127),i=n(1061),o={jsonrpc:"2.0",id:0};function s(t){return{fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function a(t){const e={fromBlock:c(t.fromBlock),toBlock:c(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function u(t){if(void 0===t||"latest"===t||"pending"===t)return"latest";if("earliest"===t)return(0,r.IntNumber)(0);if((0,i.isHexString)(t))return(0,i.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function c(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},o),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},o),{result:[]})}e.FilterPolyfill=class{constructor(t){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,r.IntNumber)(1),this.provider=t}async newFilter(t){const e=s(t),n=this.makeFilterId(),r=await this.setInitialCursorPosition(n,e.fromBlock);return console.log(`Installing new log filter(${n}):`,e,"initial cursor position:",r),this.logFilters.set(n,e),this.setFilterTimeout(n),(0,i.hexStringFromIntNumber)(n)}async newBlockFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.blockFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}uninstallFilter(t){const e=(0,i.intNumberFromHexString)(t);return console.log(`Uninstalling filter (${e})`),this.deleteFilter(e),!0}getFilterChanges(t){const e=(0,i.intNumberFromHexString)(t);return this.timeouts.has(e)&&this.setFilterTimeout(e),this.logFilters.has(e)?this.getLogFilterChanges(e):this.blockFilters.has(e)?this.getBlockFilterChanges(e):this.pendingTransactionFilters.has(e)?this.getPendingTransactionFilterChanges(e):Promise.resolve(l())}async getFilterLogs(t){const e=(0,i.intNumberFromHexString)(t),n=this.logFilters.get(e);return n?this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[a(n)]})):l()}makeFilterId(){return(0,r.IntNumber)(++this.nextFilterId)}sendAsyncPromise(t){return new Promise(((e,n)=>{this.provider.sendAsync(t,((t,r)=>t?n(t):Array.isArray(r)||null==r?n(new Error(`unexpected response received: ${JSON.stringify(r)}`)):void e(r)))}))}deleteFilter(t){console.log(`Deleting filter (${t})`),this.logFilters.delete(t),this.blockFilters.delete(t),this.pendingTransactionFilters.delete(t),this.cursors.delete(t),this.timeouts.delete(t)}async getLogFilterChanges(t){const e=this.logFilters.get(t),n=this.cursors.get(t);if(!n||!e)return l();const s=await this.getCurrentBlockHeight(),u="latest"===e.toBlock?s:e.toBlock;if(n>s)return h();if(n>e.toBlock)return h();console.log(`Fetching logs from ${n} to ${u} for filter ${t}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[a(Object.assign(Object.assign({},e),{fromBlock:n,toBlock:u}))]}));if(Array.isArray(c.result)){const e=c.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),o=Math.max(...e);if(o&&o>n){const e=(0,r.IntNumber)(o+1);console.log(`Moving cursor position for filter (${t}) from ${n} to ${e}`),this.cursors.set(t,e)}}return c}async getBlockFilterChanges(t){const e=this.cursors.get(t);if(!e)return l();const n=await this.getCurrentBlockHeight();if(e>n)return h();console.log(`Fetching blocks from ${e} to ${n} for filter (${t})`);const s=(await Promise.all((0,i.range)(e,n+1).map((t=>this.getBlockHashByNumber((0,r.IntNumber)(t)))))).filter((t=>!!t)),a=(0,r.IntNumber)(e+s.length);return console.log(`Moving cursor position for filter (${t}) from ${e} to ${a}`),this.cursors.set(t,a),Object.assign(Object.assign({},o),{result:s})}async getPendingTransactionFilterChanges(t){return Promise.resolve(h())}async setInitialCursorPosition(t,e){const n=await this.getCurrentBlockHeight(),r="number"===typeof e&&e>n?e:n;return this.cursors.set(t,r),r}setFilterTimeout(t){const e=this.timeouts.get(t);e&&window.clearTimeout(e);const n=window.setTimeout((()=>{console.log(`Filter (${t}) timed out`),this.deleteFilter(t)}),3e5);this.timeouts.set(t,n)}async getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(t),!1]}));return e.result&&"string"===typeof e.result.hash?(0,i.ensureHexString)(e.result.hash):null}},e.filterFromParam=s},1204:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONRPCMethod=void 0,function(t){t.eth_accounts="eth_accounts",t.eth_coinbase="eth_coinbase",t.net_version="net_version",t.eth_chainId="eth_chainId",t.eth_uninstallFilter="eth_uninstallFilter",t.eth_requestAccounts="eth_requestAccounts",t.eth_sign="eth_sign",t.eth_ecRecover="eth_ecRecover",t.personal_sign="personal_sign",t.personal_ecRecover="personal_ecRecover",t.eth_signTransaction="eth_signTransaction",t.eth_sendRawTransaction="eth_sendRawTransaction",t.eth_sendTransaction="eth_sendTransaction",t.eth_signTypedData_v1="eth_signTypedData_v1",t.eth_signTypedData_v2="eth_signTypedData_v2",t.eth_signTypedData_v3="eth_signTypedData_v3",t.eth_signTypedData_v4="eth_signTypedData_v4",t.eth_signTypedData="eth_signTypedData",t.cbWallet_arbitrary="walletlink_arbitrary",t.wallet_addEthereumChain="wallet_addEthereumChain",t.wallet_switchEthereumChain="wallet_switchEthereumChain",t.wallet_watchAsset="wallet_watchAsset",t.eth_subscribe="eth_subscribe",t.eth_unsubscribe="eth_unsubscribe",t.eth_newFilter="eth_newFilter",t.eth_newBlockFilter="eth_newBlockFilter",t.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",t.eth_getFilterChanges="eth_getFilterChanges",t.eth_getFilterLogs="eth_getFilterLogs"}(e.JSONRPCMethod||(e.JSONRPCMethod={}))},1205:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const r=n(1206),i=n(1214),o=()=>{};e.SubscriptionManager=class{constructor(t){const e=new r({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:o}=i({blockTracker:e,provider:t});this.events=n,this.subscriptionMiddleware=o}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,o,o),e}destroy(){this.subscriptionMiddleware.destroy()}}},1206:function(t,e,n){const r=n(1158),i=n(1207);function o(t,e){return new Promise((n=>{const r=setTimeout(n,t);r.unref&&e&&r.unref()}))}t.exports=class extends i{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");const e=t.pollingInterval||2e4,n=t.retryTimeout||e/10,r=void 0===t.keepEventLoopActive||t.keepEventLoopActive,i=t.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:e},t)),this._provider=t.provider,this._pollingInterval=e,this._retryTimeout=n,this._keepEventLoopActive=r,this._setSkipCacheFlag=i}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((t=>this.emit("error",t)))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${t.stack}`);try{this.emit("error",n)}catch(e){console.error(n)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0);const e=await r((e=>this._provider.sendAsync(t,e)))();if(e.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${e.error}`);return e.result}}},1207:function(t,e,n){n(1159),n(1158);const r=n(1210),i=(t,e)=>t+e,o=["sync","latest"];function s(t){return Number.parseInt(t,16)}t.exports=class extends r{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._blockResetDuration=t.blockResetDuration||2e4,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;return await new Promise((t=>this.once("latest",t)))}removeAllListeners(t){t?super.removeAllListeners(t):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(t,e){o.includes(t)&&this._maybeStart()}_onRemoveListener(t,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return o.map((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&s(t)<=s(e)||this._setCurrentBlock(t)}_setCurrentBlock(t){const e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},1208:function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},1209:function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,n="undefined"!==typeof t.start?t.start:Math.floor(Math.random()*e);return function(){return n%=e,n++}}},1210:function(t,e,n){const r=n(1211),i=n(32);var o="object"===typeof Reflect?Reflect:null,s=o&&"function"===typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};function a(){i.call(this)}function u(t,e,n){try{s(t,e,n)}catch(r){setTimeout((()=>{throw r}))}}function c(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}t.exports=a,r.inherits(a,i),a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[t];if(void 0===a)return!1;if("function"===typeof a)u(a,this,e);else{var l=a.length,h=c(a,l);for(n=0;n<l;++n)u(h[n],this,e)}return!0}},1211:function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!g(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(a(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,s=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}})),u=r[n];n<o;u=r[++n])b(u)||!_(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(n,r){if("undefined"!==typeof t&&!0===t.noDeprecation)return n;if("undefined"===typeof t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,s={};function a(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&e._extend(r,n),m(r.showHidden)&&(r.showHidden=!1),m(r.depth)&&(r.depth=2),m(r.colors)&&(r.colors=!1),m(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,t,r.depth)}function u(t,e){var n=a.styles[e];return n?"\x1b["+a.colors[n][0]+"m"+t+"\x1b["+a.colors[n][1]+"m":t}function c(t,e){return t}function l(t,n,r){if(t.customInspect&&n&&E(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return g(i)||(i=l(t,i,r)),i}var o=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(g(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(y(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(b(e))return t.stylize("null","null")}(t,n);if(o)return o;var s=Object.keys(n),a=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(n)),S(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(n);if(0===s.length){if(E(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(v(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(S(n))return h(n)}var c,_="",x=!1,k=["{","}"];(f(n)&&(x=!0,k=["[","]"]),E(n))&&(_=" [Function"+(n.name?": "+n.name:"")+"]");return v(n)&&(_=" "+RegExp.prototype.toString.call(n)),w(n)&&(_=" "+Date.prototype.toUTCString.call(n)),S(n)&&(_=" "+h(n)),0!==s.length||x&&0!=n.length?r<0?v(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=x?function(t,e,n,r,i){for(var o=[],s=0,a=e.length;s<a;++s)R(e,String(s))?o.push(d(t,e,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,n,r,i,!0))})),o}(t,n,r,a,s):s.map((function(e){return d(t,n,r,a,e,x)})),t.seen.pop(),function(t,e,n){var r=t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(c,_,k)):k[0]+_+k[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),R(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=b(n)?l(t,u.value,null):l(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),m(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function f(t){return Array.isArray(t)}function p(t){return"boolean"===typeof t}function b(t){return null===t}function y(t){return"number"===typeof t}function g(t){return"string"===typeof t}function m(t){return void 0===t}function v(t){return _(t)&&"[object RegExp]"===x(t)}function _(t){return"object"===typeof t&&null!==t}function w(t){return _(t)&&"[object Date]"===x(t)}function S(t){return _(t)&&("[object Error]"===x(t)||t instanceof Error)}function E(t){return"function"===typeof t}function x(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(m(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7356822947.commit-3ba8f9c",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7356822947.commit-3ba8f9c",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;s[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else s[n]=function(){};return s[n]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=p,e.isNull=b,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=g,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=m,e.isRegExp=v,e.isObject=_,e.isDate=w,e.isError=S,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=n(1212);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",A(),e.format.apply(e,arguments))},e.inherits=n(1213),e._extend=function(t,e){if(!e||!_(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var O="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(O&&t[O]){var e;if("function"!==typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(s){n(s)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),O&&Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=O,e.callbackify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!==typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,n).then((function(e){t.nextTick(s,null,e)}),(function(e){t.nextTick(M,e,s)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(101))},1212:function(t,e){t.exports=function(t){return t&&"object"===typeof t&&"function"===typeof t.copy&&"function"===typeof t.fill&&"function"===typeof t.readUInt8}},1213:function(t,e){"function"===typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},1214:function(t,e,n){const r=n(1087).default,i=n(1160),{createAsyncMiddleware:o}=n(1161),s=n(1222),{unsafeRandomBytes:a,incrementHexInt:u}=n(1085),c=n(1132);function l(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function(t){let{blockTracker:e,provider:n}=t;const h={},d=s({blockTracker:e,provider:n});let f=!1;const p=new r,b=i({eth_subscribe:o((async function(t,r){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const i=t.params[0],o=a(16);let s;switch(i){case"newHeads":s=p({subId:o});break;case"logs":const e=t.params[1];s=b({subId:o,filter:await d.newLogFilter(e)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${i}"`)}return h[o]=s,void(r.result=o);function p(t){let{subId:r}=t;const o={type:i,destroy:async()=>{e.removeListener("sync",o.update)},update:async t=>{let{oldBlock:e,newBlock:i}=t;const o=i,s=u(e);(await c({provider:n,fromBlock:s,toBlock:o})).map(l).forEach((t=>{y(r,t)}))}};return e.on("sync",o.update),o}function b(t){let{subId:e,filter:n}=t;n.on("update",(t=>y(e,t)));return{type:i,destroy:async()=>await d.uninstallFilter(n.idHex)}}})),eth_unsubscribe:o((async function(t,e){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const n=t.params[0],r=h[n];if(!r)return void(e.result=!1);delete h[n],await r.destroy(),e.result=!0}))});return b.destroy=function(){p.removeAllListeners();for(const t in h)h[t].destroy(),delete h[t];f=!0},{events:p,middleware:b};function y(t,e){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},1215:function(t,e){t.exports=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"===typeof o?o(e,n,r,i):(n.result=o,i())}}},1216:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const r=n(1162);e.createIdRemapMiddleware=function(){return(t,e,n,i)=>{const o=t.id,s=r.getUniqueId();t.id=s,e.id=s,n((n=>{t.id=o,e.id=o,n()}))}}},1217:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,n,r,i)=>{let o;const s=new Promise((t=>{o=t}));let a=null,u=!1;const c=async()=>{u=!0,r((t=>{a=t,o()})),await s};try{await t(e,n,c),u?(await s,a(null)):i(null)}catch(l){a?a(l):i(l)}}}},1218:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"===typeof o?o(e,n,r,i):(n.result=o,i())}}},1219:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(1129);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(1164);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(1220);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=n(1130);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})},1220:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(1129),i=n(1164),o=n(1130);function s(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function a(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"===typeof t)return[t];if("object"===typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!==typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>s(o.errorCodes.rpc.parse,t),invalidRequest:t=>s(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>s(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>s(o.errorCodes.rpc.methodNotFound,t),internal:t=>s(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(e,t)},invalidInput:t=>s(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>s(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>s(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>s(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>s(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>s(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>a(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>a(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>a(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>a(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>a(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!==typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},1221:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const r=n(1163);e.mergeMiddleware=function(t){const e=new r.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},1222:function(t,e,n){const r=n(1284).Mutex,{createAsyncMiddleware:i}=n(1161),o=n(1160),s=n(1223),a=n(1226),u=n(1227),{intToHex:c,hexToInt:l}=n(1085);function h(t){return d((async function(){const e=await t(...arguments),n=c(e.id);return n}))}function d(t){return i((async(e,n)=>{const r=await t.apply(null,e.params);n.result=r}))}function f(t,e){const n=[];for(let r in t)n.push(t[r]);return n}t.exports=function(t){let{blockTracker:e,provider:n}=t,i=0,p={};const b=new r,y=function(t){let{mutex:e}=t;return t=>async(n,r,i,o)=>{(await e.acquire())(),t(n,r,i,o)}}({mutex:b}),g=o({eth_newFilter:y(h(v)),eth_newBlockFilter:y(h(_)),eth_newPendingTransactionFilter:y(h(w)),eth_uninstallFilter:y(d(x)),eth_getFilterChanges:y(d(S)),eth_getFilterLogs:y(d(E))}),m=async t=>{let{oldBlock:e,newBlock:n}=t;if(0===p.length)return;const r=await b.acquire();try{await Promise.all(f(p).map((async t=>{try{await t.update({oldBlock:e,newBlock:n})}catch(r){console.error(r)}})))}catch(i){console.error(i)}r()};return g.newLogFilter=v,g.newBlockFilter=_,g.newPendingTransactionFilter=w,g.uninstallFilter=x,g.getFilterChanges=S,g.getFilterLogs=E,g.destroy=()=>{!async function(){const t=f(p).length;p={},C({prevFilterCount:t,newFilterCount:0})}()},g;async function v(t){const e=new s({provider:n,params:t});await k(e);return e}async function _(){const t=new a({provider:n});await k(t);return t}async function w(){const t=new u({provider:n});await k(t);return t}async function S(t){const e=l(t),n=p[e];if(!n)throw new Error(`No filter for index "${e}"`);return n.getChangesAndClear()}async function E(t){const e=l(t),n=p[e];if(!n)throw new Error(`No filter for index "${e}"`);return"log"===n.type?results=n.getAllResults():results=[],results}async function x(t){const e=l(t),n=p[e],r=Boolean(n);return r&&await async function(t){const e=f(p).length;delete p[t];const n=f(p).length;C({prevFilterCount:e,newFilterCount:n})}(e),r}async function k(t){const n=f(p).length,r=await e.getLatestBlock();await t.initialize({currentBlock:r}),i++,p[i]=t,t.id=i,t.idHex=c(i);return C({prevFilterCount:n,newFilterCount:f(p).length}),i}function C(t){let{prevFilterCount:n,newFilterCount:r}=t;0===n&&r>0?e.on("sync",m):n>0&&0===r&&e.removeListener("sync",m)}}},1223:function(t,e,n){const r=n(1159),i=n(1224),o=n(1225),{bnToHex:s,hexToInt:a,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=n(1085);t.exports=class extends o{constructor(t){let{provider:e,params:n}=t;super(),this.type="log",this.ethQuery=new r(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},n),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((t=>t.toLowerCase())))}async initialize(t){let{currentBlock:e}=t,n=this.params.fromBlock;["latest","pending"].includes(n)&&(n=e),"earliest"===n&&(n="0x0"),this.params.fromBlock=n;const r=c(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:r}),o=await this._fetchLogs(i);this.addInitialResults(o)}async update(t){let{oldBlock:e,newBlock:n}=t;const r=n;let i;i=e?u(e):n;const o=Object.assign({},this.params,{fromBlock:i,toBlock:r}),s=(await this._fetchLogs(o)).filter((t=>this.matchLog(t)));this.addResults(s)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(a(this.params.fromBlock)>=a(t.blockNumber))return!1;if(l(this.params.toBlock)&&a(this.params.toBlock)<=a(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();if(this.params.address&&e&&!this.params.address.includes(e))return!1;return this.params.topics.every(((e,n)=>{let r=t.topics[n];if(!r)return!1;r=r.toLowerCase();let i=Array.isArray(e)?e:[e];if(i.includes(null))return!0;i=i.map((t=>t.toLowerCase()));return i.includes(r)}))}}},1224:function(t,e,n){"use strict";const r=(t,e,n,r)=>function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];const a=e.promiseModule;return new a(((i,s)=>{e.multiArgs?o.push((function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.errorFirst?n[0]?s(n):(n.shift(),i(n)):i(n)})):e.errorFirst?o.push(((t,e)=>{t?s(t):i(e)})):o.push(i);const a=this===n?r:this;Reflect.apply(t,a,o)}))},i=new WeakMap;t.exports=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const n=typeof t;if(null===t||"object"!==n&&"function"!==n)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":n}\``);const o=new WeakMap,s=new Proxy(t,{apply(t,n,i){const a=o.get(t);if(a)return Reflect.apply(a,n,i);const u=e.excludeMain?t:r(t,e,s,t);return o.set(t,u),Reflect.apply(u,n,i)},get(t,n){const a=t[n];if(!((t,n)=>{let r=i.get(t);if(r||(r={},i.set(t,r)),n in r)return r[n];const o=t=>"string"===typeof t||"symbol"===typeof n?n===t:t.test(n),s=Reflect.getOwnPropertyDescriptor(t,n),a=void 0===s||s.writable||s.configurable,u=(e.include?e.include.some(o):!e.exclude.some(o))&&a;return r[n]=u,u})(t,n)||a===Function.prototype[n])return a;const u=o.get(a);if(u)return u;if("function"===typeof a){const n=r(a,e,s,t);return o.set(a,n),n}return a}});return s}},1225:function(t,e,n){const r=n(1131);t.exports=class extends r{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}}},1226:function(t,e,n){const r=n(1131),i=n(1132),{incrementHexInt:o}=n(1085);t.exports=class extends r{constructor(t){let{provider:e,params:n}=t;super(),this.type="block",this.provider=e}async update(t){let{oldBlock:e,newBlock:n}=t;const r=n,s=o(e),a=(await i({provider:this.provider,fromBlock:s,toBlock:r})).map((t=>t.hash));this.addResults(a)}}},1227:function(t,e,n){const r=n(1131),i=n(1132),{incrementHexInt:o}=n(1085);t.exports=class extends r{constructor(t){let{provider:e}=t;super(),this.type="tx",this.provider=e}async update(t){let{oldBlock:e}=t;const n=e,r=o(e),s=await i({provider:this.provider,fromBlock:r,toBlock:n}),a=[];for(const i of s)a.push(...i.transactions);this.addResults(a)}}},1228:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKUI=void 0;const r=n(1229),i=n(1241),o=n(1243);e.WalletSDKUI=class{constructor(t){this.attached=!1,this.snackbar=new i.Snackbar({darkMode:t.darkMode}),this.linkFlow=new r.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,linkAPIUrl:t.linkAPIUrl,connected$:t.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const t=document.documentElement,e=document.createElement("div");e.className="-cbwsdk-css-reset",t.appendChild(e),this.linkFlow.attach(e),this.snackbar.attach(e),this.attached=!0,(0,o.injectCssReset)()}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(t){}watchAsset(t){}switchEthereumChain(t){}requestEthereumAccounts(t){this.linkFlow.open({onCancel:t.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(t){}signEthereumTransaction(t){}submitEthereumTransaction(t){}ethereumAddressFromSignedMessage(t){}showConnecting(t){let e;return e=t.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:t.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]},this.snackbar.presentItem(e)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(t){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}},1229:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const r=n(1074),i=n(1075),o=n(1230);e.LinkFlow=class{constructor(t){this.extensionUI$=new i.BehaviorSubject({}),this.subscriptions=new i.Subscription,this.isConnected=!1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",t.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((t=>{this.isConnected!==t&&(this.isConnected=t,this.render())})))}detach(){var t;this.root&&(this.subscriptions.unsubscribe(),(0,r.render)(null,this.root),null===(t=this.root.parentElement)||void 0===t||t.removeChild(this.root))}setConnectDisabled(t){this.connectDisabled=t}open(t){this.isOpen=!0,this.onCancel=t.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const t=this.extensionUI$.subscribe((()=>{this.root&&(0,r.render)((0,r.h)(o.TryExtensionLinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}));this.subscriptions.add(t)}}},1230:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TryExtensionLinkDialog=void 0;const i=r(n(27)),o=n(1074),s=n(1133),a=n(1061),u=n(1231),c=r(n(1232)),l=r(n(1233)),h=r(n(1234)),d=r(n(1235)),f=n(1236),p=n(1238),b=r(n(1240));e.TryExtensionLinkDialog=t=>{const[e,n]=(0,s.useState)(!t.isOpen),[r,a]=(0,s.useState)(!t.isOpen);return(0,s.useEffect)((()=>{const{isOpen:e}=t,r=[window.setTimeout((()=>{a(!e)}),10)];return e?n(!1):r.push(window.setTimeout((()=>{n(!0)}),360)),()=>{r.forEach(window.clearTimeout)}}),[t.isOpen]),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-container",e&&"-cbwsdk-extension-dialog-container-hidden")},(0,o.h)("style",null,b.default),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-backdrop",r&&"-cbwsdk-extension-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-cbwsdk-extension-dialog"},(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box",r&&"-cbwsdk-extension-dialog-box-hidden")},(0,o.h)(y,{onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),t.connectDisabled?null:(0,o.h)(g,{darkMode:t.darkMode,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,o.h)(v,{onClick:t.onCancel}))))};const y=t=>{let{onInstallClick:e}=t;const[n,r]=(0,s.useState)(!1),i=(0,s.useCallback)((()=>{n?window.location.reload():(e(),r(!0))}),[e,n]);return(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-install-region"},(0,o.h)("h2",null,"Try the Coinbase Wallet extension"),n&&(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-subtext"},"After installing Coinbase Wallet, refresh the page and connect again."),(0,o.h)("button",{type:"button",onClick:i},n?"Refresh":"Install")),(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-info-region"},(0,o.h)(m,{icon:l.default,text:"Connect to crypto apps with one click"}),(0,o.h)(m,{icon:h.default,text:"Your private key is stored securely"}),(0,o.h)(m,{icon:c.default,text:"Works with Ethereum, Polygon, and more"})))},g=t=>{const e=(0,a.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection);return(0,o.h)("div",{"data-testid":"scan-qr-box",class:"-cbwsdk-extension-dialog-box-bottom"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",null,"Or scan to connect"),(0,o.h)("body",{class:"-cbwsdk-extension-dialog-box-bottom-description"},"Open"," ",(0,o.h)("a",{href:"https://wallet.coinbase.com/",target:"_blank",rel:"noopener noreferrer"},"Coinbase Wallet")," ","on your mobile phone and scan")),(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-region"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-wrapper"},(0,o.h)(f.QRCode,{content:e,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:d.default,width:34,height:34}})),(0,o.h)("input",{type:"hidden",name:"cbwsdk-version",value:u.LIB_VERSION}),(0,o.h)("input",{type:"hidden",value:e}),!t.isConnected&&(0,o.h)("div",{"data-testid":"connecting-spinner",class:"-cbwsdk-extension-dialog-box-bottom-qr-connecting"},(0,o.h)(p.Spinner,{size:36,color:"#000"}),(0,o.h)("p",null,"Connecting..."))))},m=t=>(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description-icon-wrapper"},(0,o.h)("img",{src:t.icon})),(0,o.h)("body",{class:"-cbwsdk-extension-dialog-box-top-description-text"},t.text)),v=t=>(0,o.h)("button",{type:"button",class:"-cbwsdk-extension-dialog-box-cancel",onClick:t.onClick},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-cancel-x"}))},1231:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.1.0"},1232:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOVpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1Wk0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwIDEgMi4wOSA5Wm04Ljk3IDQuMTVjLjQ4LTEuMTUuODEtMi41OC45MS00LjE1aDEuOTRhNS45OTggNS45OTggMCAwIDEtMi44NSA0LjE1WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},1233:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAgMC01LjUyMSAwTDYuODkgNS4zMzVBMy44OTQgMy44OTQgMCAwIDAgNS44IDguNzM5Yy4wODMuNTA2LjI2OCAxLjAxMS41NTMgMS40NjYuMTUxLjI1My4zMzYuNDcyLjUzNy42OTFsLjYyMS42MjQgMS4xNDEtMS4xNDYtLjYyLS42MjRhMi4xMDUgMi4xMDUgMCAwIDEtLjQ4Ny0uNzQxIDIuMzQgMi4zNCAwIDAgMSAuNTAzLTIuNTFsMy4yMDYtMy4yMmEyLjI5MyAyLjI5MyAwIDAgMSAzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MVoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},1234:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},1235:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="50" cy="50" r="50" fill="white"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" fill="#1B53E4"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" stroke="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3379 49.9484C19.3379 66.8508 33.04 80.553 49.9425 80.553C66.8449 80.553 80.5471 66.8508 80.5471 49.9484C80.5471 33.0459 66.8449 19.3438 49.9425 19.3438C33.04 19.3438 19.3379 33.0459 19.3379 49.9484ZM44.0817 40.0799C41.8725 40.0799 40.0817 41.8708 40.0817 44.0799V55.8029C40.0817 58.012 41.8725 59.8029 44.0817 59.8029H55.8046C58.0138 59.8029 59.8046 58.012 59.8046 55.8029V44.0799C59.8046 41.8708 58.0138 40.0799 55.8046 40.0799H44.0817Z" fill="white"/>\n</svg>\n\n'},1236:function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;const i=n(1074),o=n(1133),s=r(n(1237));e.QRCode=e=>{const[n,r]=(0,o.useState)("");return(0,o.useEffect)((()=>{var n,i;const o=new s.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=e.width)&&void 0!==n?n:256,height:null!==(i=e.height)&&void 0!==i?i:256,padding:0,image:e.image}),a=t.from(o.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${a}`)})),n?(0,i.h)("img",{src:n,alt:"QR Code"}):null}}).call(this,n(294).Buffer)},1237:function(t,e){function n(t){this.mode=i.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,n=this.data.length;e<n;e++){var r=[],o=this.data.charCodeAt(e);o>65536?(r[0]=240|(1835008&o)>>>18,r[1]=128|(258048&o)>>>12,r[2]=128|(4032&o)>>>6,r[3]=128|63&o):o>2048?(r[0]=224|(61440&o)>>>12,r[1]=128|(4032&o)>>>6,r[2]=128|63&o):o>128?(r[0]=192|(1984&o)>>>6,r[1]=128|63&o):r[0]=o,this.parsedData.push(r)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function r(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}n.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,n=this.parsedData.length;e<n;e++)t.put(this.parsedData[e],8)}},r.prototype={addData:function(t){var e=new n(t);this.dataList.push(e),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(this.modules[t+n][e+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},getBestMaskPattern:function(){for(var t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=g.getLostPoint(this);(0==n||t>r)&&(t=r,e=n)}return e},createMovieClip:function(t,e,n){var r=t.createEmptyMovieClip(e,n);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,s=0;s<this.modules[i].length;s++){var a=1*s;this.modules[i][s]&&(r.beginFill(0,100),r.moveTo(a,o),r.lineTo(a+1,o),r.lineTo(a+1,o+1),r.lineTo(a,o+1),r.endFill())}return r},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=g.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var r=t[e],i=t[n];if(null==this.modules[r][i])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][i+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},setupTypeNumber:function(t){for(var e=g.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!t&&1==(e>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},setupTypeInfo:function(t,e){for(var n=this.errorCorrectLevel<<3|e,r=g.getBCHTypeInfo(n),i=0;i<15;i++){var o=!t&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!t&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var a=0;a<2;a++)if(null==this.modules[r][s-a]){var u=!1;o<t.length&&(u=1==(t[o]>>>i&1)),g.getMask(e,r,s-a)&&(u=!u),this.modules[r][s-a]=u,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(t,e,n){for(var i=w.getRSBlocks(t,e),o=new S,s=0;s<n.length;s++){var a=n[s];o.put(a.mode,4),o.put(a.getLength(),g.getLengthInBits(a.mode,t)),a.write(o)}var u=0;for(s=0;s<i.length;s++)u+=i[s].dataCount;if(o.getLengthInBits()>8*u)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*u+")");for(o.getLengthInBits()+4<=8*u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*u)&&(o.put(r.PAD0,8),!(o.getLengthInBits()>=8*u));)o.put(r.PAD1,8);return r.createBytes(o,i)},r.createBytes=function(t,e){for(var n=0,r=0,i=0,o=new Array(e.length),s=new Array(e.length),a=0;a<e.length;a++){var u=e[a].dataCount,c=e[a].totalCount-u;r=Math.max(r,u),i=Math.max(i,c),o[a]=new Array(u);for(var l=0;l<o[a].length;l++)o[a][l]=255&t.buffer[l+n];n+=u;var h=g.getErrorCorrectPolynomial(c),d=new _(o[a],h.getLength()-1).mod(h);s[a]=new Array(h.getLength()-1);for(l=0;l<s[a].length;l++){var f=l+d.getLength()-s[a].length;s[a][l]=f>=0?d.get(f):0}}var p=0;for(l=0;l<e.length;l++)p+=e[l].totalCount;var b=new Array(p),y=0;for(l=0;l<r;l++)for(a=0;a<e.length;a++)l<o[a].length&&(b[y++]=o[a][l]);for(l=0;l<i;l++)for(a=0;a<e.length;a++)l<s[a].length&&(b[y++]=s[a][l]);return b};for(var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},o=1,s=0,a=3,u=2,c=0,l=1,h=2,d=3,f=4,p=5,b=6,y=7,g={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;g.getBCHDigit(e)-g.getBCHDigit(g.G15)>=0;)e^=g.G15<<g.getBCHDigit(e)-g.getBCHDigit(g.G15);return(t<<10|e)^g.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;g.getBCHDigit(e)-g.getBCHDigit(g.G18)>=0;)e^=g.G18<<g.getBCHDigit(e)-g.getBCHDigit(g.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return g.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case c:return(e+n)%2==0;case l:return e%2==0;case h:return n%3==0;case d:return(e+n)%3==0;case f:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case p:return e*n%2+e*n%3==0;case b:return(e*n%2+e*n%3)%2==0;case y:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new _([1],0),n=0;n<t;n++)e=e.multiply(new _([1,m.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:case i.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,r=0;r<e;r++)for(var i=0;i<e;i++){for(var o=0,s=t.isDark(r,i),a=-1;a<=1;a++)if(!(r+a<0||e<=r+a))for(var u=-1;u<=1;u++)i+u<0||e<=i+u||0==a&&0==u||s==t.isDark(r+a,i+u)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var c=0;t.isDark(r,i)&&c++,t.isDark(r+1,i)&&c++,t.isDark(r,i+1)&&c++,t.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<e;r++)for(i=0;i<e-6;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(n+=40);for(i=0;i<e;i++)for(r=0;r<e-6;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(n+=40);var l=0;for(i=0;i<e;i++)for(r=0;r<e;r++)t.isDark(r,i)&&l++;return n+=10*(Math.abs(100*l/e/e-50)/5)}},m={glog:function(t){if(t<1)throw new Error("glog("+t+")");return m.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return m.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},v=0;v<8;v++)m.EXP_TABLE[v]=1<<v;for(v=8;v<256;v++)m.EXP_TABLE[v]=m.EXP_TABLE[v-4]^m.EXP_TABLE[v-5]^m.EXP_TABLE[v-6]^m.EXP_TABLE[v-8];for(v=0;v<255;v++)m.LOG_TABLE[m.EXP_TABLE[v]]=v;function _(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var r=0;r<t.length-n;r++)this.num[r]=t[r+n]}function w(t,e){this.totalCount=t,this.dataCount=e}function S(){this.buffer=[],this.length=0}_.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<t.getLength();r++)e[n+r]^=m.gexp(m.glog(this.get(n))+m.glog(t.get(r)));return new _(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=m.glog(this.get(0))-m.glog(t.get(0)),n=new Array(this.getLength()),r=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<t.getLength();r++)n[r]^=m.gexp(m.glog(t.get(r))+e);return new _(n,0).mod(t)}},w.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],w.getRSBlocks=function(t,e){var n=w.getRsBlockTable(t,e);if(void 0==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,i=[],o=0;o<r;o++)for(var s=n[3*o+0],a=n[3*o+1],u=n[3*o+2],c=0;c<s;c++)i.push(new w(a,u));return i},w.getRsBlockTable=function(t,e){switch(e){case o:return w.RS_BLOCK_TABLE[4*(t-1)+0];case s:return w.RS_BLOCK_TABLE[4*(t-1)+1];case a:return w.RS_BLOCK_TABLE[4*(t-1)+2];case u:return w.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},S.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var E=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function x(t){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},"string"===typeof t&&(t={content:t}),t)for(var e in t)this.options[e]=t[e];if("string"!==typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var n=this.options.content,i=function(t,e){for(var n=function(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}(t),r=1,i=0,o=0,s=E.length;o<=s;o++){var a=E[o];if(!a)throw new Error("Content too long: expected "+i+" but got "+n);switch(e){case"L":i=a[0];break;case"M":i=a[1];break;case"Q":i=a[2];break;case"H":i=a[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(n<=i)break;r++}if(r>E.length)throw new Error("Content too long");return r}(n,this.options.ecl),c=function(t){switch(t){case"L":return o;case"M":return s;case"Q":return a;case"H":return u;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new r(i,c),this.qrcode.addData(n),this.qrcode.make()}x.prototype.svg=function(t){var e=this.options||{},n=this.qrcode.modules;"undefined"==typeof t&&(t={container:e.container||"svg"});for(var r="undefined"==typeof e.pretty||!!e.pretty,i=r?" ":"",o=r?"\r\n":"",s=e.width,a=e.height,u=n.length,c=s/(u+2*e.padding),l=a/(u+2*e.padding),h="undefined"!=typeof e.join&&!!e.join,d="undefined"!=typeof e.swap&&!!e.swap,f="undefined"==typeof e.xmlDeclaration||!!e.xmlDeclaration,p="undefined"!=typeof e.predefined&&!!e.predefined,b=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+c+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+o:"",y=i+'<rect x="0" y="0" width="'+s+'" height="'+a+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+o,g="",m="",v=0;v<u;v++)for(var _=0;_<u;_++){if(n[_][v]){var w=_*c+e.padding*c,S=v*l+e.padding*l;if(d){var E=w;w=S,S=E}if(h){var x=c+w,k=l+S;w=Number.isInteger(w)?Number(w):w.toFixed(2),S=Number.isInteger(S)?Number(S):S.toFixed(2),x=Number.isInteger(x)?Number(x):x.toFixed(2),m+="M"+w+","+S+" V"+(k=Number.isInteger(k)?Number(k):k.toFixed(2))+" H"+x+" V"+S+" H"+w+" Z "}else g+=p?i+'<use x="'+w.toString()+'" y="'+S.toString()+'" href="#qrmodule" />'+o:i+'<rect x="'+w.toString()+'" y="'+S.toString()+'" width="'+c+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+o}}h&&(g=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+m+'" />');let C="";if(void 0!==this.options.image&&this.options.image.svg){const t=s*this.options.image.width/100,e=a*this.options.image.height/100;C+=`<svg x="${s/2-t/2}" y="${a/2-e/2}" width="${t}" height="${e}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,C+=this.options.image.svg+o,C+="</svg>"}var A="";switch(t.container){case"svg":f&&(A+='<?xml version="1.0" standalone="yes"?>'+o),A+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+s+'" height="'+a+'">'+o,A+=b+y+g,A+=C,A+="</svg>";break;case"svg-viewbox":f&&(A+='<?xml version="1.0" standalone="yes"?>'+o),A+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+s+" "+a+'">'+o,A+=b+y+g,A+=C,A+="</svg>";break;case"g":A+='<g width="'+s+'" height="'+a+'">'+o,A+=b+y+g,A+=C,A+="</g>";break;default:A+=(b+y+g+C).replace(/^\s+/,"")}return A},t.exports=x},1238:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;const i=n(1074),o=r(n(1239));e.Spinner=t=>{var e;const n=null!==(e=t.size)&&void 0!==e?e:64,r=t.color||"#000";return(0,i.h)("div",{class:"-cbwsdk-spinner"},(0,i.h)("style",null,o.default),(0,i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0,i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:r}})))}},1239:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},1240:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='.-cbwsdk-css-reset .-cbwsdk-extension-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top{display:flex;flex-direction:row;background-color:#fff;border-radius:8px;overflow:hidden;min-height:300px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-subtext{margin-top:15px;font-size:12px;line-height:1.5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-install-region button{display:block;border-radius:8px;background-color:#1652f0;color:#fff;width:90%;min-width:fit-content;height:44px;margin-top:16px;font-size:16px;padding-left:16px;padding-right:16px;cursor:pointer;font-weight:500;text-align:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description{display:flex;flex-direction:row;align-items:center;padding-top:14px;padding-bottom:14px;padding-left:24px;padding-right:32px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-icon-wrapper{display:block;position:relative;width:40px;height:40px;flex-shrink:0;flex-grow:0;border-radius:20px;background-color:#fff;box-shadow:0px 0px 8px rgba(0,0,0,.04),0px 16px 24px rgba(0,0,0,.06)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;color:#000;align-self:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;background-color:#fff;margin-top:8px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-region{position:relative;flex-shrink:0;display:flex;flex-direction:column;justify-content:center;padding-left:24px;padding-right:24px;padding-top:16px;padding-bottom:16px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-wrapper{position:relative;display:block;padding:8px;border-radius:8px;box-shadow:0px 4px 12px rgba(0,0,0,.1)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-wrapper img{display:block}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;color:#000;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:16px;right:16px;width:24px;height:24px;border-radius:12px;background-color:#fafbfc;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:1px;background-color:#000;transition:background-color .2s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-a,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-b{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container-hidden{display:none}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px;color:#000}'},1241:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const i=r(n(27)),o=n(1074),s=n(1133),a=r(n(1242));e.Snackbar=class{constructor(t){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=t.darkMode}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",t.appendChild(this.root),this.render()}presentItem(t){const e=this.nextItemKey++;return this.items.set(e,t),this.render(),()=>{this.items.delete(e),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,o.render)((0,o.h)("div",null,(0,o.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((t=>{let[n,r]=t;return(0,o.h)(e.SnackbarInstance,Object.assign({},r,{key:n}))})))),this.root)}};e.SnackbarContainer=t=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,o.h)("style",null,a.default),(0,o.h)("div",{class:"-cbwsdk-snackbar"},t.children));e.SnackbarInstance=t=>{let{autoExpand:e,message:n,menuItems:r}=t;const[a,u]=(0,s.useState)(!0),[c,l]=(0,s.useState)(null!==e&&void 0!==e&&e);(0,s.useEffect)((()=>{const t=[window.setTimeout((()=>{u(!1)}),1),window.setTimeout((()=>{l(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}}));return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",a&&"-cbwsdk-snackbar-instance-hidden",c&&"-cbwsdk-snackbar-instance-expanded")},(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{l(!c)}},(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},n),(0,o.h)("div",{class:"-gear-container"},!c&&(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map(((t,e)=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:t.onClick,key:e},(0,o.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},t.info))))))}},1242:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},1243:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.injectCssReset=void 0;const i=r(n(1244));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},1244:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;bottom:auto;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:block;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";right:auto;tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;width:auto;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset *{box-sizing:border-box;display:initial;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'},1245:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelay=void 0;const u=a(n(1246)),c=n(1104),l=n(1075),h=n(1099),d=n(1107),f=n(1247),p=n(1251),b=n(1061),y=s(n(1252)),g=n(1108),m=n(1148),v=n(1165),_=n(1253),w=n(1254),S=n(1255),E=n(1256);class x extends m.WalletSDKRelayAbstract{constructor(t){super(),this.accountsCallback=null,this.chainCallback=null,this.appName="",this.appLogoUrl=null,this.subscriptions=new l.Subscription,this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this._session=g.Session.load(t.storage)||new g.Session(t.storage).save(),this.relayEventManager=t.relayEventManager,this.eventListener=t.eventListener,this.connection=new f.WalletSDKConnection(this._session.id,this._session.key,this.linkAPIUrl,this.eventListener),this.subscriptions.add(this.connection.sessionConfig$.subscribe({next:t=>{this.onSessionConfigChanged(t)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(this.connection.incomingEvent$.pipe((0,h.filter)((t=>"Web3Response"===t.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(this.connection.linked$.pipe((0,h.skip)(1),(0,h.tap)((t=>{var e;this.isLinked=t;const n=this.storage.getItem(m.LOCAL_STORAGE_ADDRESSES_KEY);if(t&&(this.session.linked=t),this.isUnlinkedErrorState=!1,n){const r=n.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==r[0]&&!t&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const t=this.getSessionIdHash();null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:t})}}}))).subscribe()),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>!!t.metadata&&"1"===t.metadata.__destroyed))).subscribe((()=>{var t;const e=this.connection.isDestroyed;return null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:e,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.WalletUsername))).pipe((0,h.mergeMap)((t=>y.decrypt(t.metadata.WalletUsername,this._session.secret)))).subscribe({next:t=>{this.storage.setItem(m.WALLET_USER_NAME_KEY,t)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.AppVersion))).pipe((0,h.mergeMap)((t=>y.decrypt(t.metadata.AppVersion,this._session.secret)))).subscribe({next:t=>{this.storage.setItem(m.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.ChainId&&void 0!==t.metadata.JsonRpcUrl))).pipe((0,h.mergeMap)((t=>(0,l.zip)(y.decrypt(t.metadata.ChainId,this._session.secret),y.decrypt(t.metadata.JsonRpcUrl,this._session.secret))))).pipe((0,h.distinctUntilChanged)()).subscribe({next:t=>{let[e,n]=t;this.chainCallback&&this.chainCallback(e,n)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.EthereumAddress))).pipe((0,h.mergeMap)((t=>y.decrypt(t.metadata.EthereumAddress,this._session.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),x.accountRequestCallbackIds.size>0&&(Array.from(x.accountRequestCallbackIds.values()).forEach((e=>{const n=(0,E.Web3ResponseMessage)({id:e,response:(0,S.RequestEthereumAccountsResponse)([t])});this.invokeCallback(Object.assign(Object.assign({},n),{id:e}))})),x.accountRequestCallbackIds.clear())},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.ui=t.uiConstructor({linkAPIUrl:t.linkAPIUrl,version:t.version,darkMode:t.darkMode,session:this._session,connected$:this.connection.connected$}),this.connection.connect()}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,h.timeout)(1e3),(0,h.catchError)((t=>(0,l.of)(null)))).subscribe((t=>{var e,n,r;try{this.subscriptions.unsubscribe()}catch(o){null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.eventListener)||void 0===n||n.onEvent(d.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const i=g.Session.load(this.storage);(null===i||void 0===i?void 0:i.id)===this._session.id?this.storage.clear():i&&(null===(r=this.eventListener)||void 0===r||r.onEvent(d.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:g.Session.hash(i.id)})),this.ui.reloadUI()}),(t=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${t}`,sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(t,e){this.appName=t,this.appLogoUrl=e}getStorageItem(t){return this.storage.getItem(t)}get session(){return this._session}setStorageItem(t,e){this.storage.setItem(t,e)}signEthereumMessage(t,e,n,r){return this.sendRequest({method:v.Web3Method.signEthereumMessage,params:{message:(0,b.hexStringFromBuffer)(t,!0),address:e,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(t,e,n){return this.sendRequest({method:v.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,b.hexStringFromBuffer)(t,!0),signature:(0,b.hexStringFromBuffer)(e,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,b.bigIntStringFromBN)(t.weiValue),data:(0,b.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,b.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,b.bigIntStringFromBN)(t.weiValue),data:(0,b.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,b.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,b.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,b.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:v.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,b.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:v.Web3Method.scanQRCode,params:{regExp:t}})}getQRCodeUrl(){return(0,b.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1)}genericRequest(t,e){return this.sendRequest({method:v.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const n=(0,b.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,r),null===e||void 0===e||e()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(t=>{if(null===e||void 0===e||e(),t.errorMessage)return o(new Error(t.errorMessage));i(t)})),this.ui.isStandalone()?this.sendRequestStandalone(n,t):this.publishWeb3RequestEvent(n,t)})),cancel:r}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}publishWeb3RequestEvent(t,e){var n;const r=(0,w.Web3RequestMessage)({id:t,request:e}),i=g.Session.load(this.storage);null===(n=this.eventListener)||void 0===n||n.onEvent(d.EVENTS.WEB3_REQUEST,{eventId:r.id,method:`relay::${r.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?g.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({next:t=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:r.id,method:`relay::${r.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?g.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()})},error:t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,_.Web3RequestCanceledMessage)(t);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",e,!1).subscribe())}publishEvent(t,e,n){const r=this.session.secret;return new l.Observable((t=>{y.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{origin:location.origin})),r).then((e=>{t.next(e),t.complete()}))})).pipe((0,h.mergeMap)((e=>this.connection.publishEvent(t,e,n))))}handleIncomingEvent(t){try{this.subscriptions.add(y.decrypt(t.data,this.session.secret).pipe((0,h.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,E.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(e){return}}handleWeb3ResponseMessage(t){var e;const{response:n}=t;if(null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),(0,S.isRequestEthereumAccountsResponse)(n))return x.accountRequestCallbackIds.forEach((e=>this.invokeCallback(Object.assign(Object.assign({},t),{id:e})))),void x.accountRequestCallbackIds.clear();this.invokeCallback(t)}handleErrorResponse(t,e,n,r){this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:t,response:(0,S.ErrorResponse)(e,(null!==n&&void 0!==n?n:p.WalletUIError.UserRejectedRequest).message,r)}))}invokeCallback(t){const e=this.relayEventManager.callbacks.get(t.id);e&&(e(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){const t={method:v.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},e=(0,b.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(e),this.handleErrorResponse(e,t.method,n)};return{promise:new Promise(((r,i)=>{var o;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));r(t)}));const s=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(s&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s))window.location.href=`https://go.cb-w.com/xoXnYwQimhb?cb_url=${encodeURIComponent(window.location.href)}`;else{if(this.ui.inlineAccountsResponse()){const t=t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:e,response:(0,S.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:t})}else this.ui.requestEthereumAccounts({onCancel:n});x.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:n}}watchAsset(t,e,n,r,i,o){const s={method:v.Web3Method.watchAsset,params:{type:t,options:{address:e,symbol:n,decimals:r,image:i},chainId:o}};let a=null;const u=(0,b.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,s.method,t),null===a||void 0===a||a()};this.ui.inlineWatchAsset()||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload}));return{cancel:c,promise:new Promise(((c,l)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null===a||void 0===a||a(),t.errorMessage)return l(new Error(t.errorMessage));c(t)}));const h=t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,S.WatchAssetReponse)(!1)}))},d=()=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,S.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:d,onCancel:h,type:t,address:e,symbol:n,decimals:r,image:i,chainId:o}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,s)}))}}addEthereumChain(t,e,n,r,i,o){const s={method:v.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:o}};let a=null;const u=(0,b.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,s.method,t),null===a||void 0===a||a()};this.ui.inlineAddEthereumChain(t)||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload}));return{promise:new Promise(((e,n)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null===a||void 0===a||a(),t.errorMessage)return n(new Error(t.errorMessage));e(t)}));const r=t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,S.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},i=t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,S.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))};this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:r,onApprove:i,chainId:s.params.chainId,rpcUrls:s.params.rpcUrls,blockExplorerUrls:s.params.blockExplorerUrls,chainName:s.params.chainName,iconUrls:s.params.iconUrls,nativeCurrency:s.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,s)})),cancel:c}}switchEthereumChain(t){const e={method:v.Web3Method.switchEthereumChain,params:{chainId:t}};let n=null;const r=(0,b.randomBytesHex)(8),i=t=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,t),null===n||void 0===n||n()};this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}));return{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(r,(e=>(null===n||void 0===n||n(),e.errorMessage&&e.errorCode?i(c.ethErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?i(new Error(e.errorMessage)):void t(e))));this.ui.switchEthereumChain({onCancel:t=>{if("number"===typeof t){const e=t;this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:r,response:(0,S.ErrorResponse)(v.Web3Method.switchEthereumChain,p.WalletUIError.SwitchEthereumChainUnsupportedChainId.message,e)}))}else t instanceof p.WalletUIError?this.handleErrorResponse(r,v.Web3Method.switchEthereumChain,t,t.errorCode):this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:r,response:(0,S.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:r,response:(0,S.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:e.params.chainId}),this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(r,e)})),cancel:i}}inlineAddEthereumChain(t){return this.ui.inlineAddEthereumChain(t)}getSessionIdHash(){return g.Session.hash(this._session.id)}sendRequestStandalone(t,e){const n=n=>{this.handleErrorResponse(t,e.method,n)},r=e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case v.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:r});break;default:n()}}onSessionConfigChanged(t){}}x.accountRequestCallbackIds=new Set,o([u.default],x.prototype,"resetAndReload",null),o([u.default],x.prototype,"handleIncomingEvent",null),e.WalletSDKRelay=x},1246:function(t,e,n){"use strict";var r;function i(t,e,n){if(!n||typeof n.value!==r.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:r.boolTrue,get:function(){var t=n.value.bind(this);return Object.defineProperty(this,e,{value:t,configurable:r.boolTrue,writable:r.boolTrue}),t}}}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.typeOfFunction="function",t.boolTrue=!0}(r||(r={})),e.bind=i,e.default=i},1247:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKConnection=void 0;const r=n(1075),i=n(1099),o=n(1108),s=n(1127),a=n(1248),u=n(1107),c=n(1249),l=n(1250);e.WalletSDKConnection=class{constructor(t,e,n,a){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;this.sessionId=t,this.sessionKey=e,this.eventListener=a,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,s.IntNumber)(1),this.connectedSubject=new r.BehaviorSubject(!1),this.linkedSubject=new r.BehaviorSubject(!1),this.sessionConfigSubject=new r.ReplaySubject(1);const h=new c.RxWebSocket(n+"/rpc",l);this.ws=h,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((e=>{var n;return null===(n=this.eventListener)||void 0===n?void 0:n.onEvent(u.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:o.Session.hash(t)})})),(0,i.skip)(1),(0,i.filter)((t=>t===c.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((t=>!this.destroyed)),(0,i.flatMap)((t=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((t=>this.sendIsLinked())),(0,i.tap)((t=>this.sendGetSessionConfig())),(0,i.map)((t=>!0))),(0,r.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((t=>(0,r.of)(!1)))).subscribe((t=>this.connectedSubject.next(t)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),(0,r.timer)(0,1e4))))).subscribe((t=>0===t?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((t=>"h"===t))).subscribe((t=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["IsLinkedOK","Linked"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.eventListener)||void 0===n||n.onEvent(u.EVENTS.LINKED,{sessionIdHash:o.Session.hash(t),linked:r.linked,type:e.type,onlineGuests:r.onlineGuests}),this.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["GetSessionConfigOK","SessionConfigUpdated"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.eventListener)||void 0===n||n.onEvent(u.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o.Session.hash(t),metadata_keys:r&&r.metadata?Object.keys(r.metadata):void 0}),this.sessionConfigSubject.next({webhookId:r.webhookId,webhookUrl:r.webhookUrl,metadata:r.metadata})})))}connect(){var t;if(this.destroyed)throw new Error("instance is destroyed");null===(t=this.eventListener)||void 0===t||t.onEvent(u.EVENTS.STARTED_CONNECTING,{sessionIdHash:o.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var t;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(t=this.eventListener)||void 0===t||t.onEvent(u.EVENTS.DISCONNECTED,{sessionIdHash:o.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,i.filter)((t=>{if("Event"!==t.type)return!1;const e=t;return"string"===typeof e.sessionId&&"string"===typeof e.eventId&&"string"===typeof e.event&&"string"===typeof e.data})),(0,i.map)((t=>t)))}setSessionMetadata(t,e){const n=(0,a.ClientMessageSetSessionConfig)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[t]:e}});return this.onceConnected$.pipe((0,i.flatMap)((t=>this.makeRequest(n))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to set session metadata")})))}publishEvent(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,a.ClientMessagePublishEvent)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:t,data:e,callWebhook:n});return this.onceLinked$.pipe((0,i.flatMap)((t=>this.makeRequest(r))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to publish event");return t.eventId})))}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(t){}}makeRequest(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;const n=t.id;try{this.sendData(t)}catch(o){return(0,r.throwError)(o)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(e,(0,r.throwError)(new Error(`request ${n} timed out`))),(0,i.filter)((t=>t.id===n)),(0,i.take)(1))}authenticate(){const t=(0,a.ClientMessageHostSession)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(t).pipe((0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to authentcate")})))}sendIsLinked(){const t=(0,a.ClientMessageIsLinked)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,a.ClientMessageGetSessionConfig)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},1248:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientMessagePublishEvent=e.ClientMessageSetSessionConfig=e.ClientMessageGetSessionConfig=e.ClientMessageIsLinked=e.ClientMessageHostSession=void 0,e.ClientMessageHostSession=function(t){return Object.assign({type:"HostSession"},t)},e.ClientMessageIsLinked=function(t){return Object.assign({type:"IsLinked"},t)},e.ClientMessageGetSessionConfig=function(t){return Object.assign({type:"GetSessionConfig"},t)},e.ClientMessageSetSessionConfig=function(t){return Object.assign({type:"SetSessionConfig"},t)},e.ClientMessagePublishEvent=function(t){return Object.assign({type:"PublishEvent"},t)}},1249:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const r=n(1075),i=n(1099);var o;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(o=e.ConnectionState||(e.ConnectionState={}));e.RxWebSocket=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new r.Subject,this.url=t.replace(/^http/,"ws")}connect(){return this.webSocket?(0,r.throwError)(new Error("webSocket object is not null")):new r.Observable((t=>{let e;try{this.webSocket=e=new this.WebSocketClass(this.url)}catch(n){return void t.error(n)}this.connectionStateSubject.next(o.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error(`websocket error ${e.code}: ${e.reason}`)),this.connectionStateSubject.next(o.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(o.CONNECTED)},e.onmessage=t=>{this.incomingDataSubject.next(t.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:t}=this;if(t){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{t.close()}catch(e){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((t=>{let e;try{e=JSON.parse(t)}catch(n){return(0,r.empty)()}return(0,r.of)(e)})))}sendData(t){const{webSocket:e}=this;if(!e)throw new Error("websocket is not connected");e.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}},1250:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isServerMessageFail=void 0,e.isServerMessageFail=function(t){return t&&"Fail"===t.type&&"number"===typeof t.id&&"string"===typeof t.sessionId&&"string"===typeof t.error}},1251:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletUIError=void 0;class r extends Error{constructor(t,e){super(t),this.message=t,this.errorCode=e}}e.WalletUIError=r,r.UserRejectedRequest=new r("User rejected request"),r.SwitchEthereumChainUnsupportedChainId=new r("Unsupported chainId",4902)},1252:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const r=n(1075),i=n(1061);e.encrypt=async function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,o.encode(t)),a=s.slice(s.byteLength-16),u=s.slice(0,s.byteLength-16),c=new Uint8Array(a),l=new Uint8Array(u),h=new Uint8Array([...n,...c,...l]);return(0,i.uint8ArrayToHex)(h)},e.decrypt=function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");return new r.Observable((n=>{!async function(){const r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,i.hexStringToUint8Array)(t),s=o.slice(0,12),a=o.slice(12,28),u=o.slice(28),c=new Uint8Array([...u,...a]),l={name:"AES-GCM",iv:new Uint8Array(s)};try{const t=await window.crypto.subtle.decrypt(l,r,c),e=new TextDecoder;n.next(e.decode(t)),n.complete()}catch(h){n.error(h)}}()}))}},1253:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const r=n(1134);e.Web3RequestCanceledMessage=function(t){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},1254:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const r=n(1134);e.Web3RequestMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},t)}},1255:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.WatchAssetReponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.ErrorResponse=void 0;const r=n(1165);e.ErrorResponse=function(t,e,n){return{method:t,errorMessage:e,errorCode:n}},e.AddEthereumChainResponse=function(t){return{method:r.Web3Method.addEthereumChain,result:t}},e.SwitchEthereumChainResponse=function(t){return{method:r.Web3Method.switchEthereumChain,result:t}},e.RequestEthereumAccountsResponse=function(t){return{method:r.Web3Method.requestEthereumAccounts,result:t}},e.WatchAssetReponse=function(t){return{method:r.Web3Method.watchAsset,result:t}},e.isRequestEthereumAccountsResponse=function(t){return t&&t.method===r.Web3Method.requestEthereumAccounts},e.SignEthereumMessageResponse=function(t){return{method:r.Web3Method.signEthereumMessage,result:t}},e.SignEthereumTransactionResponse=function(t){return{method:r.Web3Method.signEthereumTransaction,result:t}},e.SubmitEthereumTransactionResponse=function(t){return{method:r.Web3Method.submitEthereumTransaction,result:t}},e.EthereumAddressFromSignedMessageResponse=function(t){return{method:r.Web3Method.ethereumAddressFromSignedMessage,result:t}}},1256:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const r=n(1134);e.Web3ResponseMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_RESPONSE},t)},e.isWeb3ResponseMessage=function(t){return t&&t.type===r.RelayMessageType.WEB3_RESPONSE}},1257:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayEventManager=void 0;const r=n(1061);e.WalletSDKRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const t=this._nextRequestId,e=(0,r.prepend0x)(t.toString(16));return this.callbacks.get(e)&&this.callbacks.delete(e),t}}},1258:function(t){t.exports=JSON.parse('{"name":"@coinbase/wallet-sdk","version":"3.1.0","description":"Coinbase Wallet JavaScript SDK","keywords":["cipher","cipherbrowser","coinbase","coinbasewallet","eth","ether","ethereum","etherium","injection","toshi","wallet","walletlink","web3"],"main":"dist/index.js","types":"dist/index.d.ts","repository":"https://github.com/coinbase/coinbase-wallet-sdk.git","author":"Coinbase, Inc.","license":"Apache-2.0","scripts":{"pretest:unit":"node compile-assets.js","test:unit":"jest","test:unit:coverage":"yarn test:unit && open coverage/lcov-report/index.html","test:karma":"yarn build-npm && karma start","prebuild":"node -p \\"\'export const LIB_VERSION = \' + JSON.stringify(require(\'./package.json\').version) + \';\'\\" > src/version.ts","build":"node compile-assets.js && webpack --config webpack.config.js","build-npm":"tsc -p ./tsconfig.build.json","build:dev":"export LINK_API_URL=\'http://localhost:3000\'; yarn build","build:dev:watch":"nodemon -e \'ts,tsx,js,json,css,scss,svg\' --ignore \'src/**/*-css.ts\' --ignore \'src/**/*-svg.ts\' --watch src/ --exec \'yarn build:dev\'","build:prod":"yarn prebuild && yarn build && yarn build-npm && cp ./package.json ./README.md ./LICENSE build/npm && cp -a src/vendor-js build/npm/dist && sed -i.bak \'s| \\"private\\": true,||g\' build/npm/package.json && rm -f build/npm/package.json.bak","lint:types":"tsc --noEmit","lint:prettier":"prettier --check \\"{src,__tests__}/**/*.(js|ts|tsx)\\"","lint:eslint":"eslint ./src --ext .ts,.tsx","fix:eslint":"yarn lint:eslint --fix","fix:prettier":"prettier . --write","release":"./scripts/release.sh"},"dependencies":{"@metamask/safe-event-emitter":"2.0.0","bind-decorator":"^1.0.11","bn.js":"^5.1.1","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","js-sha256":"0.9.0","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","qs":"^6.10.3","rxjs":"^6.6.3","stream-browserify":"^3.0.0"},"devDependencies":{"@babel/core":"^7.17.9","@babel/plugin-proposal-decorators":"^7.17.9","@babel/plugin-transform-react-jsx":"^7.17.3","@babel/preset-env":"^7.16.11","@babel/preset-typescript":"^7.16.7","@peculiar/webcrypto":"^1.3.3","@testing-library/jest-dom":"^5.16.4","@testing-library/preact":"^2.0.1","@types/bn.js":"^4.11.6","@types/jest":"^27.4.1","@types/node":"^14.14.20","@types/qs":"^6.9.7","@typescript-eslint/eslint-plugin":"^5.7.0","@typescript-eslint/eslint-plugin-tslint":"^5.7.0","@typescript-eslint/parser":"^5.7.0","babel-jest":"^27.5.1","browserify":"17.0.0","copy-webpack-plugin":"^6.4.1","core-js":"^3.8.2","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.25.3","eslint-plugin-preact":"^0.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-simple-import-sort":"^7.0.0","jasmine":"3.8.0","jest":"^27.5.1","jest-chrome":"^0.7.2","karma":"^6.3.15","karma-browserify":"8.1.0","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","nodemon":"^2.0.6","prettier":"^2.5.1","raw-loader":"^4.0.2","regenerator-runtime":"^0.13.7","sass":"^1.50.0","svgo":"^2.8.0","ts-jest":"^27.1.4","ts-loader":"^8.0.13","ts-node":"^10.7.0","tslib":"^2.0.3","typescript":"^4.1.3","watchify":"4.0.0","webpack":"^5.72.0","webpack-cli":"^4.9.2","whatwg-fetch":"^3.5.0"},"engines":{"node":">= 10.0.0"},"_resolved":"https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.1.0.tgz","_integrity":"sha512-8IGfVklv/CMfCT4qd9KfL0IwlINsIgSlW1oQB/or8uSY9wAqoY8lIoQVpOyFx7YDK094Xfd9alhulZtRZNJBjw==","_from":"@coinbase/wallet-sdk@3.1.0"}')},1284:function(t,e,n){"use strict";n.r(e),n.d(e,"Mutex",(function(){return s})),n.d(e,"Semaphore",(function(){return o})),n.d(e,"withTimeout",(function(){return a}));function r(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(e){o(e)}}function a(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}Object.create;Object.create;var o=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),n=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),n},t.prototype.runExclusive=function(t){return r(this,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.acquire()];case 1:e=i.sent(),n=e[0],r=e[1],i.label=2;case 2:return i.trys.push([2,,4,5]),[4,t(n)];case 3:return[2,i.sent()];case 4:return r(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var n=!1;this._currentReleaser=function(){n||(n=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}(),s=function(){function t(){this._semaphore=new o(1)}return t.prototype.acquire=function(){return r(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=e.sent(),[2,t[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();function a(t,e,n){var o=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(s,a){return r(o,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r=!1,setTimeout((function(){r=!0,a(n)}),e),[4,t.acquire()];case 1:return o=i.sent(),r?(Array.isArray(o)?o[1]:o)():s(o),[2]}}))}))}))},runExclusive:function(t){return r(this,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:e=function(){},r.label=1;case 1:return r.trys.push([1,,7,8]),[4,this.acquire()];case 2:return n=r.sent(),Array.isArray(n)?(e=n[1],[4,t(n[0])]):[3,4];case 3:return[2,r.sent()];case 4:return e=n,[4,t()];case 5:return[2,r.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}}}]);
|
|
3
|
+
//# sourceMappingURL=3.8193ec10.chunk.js.map
|