-
Notifications
You must be signed in to change notification settings - Fork 1
/
23.164b45a1dc81414327ed.js
1 lines (1 loc) · 139 KB
/
23.164b45a1dc81414327ed.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{"/1Jb":function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;const s=n("hh2p"),r=i(n("u8Fu"));t.Spinner=e=>{var t;const n=null!==(t=e.size)&&void 0!==t?t:64,i=e.color||"#000";return s.h("div",{class:"-walletlink-spinner"},s.h("style",null,r.default),s.h("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},s.h("circle",{style:{cx:50,cy:50,r:45,stroke:i}})))}},"/aAL":function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkDialog=void 0;const s=i(n("iuhU")),r=n("hh2p"),o=n("J5ZA"),a=i(n("bFFw")),l=n("LMR0"),c=n("/1Jb");t.LinkDialog=e=>{const[t,n]=o.useState(!e.isOpen),[i,l]=o.useState(!e.isOpen);return o.useEffect(()=>{const{isOpen:t}=e,i=[window.setTimeout(()=>{l(!t)},10)];return t?n(!1):i.push(window.setTimeout(()=>{n(!0)},360)),()=>{i.forEach(window.clearTimeout)}},[e.isOpen]),r.h("div",{class:s.default("-walletlink-link-dialog-container",e.darkMode&&"-walletlink-link-dialog-container-dark",t&&"-walletlink-link-dialog-container-hidden")},r.h("style",null,a.default),r.h("div",{class:s.default("-walletlink-link-dialog-backdrop",i&&"-walletlink-link-dialog-backdrop-hidden")}),r.h("div",{class:"-walletlink-link-dialog"},r.h("div",{class:s.default("-walletlink-link-dialog-box",i&&"-walletlink-link-dialog-box-hidden")},r.h(u,{darkMode:e.darkMode,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,walletLinkUrl:e.walletLinkUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection}),e.onCancel&&r.h(d,{onClick:e.onCancel}))))};const u=e=>{const t=window.encodeURIComponent(e.walletLinkUrl),n=`${e.walletLinkUrl}/#/link?${e.isParentConnection?"parent-id":"id"}=${e.sessionId}&secret=${e.sessionSecret}&server=${t}&v=1`;return r.h("div",{class:"-walletlink-link-dialog-box-content"},r.h("h3",null,"Scan to",r.h("br",null)," Connect"),r.h("div",{class:"-walletlink-link-dialog-box-content-qrcode"},r.h("div",{class:"-walletlink-link-dialog-box-content-qrcode-wrapper"},r.h(l.QRCode,{content:n,width:224,height:224,fgColor:"#000",bgColor:"transparent"})),r.h("input",{type:"hidden",value:n}),!e.isConnected&&r.h("div",{class:"-walletlink-link-dialog-box-content-qrcode-connecting"},r.h(c.Spinner,{size:128,color:e.darkMode?"#fff":"#000"}),r.h("p",null,"Connecting...")),r.h("p",{title:`WalletLink v${e.version}`},"Powered by WalletLink")),r.h("a",{href:`${e.walletLinkUrl}/#/wallets`,target:"_blank",rel:"noopener"},"Don\u2019t have a wallet app?"))},d=e=>r.h("button",{class:"-walletlink-link-dialog-box-cancel",onClick:e.onClick},r.h("div",{class:"-walletlink-link-dialog-box-cancel-x"}))},"0zMk":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=void 0;const i=n("oK5k"),s=n("qCKp");t.encrypt=async function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.importKey("raw",i.hexStringToUint8Array(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),r=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},s,r.encode(e)),a=o.slice(o.byteLength-16),l=o.slice(0,o.byteLength-16),c=new Uint8Array(a),u=new Uint8Array(l),d=new Uint8Array([...n,...c,...u]);return i.uint8ArrayToHex(d)},t.decrypt=function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");return new s.Observable(n=>{(async()=>{const s=await crypto.subtle.importKey("raw",i.hexStringToUint8Array(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),r=i.hexStringToUint8Array(e),o=r.slice(0,12),a=r.slice(12,28),l=r.slice(28),c=new Uint8Array([...l,...a]),u={name:"AES-GCM",iv:new Uint8Array(o)},d=await window.crypto.subtle.decrypt(u,s,c),h=new TextDecoder;n.next(h.decode(d)),n.complete()})()})}},"16RA":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkUI=void 0,t.WalletLinkUI=class{constructor(e){}setConnectDisabled(e){}}},"1vXP":function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TryExtensionLinkDialog=void 0;const s=i(n("iuhU")),r=i(n("853V")),o=i(n("C4r1")),a=i(n("YQXw")),l=i(n("WCWn")),c=i(n("Clep")),u=n("hh2p"),d=n("J5ZA"),h=n("LMR0"),p=n("/1Jb");t.TryExtensionLinkDialog=e=>{const[t,n]=d.useState(!e.isOpen),[i,o]=d.useState(!e.isOpen);return d.useEffect(()=>{const{isOpen:t}=e,i=[window.setTimeout(()=>{o(!t)},10)];return t?n(!1):i.push(window.setTimeout(()=>{n(!0)},360)),()=>{i.forEach(window.clearTimeout)}},[e.isOpen]),u.h("div",{class:s.default("-walletlink-extension-dialog-container",t&&"-walletlink-extension-dialog-container-hidden")},u.h("style",null,r.default),u.h("div",{class:s.default("-walletlink-extension-dialog-backdrop",i&&"-walletlink-extension-dialog-backdrop-hidden")}),u.h("div",{class:"-walletlink-extension-dialog"},u.h("div",{class:s.default("-walletlink-extension-dialog-box",i&&"-walletlink-extension-dialog-box-hidden")},u.h(g,{onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),e.connectDisabled?null:u.h(f,{darkMode:e.darkMode,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,walletLinkUrl:e.walletLinkUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection}),e.onCancel&&u.h(b,{onClick:e.onCancel}))))};const g=e=>u.h("div",{class:"-walletlink-extension-dialog-box-top"},u.h("div",{class:"-walletlink-extension-dialog-box-top-install-region"},u.h("h2",null,"Try Coinbase Wallet extension"),u.h("button",{onClick:e.onInstallClick},"Install")),u.h("div",{class:"-walletlink-extension-dialog-box-top-info-region"},u.h(_,{icon:o.default,text:"Connect to crypto apps with one click"}),u.h(_,{icon:l.default,text:"Private keys remain secure on mobile app"}),u.h(_,{icon:a.default,text:"Compatible with all crypto apps"}))),f=e=>{const t=window.encodeURIComponent(e.walletLinkUrl),n=`${e.walletLinkUrl}/#/link?${e.isParentConnection?"parent-id":"id"}=${e.sessionId}&secret=${e.sessionSecret}&server=${t}&v=1`;return u.h("div",{class:"-walletlink-extension-dialog-box-bottom"},u.h("div",{class:"-walletlink-extension-dialog-box-bottom-description-region"},u.h("h2",null,"Or scan to connect"),u.h("body",{class:"-walletlink-extension-dialog-box-bottom-description"},"Open ",u.h("a",{href:"https://wallet.coinbase.com/"},"Coinbase Wallet")," on your mobile phone and scan")),u.h("div",{class:"-walletlink-extension-dialog-box-bottom-qr-region"},u.h("div",{class:"-walletlink-extension-dialog-box-bottom-qr-wrapper"},u.h(h.QRCode,{content:n,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:c.default,width:34,height:34}})),u.h("input",{type:"hidden",value:n}),!e.isConnected&&u.h("div",{class:"-walletlink-extension-dialog-box-bottom-qr-connecting"},u.h(p.Spinner,{size:36,color:"#000"}),u.h("p",null,"Connecting..."))))},_=e=>u.h("div",{class:"-walletlink-extension-dialog-box-top-description"},u.h("div",{class:"-walletlink-extension-dialog-box-top-description-icon-wrapper"},u.h("img",{src:e.icon})),u.h("body",{class:"-walletlink-extension-dialog-box-top-description-text"},e.text)),b=e=>u.h("button",{class:"-walletlink-extension-dialog-box-cancel",onClick:e.onClick},u.h("div",{class:"-walletlink-extension-dialog-box-cancel-x"}))},"4Mv7":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isServerMessageFail=void 0,t.isServerMessageFail=function(e){return e&&"Fail"===e.type&&"number"==typeof e.id&&"string"==typeof e.sessionId&&"string"==typeof e.error}},"4Uva":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionManager=void 0;const i=n("V5x4"),s=n("t7TP"),r=()=>{};t.SubscriptionManager=class{constructor(e){const t=new i({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:r}=s({blockTracker:t,provider:e});this.events=n,this.subscriptionMiddleware=r}async handleRequest(e){const t={};return await this.subscriptionMiddleware(e,t,r,r),t}destroy(){this.subscriptionMiddleware.destroy()}}},"4W9J":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelayAbstract=t.WALLET_USER_NAME_KEY=void 0,t.WALLET_USER_NAME_KEY="walletUsername",t.WalletLinkRelayAbstract=class{}},"5jSq":function(e,t){function n(e){this.mode=s.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,n=this.data.length;t<n;t++){var i=[],r=this.data.charCodeAt(t);r>65536?(i[0]=240|(1835008&r)>>>18,i[1]=128|(258048&r)>>>12,i[2]=128|(4032&r)>>>6,i[3]=128|63&r):r>2048?(i[0]=224|(61440&r)>>>12,i[1]=128|(4032&r)>>>6,i[2]=128|63&r):r>128?(i[0]=192|(1984&r)>>>6,i[1]=128|63&r):i[0]=r,this.parsedData.push(i)}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 i(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}n.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,n=this.parsedData.length;t<n;t++)e.put(this.parsedData[t],8)}},i.prototype={addData:function(e){var t=new n(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){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 s=0;s<this.moduleCount;s++)this.modules[n][s]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var i=-1;i<=7;i++)t+i<=-1||this.moduleCount<=t+i||(this.modules[e+n][t+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},getBestMaskPattern:function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var i=r.getLostPoint(this);(0==n||e>i)&&(e=i,t=n)}return t},createMovieClip:function(e,t,n){var i=e.createEmptyMovieClip(t,n);this.make();for(var s=0;s<this.modules.length;s++)for(var r=1*s,o=0;o<this.modules[s].length;o++){var a=1*o;this.modules[s][o]&&(i.beginFill(0,100),i.moveTo(a,r),i.lineTo(a+1,r),i.lineTo(a+1,r+1),i.lineTo(a,r+1),i.endFill())}return i},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=r.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var i=e[t],s=e[n];if(null==this.modules[i][s])for(var o=-2;o<=2;o++)for(var a=-2;a<=2;a++)this.modules[i+o][s+a]=-2==o||2==o||-2==a||2==a||0==o&&0==a}},setupTypeNumber:function(e){for(var t=r.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var i=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(n=0;n<18;n++)i=!e&&1==(t>>n&1),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i},setupTypeInfo:function(e,t){for(var n=r.getBCHTypeInfo(this.errorCorrectLevel<<3|t),i=0;i<15;i++){var s=!e&&1==(n>>i&1);i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(i=0;i<15;i++)s=!e&&1==(n>>i&1),i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s;this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var n=-1,i=this.moduleCount-1,s=7,o=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var l=0;l<2;l++)if(null==this.modules[i][a-l]){var c=!1;o<e.length&&(c=1==(e[o]>>>s&1)),r.getMask(t,i,a-l)&&(c=!c),this.modules[i][a-l]=c,-1==--s&&(o++,s=7)}if((i+=n)<0||this.moduleCount<=i){i-=n,n=-n;break}}}},i.PAD0=236,i.PAD1=17,i.createData=function(e,t,n){for(var s=c.getRSBlocks(e,t),o=new u,a=0;a<n.length;a++){var l=n[a];o.put(l.mode,4),o.put(l.getLength(),r.getLengthInBits(l.mode,e)),l.write(o)}var d=0;for(a=0;a<s.length;a++)d+=s[a].dataCount;if(o.getLengthInBits()>8*d)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*d+")");for(o.getLengthInBits()+4<=8*d&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*d||(o.put(i.PAD0,8),o.getLengthInBits()>=8*d));)o.put(i.PAD1,8);return i.createBytes(o,s)},i.createBytes=function(e,t){for(var n=0,i=0,s=0,o=new Array(t.length),a=new Array(t.length),c=0;c<t.length;c++){var u=t[c].dataCount,d=t[c].totalCount-u;i=Math.max(i,u),s=Math.max(s,d),o[c]=new Array(u);for(var h=0;h<o[c].length;h++)o[c][h]=255&e.buffer[h+n];n+=u;var p=r.getErrorCorrectPolynomial(d),g=new l(o[c],p.getLength()-1).mod(p);for(a[c]=new Array(p.getLength()-1),h=0;h<a[c].length;h++){var f=h+g.getLength()-a[c].length;a[c][h]=f>=0?g.get(f):0}}var _=0;for(h=0;h<t.length;h++)_+=t[h].totalCount;var b=new Array(_),w=0;for(h=0;h<i;h++)for(c=0;c<t.length;c++)h<o[c].length&&(b[w++]=o[c][h]);for(h=0;h<s;h++)for(c=0;c<t.length;c++)h<a[c].length&&(b[w++]=a[c][h]);return b};for(var s={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},r={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(e){for(var t=e<<10;r.getBCHDigit(t)-r.getBCHDigit(r.G15)>=0;)t^=r.G15<<r.getBCHDigit(t)-r.getBCHDigit(r.G15);return(e<<10|t)^r.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;r.getBCHDigit(t)-r.getBCHDigit(r.G18)>=0;)t^=r.G18<<r.getBCHDigit(t)-r.getBCHDigit(r.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return r.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case 0:return(t+n)%2==0;case 1:return t%2==0;case 2:return n%3==0;case 3:return(t+n)%3==0;case 4:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case 5:return t*n%2+t*n%3==0;case 6:return(t*n%2+t*n%3)%2==0;case 7:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new l([1],0),n=0;n<e;n++)t=t.multiply(new l([1,o.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case s.MODE_NUMBER:return 10;case s.MODE_ALPHA_NUM:return 9;case s.MODE_8BIT_BYTE:case s.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case s.MODE_NUMBER:return 12;case s.MODE_ALPHA_NUM:return 11;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case s.MODE_NUMBER:return 14;case s.MODE_ALPHA_NUM:return 13;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,i=0;i<t;i++)for(var s=0;s<t;s++){for(var r=0,o=e.isDark(i,s),a=-1;a<=1;a++)if(!(i+a<0||t<=i+a))for(var l=-1;l<=1;l++)s+l<0||t<=s+l||0==a&&0==l||o==e.isDark(i+a,s+l)&&r++;r>5&&(n+=3+r-5)}for(i=0;i<t-1;i++)for(s=0;s<t-1;s++){var c=0;e.isDark(i,s)&&c++,e.isDark(i+1,s)&&c++,e.isDark(i,s+1)&&c++,e.isDark(i+1,s+1)&&c++,0!=c&&4!=c||(n+=3)}for(i=0;i<t;i++)for(s=0;s<t-6;s++)e.isDark(i,s)&&!e.isDark(i,s+1)&&e.isDark(i,s+2)&&e.isDark(i,s+3)&&e.isDark(i,s+4)&&!e.isDark(i,s+5)&&e.isDark(i,s+6)&&(n+=40);for(s=0;s<t;s++)for(i=0;i<t-6;i++)e.isDark(i,s)&&!e.isDark(i+1,s)&&e.isDark(i+2,s)&&e.isDark(i+3,s)&&e.isDark(i+4,s)&&!e.isDark(i+5,s)&&e.isDark(i+6,s)&&(n+=40);var u=0;for(s=0;s<t;s++)for(i=0;i<t;i++)e.isDark(i,s)&&u++;return n+Math.abs(100*u/t/t-50)/5*10}},o={glog:function(e){if(e<1)throw new Error("glog("+e+")");return o.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return o.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},a=0;a<8;a++)o.EXP_TABLE[a]=1<<a;for(a=8;a<256;a++)o.EXP_TABLE[a]=o.EXP_TABLE[a-4]^o.EXP_TABLE[a-5]^o.EXP_TABLE[a-6]^o.EXP_TABLE[a-8];for(a=0;a<255;a++)o.LOG_TABLE[o.EXP_TABLE[a]]=a;function l(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var i=0;i<e.length-n;i++)this.num[i]=e[i+n]}function c(e,t){this.totalCount=e,this.dataCount=t}function u(){this.buffer=[],this.length=0}l.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<e.getLength();i++)t[n+i]^=o.gexp(o.glog(this.get(n))+o.glog(e.get(i)));return new l(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=o.glog(this.get(0))-o.glog(e.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<e.getLength();i++)n[i]^=o.gexp(o.glog(e.get(i))+t);return new l(n,0).mod(e)}},c.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]],c.getRSBlocks=function(e,t){var n=c.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var i=n.length/3,s=[],r=0;r<i;r++)for(var o=n[3*r+0],a=n[3*r+1],l=n[3*r+2],u=0;u<o;u++)s.push(new c(a,l));return s},c.getRsBlockTable=function(e,t){switch(t){case 1:return c.RS_BLOCK_TABLE[4*(e-1)+0];case 0:return c.RS_BLOCK_TABLE[4*(e-1)+1];case 3:return c.RS_BLOCK_TABLE[4*(e-1)+2];case 2:return c.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},u.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var d=[[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 h(e){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 e&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];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,s=function(e,t){for(var n=function(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}(e),i=1,s=0,r=0,o=d.length;r<=o;r++){var a=d[r];if(!a)throw new Error("Content too long: expected "+s+" but got "+n);switch(t){case"L":s=a[0];break;case"M":s=a[1];break;case"Q":s=a[2];break;case"H":s=a[3];break;default:throw new Error("Unknwon error correction level: "+t)}if(n<=s)break;i++}if(i>d.length)throw new Error("Content too long");return i}(n,this.options.ecl),r=function(e){switch(e){case"L":return 1;case"M":return 0;case"Q":return 3;case"H":return 2;default:throw new Error("Unknwon error correction level: "+e)}}(this.options.ecl);this.qrcode=new i(s,r),this.qrcode.addData(n),this.qrcode.make()}h.prototype.svg=function(e){var t=this.options||{},n=this.qrcode.modules;void 0===e&&(e={container:t.container||"svg"});for(var i=void 0===t.pretty||!!t.pretty,s=i?" ":"",r=i?"\r\n":"",o=t.width,a=t.height,l=n.length,c=o/(l+2*t.padding),u=a/(l+2*t.padding),d=void 0!==t.join&&!!t.join,h=void 0!==t.swap&&!!t.swap,p=void 0===t.xmlDeclaration||!!t.xmlDeclaration,g=void 0!==t.predefined&&!!t.predefined,f=g?s+'<defs><path id="qrmodule" d="M0 0 h'+u+" v"+c+' H0 z" style="fill:'+t.color+';shape-rendering:crispEdges;" /></defs>'+r:"",_=s+'<rect x="0" y="0" width="'+o+'" height="'+a+'" style="fill:'+t.background+';shape-rendering:crispEdges;"/>'+r,b="",w="",m=0;m<l;m++)for(var k=0;k<l;k++)if(n[k][m]){var y=k*c+t.padding*c,v=m*u+t.padding*u;if(h){var x=y;y=v,v=x}if(d){var M=c+y,S=u+v;y=Number.isInteger(y)?Number(y):y.toFixed(2),v=Number.isInteger(v)?Number(v):v.toFixed(2),M=Number.isInteger(M)?Number(M):M.toFixed(2),w+="M"+y+","+v+" V"+(S=Number.isInteger(S)?Number(S):S.toFixed(2))+" H"+M+" V"+v+" H"+y+" Z "}else b+=g?s+'<use x="'+y.toString()+'" y="'+v.toString()+'" href="#qrmodule" />'+r:s+'<rect x="'+y.toString()+'" y="'+v.toString()+'" width="'+c+'" height="'+u+'" style="fill:'+t.color+';shape-rendering:crispEdges;"/>'+r}d&&(b=s+'<path x="0" y="0" style="fill:'+t.color+';shape-rendering:crispEdges;" d="'+w+'" />');let E="";if(void 0!==this.options.image&&this.options.image.svg){const e=o*this.options.image.width/100,t=a*this.options.image.height/100;E+=`<svg x="${o/2-e/2}" y="${a/2-t/2}" width="${e}" height="${t}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,E+=this.options.image.svg+r,E+="</svg>"}var C="";switch(e.container){case"svg":p&&(C+='<?xml version="1.0" standalone="yes"?>'+r),C+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+a+'">'+r,C+=f+_+b,C+=E,C+="</svg>";break;case"svg-viewbox":p&&(C+='<?xml version="1.0" standalone="yes"?>'+r),C+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+a+'">'+r,C+=f+_+b,C+=E,C+="</svg>";break;case"g":C+='<g width="'+o+'" height="'+a+'">'+r,C+=f+_+b,C+=E,C+="</g>";break;default:C+=(f+_+b+E).replace(/^\s+/,"")}return C},e.exports=h},"6RcL":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestMessage=void 0;const i=n("obTc");t.Web3RequestMessage=function(e){return Object.assign({type:i.RelayMessageType.WEB3_REQUEST},e)}},"7wIv":function(e,t,n){"use strict";var i;function s(e,t,n){if(!n||typeof n.value!==i.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+t+"> is not a method!");return{configurable:i.boolTrue,get:function(){var e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:i.boolTrue,writable:i.boolTrue}),e}}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.typeOfFunction="function",e.boolTrue=!0}(i||(i={})),t.bind=s,t.default=s},"853V":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='.-walletlink-css-reset .-walletlink-extension-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-extension-dialog-backdrop-hidden{opacity:0}.-walletlink-css-reset .-walletlink-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-walletlink-css-reset .-walletlink-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top{display:flex;flex-direction:row;background-color:#fff;border-radius:8px;overflow:hidden;min-height:300px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;background-color:#fafbfc}.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-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)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;color:#000;align-self:center}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;background-color:#fff;margin-top:8px}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-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)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-wrapper img{display:block}.-walletlink-css-reset .-walletlink-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)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;color:#000;margin-top:16px}.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-a,.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-b{background-color:#000}.-walletlink-css-reset .-walletlink-extension-dialog-container{display:block}.-walletlink-css-reset .-walletlink-extension-dialog-container-hidden{display:none}.-walletlink-css-reset .-walletlink-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px;color:#000}'},"8YYL":function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,(i=t.Web3Method||(t.Web3Method={})).requestEthereumAccounts="requestEthereumAccounts",i.signEthereumMessage="signEthereumMessage",i.signEthereumTransaction="signEthereumTransaction",i.submitEthereumTransaction="submitEthereumTransaction",i.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",i.scanQRCode="scanQRCode",i.arbitrary="arbitrary",i.childRequestEthereumAccounts="childRequestEthereumAccounts"},"976o":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;const i=n("qCKp"),s=n("kU1M");var r;!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(r=t.ConnectionState||(t.ConnectionState={})),t.RxWebSocket=class{constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.connectionStateSubject=new i.BehaviorSubject(r.DISCONNECTED),this.incomingDataSubject=new i.Subject,this.url=e.replace(/^http/,"ws")}connect(){return this.webSocket?i.throwError(new Error("webSocket object is not null")):new i.Observable(e=>{let t;try{this.webSocket=t=new this.WebSocketClass(this.url)}catch(n){return void e.error(n)}this.connectionStateSubject.next(r.CONNECTING),t.onclose=t=>{this.clearWebSocket(),e.error(new Error(`websocket error ${t.code}: ${t.reason}`)),this.connectionStateSubject.next(r.DISCONNECTED)},t.onopen=t=>{e.next(),e.complete(),this.connectionStateSubject.next(r.CONNECTED)},t.onmessage=e=>{this.incomingDataSubject.next(e.data)}}).pipe(s.take(1))}disconnect(){const{webSocket:e}=this;if(e){this.clearWebSocket(),this.connectionStateSubject.next(r.DISCONNECTED);try{e.close()}catch(t){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe(s.flatMap(e=>{let t;try{t=JSON.parse(e)}catch(n){return i.empty()}return i.of(t)}))}sendData(e){const{webSocket:t}=this;if(!t)throw new Error("websocket is not connected");t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}},"98+w":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterFromParam=t.FilterPolyfill=void 0;const i=n("p7SB"),s=n("oK5k"),r={jsonrpc:"2.0",id:0};function o(e){return{fromBlock:l(e.fromBlock),toBlock:l(e.toBlock),addresses:void 0===e.address?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}function a(e){const t={fromBlock:c(e.fromBlock),toBlock:c(e.toBlock),topics:e.topics};return null!==e.addresses&&(t.address=e.addresses),t}function l(e){if(void 0===e||"latest"===e||"pending"===e)return"latest";if("earliest"===e)return i.IntNumber(0);if(s.isHexString(e))return s.intNumberFromHexString(e);throw new Error(`Invalid block option: ${e}`)}function c(e){return"latest"===e?e:s.hexStringFromIntNumber(e)}function u(){return Object.assign(Object.assign({},r),{error:{code:-32e3,message:"filter not found"}})}function d(){return Object.assign(Object.assign({},r),{result:[]})}t.FilterPolyfill=class{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=i.IntNumber(1),this.provider=e}async newFilter(e){const t=o(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,t.fromBlock);return console.log(`Installing new log filter(${n}):`,t,"initial cursor position:",i),this.logFilters.set(n,t),this.setFilterTimeout(n),s.hexStringFromIntNumber(n)}async newBlockFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,t),this.blockFilters.add(e),this.setFilterTimeout(e),s.hexStringFromIntNumber(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,t),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),s.hexStringFromIntNumber(e)}uninstallFilter(e){const t=s.intNumberFromHexString(e);return console.log(`Uninstalling filter (${t})`),this.deleteFilter(t),!0}getFilterChanges(e){const t=s.intNumberFromHexString(e);return this.timeouts.has(t)&&this.setFilterTimeout(t),this.logFilters.has(t)?this.getLogFilterChanges(t):this.blockFilters.has(t)?this.getBlockFilterChanges(t):this.pendingTransactionFilters.has(t)?this.getPendingTransactionFilterChanges(t):Promise.resolve(u())}async getFilterLogs(e){const t=s.intNumberFromHexString(e),n=this.logFilters.get(t);return n?this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getLogs",params:[a(n)]})):u()}makeFilterId(){return i.IntNumber(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((t,n)=>{this.provider.sendAsync(e,(e,i)=>e?n(e):Array.isArray(i)||null==i?n(new Error(`unexpected response received: ${JSON.stringify(i)}`)):void t(i))})}deleteFilter(e){console.log(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const t=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!t)return u();const o=await this.getCurrentBlockHeight(),l="latest"===t.toBlock?o:t.toBlock;if(n>o)return d();if(n>t.toBlock)return d();console.log(`Fetching logs from ${n} to ${l} for filter ${e}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getLogs",params:[a(Object.assign(Object.assign({},t),{fromBlock:n,toBlock:l}))]}));if(Array.isArray(c.result)){const t=c.result.map(e=>s.intNumberFromHexString(e.blockNumber||"0x0")),r=Math.max(...t);if(r&&r>n){const t=i.IntNumber(r+1);console.log(`Moving cursor position for filter (${e}) from ${n} to ${t}`),this.cursors.set(e,t)}}return c}async getBlockFilterChanges(e){const t=this.cursors.get(e);if(!t)return u();const n=await this.getCurrentBlockHeight();if(t>n)return d();console.log(`Fetching blocks from ${t} to ${n} for filter (${e})`);const o=(await Promise.all(s.range(t,n+1).map(e=>this.getBlockHashByNumber(i.IntNumber(e))))).filter(e=>!!e),a=i.IntNumber(t+o.length);return console.log(`Moving cursor position for filter (${e}) from ${t} to ${a}`),this.cursors.set(e,a),Object.assign(Object.assign({},r),{result:o})}async getPendingTransactionFilterChanges(e){return Promise.resolve(d())}async setInitialCursorPosition(e,t){const n=await this.getCurrentBlockHeight(),i="number"==typeof t&&t>n?t:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const t=this.timeouts.get(e);t&&window.clearTimeout(t);const n=window.setTimeout(()=>{console.log(`Filter (${e}) timed out`),this.deleteFilter(e)},3e5);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_blockNumber",params:[]}));return s.intNumberFromHexString(s.ensureHexString(e))}async getBlockHashByNumber(e){const t=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getBlockByNumber",params:[s.hexStringFromIntNumber(e),!1]}));return t.result&&"string"==typeof t.result.hash?s.ensureHexString(t.result.hash):null}},t.filterFromParam=o},C4r1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAwLTUuNTIxIDBMNi44OSA1LjMzNWEzLjg5NCAzLjg5NCAwIDAwLTEuMDkgMy40MDRjLjA4My41MDYuMjY4IDEuMDExLjU1MyAxLjQ2Ni4xNTEuMjUzLjMzNi40NzIuNTM3LjY5MWwuNjIxLjYyNCAxLjE0MS0xLjE0Ni0uNjItLjYyNGEyLjEwNSAyLjEwNSAwIDAxLS40ODctLjc0MSAyLjM0IDIuMzQgMCAwMS41MDMtMi41MWwzLjIwNi0zLjIyYTIuMjkzIDIuMjkzIDAgMDEzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAwLS41NTQtLjY5bC0uNjItLjYyNC0xLjE0MiAxLjE0Ni42MjEuNjIzYy4yMTguMjIuMzg2LjQ4OS40ODcuNzU4LjMzNS44MjYuMTY3IDEuODItLjUwNCAyLjQ5NGwtMy4yMDUgMy4yMTlhMi4yOTMgMi4yOTMgMCAwMS0zLjI0IDAgMi4zMTYgMi4zMTYgMCAwMTAtMy4yNTJsMS41MjgtMS41MzRhNC44MTUgNC44MTUgMCAwMS0uMjg1LTIuMDA1bC0yLjM4MyAyLjM5M2EzLjkyNyAzLjkyNyAwIDAwMCA1LjU0NCAzLjkwOSAzLjkwOSAwIDAwNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAwMS4wOTEtMy40MDQgNC4yMTEgNC4yMTEgMCAwMC0uNTM3LTEuNDQ5eiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},CkXD:function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,(i=t.JSONRPCMethod||(t.JSONRPCMethod={})).eth_accounts="eth_accounts",i.eth_coinbase="eth_coinbase",i.net_version="net_version",i.eth_chainId="eth_chainId",i.eth_uninstallFilter="eth_uninstallFilter",i.eth_requestAccounts="eth_requestAccounts",i.eth_sign="eth_sign",i.eth_ecRecover="eth_ecRecover",i.personal_sign="personal_sign",i.personal_ecRecover="personal_ecRecover",i.eth_signTransaction="eth_signTransaction",i.eth_sendRawTransaction="eth_sendRawTransaction",i.eth_sendTransaction="eth_sendTransaction",i.eth_signTypedData_v1="eth_signTypedData_v1",i.eth_signTypedData_v2="eth_signTypedData_v2",i.eth_signTypedData_v3="eth_signTypedData_v3",i.eth_signTypedData_v4="eth_signTypedData_v4",i.eth_signTypedData="eth_signTypedData",i.walletlink_arbitrary="walletlink_arbitrary",i.eth_subscribe="eth_subscribe",i.eth_unsubscribe="eth_unsubscribe",i.eth_newFilter="eth_newFilter",i.eth_newBlockFilter="eth_newBlockFilter",i.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",i.eth_getFilterChanges="eth_getFilterChanges",i.eth_getFilterLogs="eth_getFilterLogs"},Clep:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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'},G0Bx:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkSdkUI=void 0;const i=n("16RA"),s=n("Ppv8"),r=n("Xy71"),o=n("i6jr");t.WalletLinkSdkUI=class extends i.WalletLinkUI{constructor(e){super(e),this.attached=!1,this.snackbar=new o.Snackbar({darkMode:e.darkMode}),this.linkFlow=new r.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,walletLinkUrl:e.walletLinkUrl,connected$:e.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("WalletLinkUI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-walletlink-css-reset",e.appendChild(t),this.linkFlow.attach(t),this.snackbar.attach(t),this.attached=!0,s.injectCssReset()}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}showConnecting(e){return this.snackbar.presentItem({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:e.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:e.onResetConnection}]})}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}}},IBgt:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestCanceledMessage=void 0;const i=n("obTc");t.Web3RequestCanceledMessage=function(e){return{type:i.RelayMessageType.WEB3_REQUEST_CANCELED,id:e}}},J5ZA:function(e,t,n){"use strict";n.r(t),n.d(t,"useState",function(){return f}),n.d(t,"useReducer",function(){return _}),n.d(t,"useEffect",function(){return b}),n.d(t,"useLayoutEffect",function(){return w}),n.d(t,"useRef",function(){return m}),n.d(t,"useImperativeHandle",function(){return k}),n.d(t,"useMemo",function(){return y}),n.d(t,"useCallback",function(){return v}),n.d(t,"useContext",function(){return x}),n.d(t,"useDebugValue",function(){return M}),n.d(t,"useErrorBoundary",function(){return S});var i,s,r,o=n("hh2p"),a=0,l=[],c=o.options.__b,u=o.options.__r,d=o.options.diffed,h=o.options.__c,p=o.options.unmount;function g(e,t){o.options.__h&&o.options.__h(s,e,a||t),a=0;var n=s.__H||(s.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function f(e){return a=1,_(R,e)}function _(e,t,n){var r=g(i++,2);return r.t=e,r.__c||(r.__=[n?n(t):R(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=s),r.__}function b(e,t){var n=g(i++,3);!o.options.__s&&L(n.__H,t)&&(n.__=e,n.__H=t,s.__H.__h.push(n))}function w(e,t){var n=g(i++,4);!o.options.__s&&L(n.__H,t)&&(n.__=e,n.__H=t,s.__h.push(n))}function m(e){return a=5,y(function(){return{current:e}},[])}function k(e,t,n){a=6,w(function(){"function"==typeof e?e(t()):e&&(e.current=t())},null==n?n:n.concat(e))}function y(e,t){var n=g(i++,7);return L(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function v(e,t){return a=8,y(function(){return e},t)}function x(e){var t=s.context[e.__c],n=g(i++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(s)),t.props.value):e.__}function M(e,t){o.options.useDebugValue&&o.options.useDebugValue(t?t(e):e)}function S(e){var t=g(i++,10),n=f();return t.__=e,s.componentDidCatch||(s.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function E(){l.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(A),e.__H.__h.forEach(I),e.__H.__h=[]}catch(s){e.__H.__h=[],o.options.__e(s,e.__v)}}),l=[]}o.options.__b=function(e){s=null,c&&c(e)},o.options.__r=function(e){u&&u(e),i=0;var t=(s=e.__c).__H;t&&(t.__h.forEach(A),t.__h.forEach(I),t.__h=[])},o.options.diffed=function(e){d&&d(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==l.push(t)&&r===o.options.requestAnimationFrame||((r=o.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(i),C&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);C&&(t=requestAnimationFrame(n))})(E)),s=void 0},o.options.__c=function(e,t){t.some(function(e){try{e.__h.forEach(A),e.__h=e.__h.filter(function(e){return!e.__||I(e)})}catch(r){t.some(function(e){e.__h&&(e.__h=[])}),t=[],o.options.__e(r,e.__v)}}),h&&h(e,t)},o.options.unmount=function(e){p&&p(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(A)}catch(e){o.options.__e(e,t.__v)}};var C="function"==typeof requestAnimationFrame;function A(e){var t=s;"function"==typeof e.__c&&e.__c(),s=t}function I(e){var t=s;e.__c=e.__(),s=t}function L(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function R(e,t){return"function"==typeof t?t(e):t}},KU7o:function(e,t,n){(function(t){const i=n("aYMp"),s=n("OZ/i");function r(e){return t.allocUnsafe(e).fill(0)}function o(e,t,n){const i=r(t);return e=a(e),n?e.length<t?(e.copy(i),i):e.slice(0,t):e.length<t?(e.copy(i,t-e.length),i):e.slice(-t)}function a(e){if(!t.isBuffer(e))if(Array.isArray(e))e=t.from(e);else if("string"==typeof e)e=l(e)?t.from((n=c(e)).length%2?"0"+n:n,"hex"):t.from(e);else if("number"==typeof e)e=intToBuffer(e);else if(null==e)e=t.allocUnsafe(0);else if(s.isBN(e))e=e.toArrayLike(t);else{if(!e.toArray)throw new Error("invalid type");e=t.from(e.toArray())}var n;return e}function l(e){return"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function c(e){return"string"==typeof e&&e.startsWith("0x")?e.slice(2):e}e.exports={zeros:r,setLength:o,setLengthRight:function(e,t){return o(e,t,!0)},isHexString:l,stripHexPrefix:c,toBuffer:a,bufferToHex:function(e){return"0x"+(e=a(e)).toString("hex")},keccak:function(e,t){return e=a(e),t||(t=256),i("keccak"+t).update(e).digest()}}}).call(this,n("tjlA").Buffer)},LMR0:function(e,t,n){"use strict";(function(e){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;const s=n("hh2p"),r=n("J5ZA"),o=i(n("5jSq"));t.QRCode=t=>{const[n,i]=r.useState("");return r.useEffect(()=>{var n,s;const r=new o.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=t.width)&&void 0!==n?n:256,height:null!==(s=t.height)&&void 0!==s?s:256,padding:0,image:t.image}),a=e.from(r.svg(),"utf8").toString("base64");i(`data:image/svg+xml;base64,${a}`)}),n?s.h("img",{src:n,alt:"QR Code"}):null}}).call(this,n("tjlA").Buffer)},MkKo:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkConnection=void 0;const i=n("qCKp"),s=n("kU1M"),r=n("p7SB"),o=n("jOtK"),a=n("976o"),l=n("4Mv7");t.WalletLinkConnection=class{constructor(e,t,n,o=WebSocket){this.sessionId=e,this.sessionKey=t,this.subscriptions=new i.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=r.IntNumber(1),this.connectedSubject=new i.BehaviorSubject(!1),this.linkedSubject=new i.BehaviorSubject(!1),this.sessionConfigSubject=new i.ReplaySubject(1);const l=new a.RxWebSocket(n+"/rpc",o);this.ws=l,this.subscriptions.add(l.connectionState$.pipe(s.skip(1),s.filter(e=>e===a.ConnectionState.DISCONNECTED&&!this.destroyed),s.delay(5e3),s.filter(e=>!this.destroyed),s.flatMap(e=>l.connect()),s.retry()).subscribe()),this.subscriptions.add(l.connectionState$.pipe(s.skip(2),s.switchMap(e=>i.iif(()=>e===a.ConnectionState.CONNECTED,this.authenticate().pipe(s.tap(e=>this.sendIsLinked()),s.tap(e=>this.sendGetSessionConfig()),s.map(e=>!0)),i.of(!1))),s.distinctUntilChanged(),s.catchError(e=>i.of(!1))).subscribe(e=>this.connectedSubject.next(e))),this.subscriptions.add(l.connectionState$.pipe(s.skip(1),s.switchMap(e=>i.iif(()=>e===a.ConnectionState.CONNECTED,i.timer(0,1e4)))).subscribe(e=>0===e?this.updateLastHeartbeat():this.heartbeat())),this.subscriptions.add(l.incomingData$.pipe(s.filter(e=>"h"===e)).subscribe(e=>this.updateLastHeartbeat())),this.subscriptions.add(l.incomingJSONData$.pipe(s.filter(e=>["IsLinkedOK","Linked"].includes(e.type))).subscribe(e=>{this.linkedSubject.next(e.linked||e.onlineGuests>0)})),this.subscriptions.add(l.incomingJSONData$.pipe(s.filter(e=>["GetSessionConfigOK","SessionConfigUpdated"].includes(e.type))).subscribe(e=>{this.sessionConfigSubject.next({webhookId:e.webhookId,webhookUrl:e.webhookUrl,metadata:e.metadata})}))}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.ws.connect().subscribe()}destroy(){this.subscriptions.unsubscribe(),this.ws.disconnect(),this.destroyed=!0}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe(s.filter(e=>e),s.take(1),s.map(()=>{}))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe(s.filter(e=>e),s.take(1),s.map(()=>{}))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe(s.filter(e=>"Event"===e.type&&"string"==typeof e.sessionId&&"string"==typeof e.eventId&&"string"==typeof e.event&&"string"==typeof e.data),s.map(e=>e))}setSessionMetadata(e,t){const n=o.ClientMessageSetSessionConfig({id:r.IntNumber(this.nextReqId++),sessionId:this.sessionId,metadata:{[e]:t}});return this.onceConnected$.pipe(s.flatMap(e=>this.makeRequest(n)),s.map(e=>{if(l.isServerMessageFail(e))throw new Error(e.error||"failed to set session metadata")}))}publishEvent(e,t,n=!1){const i=o.ClientMessagePublishEvent({id:r.IntNumber(this.nextReqId++),sessionId:this.sessionId,event:e,data:t,callWebhook:n});return this.onceLinked$.pipe(s.flatMap(e=>this.makeRequest(i)),s.map(e=>{if(l.isServerMessageFail(e))throw new Error(e.error||"failed to publish event");return e.eventId}))}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(e){}}makeRequest(e,t=6e4){const n=e.id;try{this.sendData(e)}catch(r){return i.throwError(r)}return this.ws.incomingJSONData$.pipe(s.timeoutWith(t,i.throwError(new Error(`request ${n} timed out`))),s.filter(e=>e.id===n),s.take(1))}authenticate(){const e=o.ClientMessageHostSession({id:r.IntNumber(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe(s.map(e=>{if(l.isServerMessageFail(e))throw new Error(e.error||"failed to authentcate")}))}sendIsLinked(){const e=o.ClientMessageIsLinked({id:r.IntNumber(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}sendGetSessionConfig(){const e=o.ClientMessageGetSessionConfig({id:r.IntNumber(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}},OoBR:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWeb3ResponseMessage=t.Web3ResponseMessage=void 0;const i=n("obTc");t.Web3ResponseMessage=function(e){return Object.assign({type:i.RelayMessageType.WEB3_RESPONSE},e)},t.isWeb3ResponseMessage=function(e){return e&&e.type===i.RelayMessageType.WEB3_RESPONSE}},PYje:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='@namespace svg "http://www.w3.org/2000/svg";.-walletlink-css-reset,.-walletlink-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:transparent;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}.-walletlink-css-reset *{box-sizing:border-box;display:initial;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-walletlink-css-reset [class*=container]{margin:0;padding:0}.-walletlink-css-reset style{display:none}'},Ppv8:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.injectCssReset=void 0;const s=i(n("PYje"));t.injectCssReset=function(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(s.default)),document.documentElement.appendChild(e)}},Py8h:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLink=t.WalletLinkProvider=void 0;const i=n("e7sy"),s=n("Yjll");var r=n("e7sy");Object.defineProperty(t,"WalletLinkProvider",{enumerable:!0,get:function(){return r.WalletLinkProvider}});var o=n("Yjll");Object.defineProperty(t,"WalletLink",{enumerable:!0,get:function(){return o.WalletLink}}),t.default=s.WalletLink,"undefined"!=typeof window&&(window.WalletLink=s.WalletLink,window.WalletLinkProvider=i.WalletLinkProvider)},UTEl:function(e,t,n){(function(t){const i=n("KU7o"),s=n("hLHX"),r={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"]},o={encodeData(e,n,r,o=!0){const a=["bytes32"],l=[this.hashType(e,r)];if(o){const c=(e,n,a)=>{if(void 0!==r[n])return["bytes32",null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":i.keccak(this.encodeData(n,a,r,o))];if(void 0===a)throw new Error(`missing value for field ${e} of type ${n}`);if("bytes"===n)return["bytes32",i.keccak(a)];if("string"===n)return"string"==typeof a&&(a=t.from(a,"utf8")),["bytes32",i.keccak(a)];if(n.lastIndexOf("]")===n.length-1){const t=n.slice(0,n.lastIndexOf("[")),r=a.map(n=>c(e,t,n));return["bytes32",i.keccak(s.rawEncode(r.map(([e])=>e),r.map(([,e])=>e)))]}return[n,a]};for(const t of r[e]){const[e,i]=c(t.name,t.type,n[t.name]);a.push(e),l.push(i)}}else for(const s of r[e]){let e=n[s.name];if(void 0!==e)if("bytes"===s.type)a.push("bytes32"),e=i.keccak(e),l.push(e);else if("string"===s.type)a.push("bytes32"),"string"==typeof e&&(e=t.from(e,"utf8")),e=i.keccak(e),l.push(e);else if(void 0!==r[s.type])a.push("bytes32"),e=i.keccak(this.encodeData(s.type,e,r,o)),l.push(e);else{if(s.type.lastIndexOf("]")===s.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");a.push(s.type),l.push(e)}}return s.rawEncode(a,l)},encodeType(e,t){let n="",i=this.findTypeDependencies(e,t).filter(t=>t!==e);i=[e].concat(i.sort());for(const s of i){if(!t[s])throw new Error("No type definition specified: "+s);n+=s+"("+t[s].map(({name:e,type:t})=>t+" "+e).join(",")+")"}return n},findTypeDependencies(e,t,n=[]){if(e=e.match(/^\w*/)[0],n.includes(e)||void 0===t[e])return n;n.push(e);for(const i of t[e])for(const e of this.findTypeDependencies(i.type,t,n))!n.includes(e)&&n.push(e);return n},hashStruct(e,t,n,s=!0){return i.keccak(this.encodeData(e,t,n,s))},hashType(e,t){return i.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const n in r.properties)e[n]&&(t[n]=e[n]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,n=!0){const s=this.sanitizeData(e),r=[t.from("1901","hex")];return r.push(this.hashStruct("EIP712Domain",s.domain,s.types,n)),"EIP712Domain"!==s.primaryType&&r.push(this.hashStruct(s.primaryType,s.message,s.types,n)),i.keccak(t.concat(r))}};e.exports={TYPED_MESSAGE_SCHEMA:r,TypedDataUtils:o,hashForSignTypedDataLegacy:function(e){return function(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!e.length)throw t;const n=e.map(function(e){return"bytes"===e.type?i.toBuffer(e.value):e.value}),r=e.map(function(e){return e.type}),o=e.map(function(e){if(!e.name)throw t;return e.type+" "+e.name});return s.soliditySHA3(["bytes32","bytes32"],[s.soliditySHA3(new Array(e.length).fill("string"),o),s.soliditySHA3(r,n)])}(e.data)},hashForSignTypedData_v3:function(e){return o.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return o.hash(e.data)}}}).call(this,n("tjlA").Buffer)},UUbE:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelayEventManager=void 0;const i=n("oK5k");t.WalletLinkRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=i.prepend0x(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}},WCWn:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMXptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwMTIuNSAwYzAgLjUxLS4zMS45NS0uNzUgMS4xNHpNNS42NyA2VjQuMzNDNS42NyAzLjA1IDYuNzEgMiA4IDJzMi4zMyAxLjA1IDIuMzMgMi4zM1Y2aDJWNC4zM0MxMi4zMyAxLjk0IDEwLjM5IDAgOCAwUzMuNjcgMS45NCAzLjY3IDQuMzNWNmgyeiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},Xy71:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkFlow=void 0;const i=n("hh2p"),s=n("qCKp"),r=n("/aAL"),o=n("kU1M"),a=n("1vXP");t.LinkFlow=class{constructor(e){this.extensionUI$=new s.BehaviorSubject({}),this.subscriptions=new s.Subscription,this.isConnected=!1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.walletLinkUrl=e.walletLinkUrl,this.isParentConnection=e.isParentConnection,this.connected$=e.connected$,fetch("https://api.wallet.coinbase.com/rpc/v2/getFeatureFlags").then(e=>e.json()).then(e=>{const t=e.result.desktop.extension_ui;this.extensionUI$.next(void 0===t?{value:!1}:{value:t})}).catch(e=>{this.extensionUI$.next({value:!1})})}attach(e){this.root=document.createElement("div"),this.root.className="-walletlink-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe(e=>{this.isConnected!==e&&(this.isConnected=e,this.render())}))}detach(){var e;this.root&&(this.subscriptions.unsubscribe(),i.render(null,this.root),null===(e=this.root.parentElement)||void 0===e||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const e=this.extensionUI$.pipe(o.first(e=>void 0!==e.value)).subscribe(e=>{this.root&&i.render(e.value?i.h(a.TryExtensionLinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,walletLinkUrl:this.walletLinkUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel,connectDisabled:this.connectDisabled}):i.h(r.LinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,walletLinkUrl:this.walletLinkUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel}),this.root)});this.subscriptions.add(e)}}},YQXw:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOHptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNXpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNXpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOXpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1ek0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwMTIuMDkgOXptOC45NyA0LjE1Yy40OC0xLjE1LjgxLTIuNTguOTEtNC4xNWgxLjk0YTUuOTk4IDUuOTk4IDAgMDEtMi44NSA0LjE1eiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},Yjll:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLink=void 0;const i=n("Zozw"),s=n("e7sy"),r=n("G0Bx"),o=n("ZmYy"),a=n("UUbE"),l=n("oK5k"),c=e.env.WALLETLINK_URL||"https://www.walletlink.org",u=e.env.WALLETLINK_VERSION||n("oY2H").version||"unknown";class d{constructor(e){this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;let t,n=e.walletLinkUrl||c;t=e.walletLinkUIConstructor?e.walletLinkUIConstructor:e=>new r.WalletLinkSdkUI(e),this._overrideIsMetaMask=void 0!==e.overrideIsMetaMask&&e.overrideIsMetaMask;const s=new URL(n);this._storage=new i.ScopedLocalStorage(`-walletlink:${s.protocol}//${s.host}`),this._storage.setItem("version",d.VERSION),void 0===window.walletLinkExtension&&(this._relayEventManager=new a.WalletLinkRelayEventManager,this._relay=new o.WalletLinkRelay({walletLinkUrl:n,version:u,darkMode:!!e.darkMode,walletLinkUIConstructor:t,storage:this._storage,relayEventManager:this._relayEventManager}),this.setAppInfo(e.appName,e.appLogoUrl),this._relay.attachUI())}makeWeb3Provider(e="",t=1){if(void 0!==window.walletLinkExtension)return"boolean"==typeof window.walletLinkExtension.isCipher&&window.walletLinkExtension.isCipher||window.walletLinkExtension.setProviderInfo(e,t),window.walletLinkExtension;const n=this._relay;if(!n||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||n.setConnectDisabled(!0),new s.WalletLinkProvider({relayProvider:()=>Promise.resolve(n),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,overrideIsMetaMask:this._overrideIsMetaMask})}setAppInfo(e,t){var n;this._appName=e||"DApp",this._appLogoUrl=t||l.getFavicon(),void 0!==window.walletLinkExtension?"boolean"==typeof window.walletLinkExtension.isCipher&&window.walletLinkExtension.isCipher||window.walletLinkExtension.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;void 0!==window.walletLinkExtension?window.walletLinkExtension.close():null===(e=this._relay)||void 0===e||e.resetAndReload()}}t.WalletLink=d,d.VERSION=u}).call(this,n("8oxB"))},ZK22:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;const i=n("qCKp"),s=n("kU1M"),r=n("oK5k"),o=n("bCcq"),a="session:id",l="session:secret",c="session:linked";class u{constructor(e,t,n,i){this._storage=e,this._id=t||r.randomBytesHex(16),this._secret=n||r.randomBytesHex(32);const s=o.sha256.create();s.update(`${this._id}, ${this._secret} WalletLink`),this._key=s.hex(),this._linked=!!i}static load(e){const t=e.getItem(a),n=e.getItem(c),i=e.getItem(l);return t&&i?new u(e,t,i,"1"===n):null}static clear(e){e.removeItem(l),e.removeItem(a),e.removeItem(c)}static get persistedSessionIdChange$(){return i.fromEvent(window,"storage").pipe(s.filter(e=>e.key===a),s.map(e=>({oldValue:e.oldValue||null,newValue:e.newValue||null})))}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(a,this._id),this._storage.setItem(l,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(c,this._linked?"1":"0")}}t.Session=u},ZmYy:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelay=void 0;const l=a(n("7wIv")),c=n("qCKp"),u=n("kU1M"),d=n("MkKo"),h=n("oK5k"),p=o(n("0zMk")),g=n("ZK22"),f=n("8YYL"),_=n("IBgt"),b=n("6RcL"),w=n("vFHP"),m=n("OoBR"),k=n("4W9J");class y{constructor(e){this.accountsCallback=null,this.chainIdCallback=null,this.jsonRpcUrlCallback=null,this.appName="",this.appLogoUrl=null,this.walletLinkUrl=e.walletLinkUrl,this.storage=e.storage,this.session=g.Session.load(e.storage)||new g.Session(e.storage).save(),this.relayEventManager=e.relayEventManager,this.connection=new d.WalletLinkConnection(this.session.id,this.session.key,this.walletLinkUrl),this.connection.incomingEvent$.pipe(u.filter(e=>"Web3Response"===e.event)).subscribe({next:this.handleIncomingEvent}),this.connection.sessionConfig$.pipe(u.filter(e=>!!e.metadata&&"1"===e.metadata.__destroyed)).subscribe({next:this.resetAndReload}),this.connection.sessionConfig$.pipe(u.filter(e=>e.metadata&&void 0!==e.metadata.WalletUsername)).pipe(u.mergeMap(e=>p.decrypt(e.metadata.WalletUsername,this.session.secret))).subscribe({next:e=>{this.storage.setItem(k.WALLET_USER_NAME_KEY,e)}}),this.connection.sessionConfig$.pipe(u.filter(e=>e.metadata&&void 0!==e.metadata.ChainId)).pipe(u.mergeMap(e=>p.decrypt(e.metadata.ChainId,this.session.secret))).pipe(u.distinctUntilChanged()).subscribe({next:e=>{this.chainIdCallback&&this.chainIdCallback(e)}}),this.connection.sessionConfig$.pipe(u.filter(e=>e.metadata&&void 0!==e.metadata.JsonRpcUrl)).pipe(u.mergeMap(e=>p.decrypt(e.metadata.JsonRpcUrl,this.session.secret))).pipe(u.distinctUntilChanged()).subscribe({next:e=>{this.jsonRpcUrlCallback&&this.jsonRpcUrlCallback(e)}}),this.connection.sessionConfig$.pipe(u.filter(e=>e.metadata&&void 0!==e.metadata.EthereumAddress)).pipe(u.mergeMap(e=>p.decrypt(e.metadata.EthereumAddress,this.session.secret))).subscribe({next:e=>{this.accountsCallback&&this.accountsCallback([e]),y.accountRequestCallbackIds.size>0&&(Array.from(y.accountRequestCallbackIds.values()).forEach(t=>{const n=m.Web3ResponseMessage({id:t,response:w.RequestEthereumAccountsResponse([e])});this.invokeCallback(Object.assign(Object.assign({},n),{id:t}))}),y.accountRequestCallbackIds.clear())}}),this.ui=e.walletLinkUIConstructor({walletLinkUrl:e.walletLinkUrl,version:e.version,darkMode:e.darkMode,session:this.session,connected$:this.connection.connected$}),this.connection.connect()}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe(u.timeout(1e3),u.catchError(e=>c.of(null))).subscribe(e=>{this.connection.destroy(),this.storage.clear(),this.ui.reloadUI()})}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}setStorageItem(e,t){this.storage.setItem(e,t)}childRequestEthereumAccounts(e,t,n,i,s){return this.sendChildRequest({method:f.Web3Method.childRequestEthereumAccounts,params:{sessionId:e,sessionSecret:t,appName:n,appLogoURL:i,appURL:s}})}requestEthereumAccounts(){return this.sendRequest({method:f.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}})}signEthereumMessage(e,t,n,i){return this.sendRequest({method:f.Web3Method.signEthereumMessage,params:{message:h.hexStringFromBuffer(e,!0),address:t,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:f.Web3Method.ethereumAddressFromSignedMessage,params:{message:h.hexStringFromBuffer(e,!0),signature:h.hexStringFromBuffer(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:f.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:h.bigIntStringFromBN(e.weiValue),data:h.hexStringFromBuffer(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?h.bigIntStringFromBN(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?h.bigIntStringFromBN(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?h.bigIntStringFromBN(e.gasPriceInWei):null,gasLimit:e.gasLimit?h.bigIntStringFromBN(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:f.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:h.bigIntStringFromBN(e.weiValue),data:h.hexStringFromBuffer(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?h.bigIntStringFromBN(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?h.bigIntStringFromBN(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?h.bigIntStringFromBN(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?h.bigIntStringFromBN(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:f.Web3Method.submitEthereumTransaction,params:{signedTransaction:h.hexStringFromBuffer(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:f.Web3Method.scanQRCode,params:{regExp:e}})}arbitraryRequest(e){return this.sendRequest({method:f.Web3Method.arbitrary,params:{data:e}})}sendChildRequest(e){return new Promise((t,n)=>{const i=h.randomBytesHex(8),s=b.Web3RequestMessage({id:i,request:e});this.publishEvent("Web3Request",s,!0).subscribe({next:e=>{t(w.ChildRequestEthereumAccountsResponse(e))},error:e=>{n(new Error(e.message))}})})}sendRequest(e){return new Promise((t,n)=>{var i;let s=null;const r=h.randomBytesHex(8),o=e.method===f.Web3Method.requestEthereumAccounts,a=()=>{this.publishWeb3RequestCanceledEvent(r),this.handleWeb3ResponseMessage(m.Web3ResponseMessage({id:r,response:w.ErrorResponse(e.method,"User rejected request")})),null==s||s()};if(o){const e=(null===(i=null===window||void 0===window?void 0:window.navigator)||void 0===i?void 0:i.userAgent)||null;if(e&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)){const e=window.location.href.split("?")[0];return void(window.location.href=`https://go.cb-w.com/xoXnYwQimhb?cb_url=${e}`)}this.ui.inlineAccountsResponse()?this.ui.requestEthereumAccounts({onCancel:a,onAccounts:e=>{this.handleWeb3ResponseMessage(m.Web3ResponseMessage({id:r,response:w.RequestEthereumAccountsResponse(e)}))}}):this.ui.requestEthereumAccounts({onCancel:a}),y.accountRequestCallbackIds.add(r)}else s=this.ui.showConnecting({onCancel:a,onResetConnection:this.resetAndReload});this.relayEventManager.callbacks.set(r,e=>{if(this.ui.hideRequestEthereumAccounts(),null==s||s(),e.errorMessage)return n(new Error(e.errorMessage));t(e)}),o&&this.ui.inlineAccountsResponse()||this.publishWeb3RequestEvent(r,e)})}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainIdCallback(e){this.chainIdCallback=e}setJsonRpcUrlCallback(e){this.jsonRpcUrlCallback=e}publishWeb3RequestEvent(e,t){const n=b.Web3RequestMessage({id:e,request:t});this.publishEvent("Web3Request",n,!0).subscribe({error:e=>{this.handleWeb3ResponseMessage(m.Web3ResponseMessage({id:n.id,response:{method:n.request.method,errorMessage:e.message}}))}})}publishWeb3RequestCanceledEvent(e){const t=_.Web3RequestCanceledMessage(e);this.publishEvent("Web3RequestCanceled",t,!1).subscribe()}publishEvent(e,t,n){const i=this.session.secret;return new c.Observable(e=>{p.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin})),i).then(t=>{e.next(t),e.complete()})}).pipe(u.mergeMap(t=>this.connection.publishEvent(e,t,n)))}handleIncomingEvent(e){try{p.decrypt(e.data,this.session.secret).pipe(u.map(e=>JSON.parse(e))).subscribe({next:e=>{const t=m.isWeb3ResponseMessage(e)?e:null;t&&this.handleWeb3ResponseMessage(t)}})}catch(t){return}}handleWeb3ResponseMessage(e){const{response:t}=e;if(w.isRequestEthereumAccountsResponse(t))return Array.from(y.accountRequestCallbackIds.values()).forEach(t=>this.invokeCallback(Object.assign(Object.assign({},e),{id:t}))),void y.accountRequestCallbackIds.clear();this.invokeCallback(e)}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}}y.accountRequestCallbackIds=new Set,r([l.default],y.prototype,"resetAndReload",null),r([l.default],y.prototype,"handleIncomingEvent",null),t.WalletLinkRelay=y},Zozw:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedLocalStorage=void 0,t.ScopedLocalStorage=class{constructor(e){this.scope=e}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);"string"==typeof i&&i.startsWith(e)&&t.push(i)}t.forEach(e=>localStorage.removeItem(e))}scopedKey(e){return`${this.scope}:${e}`}}},bCcq: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__("QvbP"),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(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(n){return new Sha256(t,!0).update(n)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<OUTPUT_TYPES.length;++n){var i=OUTPUT_TYPES[n];t[i]=createOutputMethod(i,e)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if("string"==typeof e)return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(null==e)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,t){return function(n,i){return new HmacSha256(n,t,!0).update(i)[e]()}},createHmacMethod=function(e){var t=createHmacOutputMethod("hex",e);t.create=function(t){return new HmacSha256(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<OUTPUT_TYPES.length;++n){var i=OUTPUT_TYPES[n];t[i]=createHmacOutputMethod(i,e)}return t};function Sha256(e,t){t?(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],e?(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=e}function HmacSha256(e,t,n){var i,s=typeof e;if("string"===s){var r,o=[],a=e.length,l=0;for(i=0;i<a;++i)(r=e.charCodeAt(i))<128?o[l++]=r:r<2048?(o[l++]=192|r>>6,o[l++]=128|63&r):r<55296||r>=57344?(o[l++]=224|r>>12,o[l++]=128|r>>6&63,o[l++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++i)),o[l++]=240|r>>18,o[l++]=128|r>>12&63,o[l++]=128|r>>6&63,o[l++]=128|63&r);e=o}else{if("object"!==s)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR)}e.length>64&&(e=new Sha256(t,!0).update(e).array());var c=[],u=[];for(i=0;i<64;++i){var d=e[i]||0;c[i]=92^d,u[i]=54^d}Sha256.call(this,t,n),this.update(u),this.oKeyPad=c,this.inner=!0,this.sharedMemory=n}Sha256.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR);t=!0}for(var i,s,r=0,o=e.length,a=this.blocks;r<o;){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),t)for(s=this.start;r<o&&s<64;++r)a[s>>2]|=e[r]<<SHIFT[3&s++];else for(s=this.start;r<o&&s<64;++r)(i=e.charCodeAt(r))<128?a[s>>2]|=i<<SHIFT[3&s++]:i<2048?(a[s>>2]|=(192|i>>6)<<SHIFT[3&s++],a[s>>2]|=(128|63&i)<<SHIFT[3&s++]):i<55296||i>=57344?(a[s>>2]|=(224|i>>12)<<SHIFT[3&s++],a[s>>2]|=(128|i>>6&63)<<SHIFT[3&s++],a[s>>2]|=(128|63&i)<<SHIFT[3&s++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++r)),a[s>>2]|=(240|i>>18)<<SHIFT[3&s++],a[s>>2]|=(128|i>>12&63)<<SHIFT[3&s++],a[s>>2]|=(128|i>>6&63)<<SHIFT[3&s++],a[s>>2]|=(128|63&i)<<SHIFT[3&s++]);this.lastByteIndex=s,this.bytes+=s-this.start,s>=64?(this.block=a[16],this.start=s-64,this.hash(),this.hashed=!0):this.start=s}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 e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e,t,n,i,s,r,o=this.h0,a=this.h1,l=this.h2,c=this.h3,u=this.h4,d=this.h5,h=this.h6,p=this.h7,g=this.blocks;for(e=16;e<64;++e)g[e]=g[e-16]+(((t=g[e-15])>>>7|t<<25)^(t>>>18|t<<14)^t>>>3)+g[e-7]+(((t=g[e-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)<<0;for(r=a&l,e=0;e<64;e+=4)this.first?(this.is224?(n=300032,p=(t=g[0]-1413257819)-150054599<<0,c=t+24177077<<0):(n=704751109,p=(t=g[0]-210244248)-1521486534<<0,c=t+143694565<<0),this.first=!1):(p=c+(t=p+((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&d^~u&h)+K[e]+g[e])<<0,c=t+(((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+((n=o&a)^o&l^r))<<0),h=l+(t=h+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&u^~p&d)+K[e+1]+g[e+1])<<0,l=t+(((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+((i=c&o)^c&a^n))<<0,d=a+(t=d+((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&p^~h&u)+K[e+2]+g[e+2])<<0,a=t+(((l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10))+((s=l&c)^l&o^i))<<0,u=o+(t=u+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&p)+K[e+3]+g[e+3])<<0,o=t+(((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+((r=a&l)^a&c^s))<<0;this.h0=this.h0+o<<0,this.h1=this.h1+a<<0,this.h2=this.h2+l<<0,this.h3=this.h3+c<<0,this.h4=this.h4+u<<0,this.h5=this.h5+d<<0,this.h6=this.h6+h<<0,this.h7=this.h7+p<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3,s=this.h4,r=this.h5,o=this.h6,a=this.h7,l=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[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[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[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[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]+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[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];return this.is224||(l+=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]),l},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3,s=this.h4,r=this.h5,o=this.h6,a=this.h7,l=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24&255,s>>16&255,s>>8&255,255&s,r>>24&255,r>>16&255,r>>8&255,255&r,o>>24&255,o>>16&255,o>>8&255,255&o];return this.is224||l.push(a>>24&255,a>>16&255,a>>8&255,255&a),l},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),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__("8oxB"),__webpack_require__("wg4m"))},bFFw:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='.-walletlink-css-reset .-walletlink-link-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-walletlink-css-reset .-walletlink-link-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.33);transition:opacity .25s}.-walletlink-css-reset .-walletlink-link-dialog-backdrop-hidden{opacity:0}.-walletlink-css-reset .-walletlink-link-dialog-box{display:flex;position:relative;flex-direction:column;background-color:#f6f6f6;border-radius:16px;box-shadow:0px 16px 24px rgba(0,0,0,.1),0px 0px 8px rgba(0,0,0,.05);transform:scale(1);transition:opacity .25s,transform .25s;overflow:hidden}.-walletlink-css-reset .-walletlink-link-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-walletlink-css-reset .-walletlink-link-dialog-box-content{padding:24px;text-align:center}.-walletlink-css-reset .-walletlink-link-dialog-box-content h3{display:block;margin-bottom:24px;text-align:left;text-transform:uppercase;font-size:22px;font-weight:bold;line-height:1.2;color:#000}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode{position:relative;display:block;margin-bottom:24px;background-color:#f6f6f6;padding:16px;border-radius:16px;box-shadow:4px 4px 8px rgba(0,0,0,.15),-8px -8px 8px #fff;overflow:hidden}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-wrapper{display:block;width:232px;height:232px;padding:4px;border-radius:4px;background:#f4f4f4;margin-bottom:16px}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-wrapper img{display:block;width:224px;height:224px}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode>p{display:block;color:gray;font-weight:bold;font-size:12px;text-align:center}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-connecting{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(246,246,246,.98)}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-connecting p{margin-top:16px;color:#333;font-size:12px;font-weight:bold}.-walletlink-css-reset .-walletlink-link-dialog-box-content a{text-align:center;cursor:pointer;transition:color .1s;font-size:14px}.-walletlink-css-reset .-walletlink-link-dialog-box-content a,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:link,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:visited{color:#999}.-walletlink-css-reset .-walletlink-link-dialog-box-content a:hover,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:active{color:#666;text-decoration:underline}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:24px;right:24px;width:24px;height:24px;border-radius:12px;background-color:#e7e7e7;cursor:pointer}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x{position:relative;display:block}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:2px;background-color:#999;transition:background-color .2s}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::before{transform:rotate(45deg)}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::after{transform:rotate(135deg)}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-a,.-walletlink-css-reset .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-b{background-color:#000}.-walletlink-css-reset .-walletlink-link-dialog-container{display:block}.-walletlink-css-reset .-walletlink-link-dialog-container-hidden{display:none}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box{background-color:#2a2a2a}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content h3{color:#ccc}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode{background-color:#2a2a2a;box-shadow:4px 4px 8px rgba(0,0,0,.5),-8px -8px 8px #343434}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode>p{color:#999}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode-connecting{background:rgba(42,42,42,.98)}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode-connecting p{color:#ddd}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:link,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:visited{color:#888}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:hover,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:active{color:#aaa}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel{background-color:#333}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel-x::after{background-color:#aaa}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x::after{background-color:#eee}'},e7sy:function(e,t,n){"use strict";(function(e){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkProvider=void 0;const s=i(n("OZ/i")),r=n("oK5k"),o=i(n("UTEl")),a=n("98+w"),l=n("CkXD"),c=n("1VPL"),u=i(n("Fj00")),d=n("4Uva"),h="Addresses";t.WalletLinkProvider=class extends u.default{constructor(e){super(),this._filterPolyfill=new a.FilterPolyfill(this),this._subscriptionManager=new d.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.isChainOverridden=!1,this._send=this.send,this._sendAsync=this.sendAsync,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.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.arbitraryRequest=this.arbitraryRequest.bind(this),this.childRequestEthereumAccounts=this.childRequestEthereumAccounts.bind(this),this._chainId=r.ensureIntNumber(e.chainId||1),this._jsonRpcUrl=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager;const t=r.prepend0x(this._chainId.toString(16));this.emit("connect",{chainIdStr:t});const n=this._storage.getItem(h);if(n){const e=n.split(" ");""!==e[0]&&(this._addresses=e,this.emit("accountsChanged",e))}this._subscriptionManager.events.on("notification",e=>{this.emit("message",{type:e.method,data:e.params})}),this._addresses.length>0&&this.initializeRelay()}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this._chainId.toString(10)}get chainId(){return r.prepend0x(this._chainId.toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this._jsonRpcUrl}get connected(){return!0}isConnected(){return!0}setProviderInfo(e,t){this.isChainOverridden||this.updateProviderInfo(e,t,!1)}updateProviderInfo(e,t,n){n&&(this.isChainOverridden=!0);const i=this._chainId;this._chainId=r.ensureIntNumber(t);const s=this._chainId!==i;this._jsonRpcUrl=e,!s&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this._chainId),this.hasMadeFirstChainChangedEmission=!0)}setAppInfo(e,t){this.initializeRelay().then(n=>n.setAppInfo(e,t))}async enable(){return this._addresses.length>0?this._addresses:await this._send(l.JSONRPCMethod.eth_requestAccounts)}close(){this.initializeRelay().then(e=>e.resetAndReload())}send(e,t){if("string"==typeof e){const n=e,i=Array.isArray(t)?t:void 0!==t?[t]:[];return this._sendRequestAsync({jsonrpc:"2.0",id:0,method:n,params:i}).then(e=>e.result)}return"function"==typeof t?this._sendAsync(e,t):Array.isArray(e)?e.map(e=>this._sendRequest(e)):this._sendRequest(e)}sendAsync(e,t){if("function"!=typeof t)throw new Error("callback is required");if(Array.isArray(e)){const n=t;return void this._sendMultipleRequestsAsync(e).then(e=>n(null,e)).catch(e=>n(e,null))}const n=t;this._sendRequestAsync(e).then(e=>n(null,e)).catch(e=>n(e,null))}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw c.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if("string"!=typeof t||0===t.length)throw c.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw c.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const i=void 0===n?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:i,jsonrpc:"2.0",id:s})).result}async scanQRCode(e){const t=await this.initializeRelay(),n=await t.scanQRCode(r.ensureRegExpString(e));if("string"!=typeof n.result)throw new Error("result was not a string");return n.result}async arbitraryRequest(e){const t=await this.initializeRelay(),n=await t.arbitraryRequest(e);if("string"!=typeof n.result)throw new Error("result was not a string");return n.result}async childRequestEthereumAccounts(e,t,n,i,s){const r=await this.initializeRelay();return await r.childRequestEthereumAccounts(e,t,n,i,s),!0}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){const t={jsonrpc:"2.0",id:e.id},{method:n}=e;if(t.result=this._handleSynchronousMethods(e),void 0===t.result)throw new Error(`WalletLink does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return t}_setAddresses(e){if(!Array.isArray(e))throw new Error("addresses is not an array");this._addresses=e.map(e=>r.ensureAddressString(e)),this.emit("accountsChanged",this._addresses),this._storage.setItem(h,e.join(" ")),window.dispatchEvent(new CustomEvent("walletlink:addresses",{detail:this._addresses}))}_sendRequestAsync(e){return new Promise((t,n)=>{try{const i=this._handleSynchronousMethods(e);if(void 0!==i)return t({jsonrpc:"2.0",id:e.id,result:i});const s=this._handleAsynchronousFilterMethods(e);if(void 0!==s)return void s.then(n=>t(Object.assign(Object.assign({},n),{id:e.id}))).catch(e=>n(e));const r=this._handleSubscriptionMethods(e);if(void 0!==r)return void r.then(n=>t({jsonrpc:"2.0",id:e.id,result:n.result})).catch(e=>n(e))}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(n=>t(Object.assign(Object.assign({},n),{id:e.id}))).catch(e=>n(e))})}_sendMultipleRequestsAsync(e){return Promise.all(e.map(e=>this._sendRequestAsync(e)))}_handleSynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case l.JSONRPCMethod.eth_accounts:return this._eth_accounts();case l.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case l.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case l.JSONRPCMethod.net_version:return this._net_version();case l.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}_handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case l.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case l.JSONRPCMethod.eth_sign:return this._eth_sign(n);case l.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case l.JSONRPCMethod.personal_sign:return this._personal_sign(n);case l.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case l.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case l.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case l.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case l.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case l.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case l.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case l.JSONRPCMethod.eth_signTypedData_v4:case l.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case l.JSONRPCMethod.walletlink_arbitrary:return this._walletlink_arbitrary(n)}if(!this._jsonRpcUrl)throw Error("Error: No jsonRpcUrl provided");return window.fetch(this._jsonRpcUrl,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{if(!e)throw c.ethErrors.rpc.parse({});const t=e,{error:n}=t;if(n)throw c.serializeError(n);return t})}_handleAsynchronousFilterMethods(e){const{method:t}=e,n=e.params||[];switch(t){case l.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case l.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case l.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case l.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case l.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case l.JSONRPCMethod.eth_subscribe:case l.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const t=r.ensureAddressString(e);return this._addresses.includes(t)}catch(t){}return!1}_ensureKnownAddress(e){if(!this._isKnownAddress(e))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(t){const n=t.from?r.ensureAddressString(t.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");return this._ensureKnownAddress(n),{fromAddress:n,toAddress:t.to?r.ensureAddressString(t.to):null,weiValue:null!=t.value?r.ensureBN(t.value):new s.default(0),data:t.data?r.ensureBuffer(t.data):e.alloc(0),nonce:null!=t.nonce?r.ensureIntNumber(t.nonce):null,gasPriceInWei:null!=t.gasPrice?r.ensureBN(t.gasPrice):null,maxFeePerGas:null!=t.maxFeePerGas?r.ensureBN(t.maxFeePerGas):null,maxPriorityFeePerGas:null!=t.maxPriorityFeePerGas?r.ensureBN(t.maxPriorityFeePerGas):null,gasLimit:null!=t.gas?r.ensureBN(t.gas):null,chainId:this._chainId}}_requireAuthorization(){if(0===this._addresses.length)throw c.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw c.ethErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,i){this._ensureKnownAddress(t);try{const s=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await s.signEthereumMessage(e,t,n,i)).result}}catch(s){if("string"==typeof s.message&&s.message.match(/(denied|rejected)/i))throw c.ethErrors.provider.userRejectedRequest("User denied message signature");throw s}}async _ethereumAddressFromSignedMessage(e,t,n){const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.ethereumAddressFromSignedMessage(e,t,n)).result}}_eth_accounts(){return this._addresses}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this._chainId.toString(10)}_eth_chainId(){return r.hexStringFromIntNumber(this._chainId)}async _eth_requestAccounts(){if(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()}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw c.ethErrors.provider.userRejectedRequest("User denied account authorization");throw t}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(e){this._requireAuthorization();const t=r.ensureAddressString(e[0]),n=r.ensureBuffer(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=r.ensureBuffer(e[0]),n=r.ensureBuffer(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=r.ensureBuffer(e[0]),n=r.ensureAddressString(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=r.ensureBuffer(e[0]),n=r.ensureBuffer(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await e.signEthereumTransaction(t)).result}}catch(n){if("string"==typeof n.message&&n.message.match(/(denied|rejected)/i))throw c.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_sendRawTransaction(e){const t=r.ensureBuffer(e[0]),n=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await n.submitEthereumTransaction(t,this._chainId)).result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await e.signAndSubmitEthereumTransaction(t)).result}}catch(n){if("string"==typeof n.message&&n.message.match(/(denied|rejected)/i))throw c.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=r.ensureParsedJSONObject(e[0]),n=r.ensureAddressString(e[1]);this._ensureKnownAddress(n);const i=o.default.hashForSignTypedDataLegacy({data:t}),s=JSON.stringify(t,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=r.ensureAddressString(e[0]),n=r.ensureParsedJSONObject(e[1]);this._ensureKnownAddress(t);const i=o.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=r.ensureAddressString(e[0]),n=r.ensureParsedJSONObject(e[1]);this._ensureKnownAddress(t);const i=o.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _walletlink_arbitrary(e){const t=e[0];if("string"!=typeof t)throw new Error("parameter must be a string");return{jsonrpc:"2.0",id:0,result:await this.arbitraryRequest(t)}}_eth_uninstallFilter(e){const t=r.ensureHexString(e[0]);return this._filterPolyfill.uninstallFilter(t)}async _eth_newFilter(e){const t=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(t)}}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(e){const t=r.ensureHexString(e[0]);return this._filterPolyfill.getFilterChanges(t)}_eth_getFilterLogs(e){const t=r.ensureHexString(e[0]);return this._filterPolyfill.getFilterLogs(t)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(e=>(e.setChainIdCallback(e=>{this.updateProviderInfo(this._jsonRpcUrl,parseInt(e,10),!0)}),e.setJsonRpcUrlCallback(e=>{this.updateProviderInfo(e,this._chainId,!0)}),this._relay=e,e))}}}).call(this,n("tjlA").Buffer)},hLHX:function(e,t,n){(function(t){const i=n("KU7o"),s=n("OZ/i");function r(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function o(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function a(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function l(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function c(e){var t=typeof e;if("string"===t)return i.isHexString(e)?new s(i.stripHexPrefix(e),16):new s(e,10);if("number"===t)return new s(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function u(e,n){var r,d,h,p;if("address"===e)return u("uint160",c(n));if("bool"===e)return u("uint8",n?1:0);if("string"===e)return u("bytes",new t(n,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if(void 0===n.length)throw new Error("Not an array?");if("dynamic"!==(r=l(e))&&0!==r&&n.length>r)throw new Error("Elements exceed array size: "+r);for(p in h=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof n&&(n=JSON.parse(n)),n)h.push(u(e,n[p]));if("dynamic"===r){var g=u("uint256",n.length);h.unshift(g)}return t.concat(h)}if("bytes"===e)return n=new t(n),h=t.concat([u("uint256",n.length),n]),n.length%32!=0&&(h=t.concat([h,i.zeros(32-n.length%32)])),h;if(e.startsWith("bytes")){if((r=o(e))<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return i.setLengthRight(n,32)}if(e.startsWith("uint")){if((r=o(e))%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if((d=c(n)).bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+d.bitLength());if(d<0)throw new Error("Supplied uint is negative");return d.toArrayLike(t,"be",32)}if(e.startsWith("int")){if((r=o(e))%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if((d=c(n)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+d.bitLength());return d.toTwos(256).toArrayLike(t,"be",32)}if(e.startsWith("ufixed")){if(r=a(e),(d=c(n))<0)throw new Error("Supplied ufixed is negative");return u("uint256",d.mul(new s(2).pow(new s(r[1]))))}if(e.startsWith("fixed"))return r=a(e),u("int256",c(n).mul(new s(2).pow(new s(r[1]))));throw new Error("Unsupported or invalid type: "+e)}function d(e){return"string"===e||"bytes"===e||"dynamic"===l(e)}function h(e,n){if(e.length!==n.length)throw new Error("Number of types are not matching the values");for(var s,a,l=[],u=0;u<e.length;u++){var d=r(e[u]),h=n[u];if("bytes"===d)l.push(h);else if("string"===d)l.push(new t(h,"utf8"));else if("bool"===d)l.push(new t(h?"01":"00","hex"));else if("address"===d)l.push(i.setLength(h,20));else if(d.startsWith("bytes")){if((s=o(d))<1||s>32)throw new Error("Invalid bytes<N> width: "+s);l.push(i.setLengthRight(h,s))}else if(d.startsWith("uint")){if((s=o(d))%8||s<8||s>256)throw new Error("Invalid uint<N> width: "+s);if((a=c(h)).bitLength()>s)throw new Error("Supplied uint exceeds width: "+s+" vs "+a.bitLength());l.push(a.toArrayLike(t,"be",s/8))}else{if(!d.startsWith("int"))throw new Error("Unsupported or invalid type: "+d);if((s=o(d))%8||s<8||s>256)throw new Error("Invalid int<N> width: "+s);if((a=c(h)).bitLength()>s)throw new Error("Supplied int exceeds width: "+s+" vs "+a.bitLength());l.push(a.toTwos(s).toArrayLike(t,"be",s/8))}}return t.concat(l)}e.exports={rawEncode:function(e,n){var i=[],s=[],o=32*e.length;for(var a in e){var l=r(e[a]),c=u(l,n[a]);d(l)?(i.push(u("uint256",o)),s.push(c),o+=c.length):i.push(c)}return t.concat(i.concat(s))},solidityPack:h,soliditySHA3:function(e,t){return i.keccak(h(e,t))}}}).call(this,n("tjlA").Buffer)},hh2p:function(e,t,n){"use strict";n.r(t),n.d(t,"render",function(){return B}),n.d(t,"hydrate",function(){return U}),n.d(t,"createElement",function(){return _}),n.d(t,"h",function(){return _}),n.d(t,"Fragment",function(){return m}),n.d(t,"createRef",function(){return w}),n.d(t,"isValidElement",function(){return o}),n.d(t,"Component",function(){return k}),n.d(t,"cloneElement",function(){return F}),n.d(t,"createContext",function(){return W}),n.d(t,"toChildArray",function(){return C}),n.d(t,"options",function(){return s});var i,s,r,o,a,l,c,u,d={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function g(e,t){for(var n in t)e[n]=t[n];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function _(e,t,n){var s,r,o,a={};for(o in t)"key"==o?s=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return b(e,a,s,r,null)}function b(e,t,n,i,o){var a={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++r:o};return null!=s.vnode&&s.vnode(a),a}function w(){return{current:null}}function m(e){return e.children}function k(e,t){this.props=e,this.context=t}function y(e,t){if(null==t)return e.__?y(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?y(e):null}function v(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return v(e)}}function x(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!M.__r++||c!==s.debounceRendering)&&((c=s.debounceRendering)||l)(M)}function M(){for(var e;M.__r=a.length;)e=a.sort(function(e,t){return e.__v.__b-t.__v.__b}),a=[],e.some(function(e){var t,n,i,s,r,o;e.__d&&(r=(s=(t=e).__v).__e,(o=t.__P)&&(n=[],(i=g({},s)).__v=s.__v+1,j(o,s,i,t.__n,void 0!==o.ownerSVGElement,null!=s.__h?[r]:null,n,null==r?y(s):r,s.__h),D(n,s),s.__e!=r&&v(s)))})}function S(e,t,n,i,s,r,o,a,l,c){var u,p,g,f,_,w,k,v=i&&i.__k||h,x=v.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(f=n.__k[u]=null==(f=t[u])||"boolean"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?b(null,f,null,null,f):Array.isArray(f)?b(m,{children:f},null,null,null):f.__b>0?b(f.type,f.props,f.key,null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(g=v[u])||g&&f.key==g.key&&f.type===g.type)v[u]=void 0;else for(p=0;p<x;p++){if((g=v[p])&&f.key==g.key&&f.type===g.type){v[p]=void 0;break}g=null}j(e,f,g=g||d,s,r,o,a,l,c),_=f.__e,(p=f.ref)&&g.ref!=p&&(k||(k=[]),g.ref&&k.push(g.ref,null,f),k.push(p,f.__c||_,f)),null!=_?(null==w&&(w=_),"function"==typeof f.type&&null!=f.__k&&f.__k===g.__k?f.__d=l=E(f,l,e):l=A(e,f,g,v,_,l),c||"option"!==n.type?"function"==typeof n.type&&(n.__d=l):e.value=""):l&&g.__e==l&&l.parentNode!=e&&(l=y(g))}for(n.__e=w,u=x;u--;)null!=v[u]&&("function"==typeof n.type&&null!=v[u].__e&&v[u].__e==n.__d&&(n.__d=y(i,u+1)),P(v[u],v[u]));if(k)for(u=0;u<k.length;u++)O(k[u],k[++u],k[++u])}function E(e,t,n){var i,s;for(i=0;i<e.__k.length;i++)(s=e.__k[i])&&(s.__=e,t="function"==typeof s.type?E(s,t,n):A(n,s,s,e.__k,s.__e,t));return t}function C(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some(function(e){C(e,t)}):t.push(e)),t}function A(e,t,n,i,s,r){var o,a,l;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==n||s!=r||null==s.parentNode)e:if(null==r||r.parentNode!==e)e.appendChild(s),o=null;else{for(a=r,l=0;(a=a.nextSibling)&&l<i.length;l+=2)if(a==s)break e;e.insertBefore(s,r),o=r}return void 0!==o?o:s.nextSibling}function I(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||p.test(t)?n:n+"px"}function L(e,t,n,i,s){var r;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||I(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||I(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?i||e.addEventListener(t,r?N:R,r):e.removeEventListener(t,r?N:R,r);else if("dangerouslySetInnerHTML"!==t){if(s)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function R(e){this.l[e.type+!1](s.event?s.event(e):e)}function N(e){this.l[e.type+!0](s.event?s.event(e):e)}function j(e,t,n,i,r,o,a,l,c){var u,d,h,p,f,_,b,w,y,v,x,M=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(c=n.__h,l=t.__e=n.__e,t.__h=null,o=[l]),(u=s.__b)&&u(t);try{e:if("function"==typeof M){if(w=t.props,y=(u=M.contextType)&&i[u.__c],v=u?y?y.props.value:u.__:i,n.__c?b=(d=t.__c=n.__c).__=d.__E:("prototype"in M&&M.prototype.render?t.__c=d=new M(w,v):(t.__c=d=new k(w,v),d.constructor=M,d.render=H),y&&y.sub(d),d.props=w,d.state||(d.state={}),d.context=v,d.__n=i,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=M.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=g({},d.__s)),g(d.__s,M.getDerivedStateFromProps(w,d.__s))),p=d.props,f=d.state,h)null==M.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==M.getDerivedStateFromProps&&w!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(w,v),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(w,d.__s,v)||t.__v===n.__v){d.props=w,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(w,d.__s,v),null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(p,f,_)})}d.context=v,d.props=w,d.state=d.__s,(u=s.__r)&&u(t),d.__d=!1,d.__v=t,d.__P=e,u=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(i=g(g({},i),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(p,f)),x=null!=u&&u.type===m&&null==u.key?u.props.children:u,S(e,Array.isArray(x)?x:[x],t,n,i,r,o,a,l,c),d.base=t.__e,t.__h=null,d.__h.length&&a.push(d),b&&(d.__E=d.__=null),d.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=T(n.__e,t,n,i,r,o,a,c);(u=s.diffed)&&u(t)}catch(e){t.__v=null,(c||null!=o)&&(t.__e=l,t.__h=!!c,o[o.indexOf(l)]=null),s.__e(e,t,n)}}function D(e,t){s.__c&&s.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){s.__e(e,t.__v)}})}function T(e,t,n,s,r,o,a,l){var c,u,h,p=n.props,g=t.props,_=t.type,b=0;if("svg"===_&&(r=!0),null!=o)for(;b<o.length;b++)if((c=o[b])&&(c===e||(_?c.localName==_:3==c.nodeType))){e=c,o[b]=null;break}if(null==e){if(null===_)return document.createTextNode(g);e=r?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,g.is&&g),o=null,l=!1}if(null===_)p===g||l&&e.data===g||(e.data=g);else{if(o=o&&i.call(e.childNodes),u=(p=n.props||d).dangerouslySetInnerHTML,h=g.dangerouslySetInnerHTML,!l){if(null!=o)for(p={},b=0;b<e.attributes.length;b++)p[e.attributes[b].name]=e.attributes[b].value;(h||u)&&(h&&(u&&h.__html==u.__html||h.__html===e.innerHTML)||(e.innerHTML=h&&h.__html||""))}if(function(e,t,n,i,s){var r;for(r in n)"children"===r||"key"===r||r in t||L(e,r,null,n[r],i);for(r in t)s&&"function"!=typeof t[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===t[r]||L(e,r,t[r],n[r],i)}(e,g,p,r,l),h)t.__k=[];else if(b=t.props.children,S(e,Array.isArray(b)?b:[b],t,n,s,r&&"foreignObject"!==_,o,a,o?o[0]:n.__k&&y(n,0),l),null!=o)for(b=o.length;b--;)null!=o[b]&&f(o[b]);l||("value"in g&&void 0!==(b=g.value)&&(b!==e.value||"progress"===_&&!b)&&L(e,"value",b,p.value,!1),"checked"in g&&void 0!==(b=g.checked)&&b!==e.checked&&L(e,"checked",b,p.checked,!1))}return e}function O(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){s.__e(e,n)}}function P(e,t,n){var i,r;if(s.unmount&&s.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||O(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){s.__e(e,t)}i.base=i.__P=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&P(i[r],t,"function"!=typeof e.type);n||null==e.__e||f(e.__e),e.__e=e.__d=void 0}function H(e,t,n){return this.constructor(e,n)}function B(e,t,n){var r,o,a;s.__&&s.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],j(t,e=(!r&&n||t).__k=_(m,null,[e]),o||d,d,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?i.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r),D(a,e)}function U(e,t){B(e,t,U)}function F(e,t,n){var s,r,o,a=g({},e.props);for(o in t)"key"==o?s=t[o]:"ref"==o?r=t[o]:a[o]=t[o];return arguments.length>2&&(a.children=arguments.length>3?i.call(arguments,2):n),b(e.type,a,s||e.key,r||e.ref,null)}function W(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(x)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}i=h.slice,s={__e:function(e,t){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&null!=i.getDerivedStateFromError&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),s=n.__d),s)return n.__E=n}catch(t){e=t}throw e}},r=0,o=function(e){return null!=e&&void 0===e.constructor},k.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=g({},this.state),"function"==typeof e&&(e=e(g({},n),this.props)),e&&g(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),x(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x(this))},k.prototype.render=m,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,M.__r=0,u=0},i6jr:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Snackbar=void 0;const s=i(n("iuhU")),r=n("hh2p"),o=n("J5ZA"),a=i(n("uc/Z"));t.Snackbar=class{constructor(e){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e.darkMode}attach(e){this.root=document.createElement("div"),this.root.className="-walletlink-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){const t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&r.render(r.h("div",null,r.h(l,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,t])=>r.h(c,Object.assign({},t,{key:e}))))),this.root)}};const l=e=>r.h("div",{class:s.default("-walletlink-snackbar-container")},r.h("style",null,a.default),r.h("div",{class:"-walletlink-snackbar"},e.children)),c=({message:e,menuItems:t})=>{const[n,i]=o.useState(!0),[a,l]=o.useState(!1);return o.useEffect(()=>{const e=[window.setTimeout(()=>{i(!1)},1),window.setTimeout(()=>{l(!0)},1e4)];return()=>{e.forEach(window.clearTimeout)}}),r.h("div",{class:s.default("-walletlink-snackbar-instance",n&&"-walletlink-snackbar-instance-hidden",a&&"-walletlink-snackbar-instance-expanded")},r.h("div",{class:"-walletlink-snackbar-instance-header",onClick:()=>{l(!a)}},r.h("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-walletlink-snackbar-instance-header-cblogo"}),r.h("div",{class:"-walletlink-snackbar-instance-header-message"},e),r.h("div",{class:"-gear-container"},!a&&r.h("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.h("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),r.h("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),t&&t.length>0&&r.h("div",{class:"-walletlink-snackbar-instance-menu"},t.map((e,t)=>r.h("div",{class:s.default("-walletlink-snackbar-instance-menu-item",e.isRed&&"-walletlink-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},r.h("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.h("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),r.h("span",{class:s.default("-walletlink-snackbar-instance-menu-item-info",e.isRed&&"-walletlink-snackbar-instance-menu-item-info-is-red")},e.info)))))}},iuhU:function(e,t,n){"use strict";function i(e){var t,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=i(e[t]))&&(s&&(s+=" "),s+=n);else for(t in e)e[t]&&(s&&(s+=" "),s+=t);return s}n.r(t),t.default=function(){for(var e,t,n=0,s="";n<arguments.length;)(e=arguments[n++])&&(t=i(e))&&(s&&(s+=" "),s+=t);return s}},jOtK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientMessagePublishEvent=t.ClientMessageSetSessionConfig=t.ClientMessageGetSessionConfig=t.ClientMessageIsLinked=t.ClientMessageHostSession=void 0,t.ClientMessageHostSession=function(e){return Object.assign({type:"HostSession"},e)},t.ClientMessageIsLinked=function(e){return Object.assign({type:"IsLinked"},e)},t.ClientMessageGetSessionConfig=function(e){return Object.assign({type:"GetSessionConfig"},e)},t.ClientMessageSetSessionConfig=function(e){return Object.assign({type:"SetSessionConfig"},e)},t.ClientMessagePublishEvent=function(e){return Object.assign({type:"PublishEvent"},e)}},oK5k:function(e,t,n){"use strict";(function(e){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getFavicon=t.range=t.isBigNumber=t.ensureParsedJSONObject=t.ensureBN=t.ensureRegExpString=t.ensureIntNumber=t.ensureBuffer=t.ensureAddressString=t.ensureEvenLengthHexString=t.ensureHexString=t.isHexString=t.prepend0x=t.strip0x=t.has0xPrefix=t.hexStringFromIntNumber=t.intNumberFromHexString=t.bigIntStringFromBN=t.hexStringFromBuffer=t.hexStringToUint8Array=t.uint8ArrayToHex=t.randomBytesHex=void 0;const s=i(n("OZ/i")),r=n("p7SB"),o=/^[0-9]*$/,a=/^[a-f0-9]*$/;function l(e){return[...e].map(e=>e.toString(16).padStart(2,"0")).join("")}function c(e){return e.startsWith("0x")||e.startsWith("0X")}function u(e){return c(e)?e.slice(2):e}function d(e){return c(e)?"0x"+e.slice(2):"0x"+e}function h(e){if("string"!=typeof e)return!1;const t=u(e).toLowerCase();return a.test(t)}function p(e,t=!1){if("string"==typeof e){const n=u(e).toLowerCase();if(a.test(n))return r.HexString(t?"0x"+n:n)}throw new Error(`"${e}" is not a hexadecimal string`)}function g(e,t=!1){let n=p(e,!1);return n.length%2==1&&(n=r.HexString("0"+n)),t?r.HexString("0x"+n):n}function f(e){if("number"==typeof e&&Number.isInteger(e))return r.IntNumber(e);if("string"==typeof e){if(o.test(e))return r.IntNumber(Number(e));if(h(e))return r.IntNumber(new s.default(g(e,!1),16).toNumber())}throw new Error(`Not an integer: ${e}`)}function _(e){if(null==e||"function"!=typeof e.constructor)return!1;const{constructor:t}=e;return"function"==typeof t.config&&"number"==typeof t.EUCLID}t.randomBytesHex=function(e){return l(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=l,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map(e=>parseInt(e,16)))},t.hexStringFromBuffer=function(e,t=!1){const n=e.toString("hex");return r.HexString(t?"0x"+n:n)},t.bigIntStringFromBN=function(e){return r.BigIntString(e.toString(10))},t.intNumberFromHexString=function(e){return r.IntNumber(new s.default(g(e,!1),16).toNumber())},t.hexStringFromIntNumber=function(e){return r.HexString("0x"+new s.default(e).toString(16))},t.has0xPrefix=c,t.strip0x=u,t.prepend0x=d,t.isHexString=h,t.ensureHexString=p,t.ensureEvenLengthHexString=g,t.ensureAddressString=function(e){if("string"==typeof e){const t=u(e).toLowerCase();if(h(t)&&40===t.length)return r.AddressString(d(t))}throw new Error(`Invalid Ethereum address: ${e}`)},t.ensureBuffer=function(t){if(e.isBuffer(t))return t;if("string"==typeof t){if(h(t)){const n=g(t,!1);return e.from(n,"hex")}return e.from(t,"utf8")}throw new Error(`Not binary data: ${t}`)},t.ensureIntNumber=f,t.ensureRegExpString=function(e){if(e instanceof RegExp)return r.RegExpString(e.toString());throw new Error(`Not a RegExp: ${e}`)},t.ensureBN=function(e){if(null!=e&&(s.default.isBN(e)||_(e)))return new s.default(e.toString(10),10);if("number"==typeof e)return new s.default(f(e));if("string"==typeof e){if(o.test(e))return new s.default(e,10);if(h(e))return new s.default(g(e,!1),16)}throw new Error(`Not an integer: ${e}`)},t.ensureParsedJSONObject=function(e){if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;throw new Error(`Not a JSON string or an object: ${e}`)},t.isBigNumber=_,t.range=function(e,t){return Array.from({length:t-e},(t,n)=>e+n)},t.getFavicon=function(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:n}=document.location,i=e?e.getAttribute("href"):null;return!i||i.startsWith("javascript:")?null:i.startsWith("http://")||i.startsWith("https://")||i.startsWith("data:")?i:i.startsWith("//")?t+i:`${t}//${n}${i}`}}).call(this,n("tjlA").Buffer)},oY2H:function(e){e.exports=JSON.parse('{"_args":[["[email protected]","/home/user/provable/astrodrop-eth/astrodrop-frontend"]],"_from":"[email protected]","_id":"[email protected]","_inBundle":false,"_integrity":"sha512-rIjQ0EE1tywiaaSwVF/RGChuYM9v6DQjoBwP4kPYWAxRCtBiOBlorVma/6pM0IOiybZEJvAVLtq1wJ78V7HBxw==","_location":"/walletlink","_phantomChildren":{"base64-js":"1.5.1","ieee754":"1.2.1","inherits":"2.0.4","is-arguments":"1.1.0","is-generator-function":"1.0.10","is-typed-array":"1.1.7","safe-buffer":"5.1.2","string_decoder":"1.1.1","util-deprecate":"1.0.2","which-typed-array":"1.1.6"},"_requested":{"type":"version","registry":true,"raw":"[email protected]","name":"walletlink","escapedName":"walletlink","rawSpec":"2.1.8","saveSpec":null,"fetchSpec":"2.1.8"},"_requiredBy":["/bnc-onboard"],"_resolved":"https://registry.npmjs.org/walletlink/-/walletlink-2.1.8.tgz","_spec":"2.1.8","_where":"/home/user/provable/astrodrop-eth/astrodrop-frontend","author":{"name":"Coinbase, Inc."},"bugs":{"url":"https://github.com/walletlink/walletlink/issues"},"dependencies":{"@metamask/safe-event-emitter":"2.0.0","bind-decorator":"^1.0.11","bn.js":"^5.1.1","buffer":"^6.0.3","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","rxjs":"^6.6.3","stream-browserify":"^3.0.0","util":"^0.12.4"},"description":"WalletLink JavaScript SDK","devDependencies":{"@types/bn.js":"^4.11.6","@types/node":"^14.14.20","browserify":"17.0.0","copy-webpack-plugin":"^6.4.1","core-js":"^3.8.2","jasmine":"3.8.0","karma":"^6.3.2","karma-browserify":"8.1.0","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","nodemon":"^2.0.6","raw-loader":"^4.0.2","regenerator-runtime":"^0.13.7","rxjs-tslint":"^0.1.7","sass":"^1.32.0","svgo":"^1.3.2","ts-jest":"^26.4.4","ts-loader":"^8.0.13","tslib":"^2.0.3","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-config-security":"^1.16.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^4.1.3","watchify":"4.0.0","webpack":"^5.49.0","webpack-cli":"^3.3.12","whatwg-fetch":"^3.5.0"},"engines":{"node":">= 10.0.0"},"homepage":"https://github.com/walletlink/walletlink#readme","keywords":["cipher","cipherbrowser","coinbase","coinbasewallet","eth","ether","ethereum","etherium","injection","toshi","wallet","walletlink","web3"],"license":"Apache-2.0","main":"dist/index.js","name":"walletlink","repository":{"type":"git","url":"git+https://github.com/walletlink/walletlink.git"},"scripts":{"build":"node compile-assets.js && webpack --config webpack.config.js","build-chrome":"webpack --config webpack.config.chrome.js","build-npm":"tsc -p ./tsconfig.build.json","build:dev":"export WALLETLINK_URL=\'http://localhost:3000\'; yarn build && yarn build-chrome","build:dev:watch":"nodemon -e \'ts,tsx,js,json,css,scss,svg\' --ignore \'src/**/*-css.ts\' --ignore \'src/**/*-svg.ts\' --watch src/ --watch chrome/ --exec \'yarn build:dev\'","build:prod":"yarn build && yarn build-chrome && 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":"tslint -p . \'src/**/*.ts{,x}\'","lint:watch":"nodemon -e ts,tsx,js,json,css,scss,svg --watch src/ --exec \'yarn tsc && yarn lint\'","test":"yarn build-npm && karma start","tsc":"tsc --noEmit --pretty"},"types":"dist/index.d.ts","version":"2.1.8"}')},obTc:function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.RelayMessageType=void 0,(i=t.RelayMessageType||(t.RelayMessageType={})).SESSION_ID_REQUEST="SESSION_ID_REQUEST",i.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",i.LINKED="LINKED",i.UNLINKED="UNLINKED",i.WEB3_REQUEST="WEB3_REQUEST",i.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",i.WEB3_RESPONSE="WEB3_RESPONSE"},p7SB:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0,t.OpaqueType=function(){return e=>e},t.HexString=e=>e,t.AddressString=e=>e,t.BigIntString=e=>e,t.IntNumber=function(e){return Math.floor(e)},t.RegExpString=e=>e},u8Fu:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-walletlink-css-reset .-walletlink-spinner{display:inline-block}.-walletlink-css-reset .-walletlink-spinner svg{display:inline-block;animation:2s linear infinite -walletlink-spinner-svg}.-walletlink-css-reset .-walletlink-spinner svg circle{animation:1.9s ease-in-out infinite both -walletlink-spinner-circle;display:block;fill:transparent;stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -walletlink-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -walletlink-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)}}"},"uc/Z":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-walletlink-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}.-walletlink-css-reset .-gear-container *{user-select:none}.-walletlink-css-reset .-gear-container svg{opacity:0;position:absolute}.-walletlink-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-walletlink-css-reset .-walletlink-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-walletlink-css-reset .-walletlink-snackbar *{user-select:none}.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-walletlink-css-reset .-walletlink-snackbar-instance-header *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-walletlink-css-reset .-walletlink-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}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-walletlink-css-reset .-walletlink-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-walletlink-css-reset .-walletlink-snackbar-instance-expanded .-walletlink-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},vFHP:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChildRequestEthereumAccountsResponse=t.isRequestEthereumAccountsResponse=t.RequestEthereumAccountsResponse=t.ErrorResponse=void 0;const i=n("8YYL");t.ErrorResponse=function(e,t){return{method:e,errorMessage:t}},t.RequestEthereumAccountsResponse=function(e){return{method:i.Web3Method.requestEthereumAccounts,result:e}},t.isRequestEthereumAccountsResponse=function(e){return e&&e.method===i.Web3Method.requestEthereumAccounts},t.ChildRequestEthereumAccountsResponse=function(e){return{method:i.Web3Method.childRequestEthereumAccounts,result:e}}}}]);