text: "use strict";var e=require("@web3-react/abstract-connector");function r(){return(r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function t(e,r){return(t=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}exports.WalletLinkConnector=function(e){var n,o;function i(r){var t,n=r.url,o=r.appName,i=r.appLogoUrl,a=r.darkMode;return(t=e.call(this,{supportedChainIds:[1]})||this).url=n,t.appName=o,t.appLogoUrl=i,t.darkMode=a||!1,t}o=e,(n=i).prototype=Object.create(o.prototype),n.prototype.constructor=n,t(n,o);var a=i.prototype;return a.activate=function(){try{var e=this,t=function(){return Promise.resolve(e.provider.send("eth_requestAccounts").then((function(e){return e[0]}))).then((function(r){return e.provider.on("chainChanged",e.handleChainChanged),e.provider.on("accountsChanged",e.handleAccountsChanged),{provider:e.provider,chainId:1,account:r}}))},n=function(){if(!e.walletLink)return Promise.resolve(new Promise((function(e){e(function(e){if(e&&e.__esModule)return e;var r={};return e&&Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r.default=e,r}(require("walletlink")))})).then((function(e){var r;return null!=(r=null==e?void 0:e.default)?r:e}))).then((function(t){e.walletLink=new t(r({appName:e.appName,darkMode:e.darkMode},e.appLogoUrl?{appLogoUrl:e.appLogoUrl}:{})),e.provider=e.walletLink.makeWeb3Provider(e.url,1)}))}();return Promise.resolve(n&&n.then?n.then(t):t())}catch(e){return Promise.reject(e)}},a.getProvider=function(){try{return Promise.resolve(this.provider)}catch(e){return Promise.reject(e)}},a.getChainId=function(){return Promise.resolve(1)},a.getAccount=function(){try{return Promise.resolve(this.provider.send("eth_accounts").then((function(e){return e[0]})))}catch(e){return Promise.reject(e)}},a.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},a.close=function(){try{return this.provider.close(),this.emitDeactivate(),Promise.resolve()}catch(e){return Promise.reject(e)}},a.handleChainChanged=function(e){this.emitUpdate({chainId:e})},a.handleAccountsChanged=function(e){this.emitUpdate({account:e[0]})},i}(e.AbstractConnector);
  //# sourceMappingURL=walletlink-connector.cjs.production.min.js.map
  