From 9509ad0f683211ed418a5c61758cae9a449cca55 Mon Sep 17 00:00:00 2001 From: lassejaco Date: Tue, 23 Jan 2024 23:52:57 +0900 Subject: [PATCH] bump frontend deps --- pretix_eth/signals.py | 12 +- pretix_eth/static/pretix_eth/eth_plugin.css | 2 +- .../pretix_eth/web3modal-dist/manifest.json | 4 +- .../web3modal.0d8a283067a5e9dbd598.js | 5436 +++++++++++++++++ ...modal.0d8a283067a5e9dbd598.js.LICENSE.txt} | 18 + .../web3modal.177d8cabdae10dcc5990.js | 1 - .../web3modal.30b71e763c28fe96ef2e.js | 1 + .../web3modal.4411707096ff89c614b4.js | 2 - .../static/pretix_eth/web3modal/package.json | 7 +- .../static/pretix_eth/web3modal/src/chains.js | 3 +- .../static/pretix_eth/web3modal/src/core.js | 43 +- .../pretix_eth/web3modal/src/interface.js | 2 +- .../pretix_eth/web3modal/src/web3modal.js | 41 +- .../static/pretix_eth/web3modal/yarn.lock | 3924 ++++++++++++ .../templates/pretix_eth/web3modal.html | 2 +- 15 files changed, 9450 insertions(+), 48 deletions(-) create mode 100644 pretix_eth/static/pretix_eth/web3modal-dist/web3modal.0d8a283067a5e9dbd598.js rename pretix_eth/static/pretix_eth/web3modal-dist/{web3modal.4411707096ff89c614b4.js.LICENSE.txt => web3modal.0d8a283067a5e9dbd598.js.LICENSE.txt} (80%) delete mode 100644 pretix_eth/static/pretix_eth/web3modal-dist/web3modal.177d8cabdae10dcc5990.js create mode 100644 pretix_eth/static/pretix_eth/web3modal-dist/web3modal.30b71e763c28fe96ef2e.js delete mode 100644 pretix_eth/static/pretix_eth/web3modal-dist/web3modal.4411707096ff89c614b4.js create mode 100644 pretix_eth/static/pretix_eth/web3modal/yarn.lock diff --git a/pretix_eth/signals.py b/pretix_eth/signals.py index e11de0c0..40a521c8 100644 --- a/pretix_eth/signals.py +++ b/pretix_eth/signals.py @@ -26,23 +26,27 @@ def signal_process_response(sender, request, response, **kwargs): h = _parse_csp(response['Content-Security-Policy']) _merge_csp(h, { 'style-src': [ + 'https://fonts.googleapis.com', "'unsafe-inline'" ], 'img-src': [ - 'https://registry.walletconnect.com', - "https://explorer-api.walletconnect.com", - "https://*.bridge.walletconnect.org", + "blob: data:" ], 'script-src': [ # unsafe-inline/eval required for webpack bundles (we cannot know names in advance). "'unsafe-inline'", "'unsafe-eval'" ], + 'font-src': [ + "https://fonts.gstatic.com" + ], 'frame-src': [ - 'https://verify.walletconnect.com/' + 'https://verify.walletconnect.org', + 'https://verify.walletconnect.com' ], # Chrome correctly errors out without this CSP 'connect-src': [ + "https://api.web3modal.com", "wss://relay.walletconnect.com", "https://zkevm-rpc.com/", "https://explorer-api.walletconnect.com", diff --git a/pretix_eth/static/pretix_eth/eth_plugin.css b/pretix_eth/static/pretix_eth/eth_plugin.css index 128737f5..c1420720 100644 --- a/pretix_eth/static/pretix_eth/eth_plugin.css +++ b/pretix_eth/static/pretix_eth/eth_plugin.css @@ -94,7 +94,7 @@ button#uniswap_btn:hover { display: block; } -w3m-core-button { +w3m-button { display: block; margin-bottom: 10px; } diff --git a/pretix_eth/static/pretix_eth/web3modal-dist/manifest.json b/pretix_eth/static/pretix_eth/web3modal-dist/manifest.json index 86d827b9..76cd4a5b 100644 --- a/pretix_eth/static/pretix_eth/web3modal-dist/manifest.json +++ b/pretix_eth/static/pretix_eth/web3modal-dist/manifest.json @@ -1,4 +1,4 @@ { - "main.js": "/static/pretix_eth/web3modal-dist/web3modal.4411707096ff89c614b4.js", - "periodicCheck.js": "/static/pretix_eth/web3modal-dist/web3modal.177d8cabdae10dcc5990.js" + "main.js": "/static/pretix_eth/web3modal-dist/web3modal.0d8a283067a5e9dbd598.js", + "periodicCheck.js": "/static/pretix_eth/web3modal-dist/web3modal.30b71e763c28fe96ef2e.js" } \ No newline at end of file diff --git a/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.0d8a283067a5e9dbd598.js b/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.0d8a283067a5e9dbd598.js new file mode 100644 index 00000000..70216070 --- /dev/null +++ b/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.0d8a283067a5e9dbd598.js @@ -0,0 +1,5436 @@ +/*! For license information please see web3modal.0d8a283067a5e9dbd598.js.LICENSE.txt */ +(()=>{var e,t,r={9016:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletSDK=void 0;const n=r(2719),i=r(2704),o=r(9682),s=r(3143),a=r(3518),c=r(6570),l=r(7472),u=r(4643),h=r(3604);class d{constructor(e){var t,r,n;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const s=e.linkAPIUrl||i.LINK_API_URL;let u;if(u=e.uiConstructor?e.uiConstructor:e=>new a.WalletSDKUI(e),void 0===e.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(t=e.overrideIsCoinbaseWallet)||void 0===t||t,this._overrideIsCoinbaseBrowser=null!==(r=e.overrideIsCoinbaseBrowser)&&void 0!==r&&r,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this._diagnosticLogger={log:e.eventListener.onEvent}:this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=null===(n=e.reloadOnDisconnect)||void 0===n||n;const p=new URL(s),f=`${p.protocol}//${p.host}`;this._storage=new o.ScopedLocalStorage(`-walletlink:${f}`),this._storage.setItem("version",d.VERSION),this.walletExtension||this.coinbaseBrowser||(this._relayEventManager=new l.WalletSDKRelayEventManager,this._relay=new c.WalletSDKRelay({linkAPIUrl:s,version:h.LIB_VERSION,darkMode:!!e.darkMode,uiConstructor:u,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect}),this.setAppInfo(e.appName,e.appLogoUrl),e.headlessMode||this._relay.attachUI())}makeWeb3Provider(e="",t=1){const r=this.walletExtension;if(r)return this.isCipherProvider(r)||r.setProviderInfo(e,t),!1===this._reloadOnDisconnect&&"function"==typeof r.disableReloadOnDisconnect&&r.disableReloadOnDisconnect(),r;const n=this.coinbaseBrowser;if(n)return n;const i=this._relay;if(!i||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||i.setConnectDisabled(!0),new s.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(i),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,t){var r;this._appName=e||"DApp",this._appLogoUrl=t||(0,u.getFavicon)();const n=this.walletExtension;n?this.isCipherProvider(n)||n.setAppInfo(this._appName,this._appLogoUrl):null===(r=this._relay)||void 0===r||r.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;const t=this.walletExtension;t?t.close():null===(e=this._relay)||void 0===e||e.resetAndReload()}getQrUrl(){var e,t;return null!==(t=null===(e=this._relay)||void 0===e?void 0:e.getQRCodeUrl())&&void 0!==t?t:null}getCoinbaseWalletLogo(e,t=240){return(0,n.walletLogo)(e,t)}get walletExtension(){var e;return null!==(e=window.coinbaseWalletExtension)&&void 0!==e?e:window.walletLinkExtension}get coinbaseBrowser(){var e,t;try{const r=null!==(e=window.ethereum)&&void 0!==e?e:null===(t=window.top)||void 0===t?void 0:t.ethereum;if(!r)return;return"isCoinbaseBrowser"in r&&r.isCoinbaseBrowser?r:void 0}catch(e){return}}isCipherProvider(e){return"boolean"==typeof e.isCipher&&e.isCipher}}t.CoinbaseWalletSDK=d,d.VERSION=h.LIB_VERSION},2719:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletLogo=void 0,t.walletLogo=(e,t)=>{let r;switch(e){case"standard":default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`}}},8292:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-item.light.selected{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark.selected{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item.selected{border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"},5558:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseAppSteps=t.CoinbaseWalletSteps=t.ConnectItem=t.ConnectContent=void 0;const i=n(r(6010)),o=r(6400),s=r(396),a=r(4643),c=r(3604),l=r(7598),u=n(r(417)),h=n(r(2348)),d=r(8646),p=n(r(5666)),f=n(r(19)),g=r(7494),m=r(381),y=r(8727),w=n(r(8292)),b={"coinbase-wallet-app":{title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",icon:h.default,steps:E},"coinbase-app":{title:"Coinbase app",description:"Connect with your Coinbase account",icon:u.default,steps:x}},v=e=>"light"===e?"#FFFFFF":"#0A0B0D";function _({title:e,description:t,icon:r,selected:n,theme:s,onClick:a}){return(0,o.h)("div",{onClick:a,class:(0,i.default)("-cbwsdk-connect-item",s,{selected:n})},(0,o.h)("div",null,(0,o.h)("img",{src:r,alt:e})),(0,o.h)("div",{class:"-cbwsdk-connect-item-copy-wrapper"},(0,o.h)("h3",{class:"-cbwsdk-connect-item-title"},e),(0,o.h)("p",{class:"-cbwsdk-connect-item-description"},t)))}function E({theme:e}){return(0,o.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,o.h)("li",{class:(0,i.default)("-cbwsdk-wallet-steps-item",e)},(0,o.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,o.h)("li",{class:(0,i.default)("-cbwsdk-wallet-steps-item",e)},(0,o.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,o.h)("span",null,"Tap ",(0,o.h)("strong",null,"Scan")," "),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,o.h)(d.QRCodeIcon,{fill:v(e)})))))}function x({theme:e}){return(0,o.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,o.h)("li",{class:(0,i.default)("-cbwsdk-wallet-steps-item",e)},(0,o.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase app")),(0,o.h)("li",{class:(0,i.default)("-cbwsdk-wallet-steps-item",e)},(0,o.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,o.h)("span",null,"Tap ",(0,o.h)("strong",null,"More")),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,o.h)(g.StatusDotIcon,{fill:v(e)})),(0,o.h)("span",{class:"-cbwsdk-wallet-steps-pad-left"},"then ",(0,o.h)("strong",null,"Scan")),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,o.h)(d.QRCodeIcon,{fill:v(e)})))))}t.ConnectContent=function(e){const{theme:t}=e,[r,n]=(0,s.useState)("coinbase-wallet-app"),u=(0,s.useCallback)((e=>{n(e)}),[]),h=(0,a.createQrUrl)(e.sessionId,e.sessionSecret,e.linkAPIUrl,e.isParentConnection,e.version,e.chainId);if(!r)return null;const d=b[r].steps,g="coinbase-app"===r;return(0,o.h)("div",{"data-testid":"connect-content",class:(0,i.default)("-cbwsdk-connect-content",t)},(0,o.h)("style",null,w.default),(0,o.h)("div",{class:"-cbwsdk-connect-content-header"},(0,o.h)("h2",{class:(0,i.default)("-cbwsdk-connect-content-heading",t)},"Scan to connect with one of our mobile apps"),e.onCancel&&(0,o.h)("button",{type:"button",class:"-cbwsdk-cancel-button",onClick:e.onCancel},(0,o.h)(l.CloseIcon,{fill:"light"===t?"#0A0B0D":"#FFFFFF"}))),(0,o.h)("div",{class:"-cbwsdk-connect-content-layout"},(0,o.h)("div",{class:"-cbwsdk-connect-content-column-left"},(0,o.h)("div",null,Object.entries(b).map((([e,n])=>(0,o.h)(_,{key:e,title:n.title,description:n.description,icon:n.icon,selected:r===e,onClick:()=>u(e),theme:t})))),g&&(0,o.h)("div",{class:(0,i.default)("-cbwsdk-connect-content-update-app",t)},"Don’t see a ",(0,o.h)("strong",null,"Scan")," option? Update your Coinbase app to the latest version and try again.")),(0,o.h)("div",{class:"-cbwsdk-connect-content-column-right"},(0,o.h)("div",{class:"-cbwsdk-connect-content-qr-wrapper"},(0,o.h)(m.QRCode,{content:h,width:200,height:200,fgColor:"#000",bgColor:"transparent",image:{svg:(v=r,"coinbase-app"===v?p.default:f.default),width:25,height:25}}),(0,o.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:c.LIB_VERSION}),(0,o.h)("input",{type:"hidden",value:h})),(0,o.h)(d,{theme:t}),!e.isConnected&&(0,o.h)("div",{"data-testid":"connecting-spinner",class:(0,i.default)("-cbwsdk-connect-content-qr-connecting",t)},(0,o.h)(y.Spinner,{size:36,color:"dark"===t?"#FFF":"#000"}),(0,o.h)("p",null,"Connecting...")))));var v},t.ConnectItem=_,t.CoinbaseWalletSteps=E,t.CoinbaseAppSteps=x},6956:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"},8845:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectDialog=void 0;const i=n(r(6010)),o=r(6400),s=r(396),a=r(5558),c=r(6868),l=n(r(6956));t.ConnectDialog=e=>{const{isOpen:t,darkMode:r}=e,[n,u]=(0,s.useState)(!t),[h,d]=(0,s.useState)(!t);(0,s.useEffect)((()=>{const e=[window.setTimeout((()=>{d(!t)}),10)];return t?u(!1):e.push(window.setTimeout((()=>{u(!0)}),360)),()=>{e.forEach(window.clearTimeout)}}),[e.isOpen]);const p=r?"dark":"light";return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,o.h)("style",null,l.default),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-backdrop",p,h&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-cbwsdk-connect-dialog"},(0,o.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-box",h&&"-cbwsdk-connect-dialog-box-hidden")},e.connectDisabled?null:(0,o.h)(a.ConnectContent,{theme:p,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection,chainId:e.chainId,onCancel:e.onCancel}),(0,o.h)(c.TryExtensionContent,{theme:p}))))}},7759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkFlow=void 0;const n=r(6400),i=r(4143),o=r(8845);t.LinkFlow=class{constructor(e){this.extensionUI$=new i.BehaviorSubject({}),this.subscriptions=new i.Subscription,this.isConnected=!1,this.chainId=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.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection,this.connected$=e.connected$,this.chainId$=e.chainId$}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((e=>{this.isConnected!==e&&(this.isConnected=e,this.render())}))),this.subscriptions.add(this.chainId$.subscribe((e=>{this.chainId!==e&&(this.chainId=e,this.render())})))}detach(){var e;this.root&&(this.subscriptions.unsubscribe(),(0,n.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$.subscribe((()=>{this.root&&(0,n.render)((0,n.h)(o.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}));this.subscriptions.add(e)}}},381:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;const i=r(6400),o=r(396),s=n(r(7713));t.QRCode=e=>{const[t,r]=(0,o.useState)("");return(0,o.useEffect)((()=>{var t,n;const i=new s.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(t=e.width)&&void 0!==t?t:256,height:null!==(n=e.height)&&void 0!==n?n:256,padding:0,image:e.image}),o=Buffer.from(i.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${o}`)})),t?(0,i.h)("img",{src:t,alt:"QR Code"}):null}},4325:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},9199:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;const i=n(r(6010)),o=r(6400),s=r(396),a=n(r(4325));function c(e){return"coinbase-app"===e?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0LjY3NCAxOC44NThjLTIuMDQ1IDAtMy42NDgtMS43MjItMy42NDgtMy44NDVzMS42NTktMy44NDUgMy42NDgtMy44NDVjMS44MjQgMCAzLjMxNyAxLjM3NyAzLjU5MyAzLjIxNGgzLjcwM2MtLjMzMS0zLjk2LTMuNDgyLTcuMDU5LTcuMjk2LTcuMDU5LTQuMDM0IDAtNy4zNSAzLjQ0My03LjM1IDcuNjkgMCA0LjI0NiAzLjI2IDcuNjkgNy4zNSA3LjY5IDMuODcgMCA2Ljk2NS0zLjEgNy4yOTYtNy4wNTloLTMuNzAzYy0uMjc2IDEuODM2LTEuNzY5IDMuMjE0LTMuNTkzIDMuMjE0WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0wIDEwLjY3OGMwLTMuNzExIDAtNS41OTYuNzQyLTcuMDIzQTYuNTMyIDYuNTMyIDAgMCAxIDMuNjU1Ljc0MkM1LjA4MiAwIDYuOTY3IDAgMTAuNjc4IDBoNy45MzhjMy43MTEgMCA1LjU5NiAwIDcuMDIzLjc0MmE2LjUzMSA2LjUzMSAwIDAgMSAyLjkxMyAyLjkxM2MuNzQyIDEuNDI3Ljc0MiAzLjMxMi43NDIgNy4wMjN2Ny45MzhjMCAzLjcxMSAwIDUuNTk2LS43NDIgNy4wMjNhNi41MzEgNi41MzEgMCAwIDEtMi45MTMgMi45MTNjLTEuNDI3Ljc0Mi0zLjMxMi43NDItNy4wMjMuNzQyaC03LjkzOGMtMy43MTEgMC01LjU5NiAwLTcuMDIzLS43NDJhNi41MzEgNi41MzEgMCAwIDEtMi45MTMtMi45MTNDMCAyNC4yMTIgMCAyMi4zODQgMCAxOC42MTZ2LTcuOTM4WiIgZmlsbD0iIzAwNTJGRiIvPjxwYXRoIGQ9Ik0xNC42ODQgMTkuNzczYy0yLjcyNyAwLTQuODY0LTIuMjk1LTQuODY0LTUuMTI2IDAtMi44MzEgMi4yMS01LjEyNyA0Ljg2NC01LjEyNyAyLjQzMiAwIDQuNDIyIDEuODM3IDQuNzkgNC4yODVoNC45MzhjLS40NDItNS4yOC00LjY0My05LjQxMS05LjcyOC05LjQxMS01LjM4IDAtOS44MDIgNC41OS05LjgwMiAxMC4yNTMgMCA1LjY2MiA0LjM0OCAxMC4yNTMgOS44MDIgMTAuMjUzIDUuMTU5IDAgOS4yODYtNC4xMzIgOS43MjgtOS40MTFoLTQuOTM4Yy0uMzY4IDIuNDQ4LTIuMzU4IDQuMjg0LTQuNzkgNC4yODRaIiBmaWxsPSIjZmZmIi8+PC9zdmc+":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"}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="-cbwsdk-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&&(0,o.render)((0,o.h)("div",null,(0,o.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((([e,r])=>(0,o.h)(t.SnackbarInstance,Object.assign({},r,{key:e})))))),this.root)}},t.SnackbarContainer=e=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,o.h)("style",null,a.default),(0,o.h)("div",{class:"-cbwsdk-snackbar"},e.children)),t.SnackbarInstance=({autoExpand:e,message:t,menuItems:r,appSrc:n})=>{const[a,l]=(0,s.useState)(!0),[u,h]=(0,s.useState)(null!=e&&e);return(0,s.useEffect)((()=>{const e=[window.setTimeout((()=>{l(!1)}),1),window.setTimeout((()=>{h(!0)}),1e4)];return()=>{e.forEach(window.clearTimeout)}})),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",a&&"-cbwsdk-snackbar-instance-hidden",u&&"-cbwsdk-snackbar-instance-expanded")},(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{h(!u)}},(0,o.h)("img",{src:c(n),class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},t),(0,o.h)("div",{class:"-gear-container"},!u&&(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map(((e,t)=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,o.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info))))))}},2061:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},8727:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;const i=r(6400),o=n(r(2061));t.Spinner=e=>{var t;const r=null!==(t=e.size)&&void 0!==t?t:64,n=e.color||"#000";return(0,i.h)("div",{class:"-cbwsdk-spinner"},(0,i.h)("style",null,o.default),(0,i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))}},5157:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"},6868:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TryExtensionContent=void 0;const i=n(r(6010)),o=r(6400),s=r(396),a=r(9414),c=r(2467),l=r(5178),u=n(r(5157));t.TryExtensionContent=function({theme:e}){const[t,r]=(0,s.useState)(!1),n=(0,s.useCallback)((()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}),[]),h=(0,s.useCallback)((()=>{t?window.location.reload():(n(),r(!0))}),[n,t]);return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-try-extension",e)},(0,o.h)("style",null,u.default),(0,o.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,o.h)("h3",{class:(0,i.default)("-cbwsdk-try-extension-heading",e)},"Or try the Coinbase Wallet browser extension"),(0,o.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,o.h)("button",{class:(0,i.default)("-cbwsdk-try-extension-cta",e),onClick:h},t?"Refresh":"Install"),(0,o.h)("div",null,!t&&(0,o.h)(a.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:"light"===e?"#0052FF":"#588AF5"})))),(0,o.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,o.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,o.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,o.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,o.h)("span",{class:(0,i.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,o.h)(c.LaptopIcon,{fill:"light"===e?"#0A0B0D":"#FFFFFF"}))),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-try-extension-list-item-copy",e)},"Connect with dapps with just one click on your desktop browser")),(0,o.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,o.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,o.h)("span",{class:(0,i.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,o.h)(l.SafeIcon,{fill:"light"===e?"#0A0B0D":"#FFFFFF"}))),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-try-extension-list-item-copy",e)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}},9414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowLeftIcon=void 0;const n=r(6400);t.ArrowLeftIcon=function(e){return(0,n.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),(0,n.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}},7598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloseIcon=void 0;const n=r(6400);t.CloseIcon=function(e){return(0,n.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,n.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}},2467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaptopIcon=void 0;const n=r(6400);t.LaptopIcon=function(e){return(0,n.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,n.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,n.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}},8646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodeIcon=void 0;const n=r(6400);t.QRCodeIcon=function(e){return(0,n.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},e),(0,n.h)("path",{d:"M8.2271 1.77124L7.0271 1.77124V2.97124H8.2271V1.77124Z"}),(0,n.h)("path",{d:"M5.44922 0.199219L5.44922 4.54922L9.79922 4.54922V0.199219L5.44922 0.199219ZM8.89922 3.64922L6.34922 3.64922L6.34922 1.09922L8.89922 1.09922V3.64922Z"}),(0,n.h)("path",{d:"M2.97124 1.77124L1.77124 1.77124L1.77124 2.97124H2.97124V1.77124Z"}),(0,n.h)("path",{d:"M0.199219 4.54922L4.54922 4.54922L4.54922 0.199219L0.199219 0.199219L0.199219 4.54922ZM1.09922 1.09922L3.64922 1.09922L3.64922 3.64922L1.09922 3.64922L1.09922 1.09922Z"}),(0,n.h)("path",{d:"M2.97124 7.0271H1.77124L1.77124 8.2271H2.97124V7.0271Z"}),(0,n.h)("path",{d:"M0.199219 9.79922H4.54922L4.54922 5.44922L0.199219 5.44922L0.199219 9.79922ZM1.09922 6.34922L3.64922 6.34922L3.64922 8.89922H1.09922L1.09922 6.34922Z"}),(0,n.h)("path",{d:"M8.89922 7.39912H7.99922V5.40112H5.44922L5.44922 9.79912H6.34922L6.34922 6.30112H7.09922V8.29912H9.79922V5.40112H8.89922V7.39912Z"}),(0,n.h)("path",{d:"M7.99912 8.89917H7.09912V9.79917H7.99912V8.89917Z"}),(0,n.h)("path",{d:"M9.79917 8.89917H8.89917V9.79917H9.79917V8.89917Z"}))}},5666:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='\n \n \n \n \n \n'},19:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='\n \n \n \n \n \n \n'},5178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeIcon=void 0;const n=r(6400);t.SafeIcon=function(e){return(0,n.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}},7494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusDotIcon=void 0;const n=r(6400);t.StatusDotIcon=function(e){return(0,n.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},e),(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.29995 4.99995C2.29995 5.57985 1.82985 6.04995 1.24995 6.04995C0.670052 6.04995 0.199951 5.57985 0.199951 4.99995C0.199951 4.42005 0.670052 3.94995 1.24995 3.94995C1.82985 3.94995 2.29995 4.42005 2.29995 4.99995ZM4.99995 6.04995C5.57985 6.04995 6.04995 5.57985 6.04995 4.99995C6.04995 4.42005 5.57985 3.94995 4.99995 3.94995C4.42005 3.94995 3.94995 4.42005 3.94995 4.99995C3.94995 5.57985 4.42005 6.04995 4.99995 6.04995ZM8.74995 6.04995C9.32985 6.04995 9.79995 5.57985 9.79995 4.99995C9.79995 4.42005 9.32985 3.94995 8.74995 3.94995C8.17005 3.94995 7.69995 4.42005 7.69995 4.99995C7.69995 5.57985 8.17005 6.04995 8.74995 6.04995Z"}))}},417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMTQuMDM3IDE4LjkyNmMtMi43NSAwLTQuOTA3LTIuMjA1LTQuOTA3LTQuOTI2IDAtMi43MiAyLjIzLTQuOTI2IDQuOTA3LTQuOTI2YTQuODY2IDQuODY2IDAgMCAxIDQuODMzIDQuMTE4aDQuOTgyYy0uNDQ2LTUuMDczLTQuNjg0LTkuMDQ0LTkuODE1LTkuMDQ0QzguNjEgNC4xNDggNC4xNDkgOC41NiA0LjE0OSAxNHM0LjM4NyA5Ljg1MiA5Ljg5IDkuODUyYzUuMjA0IDAgOS4zNjgtMy45NyA5LjgxNC05LjA0M0gxOC44N2E0Ljg2NiA0Ljg2NiAwIDAgMS00LjgzMyA0LjExN1oiIGZpbGw9IiNmZmYiLz48L3N2Zz4="},2348:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMjMuODUyIDE0QTkuODM0IDkuODM0IDAgMCAxIDE0IDIzLjg1MiA5LjgzNCA5LjgzNCAwIDAgMSA0LjE0OCAxNCA5LjgzNCA5LjgzNCAwIDAgMSAxNCA0LjE0OCA5LjgzNCA5LjgzNCAwIDAgMSAyMy44NTIgMTRaIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTExLjE4NSAxMi41MDRjMC0uNDU2IDAtLjcxLjA5OC0uODYyLjA5OC0uMTUyLjE5Ni0uMzA0LjM0My0uMzU1LjE5Ni0uMTAyLjM5Mi0uMTAyLjg4MS0uMTAyaDIuOTg2Yy40OSAwIC42ODYgMCAuODgyLjEwMi4xNDYuMTAxLjI5My4yMDMuMzQyLjM1NS4wOTguMjAzLjA5OC40MDYuMDk4Ljg2MnYyLjk5MmMwIC40NTcgMCAuNzEtLjA5OC44NjMtLjA5OC4xNTItLjE5NS4zMDQtLjM0Mi4zNTUtLjE5Ni4xMDEtLjM5Mi4xMDEtLjg4Mi4xMDFoLTIuOTg2Yy0uNDkgMC0uNjg1IDAtLjg4LS4xMDEtLjE0OC0uMTAyLS4yOTUtLjIwMy0uMzQ0LS4zNTUtLjA5OC0uMjAzLS4wOTgtLjQwNi0uMDk4LS44NjN2LTIuOTkyWiIgZmlsbD0iIzAwNTJGRiIvPjwvc3ZnPg=="},8178:(e,t)=>{"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)}},2191:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVENTS=void 0,t.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;const n=r(4143),i=r(1717);var o;!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(o=t.ConnectionState||(t.ConnectionState={})),t.RxWebSocket=class{constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.connectionStateSubject=new n.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new n.Subject,this.url=e.replace(/^http/,"ws")}connect(){return this.webSocket?(0,n.throwError)(new Error("webSocket object is not null")):new n.Observable((e=>{let t;try{this.webSocket=t=new this.WebSocketClass(this.url)}catch(t){return void e.error(t)}this.connectionStateSubject.next(o.CONNECTING),t.onclose=t=>{this.clearWebSocket(),e.error(new Error(`websocket error ${t.code}: ${t.reason}`)),this.connectionStateSubject.next(o.DISCONNECTED)},t.onopen=t=>{e.next(),e.complete(),this.connectionStateSubject.next(o.CONNECTED)},t.onmessage=e=>{this.incomingDataSubject.next(e.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:e}=this;if(e){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{e.close()}catch(e){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((e=>{let t;try{t=JSON.parse(e)}catch(e){return(0,n.empty)()}return(0,n.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)}}},6156:(e,t)=>{"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}},8876:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKConnection=void 0;const n=r(4143),i=r(1717),o=r(3526),s=r(1295),a=r(8178),c=r(2191),l=r(179),u=r(6156);t.WalletSDKConnection=class{constructor(e,t,r,a,u=WebSocket){this.sessionId=e,this.sessionKey=t,this.diagnostic=a,this.subscriptions=new n.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,s.IntNumber)(1),this.connectedSubject=new n.BehaviorSubject(!1),this.linkedSubject=new n.BehaviorSubject(!1),this.sessionConfigSubject=new n.ReplaySubject(1);const h=new l.RxWebSocket(r+"/rpc",u);this.ws=h,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((t=>{var r;return null===(r=this.diagnostic)||void 0===r?void 0:r.log(c.EVENTS.CONNECTED_STATE_CHANGE,{state:t,sessionIdHash:o.Session.hash(e)})})),(0,i.skip)(1),(0,i.filter)((e=>e===l.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((e=>!this.destroyed)),(0,i.flatMap)((e=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((e=>(0,n.iif)((()=>e===l.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((e=>this.sendIsLinked())),(0,i.tap)((e=>this.sendGetSessionConfig())),(0,i.map)((e=>!0))),(0,n.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((e=>(0,n.of)(!1)))).subscribe((e=>this.connectedSubject.next(e)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((e=>(0,n.iif)((()=>e===l.ConnectionState.CONNECTED),(0,n.timer)(0,1e4))))).subscribe((e=>0===e?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((e=>"h"===e))).subscribe((e=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((e=>["IsLinkedOK","Linked"].includes(e.type)))).subscribe((t=>{var r;const n=t;null===(r=this.diagnostic)||void 0===r||r.log(c.EVENTS.LINKED,{sessionIdHash:o.Session.hash(e),linked:n.linked,type:t.type,onlineGuests:n.onlineGuests}),this.linkedSubject.next(n.linked||n.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((e=>["GetSessionConfigOK","SessionConfigUpdated"].includes(e.type)))).subscribe((t=>{var r;const n=t;null===(r=this.diagnostic)||void 0===r||r.log(c.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o.Session.hash(e),metadata_keys:n&&n.metadata?Object.keys(n.metadata):void 0}),this.sessionConfigSubject.next({webhookId:n.webhookId,webhookUrl:n.webhookUrl,metadata:n.metadata})})))}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");null===(e=this.diagnostic)||void 0===e||e.log(c.EVENTS.STARTED_CONNECTING,{sessionIdHash:o.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var e;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(e=this.diagnostic)||void 0===e||e.log(c.EVENTS.DISCONNECTED,{sessionIdHash:o.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,i.filter)((e=>e)),(0,i.take)(1),(0,i.map)((()=>{})))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,i.filter)((e=>e)),(0,i.take)(1),(0,i.map)((()=>{})))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,i.filter)((e=>{if("Event"!==e.type)return!1;const t=e;return"string"==typeof t.sessionId&&"string"==typeof t.eventId&&"string"==typeof t.event&&"string"==typeof t.data})),(0,i.map)((e=>e)))}setSessionMetadata(e,t){const r=(0,a.ClientMessageSetSessionConfig)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[e]:t}});return this.onceConnected$.pipe((0,i.flatMap)((e=>this.makeRequest(r))),(0,i.map)((e=>{if((0,u.isServerMessageFail)(e))throw new Error(e.error||"failed to set session metadata")})))}publishEvent(e,t,r=!1){const n=(0,a.ClientMessagePublishEvent)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:t,callWebhook:r});return this.onceLinked$.pipe((0,i.flatMap)((e=>this.makeRequest(n))),(0,i.map)((e=>{if((0,u.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 r=e.id;try{this.sendData(e)}catch(e){return(0,n.throwError)(e)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(t,(0,n.throwError)(new Error(`request ${r} timed out`))),(0,i.filter)((e=>e.id===r)),(0,i.take)(1))}authenticate(){const e=(0,a.ClientMessageHostSession)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,i.map)((e=>{if((0,u.isServerMessageFail)(e))throw new Error(e.error||"failed to authentcate")})))}sendIsLinked(){const e=(0,a.ClientMessageIsLinked)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}sendGetSessionConfig(){const e=(0,a.ClientMessageGetSessionConfig)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}},2704:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LINK_API_URL=void 0,t.LINK_API_URL="https://www.walletlink.org"},9621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const n=r(9826),i=r(7386),o=r(3604);t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},n.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},n.errorCodes.provider),{unsupportedChain:4902}))})),t.standardErrorMessage=function(e){return void 0!==e?(0,n.getMessageFromCode)(e):"Unknown error"},t.standardErrors=Object.freeze(Object.assign(Object.assign({},n.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},n.ethErrors.provider),{unsupportedChain:(e="")=>n.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${e}. Try adding the chain using wallet_addEthereumChain first.`})}))})),t.serializeError=function(e,r){const s=(0,n.serializeError)(function(e){return"string"==typeof e?{message:e,code:t.standardErrorCodes.rpc.internal}:(0,i.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method,result:e.result}}):e}(e),{shouldIncludeStack:!0}),a=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");a.searchParams.set("version",o.LIB_VERSION),a.searchParams.set("code",s.code.toString());const c=function(e,t){var r;const n=null===(r=e)||void 0===r?void 0:r.method;return n||(void 0===t?void 0:"string"==typeof t?t:Array.isArray(t)?t.length>0?t[0].method:void 0:t.method)}(s.data,r);return c&&a.searchParams.set("method",c),a.searchParams.set("message",s.message),Object.assign(Object.assign({},s),{docUrl:a.href})},t.getErrorCode=function(e){var t;return"number"==typeof e?e:function(e){return"object"==typeof e&&null!==e&&("number"==typeof e.code||"number"==typeof e.errorCode)}(e)?null!==(t=e.code)&&void 0!==t?t:e.errorCode:void 0}},5811:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=t.CoinbaseWalletSDK=void 0;const n=r(9016),i=r(3143);var o=r(9016);Object.defineProperty(t,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return o.CoinbaseWalletSDK}});var s=r(3143);Object.defineProperty(t,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return s.CoinbaseWalletProvider}}),t.default=n.CoinbaseWalletSDK,"undefined"!=typeof window&&(window.CoinbaseWalletSDK=n.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=n.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},9682:(e,t)=>{"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 r=0;rlocalStorage.removeItem(e)))}scopedKey(e){return`${this.scope}:${e}`}}},1119:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;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;counter-increment:none;counter-reset:none;direction:ltr;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;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;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";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;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;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'},7162:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.injectCssReset=void 0;const i=n(r(1119));t.injectCssReset=function(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(e)}},3143:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=void 0;const i=n(r(9394)),o=n(r(3550)),s=r(2191),a=r(9621),c=r(3526),l=r(5633),u=r(3083),h=r(7386),d=r(4643),p=n(r(4497)),f=r(3648),g=r(8565),m=r(5313),y="DefaultChainId",w="DefaultJsonRpcUrl";class b extends i.default{constructor(e){var t,r;super(),this._filterPolyfill=new f.FilterPolyfill(this),this._subscriptionManager=new m.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=null===(t=e.overrideIsCoinbaseWallet)||void 0===t||t,this.isCoinbaseBrowser=null!==(r=e.overrideIsCoinbaseBrowser)&&void 0!==r&&r,this.qrUrl=e.qrUrl;const n=this.getChainId(),i=(0,d.prepend0x)(n.toString(16));this.emit("connect",{chainIdStr:i});const o=this._storage.getItem(l.LOCAL_STORAGE_ADDRESSES_KEY);if(o){const e=o.split(" ");""!==e[0]&&(this._addresses=e.map((e=>(0,d.ensureAddressString)(e))),this.emit("accountsChanged",e))}this._subscriptionManager.events.on("notification",(e=>{this.emit("message",{type:e.method,data:e.params})})),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",(e=>{var t;if(e.origin===location.origin&&e.source===window&&"walletLinkMessage"===e.data.type){if("dappChainSwitched"===e.data.data.action){const r=e.data.data.chainId,n=null!==(t=e.data.data.jsonRpcUrl)&&void 0!==t?t:this.jsonRpcUrl;this.updateProviderInfo(n,Number(r))}"addressChanged"===e.data.data.action&&this._setAddresses([e.data.data.address])}}))}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,d.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return null!==(e=this._storage.getItem(w))&&void 0!==e?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(w,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,t){this.isCoinbaseBrowser||(this._chainIdFromOpts=t,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,t){this.jsonRpcUrl=e;const r=this.getChainId();this._storage.setItem(y,t.toString(10)),(0,d.ensureIntNumber)(t)===r&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,r,n,i,o){const s=await this.initializeRelay();return!!(await s.watchAsset(e,t,r,n,i,null==o?void 0:o.toString()).promise).result}async addEthereumChain(e,t,r,n,i,o){var s,a;if((0,d.ensureIntNumber)(e)===this.getChainId())return!1;const c=await this.initializeRelay(),l=c.inlineAddEthereumChain(e.toString());this._isAuthorized()||l||await c.requestEthereumAccounts().promise;const u=await c.addEthereumChain(e.toString(),t,i,r,n,o).promise;return!0===(null===(s=u.result)||void 0===s?void 0:s.isApproved)&&this.updateProviderInfo(t[0],e),!0===(null===(a=u.result)||void 0===a?void 0:a.isApproved)}async switchEthereumChain(e){const t=await this.initializeRelay(),r=await t.switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,h.isErrorResponse)(r)&&r.errorCode)throw r.errorCode===a.standardErrorCodes.provider.unsupportedChain?a.standardErrors.provider.unsupportedChain(e):a.standardErrors.provider.custom({message:r.errorMessage,code:r.errorCode});const n=r.result;n.isApproved&&n.rpcUrl.length>0&&this.updateProviderInfo(n.rpcUrl,e)}setAppInfo(e,t){this.initializeRelay().then((r=>r.setAppInfo(e,t)))}async enable(){var e;return null===(e=this.diagnostic)||void 0===e||e.log(s.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?c.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send(g.JSONRPCMethod.eth_requestAccounts)}async close(){(await this.initializeRelay()).resetAndReload()}send(e,t){try{const r=this._send(e,t);if(r instanceof Promise)return r.catch((t=>{throw(0,a.serializeError)(t,e)}))}catch(t){throw(0,a.serializeError)(t,e)}}_send(e,t){if("string"==typeof e){const r={jsonrpc:"2.0",id:0,method:e,params:Array.isArray(t)?t:void 0!==t?[t]:[]};return this._sendRequestAsync(r).then((e=>e.result))}if("function"==typeof t){const r=e,n=t;return this._sendAsync(r,n)}if(Array.isArray(e))return e.map((e=>this._sendRequest(e)));const r=e;return this._sendRequest(r)}async sendAsync(e,t){try{return this._sendAsync(e,t).catch((t=>{throw(0,a.serializeError)(t,e)}))}catch(t){return Promise.reject((0,a.serializeError)(t,e))}}async _sendAsync(e,t){if("function"!=typeof t)throw new Error("callback is required");if(Array.isArray(e)){const r=t;return void this._sendMultipleRequestsAsync(e).then((e=>r(null,e))).catch((e=>r(e,null)))}const r=t;return this._sendRequestAsync(e).then((e=>r(null,e))).catch((e=>r(e,null)))}async request(e){try{return this._request(e).catch((t=>{throw(0,a.serializeError)(t,e.method)}))}catch(t){return Promise.reject((0,a.serializeError)(t,e.method))}}async _request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw a.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw a.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw a.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const n=void 0===r?[]:r,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:n,jsonrpc:"2.0",id:i})).result}async scanQRCode(e){var t;const r=await this.initializeRelay(),n=await r.scanQRCode((0,d.ensureRegExpString)(e)).promise;if("string"!=typeof n.result)throw(0,a.serializeError)(null!==(t=n.errorMessage)&&void 0!==t?t:"result was not a string",u.Web3Method.scanQRCode);return n.result}async genericRequest(e,t){var r;const n=await this.initializeRelay(),i=await n.genericRequest(e,t).promise;if("string"!=typeof i.result)throw(0,a.serializeError)(null!==(r=i.errorMessage)&&void 0!==r?r:"result was not a string",u.Web3Method.generic);return i.result}async selectProvider(e){var t;const r=await this.initializeRelay(),n=await r.selectProvider(e).promise;if("string"!=typeof n.result)throw(0,a.serializeError)(null!==(t=n.errorMessage)&&void 0!==t?t:"result was not a string",u.Web3Method.selectProvider);return n.result}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:r}=e;if(t.result=this._handleSynchronousMethods(e),void 0===t.result)throw new Error(`Coinbase Wallet does not support calling ${r} synchronously without a callback. Please provide a callback parameter to call ${r} asynchronously.`);return t}_setAddresses(e,t){if(!Array.isArray(e))throw new Error("addresses is not an array");const r=e.map((e=>(0,d.ensureAddressString)(e)));JSON.stringify(r)!==JSON.stringify(this._addresses)&&(this._addresses=r,this.emit("accountsChanged",this._addresses),this._storage.setItem(l.LOCAL_STORAGE_ADDRESSES_KEY,r.join(" ")))}_sendRequestAsync(e){return new Promise(((t,r)=>{try{const n=this._handleSynchronousMethods(e);if(void 0!==n)return t({jsonrpc:"2.0",id:e.id,result:n});const i=this._handleAsynchronousFilterMethods(e);if(void 0!==i)return void i.then((r=>t(Object.assign(Object.assign({},r),{id:e.id})))).catch((e=>r(e)));const o=this._handleSubscriptionMethods(e);if(void 0!==o)return void o.then((r=>t({jsonrpc:"2.0",id:e.id,result:r.result}))).catch((e=>r(e)))}catch(e){return r(e)}this._handleAsynchronousMethods(e).then((r=>r&&t(Object.assign(Object.assign({},r),{id:e.id})))).catch((e=>r(e)))}))}_sendMultipleRequestsAsync(e){return Promise.all(e.map((e=>this._sendRequestAsync(e))))}_handleSynchronousMethods(e){const{method:t}=e,r=e.params||[];switch(t){case g.JSONRPCMethod.eth_accounts:return this._eth_accounts();case g.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case g.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(r);case g.JSONRPCMethod.net_version:return this._net_version();case g.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,r=e.params||[];switch(t){case g.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case g.JSONRPCMethod.eth_sign:return this._eth_sign(r);case g.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(r);case g.JSONRPCMethod.personal_sign:return this._personal_sign(r);case g.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(r);case g.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(r);case g.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(r);case g.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(r);case g.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(r);case g.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case g.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(r);case g.JSONRPCMethod.eth_signTypedData_v4:case g.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(r);case g.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(r);case g.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(r);case g.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(r);case g.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(r)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(e){const{method:t}=e,r=e.params||[];switch(t){case g.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(r);case g.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case g.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case g.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(r);case g.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(r)}}_handleSubscriptionMethods(e){switch(e.method){case g.JSONRPCMethod.eth_subscribe:case g.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const t=(0,d.ensureAddressString)(e);return this._addresses.map((e=>(0,d.ensureAddressString)(e))).includes(t)}catch(e){}return!1}_ensureKnownAddress(e){var t;if(!this._isKnownAddress(e))throw null===(t=this.diagnostic)||void 0===t||t.log(s.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?(0,d.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");return this._ensureKnownAddress(t),{fromAddress:t,toAddress:e.to?(0,d.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,d.ensureBN)(e.value):new o.default(0),data:e.data?(0,d.ensureBuffer)(e.data):Buffer.alloc(0),nonce:null!=e.nonce?(0,d.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,d.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,d.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,d.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,d.ensureBN)(e.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw a.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw a.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,r,n){this._ensureKnownAddress(t);try{const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(e,t,r,n).promise).result}}catch(e){if("string"==typeof e.message&&e.message.match(/(denied|rejected)/i))throw a.standardErrors.provider.userRejectedRequest("User denied message signature");throw e}}async _ethereumAddressFromSignedMessage(e,t,r){const n=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await n.ethereumAddressFromSignedMessage(e,t,r).promise).result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,d.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(y);if(!e)return(0,d.ensureIntNumber)(this._chainIdFromOpts);const t=parseInt(e,10);return(0,d.ensureIntNumber)(t)}async _eth_requestAccounts(){var e;if(null===(e=this.diagnostic)||void 0===e||e.log(s.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?c.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let t;try{const e=await this.initializeRelay();t=await e.requestEthereumAccounts().promise}catch(e){if("string"==typeof e.message&&e.message.match(/(denied|rejected)/i))throw a.standardErrors.provider.userRejectedRequest("User denied account authorization");throw e}if(!t.result)throw new Error("accounts received is empty");return this._setAddresses(t.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,d.ensureAddressString)(e[0]),r=(0,d.ensureBuffer)(e[1]);return this._signEthereumMessage(r,t,!1)}_eth_ecRecover(e){const t=(0,d.ensureBuffer)(e[0]),r=(0,d.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,r,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,d.ensureBuffer)(e[0]),r=(0,d.ensureAddressString)(e[1]);return this._signEthereumMessage(t,r,!0)}_personal_ecRecover(e){const t=(0,d.ensureBuffer)(e[0]),r=(0,d.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,r,!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).promise).result}}catch(e){if("string"==typeof e.message&&e.message.match(/(denied|rejected)/i))throw a.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw e}}async _eth_sendRawTransaction(e){const t=(0,d.ensureBuffer)(e[0]),r=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await r.submitEthereumTransaction(t,this.getChainId()).promise).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).promise).result}}catch(e){if("string"==typeof e.message&&e.message.match(/(denied|rejected)/i))throw a.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw e}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,d.ensureParsedJSONObject)(e[0]),r=(0,d.ensureAddressString)(e[1]);this._ensureKnownAddress(r);const n=p.default.hashForSignTypedDataLegacy({data:t}),i=JSON.stringify(t,null,2);return this._signEthereumMessage(n,r,!1,i)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,d.ensureAddressString)(e[0]),r=(0,d.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const n=p.default.hashForSignTypedData_v3({data:r}),i=JSON.stringify(r,null,2);return this._signEthereumMessage(n,t,!1,i)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,d.ensureAddressString)(e[0]),r=(0,d.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const n=p.default.hashForSignTypedData_v4({data:r}),i=JSON.stringify(r,null,2);return this._signEthereumMessage(n,t,!1,i)}async _cbwallet_arbitrary(e){const t=e[0],r=e[1];if("string"!=typeof r)throw new Error("parameter must be a string");if("object"!=typeof t||null===t)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(t,r)}}async _wallet_addEthereumChain(e){var t,r,n,i;const o=e[0];if(0===(null===(t=o.rpcUrls)||void 0===t?void 0:t.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||""===o.chainName.trim())throw a.standardErrors.rpc.invalidParams("chainName is a required field");if(!o.nativeCurrency)throw a.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const s=parseInt(o.chainId,16);return await this.addEthereumChain(s,null!==(r=o.rpcUrls)&&void 0!==r?r:[],null!==(n=o.blockExplorerUrls)&&void 0!==n?n:[],o.chainName,null!==(i=o.iconUrls)&&void 0!==i?i:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw a.standardErrors.rpc.invalidParams("Type is required");if("ERC20"!==(null==t?void 0:t.type))throw a.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(null==t?void 0:t.options))throw a.standardErrors.rpc.invalidParams("Options are required");if(!(null==t?void 0:t.options.address))throw a.standardErrors.rpc.invalidParams("Address is required");const r=this.getChainId(),{address:n,symbol:i,image:o,decimals:s}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,n,i,s,o,r)}}_eth_uninstallFilter(e){const t=(0,d.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=(0,d.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(t)}_eth_getFilterLogs(e){const t=(0,d.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(t)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then((e=>(e.setAccountsCallback(((e,t)=>this._setAddresses(e,t))),e.setChainCallback(((e,t)=>{this.updateProviderInfo(t,parseInt(e,10))})),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e)))}}t.CoinbaseWalletProvider=b},3648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterFromParam=t.FilterPolyfill=void 0;const n=r(1295),i=r(4643),o={jsonrpc:"2.0",id:0};function s(e){return{fromBlock:c(e.fromBlock),toBlock:c(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:l(e.fromBlock),toBlock:l(e.toBlock),topics:e.topics};return null!==e.addresses&&(t.address=e.addresses),t}function c(e){if(void 0===e||"latest"===e||"pending"===e)return"latest";if("earliest"===e)return(0,n.IntNumber)(0);if((0,i.isHexString)(e))return(0,i.intNumberFromHexString)(e);throw new Error(`Invalid block option: ${String(e)}`)}function l(e){return"latest"===e?e:(0,i.hexStringFromIntNumber)(e)}function u(){return Object.assign(Object.assign({},o),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},o),{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=(0,n.IntNumber)(1),this.provider=e}async newFilter(e){const t=s(e),r=this.makeFilterId(),n=await this.setInitialCursorPosition(r,t.fromBlock);return console.log(`Installing new log filter(${r}):`,t,"initial cursor position:",n),this.logFilters.set(r,t),this.setFilterTimeout(r),(0,i.hexStringFromIntNumber)(r)}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),(0,i.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),(0,i.hexStringFromIntNumber)(e)}uninstallFilter(e){const t=(0,i.intNumberFromHexString)(e);return console.log(`Uninstalling filter (${t})`),this.deleteFilter(t),!0}getFilterChanges(e){const t=(0,i.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=(0,i.intNumberFromHexString)(e),r=this.logFilters.get(t);return r?this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[a(r)]})):u()}makeFilterId(){return(0,n.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise(((t,r)=>{this.provider.sendAsync(e,((e,n)=>e?r(e):Array.isArray(n)||null==n?r(new Error(`unexpected response received: ${JSON.stringify(n)}`)):void t(n)))}))}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),r=this.cursors.get(e);if(!r||!t)return u();const s=await this.getCurrentBlockHeight(),c="latest"===t.toBlock?s:t.toBlock;if(r>s)return h();if(r>t.toBlock)return h();console.log(`Fetching logs from ${r} to ${c} for filter ${e}`);const l=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[a(Object.assign(Object.assign({},t),{fromBlock:r,toBlock:c}))]}));if(Array.isArray(l.result)){const t=l.result.map((e=>(0,i.intNumberFromHexString)(e.blockNumber||"0x0"))),o=Math.max(...t);if(o&&o>r){const t=(0,n.IntNumber)(o+1);console.log(`Moving cursor position for filter (${e}) from ${r} to ${t}`),this.cursors.set(e,t)}}return l}async getBlockFilterChanges(e){const t=this.cursors.get(e);if(!t)return u();const r=await this.getCurrentBlockHeight();if(t>r)return h();console.log(`Fetching blocks from ${t} to ${r} for filter (${e})`);const s=(await Promise.all((0,i.range)(t,r+1).map((e=>this.getBlockHashByNumber((0,n.IntNumber)(e)))))).filter((e=>!!e)),a=(0,n.IntNumber)(t+s.length);return console.log(`Moving cursor position for filter (${e}) from ${t} to ${a}`),this.cursors.set(e,a),Object.assign(Object.assign({},o),{result:s})}async getPendingTransactionFilterChanges(e){return Promise.resolve(h())}async setInitialCursorPosition(e,t){const r=await this.getCurrentBlockHeight(),n="number"==typeof t&&t>r?t:r;return this.cursors.set(e,n),n}setFilterTimeout(e){const t=this.timeouts.get(e);t&&window.clearTimeout(t);const r=window.setTimeout((()=>{console.log(`Filter (${e}) timed out`),this.deleteFilter(e)}),3e5);this.timeouts.set(e,r)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(e))}async getBlockHashByNumber(e){const t=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(e),!1]}));return t.result&&"string"==typeof t.result.hash?(0,i.ensureHexString)(t.result.hash):null}},t.filterFromParam=s},8565:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,(r=t.JSONRPCMethod||(t.JSONRPCMethod={})).eth_accounts="eth_accounts",r.eth_coinbase="eth_coinbase",r.net_version="net_version",r.eth_chainId="eth_chainId",r.eth_uninstallFilter="eth_uninstallFilter",r.eth_requestAccounts="eth_requestAccounts",r.eth_sign="eth_sign",r.eth_ecRecover="eth_ecRecover",r.personal_sign="personal_sign",r.personal_ecRecover="personal_ecRecover",r.eth_signTransaction="eth_signTransaction",r.eth_sendRawTransaction="eth_sendRawTransaction",r.eth_sendTransaction="eth_sendTransaction",r.eth_signTypedData_v1="eth_signTypedData_v1",r.eth_signTypedData_v2="eth_signTypedData_v2",r.eth_signTypedData_v3="eth_signTypedData_v3",r.eth_signTypedData_v4="eth_signTypedData_v4",r.eth_signTypedData="eth_signTypedData",r.cbWallet_arbitrary="walletlink_arbitrary",r.wallet_addEthereumChain="wallet_addEthereumChain",r.wallet_switchEthereumChain="wallet_switchEthereumChain",r.wallet_watchAsset="wallet_watchAsset",r.eth_subscribe="eth_subscribe",r.eth_unsubscribe="eth_unsubscribe",r.eth_newFilter="eth_newFilter",r.eth_newBlockFilter="eth_newBlockFilter",r.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",r.eth_getFilterChanges="eth_getFilterChanges",r.eth_getFilterLogs="eth_getFilterLogs"},5313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionManager=void 0;const n=r(6842),i=r(8961),o=()=>{};t.SubscriptionManager=class{constructor(e){const t=new n.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:r,middleware:o}=i({blockTracker:t,provider:e});this.events=r,this.subscriptionMiddleware=o}async handleRequest(e){const t={};return await this.subscriptionMiddleware(e,t,o,o),t}destroy(){this.subscriptionMiddleware.destroy()}}},3518:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKUI=void 0;const n=r(7759),i=r(9199),o=r(7162);t.WalletSDKUI=class{constructor(e){this.standalone=null,this.attached=!1,this.appSrc=null,this.snackbar=new i.Snackbar({darkMode:e.darkMode}),this.linkFlow=new n.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,connected$:e.connected$,chainId$:e.chainId$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.linkFlow.attach(t),this.snackbar.attach(t),this.attached=!0,(0,o.injectCssReset)()}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(e){}watchAsset(e){}switchEthereumChain(e){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(e){}signEthereumTransaction(e){}submitEthereumTransaction(e){}ethereumAddressFromSignedMessage(e){}showConnecting(e){let t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",appSrc:this.appSrc,menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:{message:"Confirm on phone",appSrc:this.appSrc,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}]},this.snackbar.presentItem(t)}setAppSrc(e){this.appSrc=e}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(e){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return null!==(e=this.standalone)&&void 0!==e&&e}}},5813:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RelayMessageType=void 0,(r=t.RelayMessageType||(t.RelayMessageType={})).SESSION_ID_REQUEST="SESSION_ID_REQUEST",r.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",r.LINKED="LINKED",r.UNLINKED="UNLINKED",r.WEB3_REQUEST="WEB3_REQUEST",r.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",r.WEB3_RESPONSE="WEB3_RESPONSE"},3526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;const n=r(9072),i=r(4643),o="session:id",s="session:secret",a="session:linked";class c{constructor(e,t,r,o){this._storage=e,this._id=t||(0,i.randomBytesHex)(16),this._secret=r||(0,i.randomBytesHex)(32),this._key=(new n.sha256).update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!o}static load(e){const t=e.getItem(o),r=e.getItem(a),n=e.getItem(s);return t&&n?new c(e,t,n,"1"===r):null}static hash(e){return(new n.sha256).update(e).digest("hex")}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(o,this._id),this._storage.setItem(s,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(a,this._linked?"1":"0")}}t.Session=c},6570:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelay=void 0;const c=a(r(7056)),l=r(4143),u=r(1717),h=r(2191),d=r(8876),p=r(9621),f=r(1295),g=r(4643),m=s(r(235)),y=r(3526),w=r(5633),b=r(3083),v=r(5186),_=r(3770),E=r(7386),x=r(287);class C extends w.WalletSDKRelayAbstract{constructor(e){var t;super(),this.accountsCallback=null,this.chainCallback=null,this.dappDefaultChainSubject=new l.BehaviorSubject(1),this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.subscriptions=new l.Subscription,this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;const{session:r,ui:n,connection:i}=this.subscribe();if(this._session=r,this.connection=i,this.relayEventManager=e.relayEventManager,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this.diagnostic={log:e.eventListener.onEvent}:this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=null===(t=e.reloadOnDisconnect)||void 0===t||t,this.ui=n}subscribe(){this.subscriptions.add(this.dappDefaultChainSubject.subscribe((e=>{this.dappDefaultChain!==e&&(this.dappDefaultChain=e)})));const e=y.Session.load(this.storage)||new y.Session(this.storage).save(),t=new d.WalletSDKConnection(e.id,e.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(t.sessionConfig$.subscribe({next:e=>{this.onSessionConfigChanged(e)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(t.incomingEvent$.pipe((0,u.filter)((e=>"Web3Response"===e.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(t.linked$.pipe((0,u.skip)(1),(0,u.tap)((e=>{var t;this.isLinked=e;const r=this.storage.getItem(w.LOCAL_STORAGE_ADDRESSES_KEY);if(e&&(this.session.linked=e),this.isUnlinkedErrorState=!1,r){const n=r.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==n[0]&&!e&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const e=this.getSessionIdHash();null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:e})}}}))).subscribe()),this.subscriptions.add(t.sessionConfig$.pipe((0,u.filter)((e=>!!e.metadata&&"1"===e.metadata.__destroyed))).subscribe((()=>{var e;const r=t.isDestroyed;return null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:r,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(t.sessionConfig$.pipe((0,u.filter)((e=>e.metadata&&void 0!==e.metadata.WalletUsername))).pipe((0,u.mergeMap)((t=>m.decrypt(t.metadata.WalletUsername,e.secret)))).subscribe({next:e=>{this.storage.setItem(w.WALLET_USER_NAME_KEY,e)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(t.sessionConfig$.pipe((0,u.filter)((e=>e.metadata&&void 0!==e.metadata.AppVersion))).pipe((0,u.mergeMap)((t=>m.decrypt(t.metadata.AppVersion,e.secret)))).subscribe({next:e=>{this.storage.setItem(w.APP_VERSION_KEY,e)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(t.sessionConfig$.pipe((0,u.filter)((e=>e.metadata&&void 0!==e.metadata.ChainId&&void 0!==e.metadata.JsonRpcUrl))).pipe((0,u.mergeMap)((t=>(0,l.zip)(m.decrypt(t.metadata.ChainId,e.secret),m.decrypt(t.metadata.JsonRpcUrl,e.secret))))).pipe((0,u.distinctUntilChanged)()).subscribe({next:([e,t])=>{this.chainCallback&&this.chainCallback(e,t)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(t.sessionConfig$.pipe((0,u.filter)((e=>e.metadata&&void 0!==e.metadata.EthereumAddress))).pipe((0,u.mergeMap)((t=>m.decrypt(t.metadata.EthereumAddress,e.secret)))).subscribe({next:e=>{this.accountsCallback&&this.accountsCallback([e]),C.accountRequestCallbackIds.size>0&&(Array.from(C.accountRequestCallbackIds.values()).forEach((t=>{const r=(0,x.Web3ResponseMessage)({id:t,response:(0,E.RequestEthereumAccountsResponse)([e])});this.invokeCallback(Object.assign(Object.assign({},r),{id:t}))})),C.accountRequestCallbackIds.clear())},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.subscriptions.add(t.sessionConfig$.pipe((0,u.filter)((e=>e.metadata&&void 0!==e.metadata.AppSrc))).pipe((0,u.mergeMap)((t=>m.decrypt(t.metadata.AppSrc,e.secret)))).subscribe({next:e=>{this.ui.setAppSrc(e)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appSrc"})}}));const r=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:e,connected$:t.connected$,chainId$:this.dappDefaultChainSubject});return t.connect(),{session:e,ui:r,connection:t}}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,u.timeout)(1e3),(0,u.catchError)((e=>(0,l.of)(null)))).subscribe((e=>{var t,r,n;const i=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch(e){null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(r=this.diagnostic)||void 0===r||r.log(h.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const o=y.Session.load(this.storage);if((null==o?void 0:o.id)===this._session.id?this.storage.clear():o&&(null===(n=this.diagnostic)||void 0===n||n.log(h.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:y.Session.hash(o.id)})),this._reloadOnDisconnect)return void this.ui.reloadUI();this.accountsCallback&&this.accountsCallback([],!0),this.subscriptions=new l.Subscription;const{session:s,ui:a,connection:c}=this.subscribe();this._session=s,this.connection=c,this.ui=a,i&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}),(e=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,r,n){return this.sendRequest({method:b.Web3Method.signEthereumMessage,params:{message:(0,g.hexStringFromBuffer)(e,!0),address:t,addPrefix:r,typedDataJson:n||null}})}ethereumAddressFromSignedMessage(e,t,r){return this.sendRequest({method:b.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,g.hexStringFromBuffer)(e,!0),signature:(0,g.hexStringFromBuffer)(t,!0),addPrefix:r}})}signEthereumTransaction(e){return this.sendRequest({method:b.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,g.bigIntStringFromBN)(e.weiValue),data:(0,g.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,g.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:b.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,g.bigIntStringFromBN)(e.weiValue),data:(0,g.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,g.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,g.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,g.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:b.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,g.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:b.Web3Method.scanQRCode,params:{regExp:e}})}getQRCodeUrl(){return(0,g.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,t){return this.sendRequest({method:b.Web3Method.generic,params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const r=(0,g.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,n),null==t||t()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:n,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(r,(e=>{if(null==t||t(),e.errorMessage)return o(new Error(e.errorMessage));i(e)})),this.ui.isStandalone()?this.sendRequestStandalone(r,e):this.publishWeb3RequestEvent(r,e)})),cancel:n}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChainSubject.next(e)}publishWeb3RequestEvent(e,t){var r;const n=(0,_.Web3RequestMessage)({id:e,request:t}),i=y.Session.load(this.storage);null===(r=this.diagnostic)||void 0===r||r.log(h.EVENTS.WEB3_REQUEST,{eventId:n.id,method:`relay::${n.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?y.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",n,!0).subscribe({next:e=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:n.id,method:`relay::${n.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?y.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()})},error:e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:n.id,response:{method:n.request.method,errorMessage:e.message}}))}}))}publishWeb3RequestCanceledEvent(e){const t=(0,v.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",t,!1).subscribe())}publishEvent(e,t,r){const n=this.session.secret;return new l.Observable((e=>{m.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin})),n).then((t=>{e.next(t),e.complete()}))})).pipe((0,u.mergeMap)((t=>this.connection.publishEvent(e,t,r))))}handleIncomingEvent(e){try{this.subscriptions.add((0,l.from)(m.decrypt(e.data,this.session.secret)).pipe((0,u.map)((e=>JSON.parse(e)))).subscribe({next:e=>{const t=(0,x.isWeb3ResponseMessage)(e)?e:null;t&&this.handleWeb3ResponseMessage(t)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(e){return}}handleWeb3ResponseMessage(e){var t;const{response:r}=e;if(null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash()}),(0,E.isRequestEthereumAccountsResponse)(r))return C.accountRequestCallbackIds.forEach((t=>this.invokeCallback(Object.assign(Object.assign({},e),{id:t})))),void C.accountRequestCallbackIds.clear();this.invokeCallback(e)}handleErrorResponse(e,t,r,n){var i;const o=null!==(i=null==r?void 0:r.message)&&void 0!==i?i:(0,p.standardErrorMessage)(n);this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:e,response:{method:t,errorMessage:o,errorCode:n}}))}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:b.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,g.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(t),this.handleErrorResponse(t,e.method,r)};return{promise:new Promise(((n,i)=>{var o;this.relayEventManager.callbacks.set(t,(e=>{if(this.ui.hideRequestEthereumAccounts(),e.errorMessage)return i(new Error(e.errorMessage));n(e)}));const s=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(s&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s)){let e;try{e=(0,g.isInIFrame)()&&window.top?window.top.location:window.location}catch(t){e=window.location}e.href=`https://www.coinbase.com/connect-dapp?uri=${encodeURIComponent(e.href)}`}else{if(this.ui.inlineAccountsResponse()){const e=e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:t,response:(0,E.RequestEthereumAccountsResponse)(e)}))};this.ui.requestEthereumAccounts({onCancel:r,onAccounts:e})}else{const e=p.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>r(e)})}C.accountRequestCallbackIds.add(t),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(t,e)}})),cancel:r}}selectProvider(e){const t={method:b.Web3Method.selectProvider,params:{providerOptions:e}},r=(0,g.randomBytesHex)(8);return{cancel:e=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,t.method,e)},promise:new Promise(((t,n)=>{this.relayEventManager.callbacks.set(r,(e=>{if(e.errorMessage)return n(new Error(e.errorMessage));t(e)})),this.ui.selectProvider&&this.ui.selectProvider({onApprove:e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:r,response:(0,E.SelectProviderResponse)(e)}))},onCancel:e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:r,response:(0,E.SelectProviderResponse)(f.ProviderType.Unselected)}))},providerOptions:e})}))}}watchAsset(e,t,r,n,i,o){const s={method:b.Web3Method.watchAsset,params:{type:e,options:{address:t,symbol:r,decimals:n,image:i},chainId:o}};let a=null;const c=(0,g.randomBytesHex)(8),l=e=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,s.method,e),null==a||a()};return this.ui.inlineWatchAsset()||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload})),{cancel:l,promise:new Promise(((l,u)=>{this.relayEventManager.callbacks.set(c,(e=>{if(null==a||a(),e.errorMessage)return u(new Error(e.errorMessage));l(e)}));this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:()=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:c,response:(0,E.WatchAssetReponse)(!0)}))},onCancel:e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:c,response:(0,E.WatchAssetReponse)(!1)}))},type:e,address:t,symbol:r,decimals:n,image:i,chainId:o}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(c,s)}))}}addEthereumChain(e,t,r,n,i,o){const s={method:b.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:t,blockExplorerUrls:n,chainName:i,iconUrls:r,nativeCurrency:o}};let a=null;const c=(0,g.randomBytesHex)(8),l=e=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,s.method,e),null==a||a()};return this.ui.inlineAddEthereumChain(e)||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload})),{promise:new Promise(((t,r)=>{this.relayEventManager.callbacks.set(c,(e=>{if(null==a||a(),e.errorMessage)return r(new Error(e.errorMessage));t(e)}));this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:c,response:(0,E.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:c,response:(0,E.AddEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:s.params.chainId,rpcUrls:s.params.rpcUrls,blockExplorerUrls:s.params.blockExplorerUrls,chainName:s.params.chainName,iconUrls:s.params.iconUrls,nativeCurrency:s.params.nativeCurrency}),this.ui.inlineAddEthereumChain(e)||this.ui.isStandalone()||this.publishWeb3RequestEvent(c,s)})),cancel:l}}switchEthereumChain(e,t){const r={method:b.Web3Method.switchEthereumChain,params:Object.assign({chainId:e},{address:t})},n=(0,g.randomBytesHex)(8);return{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(n,(e=>(0,E.isErrorResponse)(e)&&e.errorCode?i(p.standardErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?i(new Error(e.errorMessage)):void t(e))),this.ui.switchEthereumChain({onCancel:t=>{var r;if(t){const i=null!==(r=(0,p.getErrorCode)(t))&&void 0!==r?r:p.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(n,b.Web3Method.switchEthereumChain,t instanceof Error?t:p.standardErrors.provider.unsupportedChain(e),i)}else this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:n,response:(0,E.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:n,response:(0,E.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:r.params.chainId,address:r.params.address}),this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(n,r)})),cancel:e=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,e)}}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return y.Session.hash(this._session.id)}sendRequestStandalone(e,t){const r=r=>{this.handleErrorResponse(e,t.method,r)},n=t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:e,response:t}))};switch(t.method){case b.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:t,onSuccess:n,onCancel:r});break;case b.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:t,onSuccess:n,onCancel:r});break;case b.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:t,onSuccess:n,onCancel:r});break;case b.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:t,onSuccess:n});break;default:r()}}onSessionConfigChanged(e){}}C.accountRequestCallbackIds=new Set,o([c.default],C.prototype,"resetAndReload",null),o([c.default],C.prototype,"handleIncomingEvent",null),t.WalletSDKRelay=C},5633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayAbstract=t.APP_VERSION_KEY=t.LOCAL_STORAGE_ADDRESSES_KEY=t.WALLET_USER_NAME_KEY=void 0;const n=r(9621);t.WALLET_USER_NAME_KEY="walletUsername",t.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",t.APP_VERSION_KEY="AppVersion",t.WalletSDKRelayAbstract=class{async makeEthereumJSONRPCRequest(e,t){if(!t)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(t,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((t=>{if(!t)throw n.standardErrors.rpc.parse({});const r=t,{error:i}=r;if(i)throw(0,n.serializeError)(i,e.method);return r}))}}},7472:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayEventManager=void 0;const n=r(4643);t.WalletSDKRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,n.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}},3083:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,(r=t.Web3Method||(t.Web3Method={})).requestEthereumAccounts="requestEthereumAccounts",r.signEthereumMessage="signEthereumMessage",r.signEthereumTransaction="signEthereumTransaction",r.submitEthereumTransaction="submitEthereumTransaction",r.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",r.scanQRCode="scanQRCode",r.generic="generic",r.childRequestEthereumAccounts="childRequestEthereumAccounts",r.addEthereumChain="addEthereumChain",r.switchEthereumChain="switchEthereumChain",r.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",r.watchAsset="watchAsset",r.selectProvider="selectProvider"},5186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestCanceledMessage=void 0;const n=r(5813);t.Web3RequestCanceledMessage=function(e){return{type:n.RelayMessageType.WEB3_REQUEST_CANCELED,id:e}}},3770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestMessage=void 0;const n=r(5813);t.Web3RequestMessage=function(e){return Object.assign({type:n.RelayMessageType.WEB3_REQUEST},e)}},7386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressFromSignedMessageResponse=t.SubmitEthereumTransactionResponse=t.SignEthereumTransactionResponse=t.SignEthereumMessageResponse=t.isRequestEthereumAccountsResponse=t.SelectProviderResponse=t.WatchAssetReponse=t.RequestEthereumAccountsResponse=t.SwitchEthereumChainResponse=t.AddEthereumChainResponse=t.isErrorResponse=void 0;const n=r(3083);t.isErrorResponse=function(e){var t,r;return void 0!==(null===(t=e)||void 0===t?void 0:t.method)&&void 0!==(null===(r=e)||void 0===r?void 0:r.errorMessage)},t.AddEthereumChainResponse=function(e){return{method:n.Web3Method.addEthereumChain,result:e}},t.SwitchEthereumChainResponse=function(e){return{method:n.Web3Method.switchEthereumChain,result:e}},t.RequestEthereumAccountsResponse=function(e){return{method:n.Web3Method.requestEthereumAccounts,result:e}},t.WatchAssetReponse=function(e){return{method:n.Web3Method.watchAsset,result:e}},t.SelectProviderResponse=function(e){return{method:n.Web3Method.selectProvider,result:e}},t.isRequestEthereumAccountsResponse=function(e){return e&&e.method===n.Web3Method.requestEthereumAccounts},t.SignEthereumMessageResponse=function(e){return{method:n.Web3Method.signEthereumMessage,result:e}},t.SignEthereumTransactionResponse=function(e){return{method:n.Web3Method.signEthereumTransaction,result:e}},t.SubmitEthereumTransactionResponse=function(e){return{method:n.Web3Method.submitEthereumTransaction,result:e}},t.EthereumAddressFromSignedMessageResponse=function(e){return{method:n.Web3Method.ethereumAddressFromSignedMessage,result:e}}},287:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWeb3ResponseMessage=t.Web3ResponseMessage=void 0;const n=r(5813);t.Web3ResponseMessage=function(e){return Object.assign({type:n.RelayMessageType.WEB3_RESPONSE},e)},t.isWeb3ResponseMessage=function(e){return e&&e.type===n.RelayMessageType.WEB3_RESPONSE}},235:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=void 0;const n=r(4643);t.encrypt=async function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");const r=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,n.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},i,o.encode(e)),a=s.slice(s.byteLength-16),c=s.slice(0,s.byteLength-16),l=new Uint8Array(a),u=new Uint8Array(c),h=new Uint8Array([...r,...l,...u]);return(0,n.uint8ArrayToHex)(h)},t.decrypt=function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");return new Promise(((r,i)=>{!async function(){const o=await crypto.subtle.importKey("raw",(0,n.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=(0,n.hexStringToUint8Array)(e),a=s.slice(0,12),c=s.slice(12,28),l=s.slice(28),u=new Uint8Array([...l,...c]),h={name:"AES-GCM",iv:new Uint8Array(a)};try{const e=await window.crypto.subtle.decrypt(h,o,u),t=new TextDecoder;r(t.decode(e))}catch(e){i(e)}}()}))}},1295:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderType=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,(r=t.ProviderType||(t.ProviderType={})).CoinbaseWallet="CoinbaseWallet",r.MetaMask="MetaMask",r.Unselected=""},4643:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isInIFrame=t.createQrUrl=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 i=n(r(3550)),o=r(129),s=r(9621),a=r(1295),c=/^[0-9]*$/,l=/^[a-f0-9]*$/;function u(e){return[...e].map((e=>e.toString(16).padStart(2,"0"))).join("")}function h(e){return e.startsWith("0x")||e.startsWith("0X")}function d(e){return h(e)?e.slice(2):e}function p(e){return h(e)?"0x"+e.slice(2):"0x"+e}function f(e){if("string"!=typeof e)return!1;const t=d(e).toLowerCase();return l.test(t)}function g(e,t=!1){if("string"==typeof e){const r=d(e).toLowerCase();if(l.test(r))return(0,a.HexString)(t?"0x"+r:r)}throw s.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}function m(e,t=!1){let r=g(e,!1);return r.length%2==1&&(r=(0,a.HexString)("0"+r)),t?(0,a.HexString)("0x"+r):r}function y(e){if("number"==typeof e&&Number.isInteger(e))return(0,a.IntNumber)(e);if("string"==typeof e){if(c.test(e))return(0,a.IntNumber)(Number(e));if(f(e))return(0,a.IntNumber)(new i.default(m(e,!1),16).toNumber())}throw s.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}function w(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 u(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=u,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map((e=>parseInt(e,16))))},t.hexStringFromBuffer=function(e,t=!1){const r=e.toString("hex");return(0,a.HexString)(t?"0x"+r:r)},t.bigIntStringFromBN=function(e){return(0,a.BigIntString)(e.toString(10))},t.intNumberFromHexString=function(e){return(0,a.IntNumber)(new i.default(m(e,!1),16).toNumber())},t.hexStringFromIntNumber=function(e){return(0,a.HexString)("0x"+new i.default(e).toString(16))},t.has0xPrefix=h,t.strip0x=d,t.prepend0x=p,t.isHexString=f,t.ensureHexString=g,t.ensureEvenLengthHexString=m,t.ensureAddressString=function(e){if("string"==typeof e){const t=d(e).toLowerCase();if(f(t)&&40===t.length)return(0,a.AddressString)(p(t))}throw s.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)},t.ensureBuffer=function(e){if(Buffer.isBuffer(e))return e;if("string"==typeof e){if(f(e)){const t=m(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw s.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)},t.ensureIntNumber=y,t.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,a.RegExpString)(e.toString());throw s.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)},t.ensureBN=function(e){if(null!==e&&(i.default.isBN(e)||w(e)))return new i.default(e.toString(10),10);if("number"==typeof e)return new i.default(y(e));if("string"==typeof e){if(c.test(e))return new i.default(e,10);if(f(e))return new i.default(m(e,!1),16)}throw s.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)},t.ensureParsedJSONObject=function(e){if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;throw s.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)},t.isBigNumber=w,t.range=function(e,t){return Array.from({length:t-e},((t,r)=>e+r))},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:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`},t.createQrUrl=function(e,t,r,n,i,s){const a=n?"parent-id":"id";return`${r}/#/link?${(0,o.stringify)({[a]:e,secret:t,server:r,v:i,chainId:s})}`},t.isInIFrame=function(){try{return null!==window.frameElement}catch(e){return!1}}},6089:(e,t,r)=>{const n=r(2518),i=r(3550);function o(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 s(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 c(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function l(e){var t=typeof e;if("string"===t)return n.isHexString(e)?new i(n.stripHexPrefix(e),16):new i(e,10);if("number"===t)return new i(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function u(e,t){var r,o,h,d;if("address"===e)return u("uint160",l(t));if("bool"===e)return u("uint8",t?1:0);if("string"===e)return u("bytes",new Buffer(t,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if(void 0===t.length)throw new Error("Not an array?");if("dynamic"!==(r=c(e))&&0!==r&&t.length>r)throw new Error("Elements exceed array size: "+r);for(d in h=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)h.push(u(e,t[d]));if("dynamic"===r){var p=u("uint256",t.length);h.unshift(p)}return Buffer.concat(h)}if("bytes"===e)return t=new Buffer(t),h=Buffer.concat([u("uint256",t.length),t]),t.length%32!=0&&(h=Buffer.concat([h,n.zeros(32-t.length%32)])),h;if(e.startsWith("bytes")){if((r=s(e))<1||r>32)throw new Error("Invalid bytes width: "+r);return n.setLengthRight(t,32)}if(e.startsWith("uint")){if((r=s(e))%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if((o=l(t)).bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+o.bitLength());if(o<0)throw new Error("Supplied uint is negative");return o.toArrayLike(Buffer,"be",32)}if(e.startsWith("int")){if((r=s(e))%8||r<8||r>256)throw new Error("Invalid int width: "+r);if((o=l(t)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+o.bitLength());return o.toTwos(256).toArrayLike(Buffer,"be",32)}if(e.startsWith("ufixed")){if(r=a(e),(o=l(t))<0)throw new Error("Supplied ufixed is negative");return u("uint256",o.mul(new i(2).pow(new i(r[1]))))}if(e.startsWith("fixed"))return r=a(e),u("int256",l(t).mul(new i(2).pow(new i(r[1]))));throw new Error("Unsupported or invalid type: "+e)}function h(e){return"string"===e||"bytes"===e||"dynamic"===c(e)}function d(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var r,i,a=[],c=0;c32)throw new Error("Invalid bytes width: "+r);a.push(n.setLengthRight(h,r))}else if(u.startsWith("uint")){if((r=s(u))%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if((i=l(h)).bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+i.bitLength());a.push(i.toArrayLike(Buffer,"be",r/8))}else{if(!u.startsWith("int"))throw new Error("Unsupported or invalid type: "+u);if((r=s(u))%8||r<8||r>256)throw new Error("Invalid int width: "+r);if((i=l(h)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+i.bitLength());a.push(i.toTwos(r).toArrayLike(Buffer,"be",r/8))}}return Buffer.concat(a)}e.exports={rawEncode:function(e,t){var r=[],n=[],i=32*e.length;for(var s in e){var a=o(e[s]),c=u(a,t[s]);h(a)?(r.push(u("uint256",i)),n.push(c),i+=c.length):r.push(c)}return Buffer.concat(r.concat(n))},solidityPack:d,soliditySHA3:function(e,t){return n.keccak(d(e,t))}}},4497:(e,t,r)=>{const n=r(2518),i=r(6089),o={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},s={encodeData(e,t,r,o=!0){const s=["bytes32"],a=[this.hashType(e,r)];if(o){const c=(e,t,s)=>{if(void 0!==r[t])return["bytes32",null==s?"0x0000000000000000000000000000000000000000000000000000000000000000":n.keccak(this.encodeData(t,s,r,o))];if(void 0===s)throw new Error(`missing value for field ${e} of type ${t}`);if("bytes"===t)return["bytes32",n.keccak(s)];if("string"===t)return"string"==typeof s&&(s=Buffer.from(s,"utf8")),["bytes32",n.keccak(s)];if(t.lastIndexOf("]")===t.length-1){const r=t.slice(0,t.lastIndexOf("[")),o=s.map((t=>c(e,r,t)));return["bytes32",n.keccak(i.rawEncode(o.map((([e])=>e)),o.map((([,e])=>e))))]}return[t,s]};for(const n of r[e]){const[e,r]=c(n.name,n.type,t[n.name]);s.push(e),a.push(r)}}else for(const i of r[e]){let e=t[i.name];if(void 0!==e)if("bytes"===i.type)s.push("bytes32"),e=n.keccak(e),a.push(e);else if("string"===i.type)s.push("bytes32"),"string"==typeof e&&(e=Buffer.from(e,"utf8")),e=n.keccak(e),a.push(e);else if(void 0!==r[i.type])s.push("bytes32"),e=n.keccak(this.encodeData(i.type,e,r,o)),a.push(e);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");s.push(i.type),a.push(e)}}return i.rawEncode(s,a)},encodeType(e,t){let r="",n=this.findTypeDependencies(e,t).filter((t=>t!==e));n=[e].concat(n.sort());for(const e of n){if(!t[e])throw new Error("No type definition specified: "+e);r+=e+"("+t[e].map((({name:e,type:t})=>t+" "+e)).join(",")+")"}return r},findTypeDependencies(e,t,r=[]){if(e=e.match(/^\w*/)[0],r.includes(e)||void 0===t[e])return r;r.push(e);for(const n of t[e])for(const e of this.findTypeDependencies(n.type,t,r))!r.includes(e)&&r.push(e);return r},hashStruct(e,t,r,i=!0){return n.keccak(this.encodeData(e,t,r,i))},hashType(e,t){return n.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const r in o.properties)e[r]&&(t[r]=e[r]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){const r=this.sanitizeData(e),i=[Buffer.from("1901","hex")];return i.push(this.hashStruct("EIP712Domain",r.domain,r.types,t)),"EIP712Domain"!==r.primaryType&&i.push(this.hashStruct(r.primaryType,r.message,r.types,t)),n.keccak(Buffer.concat(i))}};e.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:s,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 r=e.map((function(e){return"bytes"===e.type?n.toBuffer(e.value):e.value})),o=e.map((function(e){return e.type})),s=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(e.length).fill("string"),s),i.soliditySHA3(o,r)])}(e.data)},hashForSignTypedData_v3:function(e){return s.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return s.hash(e.data)}}},2518:(e,t,r)=>{const n=r(8598),i=r(3550);function o(e){return Buffer.allocUnsafe(e).fill(0)}function s(e,t,r){const n=o(t);return e=a(e),r?e.length{function t(e){this.mode=n.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,r=this.data.length;t65536?(i[0]=240|(1835008&o)>>>18,i[1]=128|(258048&o)>>>12,i[2]=128|(4032&o)>>>6,i[3]=128|63&o):o>2048?(i[0]=224|(61440&o)>>>12,i[1]=128|(4032&o)>>>6,i[2]=128|63&o):o>128?(i[0]=192|(1984&o)>>>6,i[1]=128|63&o):i[0]=o,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 r(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,r=this.parsedData.length;t=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(this.modules[e+r][t+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},getBestMaskPattern:function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=i.getLostPoint(this);(0==r||e>n)&&(e=n,t=r)}return t},createMovieClip:function(e,t,r){var n=e.createEmptyMovieClip(t,r);this.make();for(var i=0;i>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++)n=!e&&1==(t>>r&1),this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n},setupTypeInfo:function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=i.getBCHTypeInfo(r),o=0;o<15;o++){var s=!e&&1==(n>>o&1);o<6?this.modules[o][8]=s:o<8?this.modules[o+1][8]=s:this.modules[this.moduleCount-15+o][8]=s}for(o=0;o<15;o++)s=!e&&1==(n>>o&1),o<8?this.modules[8][this.moduleCount-o-1]=s:o<9?this.modules[8][15-o-1+1]=s:this.modules[8][15-o-1]=s;this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var r=-1,n=this.moduleCount-1,o=7,s=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var c=0;c<2;c++)if(null==this.modules[n][a-c]){var l=!1;s>>o&1)),i.getMask(t,n,a-c)&&(l=!l),this.modules[n][a-c]=l,-1==--o&&(s++,o=7)}if((n+=r)<0||this.moduleCount<=n){n-=r,r=-r;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(e,t,n){for(var o=c.getRSBlocks(e,t),s=new l,a=0;a8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(r.PAD0,8),s.getLengthInBits()>=8*h));)s.put(r.PAD1,8);return r.createBytes(s,o)},r.createBytes=function(e,t){for(var r=0,n=0,o=0,s=new Array(t.length),c=new Array(t.length),l=0;l=0?f.get(g):0}}var m=0;for(d=0;d=0;)t^=i.G15<=0;)t^=i.G18<>>=1;return t},getPatternPosition:function(e){return i.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case 0:return(t+r)%2==0;case 1:return t%2==0;case 2:return r%3==0;case 3:return(t+r)%3==0;case 4:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case 5:return t*r%2+t*r%3==0;case 6:return(t*r%2+t*r%3)%2==0;case 7:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new a([1],0),r=0;r5&&(r+=3+o-5)}for(n=0;n=256;)e-=255;return o.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},s=0;s<8;s++)o.EXP_TABLE[s]=1<>>7-e%8&1)},put:function(e,t){for(var r=0;r>>t-r-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 u=[[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,i=function(e,t){for(var r=function(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}(e),n=1,i=0,o=0,s=u.length;o<=s;o++){var a=u[o];if(!a)throw new Error("Content too long: expected "+i+" but got "+r);switch(t){case"L":i=a[0];break;case"M":i=a[1];break;case"Q":i=a[2];break;case"H":i=a[3];break;default:throw new Error("Unknwon error correction level: "+t)}if(r<=i)break;n++}if(n>u.length)throw new Error("Content too long");return n}(n,this.options.ecl),o=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 r(i,o),this.qrcode.addData(n),this.qrcode.make()}h.prototype.svg=function(e){var t=this.options||{},r=this.qrcode.modules;void 0===e&&(e={container:t.container||"svg"});for(var n=void 0===t.pretty||!!t.pretty,i=n?" ":"",o=n?"\r\n":"",s=t.width,a=t.height,c=r.length,l=s/(c+2*t.padding),u=a/(c+2*t.padding),h=void 0!==t.join&&!!t.join,d=void 0!==t.swap&&!!t.swap,p=void 0===t.xmlDeclaration||!!t.xmlDeclaration,f=void 0!==t.predefined&&!!t.predefined,g=f?i+''+o:"",m=i+''+o,y="",w="",b=0;b'+o:i+''+o}h&&(y=i+'');let A="";if(void 0!==this.options.image&&this.options.image.svg){const e=s*this.options.image.width/100,t=a*this.options.image.height/100;A+=``,A+=this.options.image.svg+o,A+=""}var I="";switch(e.container){case"svg":p&&(I+=''+o),I+=''+o,I+=g+m+y,I+=A,I+="";break;case"svg-viewbox":p&&(I+=''+o),I+=''+o,I+=g+m+y,I+=A,I+="";break;case"g":I+=''+o,I+=g+m+y,I+=A,I+="";break;default:I+=(g+m+y+A).replace(/^\s+/,"")}return I},e.exports=h},3604:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LIB_VERSION=void 0,t.LIB_VERSION="3.7.2"},9394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7187);function i(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class o extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(void 0!==n)r=r&&void 0===n.error;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const o=n[e];if(void 0===o)return!1;if("function"==typeof o)i(o,this,t);else{const e=o.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;const n=r(1821);function i(e,t){return r=e,Boolean("string"==typeof(null===(i=null===(n=null==r?void 0:r.prototype)||void 0===n?void 0:n.constructor)||void 0===i?void 0:i.name))?new e({message:t}):e({message:t});var r,n,i}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}t.AssertionError=o,t.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",s=o){try{(0,n.assert)(e,t)}catch(e){throw i(s,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},7207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;const n=r(1821),i=r(1422);t.base64=(e,t={})=>{var r,o;const s=null!==(r=t.paddingRequired)&&void 0!==r&&r,a=null!==(o=t.characterSet)&&void 0!==o?o:"base64";let c,l;return"base64"===a?c=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===a),c=String.raw`[-_A-Za-z0-9]`),l=s?new RegExp(`^(?:${c}{4})*(?:${c}{3}=|${c}{2}==)?$`,"u"):new RegExp(`^(?:${c}{4})*(?:${c}{2,3}|${c}{3}=|${c}{2}==)?$`,"u"),(0,n.pattern)(e,l)}},9513:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;const n=r(1422),i=r(2009),o=48,s=58,a=87,c=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function l(e){return e instanceof Uint8Array}function u(e){(0,n.assert)(l(e),"Value must be a Uint8Array.")}function h(e){if(u(e),0===e.length)return"0x";const t=c(),r=new Array(e.length);for(let n=0;n=BigInt(0),"Value must be a non-negative bigint."),p(e.toString(16))}function g(e){return(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),p(e.toString(16))}function m(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return f(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?p(e):m(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}t.isBytes=l,t.assertIsBytes=u,t.bytesToHex=h,t.bytesToBigInt=d,t.bytesToSignedBigInt=function(e){u(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const i=new Uint8Array(t);for(let e=0;e>=BigInt(8);return i.reverse()},t.numberToBytes=g,t.stringToBytes=m,t.valueToBytes=y,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;const n=r(1821),i=r(7207);t.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},3557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;const n=r(1821),i=r(1422),o=r(9513),s=r(2009),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),c=(0,n.coerce)((0,n.number)(),a,Number),l=(0,n.coerce)((0,n.bigint)(),a,BigInt),u=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),o.hexToBytes)),h=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);t.createNumber=function(e){try{const t=(0,n.create)(e,c);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,u)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,h)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},4283:function(e,t){"use strict";var r,n,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class s{constructor(e){r.set(this,void 0),i(this,r,new Map(e),"f"),Object.freeze(this)}get size(){return o(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return o(this,r,"f")[Symbol.iterator]()}entries(){return o(this,r,"f").entries()}forEach(e,t){return o(this,r,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return o(this,r,"f").get(e)}has(e){return o(this,r,"f").has(e)}keys(){return o(this,r,"f").keys()}values(){return o(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}t.FrozenMap=s;class a{constructor(e){n.set(this,void 0),i(this,n,new Set(e),"f"),Object.freeze(this)}get size(){return o(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return o(this,n,"f")[Symbol.iterator]()}entries(){return o(this,n,"f").entries()}forEach(e,t){return o(this,n,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return o(this,n,"f").has(e)}keys(){return o(this,n,"f").keys()}values(){return o(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}t.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},2009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const n=r(1821),i=r(1422);function o(e){return(0,n.is)(e,t.HexStruct)}function s(e){return(0,n.is)(e,t.StrictHexStruct)}t.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),t.isHexString=o,t.isStrictHexString=s,t.assertIsHexString=function(e){(0,i.assert)(o(e),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(e){(0,i.assert)(s(e),'Value must be a hexadecimal string, starting with "0x".')},t.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},t.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}},2451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1422),t),i(r(7207),t),i(r(9513),t),i(r(5013),t),i(r(3557),t),i(r(4283),t),i(r(2009),t),i(r(2497),t),i(r(160),t),i(r(6215),t),i(r(9679),t),i(r(9108),t),i(r(7772),t),i(r(8426),t)},2497:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonAndGetSize=t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.isValidJson=t.JsonStruct=void 0;const n=r(1821),i=r(1422),o=r(6215);function s(e,t=!1){const r=new Set;return function e(t,n){if(void 0===t)return[!1,0];if(null===t)return[!0,n?0:o.JsonSize.Null];const i=typeof t;try{if("function"===i)return[!1,0];if("string"===i||t instanceof String)return[!0,n?0:(0,o.calculateStringSize)(t)+2*o.JsonSize.Quote];if("boolean"===i||t instanceof Boolean)return n?[!0,0]:[!0,1==t?o.JsonSize.True:o.JsonSize.False];if("number"===i||t instanceof Number)return n?[!0,0]:[!0,(0,o.calculateNumberSize)(t)];if(t instanceof Date)return n?[!0,0]:[!0,isNaN(t.getDate())?o.JsonSize.Null:o.JsonSize.Date+2*o.JsonSize.Quote]}catch(e){return[!1,0]}if(!(0,o.isPlainObject)(t)&&!Array.isArray(t))return[!1,0];if(r.has(t))return[!1,0];r.add(t);try{return[!0,Object.entries(t).reduce(((i,[s,a],c,l)=>{let[u,h]=e(a,n);if(!u)throw new Error("JSON validation did not pass. Validation process stopped.");return r.delete(t),n?0:i+(Array.isArray(t)?0:s.length+o.JsonSize.Comma+2*o.JsonSize.Colon)+h+(c{const[t]=s(e,!0);return!!t||"Expected a valid JSON-serializable value"})),t.isValidJson=function(e){return(0,n.is)(e,t.JsonStruct)},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,n.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),t.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(t.JsonStruct),stack:(0,n.optional)((0,n.string)())}),t.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),t.JsonStruct),(0,n.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,n.omit)(t.JsonRpcRequestStruct,["id"]),t.isJsonRpcNotification=function(e){return(0,n.is)(e,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(e,r){(0,i.assertStruct)(e,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",r)},t.isJsonRpcRequest=function(e){return(0,n.is)(e,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(e,r){(0,i.assertStruct)(e,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",r)},t.PendingJsonRpcResponseStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,n.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",r)},t.isJsonRpcResponse=function(e){return(0,n.is)(e,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",r)},t.isJsonRpcSuccess=function(e){return(0,n.is)(e,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(e,r){(0,i.assertStruct)(e,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",r)},t.isJsonRpcFailure=function(e){return(0,n.is)(e,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(e,r){(0,i.assertStruct)(e,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",r)},t.isJsonRpcError=function(e){return(0,n.is)(e,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(e,r){(0,i.assertStruct)(e,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",r)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},e);return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)},t.validateJsonAndGetSize=s},160:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.createProjectLogger=void 0;const i=(0,n(r(1227)).default)("metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},6215:(e,t)=>{"use strict";function r(e){return e.charCodeAt(0)<=127}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),(n=t.JsonSize||(t.JsonSize={}))[n.Null=4]="Null",n[n.Comma=1]="Comma",n[n.Wrapper=1]="Wrapper",n[n.True=4]="True",n[n.False=5]="False",n[n.Quote=1]="Quote",n[n.Colon=1]="Colon",n[n.Date=24]="Date",t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=r,t.calculateStringSize=function(e){var n;return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(null!==(n=e.match(t.ESCAPE_CHARACTERS_REGEXP))&&void 0!==n?n:[]).length},t.calculateNumberSize=function(e){return e.toString().length}},9679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;const n=r(1422),i=r(2009);t.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16))),t.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16))),t.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},9108:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7772:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,(r=t.Duration||(t.Duration={}))[r.Millisecond=1]="Millisecond",r[r.Second=1e3]="Second",r[r.Minute=6e4]="Minute",r[r.Hour=36e5]="Hour",r[r.Day=864e5]="Day",r[r.Week=6048e5]="Week",r[r.Year=31536e6]="Year";const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},8426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const n=r(1249),i=r(1821),o=r(1422);t.VersionStruct=(0,i.refine)((0,i.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),t.VersionRangeStruct=(0,i.refine)((0,i.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),t.isValidSemVerVersion=function(e){return(0,i.is)(e,t.VersionStruct)},t.isValidSemVerRange=function(e){return(0,i.is)(e,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(e){(0,o.assertStruct)(e,t.VersionStruct)},t.assertIsSemVerRange=function(e){(0,o.assertStruct)(e,t.VersionRangeStruct)},t.gtVersion=function(e,t){return(0,n.gt)(e,t)},t.gtRange=function(e,t){return(0,n.gtr)(e,t)},t.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}},8099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7117);function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function o(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function s(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function a(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function l(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function u(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),u(e/4294967296>>>0,t,r),u(e>>>0,t,r+4),t}function p(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),h(e>>>0,t,r),h(e/4294967296>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=o,t.writeInt16LE=o,t.readInt32BE=s,t.readUint32BE=a,t.readInt32LE=c,t.readUint32LE=l,t.writeUint32BE=u,t.writeInt32BE=u,t.writeUint32LE=h,t.writeInt32LE=h,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=s(e,t),n=s(e,t+4);return 4294967296*r+n-4294967296*(n>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*a(e,t)+a(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 4294967296*c(e,t+4)+r-4294967296*(r>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=l(e,t);return 4294967296*l(e,t+4)+r},t.writeUint64BE=d,t.writeInt64BE=d,t.writeUint64LE=p,t.writeInt64LE=p,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=e/8+r-1;o>=r;o--)n+=t[o]*i,i*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o=i;s--)r[s]=t/o&255,o*=256;return r},t.writeUintLE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,s=i;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8099),i=r(7309),o=20;function s(e,t,r){for(var i=1634760805,s=857760878,a=2036477234,c=1797285236,l=r[3]<<24|r[2]<<16|r[1]<<8|r[0],u=r[7]<<24|r[6]<<16|r[5]<<8|r[4],h=r[11]<<24|r[10]<<16|r[9]<<8|r[8],d=r[15]<<24|r[14]<<16|r[13]<<8|r[12],p=r[19]<<24|r[18]<<16|r[17]<<8|r[16],f=r[23]<<24|r[22]<<16|r[21]<<8|r[20],g=r[27]<<24|r[26]<<16|r[25]<<8|r[24],m=r[31]<<24|r[30]<<16|r[29]<<8|r[28],y=t[3]<<24|t[2]<<16|t[1]<<8|t[0],w=t[7]<<24|t[6]<<16|t[5]<<8|t[4],b=t[11]<<24|t[10]<<16|t[9]<<8|t[8],v=t[15]<<24|t[14]<<16|t[13]<<8|t[12],_=i,E=s,x=a,C=c,S=l,A=u,I=h,k=d,P=p,O=f,R=g,M=m,N=y,T=w,j=b,L=v,D=0;D>>16|N<<16)|0)>>>20|S<<12,A=(A^=O=O+(T=(T^=E=E+A|0)>>>16|T<<16)|0)>>>20|A<<12,I=(I^=R=R+(j=(j^=x=x+I|0)>>>16|j<<16)|0)>>>20|I<<12,k=(k^=M=M+(L=(L^=C=C+k|0)>>>16|L<<16)|0)>>>20|k<<12,I=(I^=R=R+(j=(j^=x=x+I|0)>>>24|j<<8)|0)>>>25|I<<7,k=(k^=M=M+(L=(L^=C=C+k|0)>>>24|L<<8)|0)>>>25|k<<7,A=(A^=O=O+(T=(T^=E=E+A|0)>>>24|T<<8)|0)>>>25|A<<7,S=(S^=P=P+(N=(N^=_=_+S|0)>>>24|N<<8)|0)>>>25|S<<7,A=(A^=R=R+(L=(L^=_=_+A|0)>>>16|L<<16)|0)>>>20|A<<12,I=(I^=M=M+(N=(N^=E=E+I|0)>>>16|N<<16)|0)>>>20|I<<12,k=(k^=P=P+(T=(T^=x=x+k|0)>>>16|T<<16)|0)>>>20|k<<12,S=(S^=O=O+(j=(j^=C=C+S|0)>>>16|j<<16)|0)>>>20|S<<12,k=(k^=P=P+(T=(T^=x=x+k|0)>>>24|T<<8)|0)>>>25|k<<7,S=(S^=O=O+(j=(j^=C=C+S|0)>>>24|j<<8)|0)>>>25|S<<7,I=(I^=M=M+(N=(N^=E=E+I|0)>>>24|N<<8)|0)>>>25|I<<7,A=(A^=R=R+(L=(L^=_=_+A|0)>>>24|L<<8)|0)>>>25|A<<7;n.writeUint32LE(_+i|0,e,0),n.writeUint32LE(E+s|0,e,4),n.writeUint32LE(x+a|0,e,8),n.writeUint32LE(C+c|0,e,12),n.writeUint32LE(S+l|0,e,16),n.writeUint32LE(A+u|0,e,20),n.writeUint32LE(I+h|0,e,24),n.writeUint32LE(k+d|0,e,28),n.writeUint32LE(P+p|0,e,32),n.writeUint32LE(O+f|0,e,36),n.writeUint32LE(R+g|0,e,40),n.writeUint32LE(M+m|0,e,44),n.writeUint32LE(N+y|0,e,48),n.writeUint32LE(T+w|0,e,52),n.writeUint32LE(j+b|0,e,56),n.writeUint32LE(L+v|0,e,60)}function a(e,t,r,n,o){if(void 0===o&&(o=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=a,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),a(e,t,r,r,n)}},5501:(e,t,r)=>{"use strict";var n=r(5439),i=r(3027),o=r(7309),s=r(8099),a=r(4153);t.Cv=32,t.WH=12,t.pg=16;var c=new Uint8Array(16),l=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);n.stream(this._key,s,a,4);var c,l=t.length+this.tagLength;if(i){if(i.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");c=i}else c=new Uint8Array(l);return n.streamXOR(this._key,s,t,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),r),o.wipe(s),c},e.prototype.open=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&a.update(c.subarray(n.length%16))),a.update(r),r.length%16>0&&a.update(c.subarray(r.length%16));var l=new Uint8Array(8);n&&s.writeUint64LE(n.length,l),a.update(l),s.writeUint64LE(r.length,l),a.update(l);for(var u=a.digest(),h=0;h{"use strict";function r(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,r){return~(e-1)&t|e-1&r},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=r,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==r(e,t)}},1050:(e,t,r)=>{"use strict";t.Xx=t._w=t.aP=t.KS=t.jQ=void 0;r(1416);const n=r(3350);r(7309);function i(e){const t=new Float64Array(16);if(e)for(let r=0;r>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,d(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}function f(e){const t=new Uint8Array(32);return p(t,e),1&t[0]}function g(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function m(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function y(e,t,r){let n,i,o=0,s=0,a=0,c=0,l=0,u=0,h=0,d=0,p=0,f=0,g=0,m=0,y=0,w=0,b=0,v=0,_=0,E=0,x=0,C=0,S=0,A=0,I=0,k=0,P=0,O=0,R=0,M=0,N=0,T=0,j=0,L=r[0],D=r[1],$=r[2],B=r[3],U=r[4],F=r[5],z=r[6],W=r[7],H=r[8],V=r[9],q=r[10],G=r[11],Z=r[12],K=r[13],Y=r[14],Q=r[15];n=t[0],o+=n*L,s+=n*D,a+=n*$,c+=n*B,l+=n*U,u+=n*F,h+=n*z,d+=n*W,p+=n*H,f+=n*V,g+=n*q,m+=n*G,y+=n*Z,w+=n*K,b+=n*Y,v+=n*Q,n=t[1],s+=n*L,a+=n*D,c+=n*$,l+=n*B,u+=n*U,h+=n*F,d+=n*z,p+=n*W,f+=n*H,g+=n*V,m+=n*q,y+=n*G,w+=n*Z,b+=n*K,v+=n*Y,_+=n*Q,n=t[2],a+=n*L,c+=n*D,l+=n*$,u+=n*B,h+=n*U,d+=n*F,p+=n*z,f+=n*W,g+=n*H,m+=n*V,y+=n*q,w+=n*G,b+=n*Z,v+=n*K,_+=n*Y,E+=n*Q,n=t[3],c+=n*L,l+=n*D,u+=n*$,h+=n*B,d+=n*U,p+=n*F,f+=n*z,g+=n*W,m+=n*H,y+=n*V,w+=n*q,b+=n*G,v+=n*Z,_+=n*K,E+=n*Y,x+=n*Q,n=t[4],l+=n*L,u+=n*D,h+=n*$,d+=n*B,p+=n*U,f+=n*F,g+=n*z,m+=n*W,y+=n*H,w+=n*V,b+=n*q,v+=n*G,_+=n*Z,E+=n*K,x+=n*Y,C+=n*Q,n=t[5],u+=n*L,h+=n*D,d+=n*$,p+=n*B,f+=n*U,g+=n*F,m+=n*z,y+=n*W,w+=n*H,b+=n*V,v+=n*q,_+=n*G,E+=n*Z,x+=n*K,C+=n*Y,S+=n*Q,n=t[6],h+=n*L,d+=n*D,p+=n*$,f+=n*B,g+=n*U,m+=n*F,y+=n*z,w+=n*W,b+=n*H,v+=n*V,_+=n*q,E+=n*G,x+=n*Z,C+=n*K,S+=n*Y,A+=n*Q,n=t[7],d+=n*L,p+=n*D,f+=n*$,g+=n*B,m+=n*U,y+=n*F,w+=n*z,b+=n*W,v+=n*H,_+=n*V,E+=n*q,x+=n*G,C+=n*Z,S+=n*K,A+=n*Y,I+=n*Q,n=t[8],p+=n*L,f+=n*D,g+=n*$,m+=n*B,y+=n*U,w+=n*F,b+=n*z,v+=n*W,_+=n*H,E+=n*V,x+=n*q,C+=n*G,S+=n*Z,A+=n*K,I+=n*Y,k+=n*Q,n=t[9],f+=n*L,g+=n*D,m+=n*$,y+=n*B,w+=n*U,b+=n*F,v+=n*z,_+=n*W,E+=n*H,x+=n*V,C+=n*q,S+=n*G,A+=n*Z,I+=n*K,k+=n*Y,P+=n*Q,n=t[10],g+=n*L,m+=n*D,y+=n*$,w+=n*B,b+=n*U,v+=n*F,_+=n*z,E+=n*W,x+=n*H,C+=n*V,S+=n*q,A+=n*G,I+=n*Z,k+=n*K,P+=n*Y,O+=n*Q,n=t[11],m+=n*L,y+=n*D,w+=n*$,b+=n*B,v+=n*U,_+=n*F,E+=n*z,x+=n*W,C+=n*H,S+=n*V,A+=n*q,I+=n*G,k+=n*Z,P+=n*K,O+=n*Y,R+=n*Q,n=t[12],y+=n*L,w+=n*D,b+=n*$,v+=n*B,_+=n*U,E+=n*F,x+=n*z,C+=n*W,S+=n*H,A+=n*V,I+=n*q,k+=n*G,P+=n*Z,O+=n*K,R+=n*Y,M+=n*Q,n=t[13],w+=n*L,b+=n*D,v+=n*$,_+=n*B,E+=n*U,x+=n*F,C+=n*z,S+=n*W,A+=n*H,I+=n*V,k+=n*q,P+=n*G,O+=n*Z,R+=n*K,M+=n*Y,N+=n*Q,n=t[14],b+=n*L,v+=n*D,_+=n*$,E+=n*B,x+=n*U,C+=n*F,S+=n*z,A+=n*W,I+=n*H,k+=n*V,P+=n*q,O+=n*G,R+=n*Z,M+=n*K,N+=n*Y,T+=n*Q,n=t[15],v+=n*L,_+=n*D,E+=n*$,x+=n*B,C+=n*U,S+=n*F,A+=n*z,I+=n*W,k+=n*H,P+=n*V,O+=n*q,R+=n*G,M+=n*Z,N+=n*K,T+=n*Y,j+=n*Q,o+=38*_,s+=38*E,a+=38*x,c+=38*C,l+=38*S,u+=38*A,h+=38*I,d+=38*k,p+=38*P,f+=38*O,g+=38*R,m+=38*M,y+=38*N,w+=38*T,b+=38*j,i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,o+=i-1+37*(i-1),i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=l,e[5]=u,e[6]=h,e[7]=d,e[8]=p,e[9]=f,e[10]=g,e[11]=m,e[12]=y,e[13]=w,e[14]=b,e[15]=v}function w(e,t){y(e,t,t)}function b(e,t){const r=i(),n=i(),o=i(),s=i(),c=i(),l=i(),u=i(),h=i(),d=i();m(r,e[1],e[0]),m(d,t[1],t[0]),y(r,r,d),g(n,e[0],e[1]),g(d,t[0],t[1]),y(n,n,d),y(o,e[3],t[3]),y(o,o,a),y(s,e[2],t[2]),g(s,s,s),m(c,n,r),m(l,s,o),g(u,s,o),g(h,n,r),y(e[0],c,l),y(e[1],h,u),y(e[2],u,l),y(e[3],c,h)}function v(e,t,r){for(let n=0;n<4;n++)d(e[n],t[n],r)}function _(e,t){const r=i(),n=i(),o=i();(function(e,t){const r=i();let n;for(n=0;n<16;n++)r[n]=t[n];for(n=253;n>=0;n--)w(r,r),2!==n&&4!==n&&y(r,r,t);for(n=0;n<16;n++)e[n]=r[n]})(o,t[2]),y(r,t[0],o),y(n,t[1],o),p(e,n),e[31]^=f(r)<<7}function E(e,t){const r=[i(),i(),i(),i()];u(r[0],c),u(r[1],l),u(r[2],s),y(r[3],c,l),function(e,t,r){u(e[0],o),u(e[1],s),u(e[2],s),u(e[3],o);for(let n=255;n>=0;--n){const i=r[n/8|0]>>(7&n)&1;v(e,t,i),b(t,e),b(e,e),v(e,t,i)}}(e,r,t)}t._w=function(e){if(e.length!==t.aP)throw new Error(`ed25519: seed must be ${t.aP} bytes`);const r=(0,n.hash)(e);r[0]&=248,r[31]&=127,r[31]|=64;const o=new Uint8Array(32),s=[i(),i(),i(),i()];E(s,r),_(o,s);const a=new Uint8Array(64);return a.set(e),a.set(o,32),{publicKey:o,secretKey:a}};const x=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function C(e,t){let r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>4)*x[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*x[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function S(e){const t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let t=0;t<64;t++)e[t]=0;C(e,t)}t.Xx=function(e,t){const r=new Float64Array(64),o=[i(),i(),i(),i()],s=(0,n.hash)(e.subarray(0,32));s[0]&=248,s[31]&=127,s[31]|=64;const a=new Uint8Array(64);a.set(s.subarray(32),32);const c=new n.SHA512;c.update(a.subarray(32)),c.update(t);const l=c.digest();c.clean(),S(l),E(o,l),_(a,o),c.reset(),c.update(a.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const u=c.digest();S(u);for(let e=0;e<32;e++)r[e]=l[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=u[e]*s[t];return C(a.subarray(32),r),a}},9984:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState}},512:(e,t,r)=>{"use strict";var n=r(5629),i=r(7309),o=function(){function e(e,t,r,i){void 0===r&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=n.hmac(this._hash,r,t);this._hmac=new n.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9984),i=r(4153),o=r(7309),s=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(r).clean():r.set(t);for(var i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},3027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4153),i=r(7309);t.DIGEST_LENGTH=16;var o=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=8191&r;var n=e[2]|e[3]<<8;this._r[1]=8191&(r>>>13|n<<3);var i=e[4]|e[5]<<8;this._r[2]=7939&(n>>>10|i<<6);var o=e[6]|e[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=e[8]|e[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=e[10]|e[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var l=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|l<<8),this._r[9]=l>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,r){for(var n=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],c=this._h[4],l=this._h[5],u=this._h[6],h=this._h[7],d=this._h[8],p=this._h[9],f=this._r[0],g=this._r[1],m=this._r[2],y=this._r[3],w=this._r[4],b=this._r[5],v=this._r[6],_=this._r[7],E=this._r[8],x=this._r[9];r>=16;){var C=e[t+0]|e[t+1]<<8;i+=8191&C;var S=e[t+2]|e[t+3]<<8;o+=8191&(C>>>13|S<<3);var A=e[t+4]|e[t+5]<<8;s+=8191&(S>>>10|A<<6);var I=e[t+6]|e[t+7]<<8;a+=8191&(A>>>7|I<<9);var k=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|k<<12),l+=k>>>1&8191;var P=e[t+10]|e[t+11]<<8;u+=8191&(k>>>14|P<<2);var O=e[t+12]|e[t+13]<<8;h+=8191&(P>>>11|O<<5);var R=e[t+14]|e[t+15]<<8,M=0,N=M;N+=i*f,N+=o*(5*x),N+=s*(5*E),N+=a*(5*_),M=(N+=c*(5*v))>>>13,N&=8191,N+=l*(5*b),N+=u*(5*w),N+=h*(5*y),N+=(d+=8191&(O>>>8|R<<8))*(5*m);var T=M+=(N+=(p+=R>>>5|n)*(5*g))>>>13;T+=i*g,T+=o*f,T+=s*(5*x),T+=a*(5*E),M=(T+=c*(5*_))>>>13,T&=8191,T+=l*(5*v),T+=u*(5*b),T+=h*(5*w),T+=d*(5*y),M+=(T+=p*(5*m))>>>13,T&=8191;var j=M;j+=i*m,j+=o*g,j+=s*f,j+=a*(5*x),M=(j+=c*(5*E))>>>13,j&=8191,j+=l*(5*_),j+=u*(5*v),j+=h*(5*b),j+=d*(5*w);var L=M+=(j+=p*(5*y))>>>13;L+=i*y,L+=o*m,L+=s*g,L+=a*f,M=(L+=c*(5*x))>>>13,L&=8191,L+=l*(5*E),L+=u*(5*_),L+=h*(5*v),L+=d*(5*b);var D=M+=(L+=p*(5*w))>>>13;D+=i*w,D+=o*y,D+=s*m,D+=a*g,M=(D+=c*f)>>>13,D&=8191,D+=l*(5*x),D+=u*(5*E),D+=h*(5*_),D+=d*(5*v);var $=M+=(D+=p*(5*b))>>>13;$+=i*b,$+=o*w,$+=s*y,$+=a*m,M=($+=c*g)>>>13,$&=8191,$+=l*f,$+=u*(5*x),$+=h*(5*E),$+=d*(5*_);var B=M+=($+=p*(5*v))>>>13;B+=i*v,B+=o*b,B+=s*w,B+=a*y,M=(B+=c*m)>>>13,B&=8191,B+=l*g,B+=u*f,B+=h*(5*x),B+=d*(5*E);var U=M+=(B+=p*(5*_))>>>13;U+=i*_,U+=o*v,U+=s*b,U+=a*w,M=(U+=c*y)>>>13,U&=8191,U+=l*m,U+=u*g,U+=h*f,U+=d*(5*x);var F=M+=(U+=p*(5*E))>>>13;F+=i*E,F+=o*_,F+=s*v,F+=a*b,M=(F+=c*w)>>>13,F&=8191,F+=l*y,F+=u*m,F+=h*g,F+=d*f;var z=M+=(F+=p*(5*x))>>>13;z+=i*x,z+=o*E,z+=s*_,z+=a*v,M=(z+=c*b)>>>13,z&=8191,z+=l*w,z+=u*y,z+=h*m,z+=d*g,i=N=8191&(M=(M=((M+=(z+=p*f)>>>13)<<2)+M|0)+(N&=8191)|0),o=T+=M>>>=13,s=j&=8191,a=L&=8191,c=D&=8191,l=$&=8191,u=B&=8191,h=U&=8191,d=F&=8191,p=z&=8191,t+=16,r-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=c,this._h[5]=l,this._h[6]=u,this._h[7]=h,this._h[8]=d,this._h[9]=p},e.prototype.finish=function(e,t){void 0===t&&(t=0);var r,n,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=r,r=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,s[0]=this._h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this._h[o]=this._h[o]&n|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,r=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var i=0;i=16&&(t=n-n%16,this._blocks(e,r,t),r+=t,n-=t),n){for(i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const n=r(6008),i=r(8099),o=r(7309);function s(e,r=t.defaultRandomSource){return r.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=s,t.randomUint32=function(e=t.defaultRandomSource){const r=s(4,e),n=(0,i.readUint32LE)(r);return(0,o.wipe)(r),n};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(e,r=a,n=t.defaultRandomSource){if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let i="";const c=r.length,l=256-256%c;for(;e>0;){const t=s(Math.ceil(256*e/l),n);for(let n=0;n0;n++){const o=t[n];o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0,t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const n=r(7309);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=r(5883);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(e);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const n=r(5455),i=r(8871);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},3294:(e,t,r)=>{"use strict";var n=r(8099),i=r(7309);t.k=32,t.cn=64;var o=function(){function e(){this.digestLength=t.k,this.blockSize=t.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=a(this._temp,this._state,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,s=t%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=o;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function a(e,t,r,i,o){for(;o>=64;){for(var a=t[0],c=t[1],l=t[2],u=t[3],h=t[4],d=t[5],p=t[6],f=t[7],g=0;g<16;g++){var m=i+4*g;e[g]=n.readUint32BE(r,m)}for(g=16;g<64;g++){var y=e[g-2],w=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,b=((y=e[g-15])>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;e[g]=(w+e[g-7]|0)+(b+e[g-16]|0)}for(g=0;g<64;g++)w=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&d^~h&p)|0)+(f+(s[g]+e[g]|0)|0)|0,b=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&l^c&l)|0,f=p,p=d,d=h,h=u+w|0,u=l,l=c,c=a,a=w+b|0;t[0]+=a,t[1]+=c,t[2]+=l,t[3]+=u,t[4]+=h,t[5]+=d,t[6]+=p,t[7]+=f,i+=64,o-=64}return i}t.vp=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},3350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8099),i=r(7309);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var o=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,s=t%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.stateHi),i.wipe(e.stateLo),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=o;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(e,t,r,i,o,a,c){for(var l,u,h,d,p,f,g,m,y=r[0],w=r[1],b=r[2],v=r[3],_=r[4],E=r[5],x=r[6],C=r[7],S=i[0],A=i[1],I=i[2],k=i[3],P=i[4],O=i[5],R=i[6],M=i[7];c>=128;){for(var N=0;N<16;N++){var T=8*N+a;e[N]=n.readUint32BE(o,T),t[N]=n.readUint32BE(o,T+4)}for(N=0;N<80;N++){var j,L,D=y,$=w,B=b,U=v,F=_,z=E,W=x,H=S,V=A,q=I,G=k,Z=P,K=O,Y=R;if(p=65535&(u=M),f=u>>>16,g=65535&(l=C),m=l>>>16,p+=65535&(u=(P>>>14|_<<18)^(P>>>18|_<<14)^(_>>>9|P<<23)),f+=u>>>16,g+=65535&(l=(_>>>14|P<<18)^(_>>>18|P<<14)^(P>>>9|_<<23)),m+=l>>>16,p+=65535&(u=P&O^~P&R),f+=u>>>16,g+=65535&(l=_&E^~_&x),m+=l>>>16,l=s[2*N],p+=65535&(u=s[2*N+1]),f+=u>>>16,g+=65535&l,m+=l>>>16,l=e[N%16],f+=(u=t[N%16])>>>16,g+=65535&l,m+=l>>>16,g+=(f+=(p+=65535&u)>>>16)>>>16,p=65535&(u=d=65535&p|f<<16),f=u>>>16,g=65535&(l=h=65535&g|(m+=g>>>16)<<16),m=l>>>16,p+=65535&(u=(S>>>28|y<<4)^(y>>>2|S<<30)^(y>>>7|S<<25)),f+=u>>>16,g+=65535&(l=(y>>>28|S<<4)^(S>>>2|y<<30)^(S>>>7|y<<25)),m+=l>>>16,f+=(u=S&A^S&I^A&I)>>>16,g+=65535&(l=y&w^y&b^w&b),m+=l>>>16,j=65535&(g+=(f+=(p+=65535&u)>>>16)>>>16)|(m+=g>>>16)<<16,L=65535&p|f<<16,p=65535&(u=G),f=u>>>16,g=65535&(l=U),m=l>>>16,f+=(u=d)>>>16,g+=65535&(l=h),m+=l>>>16,w=D,b=$,v=B,_=U=65535&(g+=(f+=(p+=65535&u)>>>16)>>>16)|(m+=g>>>16)<<16,E=F,x=z,C=W,y=j,A=H,I=V,k=q,P=G=65535&p|f<<16,O=Z,R=K,M=Y,S=L,N%16==15)for(T=0;T<16;T++)l=e[T],p=65535&(u=t[T]),f=u>>>16,g=65535&l,m=l>>>16,l=e[(T+9)%16],p+=65535&(u=t[(T+9)%16]),f+=u>>>16,g+=65535&l,m+=l>>>16,h=e[(T+1)%16],p+=65535&(u=((d=t[(T+1)%16])>>>1|h<<31)^(d>>>8|h<<24)^(d>>>7|h<<25)),f+=u>>>16,g+=65535&(l=(h>>>1|d<<31)^(h>>>8|d<<24)^h>>>7),m+=l>>>16,h=e[(T+14)%16],f+=(u=((d=t[(T+14)%16])>>>19|h<<13)^(h>>>29|d<<3)^(d>>>6|h<<26))>>>16,g+=65535&(l=(h>>>19|d<<13)^(d>>>29|h<<3)^h>>>6),m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,e[T]=65535&g|m<<16,t[T]=65535&p|f<<16}p=65535&(u=S),f=u>>>16,g=65535&(l=y),m=l>>>16,l=r[0],f+=(u=i[0])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[0]=y=65535&g|m<<16,i[0]=S=65535&p|f<<16,p=65535&(u=A),f=u>>>16,g=65535&(l=w),m=l>>>16,l=r[1],f+=(u=i[1])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[1]=w=65535&g|m<<16,i[1]=A=65535&p|f<<16,p=65535&(u=I),f=u>>>16,g=65535&(l=b),m=l>>>16,l=r[2],f+=(u=i[2])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[2]=b=65535&g|m<<16,i[2]=I=65535&p|f<<16,p=65535&(u=k),f=u>>>16,g=65535&(l=v),m=l>>>16,l=r[3],f+=(u=i[3])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[3]=v=65535&g|m<<16,i[3]=k=65535&p|f<<16,p=65535&(u=P),f=u>>>16,g=65535&(l=_),m=l>>>16,l=r[4],f+=(u=i[4])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[4]=_=65535&g|m<<16,i[4]=P=65535&p|f<<16,p=65535&(u=O),f=u>>>16,g=65535&(l=E),m=l>>>16,l=r[5],f+=(u=i[5])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[5]=E=65535&g|m<<16,i[5]=O=65535&p|f<<16,p=65535&(u=R),f=u>>>16,g=65535&(l=x),m=l>>>16,l=r[6],f+=(u=i[6])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[6]=x=65535&g|m<<16,i[6]=R=65535&p|f<<16,p=65535&(u=M),f=u>>>16,g=65535&(l=C),m=l>>>16,l=r[7],f+=(u=i[7])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[7]=C=65535&g|m<<16,i[7]=M=65535&p|f<<16,a+=128,c-=128}return a}t.hash=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},7309:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t{"use strict";t.gi=t.Au=t.KS=t.kz=void 0;const n=r(1416),i=r(7309);function o(e){const t=new Float64Array(16);if(e)for(let r=0;r=0;--e){const t=r[e>>>3]>>>(7&e)&1;l(i,s,t),l(f,g,t),u(m,i,f),h(i,i,f),u(f,s,g),h(s,s,g),p(g,m),p(y,i),d(i,f,i),d(f,s,m),u(m,i,f),h(i,i,f),p(s,i),h(f,g,y),d(i,f,a),u(i,i,g),d(f,f,i),d(i,g,y),d(g,s,n),p(s,m),l(i,s,t),l(f,g,t)}for(let e=0;e<16;e++)n[e+16]=i[e],n[e+32]=f[e],n[e+48]=s[e],n[e+64]=g[e];const w=n.subarray(32),b=n.subarray(16);!function(e,t){const r=o();for(let e=0;e<16;e++)r[e]=t[e];for(let e=253;e>=0;e--)p(r,r),2!==e&&4!==e&&d(r,r,t);for(let t=0;t<16;t++)e[t]=r[t]}(w,w),d(b,b,w);const v=new Uint8Array(32);return function(e,t){const r=o(),n=o();for(let e=0;e<16;e++)n[e]=t[e];c(n),c(n),c(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,l(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}(v,b),v}t.Au=function(e){const r=(0,n.randomBytes)(32,e),o=function(e){if(e.length!==t.KS)throw new Error(`x25519: seed must be ${t.KS} bytes`);const r=new Uint8Array(e);return{publicKey:(n=r,f(n,s)),secretKey:r};var n}(r);return(0,i.wipe)(r),o},t.gi=function(e,r,n=!1){if(e.length!==t.kz)throw new Error("X25519: incorrect secret key length");if(r.length!==t.kz)throw new Error("X25519: incorrect public key length");const i=f(e,r);if(n){let e=0;for(let t=0;t{"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function i(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=i,t.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},8618:(e,t)=>{"use strict";function r(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function n(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=r,t.isNode=n,t.isBrowser=function(){return!r()&&!n()}},1468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(926),t),n.__exportStar(r(8618),t)},3098:(e,t,r)=>{"use strict";r.d(t,{EthereumProvider:()=>Co});var n=r(7187),i=r.n(n),o=r(9795);const s=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,a=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,c=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function l(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function u(e,t={}){if("string"!=typeof e)return e;const r=e.trim();if('"'===e[0]&&'"'===e.at(-1)&&!e.includes("\\"))return r.slice(1,-1);if(r.length<=9){const e=r.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!c.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(s.test(e)||a.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,l)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}function h(e,...t){try{return(r=e(...t))&&"function"==typeof r.then?r:Promise.resolve(r)}catch(e){return Promise.reject(e)}var r}function d(e){if(function(e){const t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return d(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function p(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const f="base64:";function g(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function m(...e){return g(e.join(":"))}function y(e){return(e=g(e))?e+":":""}const w=()=>{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function b(e,t,r){return e.watch?e.watch(((e,n)=>t(e,r+n))):()=>{}}async function v(e){"function"==typeof e.dispose&&await h(e.dispose)}function _(e){return new Promise(((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)}))}function E(e,t){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);const n=_(r);return(e,r)=>n.then((n=>r(n.transaction(t,e).objectStore(t))))}let x;function C(){return x||(x=E("keyval-store","keyval")),x}function S(e,t=C()){return t("readonly",(t=>_(t.get(e))))}const A=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),I=e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function k(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return I(e)}catch(t){return e}}function P(e){return"string"==typeof e?e:A(e)||""}var O=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",r=e=>t+e;let n;return e.dbName&&e.storeName&&(n=E(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await S(r(e),n)>"u"),getItem:async e=>await S(r(e),n)??null,setItem:(e,t)=>function(e,t,r=C()){return r("readwrite",(r=>(r.put(t,e),_(r.transaction))))}(r(e),t,n),removeItem:e=>function(e,t=C()){return t("readwrite",(t=>(t.delete(e),_(t.transaction))))}(r(e),n),getKeys:()=>function(e=C()){return e("readonly",(e=>{if(e.getAllKeys)return _(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},_(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}(n),clear:()=>function(e=C()){return e("readwrite",(e=>(e.clear(),_(e.transaction))))}(n)}};class R{constructor(){this.indexedDb=function(e={}){const t={mounts:{"":e.driver||w()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=e=>{for(const r of t.mountpoints)if(e.startsWith(r))return{base:r,relativeKey:e.slice(r.length),driver:t.mounts[r]};return{base:"",relativeKey:e,driver:t.mounts[""]}},n=(e,r)=>t.mountpoints.filter((t=>t.startsWith(e)||r&&e.startsWith(t))).map((r=>({relativeBase:e.length>r.length?e.slice(r.length):void 0,mountpoint:r,driver:t.mounts[r]}))),i=(e,r)=>{if(t.watching){r=g(r);for(const n of t.watchListeners)n(e,r)}},o=async()=>{if(t.watching){for(const e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},s=(e,t,n)=>{const i=new Map,o=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const n of e){const e="string"==typeof n,i=g(e?n:n.key),s=e?void 0:n.value,a=e||!n.options?t:{...t,...n.options},c=r(i);o(c).items.push({key:i,value:s,relativeKey:c.relativeKey,options:a})}return Promise.all([...i.values()].map((e=>n(e)))).then((e=>e.flat()))},a={hasItem(e,t={}){e=g(e);const{relativeKey:n,driver:i}=r(e);return h(i.hasItem,n,t)},getItem(e,t={}){e=g(e);const{relativeKey:n,driver:i}=r(e);return h(i.getItem,n,t).then((e=>u(e)))},getItems:(e,t)=>s(e,t,(e=>e.driver.getItems?h(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:m(e.base,t.key),value:u(t.value)}))))):Promise.all(e.items.map((t=>h(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:u(e)})))))))),getItemRaw(e,t={}){e=g(e);const{relativeKey:n,driver:i}=r(e);return i.getItemRaw?h(i.getItemRaw,n,t):h(i.getItem,n,t).then((e=>function(e){return"string"!=typeof e?e:e.startsWith(f)?(p(),Buffer.from(e.slice(7),"base64")):e}(e)))},async setItem(e,t,n={}){if(void 0===t)return a.removeItem(e);e=g(e);const{relativeKey:o,driver:s}=r(e);s.setItem&&(await h(s.setItem,o,d(t),n),s.watch||i("update",e))},async setItems(e,t){await s(e,t,(async e=>{e.driver.setItems&&await h(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:d(e.value),options:e.options}))),t),e.driver.setItem&&await Promise.all(e.items.map((t=>h(e.driver.setItem,t.relativeKey,d(t.value),t.options))))}))},async setItemRaw(e,t,n={}){if(void 0===t)return a.removeItem(e,n);e=g(e);const{relativeKey:o,driver:s}=r(e);if(s.setItemRaw)await h(s.setItemRaw,o,t,n);else{if(!s.setItem)return;await h(s.setItem,o,function(e){if("string"==typeof e)return e;p();const t=Buffer.from(e).toString("base64");return f+t}(t),n)}s.watch||i("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=g(e);const{relativeKey:n,driver:o}=r(e);o.removeItem&&(await h(o.removeItem,n,t),(t.removeMeta||t.removeMata)&&await h(o.removeItem,n+"$",t),o.watch||i("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=g(e);const{relativeKey:n,driver:i}=r(e),o=Object.create(null);if(i.getMeta&&Object.assign(o,await h(i.getMeta,n,t)),!t.nativeOnly){const e=await h(i.getItem,n+"$",t).then((e=>u(e)));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(o,e))}return o},setMeta(e,t,r={}){return this.setItem(e+"$",t,r)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=y(e);const r=n(e,!0);let i=[];const o=[];for(const e of r){const r=(await h(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+g(t))).filter((e=>!i.some((t=>e.startsWith(t)))));o.push(...r),i=[e.mountpoint,...i.filter((t=>!t.startsWith(e.mountpoint)))]}return e?o.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):o.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=y(e),await Promise.all(n(e,!1).map((async e=>{if(e.driver.clear)return h(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const r=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(r.map((r=>e.driver.removeItem(r,t))))}})))},async dispose(){await Promise.all(Object.values(t.mounts).map((e=>v(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(const e in t.mounts)t.unwatch[e]=await b(t.mounts[e],i,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await o()}),async unwatch(){t.watchListeners=[],await o()},mount(e,r){if((e=y(e))&&t.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort(((e,t)=>t.length-e.length))),t.mounts[e]=r,t.watching&&Promise.resolve(b(r,i,e)).then((r=>{t.unwatch[e]=r})).catch(console.error),a},async unmount(e,r=!0){(e=y(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),r&&await v(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=g(e)+":";const t=r(e);return{driver:t.driver,base:t.base}},getMounts:(e="",t={})=>(e=g(e),n(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint}))))};return a}({driver:O({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,P(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var M=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{},N={exports:{}};function T(e){var t;return[e[0],k(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof M<"u"&&M.localStorage?N.exports=M.localStorage:typeof window<"u"&&window.localStorage?N.exports=window.localStorage:N.exports=new t}();class j{constructor(){this.localStorage=N.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(T)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return k(t)}async setItem(e,t){this.localStorage.setItem(e,P(t))}async removeItem(e){this.localStorage.removeItem(e)}}class L{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new j;this.storage=e;try{(async(e,t,r)=>{const n="wc_storage_version",i=await t.getItem(n);if(i&&i>=1)return void r(t);const o=await e.getKeys();if(!o.length)return void r(t);const s=[];for(;o.length;){const r=o.shift();if(!r)continue;const n=r.toLowerCase();if(n.includes("wc@")||n.includes("walletconnect")||n.includes("wc_")||n.includes("wallet_connect")){const n=await e.getItem(r);await t.setItem(r,n),s.push(r)}}await t.setItem(n,1),r(t),(async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))})(e,s)})(e,new R,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}var D=r(772),$=r(9107),B=r(8200);class U extends B.q{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class F extends B.q{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class z{constructor(e,t){this.logger=e,this.core=t}}class W extends B.q{constructor(e,t){super(),this.relayer=e,this.logger=t}}class H extends B.q{constructor(e){super()}}class V{constructor(e,t,r,n){this.core=e,this.logger=t,this.name=r}}class q extends B.q{constructor(e,t){super(),this.relayer=e,this.logger=t}}class G extends B.q{constructor(e,t){super(),this.core=e,this.logger=t}}class Z{constructor(e,t){this.projectId=e,this.logger=t}}class K{constructor(e,t){this.projectId=e,this.logger=t}}class Y{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class Q{constructor(e){this.client=e}}var J=r(1050),X=r(1416),ee=r(6736);const te="base64url",re="utf8",ne=":",ie="did",oe="key",se="base58btc",ae="z",ce="K36";var le=r(605),ue=r(2263),he=r(2217);function de(e){return(0,ue.B)((0,he.m)(P(e),re),te)}function pe(e){const t=(0,he.m)(ce,se),r=ae+(0,ue.B)((0,le.z)([t,e]),se);return[ie,oe,r].join(ne)}function fe(e=(0,X.randomBytes)(32)){return J._w(e)}r(3014);var ge=r(7466);const me="INTERNAL_ERROR",ye="SERVER_ERROR",we=[-32700,-32600,-32601,-32602,-32603],be={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[me]:{code:-32603,message:"Internal error"},[ye]:{code:-32e3,message:"Server error"}},ve=ye;function _e(e){return Object.keys(be).includes(e)?be[e]:be[ve]}function Ee(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var xe=r(1468);function Ce(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function Se(e=6){return BigInt(Ce(e))}function Ae(e,t,r){return{id:r||Ce(),jsonrpc:"2.0",method:e,params:t}}function Ie(e,t){return{id:e,jsonrpc:"2.0",result:t}}function ke(e,t,r){return{id:e,jsonrpc:"2.0",error:Pe(t,r)}}function Pe(e,t){return void 0===e?_e(me):("string"==typeof e&&(e=Object.assign(Object.assign({},_e(ye)),{message:e})),void 0!==t&&(e.data=t),r=e.code,we.includes(r)&&(e=function(e){return Object.values(be).find((t=>t.code===e))||be[ve]}(e.code)),e);var r}class Oe{}class Re extends Oe{constructor(){super()}}class Me extends Re{constructor(e){super()}}function Ne(e,t){const r=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==r&&new RegExp(t).test(r)}function Te(e){return Ne(e,"^https?:")}function je(e){return Ne(e,"^wss?:")}function Le(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function De(e){return Le(e)&&"method"in e}function $e(e){return Le(e)&&(Be(e)||Ue(e))}function Be(e){return"result"in e}function Ue(e){return"error"in e}class Fe extends Me{constructor(e){super(e),this.events=new n.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(Ae(e.method,e.params||[],e.id||Se().toString()),t)}async requestStrict(e,t){return new Promise((async(r,n)=>{if(!this.connection.connected)try{await this.open()}catch(e){n(e)}this.events.on(`${e.id}`,(e=>{Ue(e)?n(e.error):r(e.result)}));try{await this.connection.send(e,t)}catch(e){n(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),$e(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const ze=e=>e.split("?")[0],We=typeof WebSocket<"u"?WebSocket:typeof r.g<"u"&&typeof r.g.WebSocket<"u"?r.g.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:r(7026);class He{constructor(e){if(this.url=e,this.events=new n.EventEmitter,this.registering=!1,!je(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(P(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!je(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const i=new URLSearchParams(e).get("origin"),o=(0,xe.isReactNative)()?{headers:{origin:i}}:{rejectUnauthorized:(a=e,!new RegExp("wss?://localhost(:d{2,5})?").test(a))},s=new We(e,[],o);var a;typeof WebSocket<"u"||typeof r.g<"u"&&typeof r.g.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?s.onerror=e=>{const t=e;n(this.emitError(t.error))}:s.on("error",(e=>{n(this.emitError(e))})),s.onopen=()=>{this.onOpen(s),t(s)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?k(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),n=ke(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return Ee(e,ze(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${ze(this.url)}`));return this.events.emit("register_error",t),t}}var Ve=r(2307),qe=r.n(Ve),Ge=r(204),Ze=r.n(Ge),Ke=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,d=o-1;(0!==u||h>>0,s[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var p=o-i;p!==o&&0===s[p];)p++;for(var f=new Uint8Array(n+(o-p)),g=n;p!==o;)f[g++]=s[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*u+1>>>0,l=new Uint8Array(s);i!==o;){for(var h=t[i],d=0,p=s-1;(0!==h||d>>0,l[p]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var f=s-n;f!==s&&0===l[f];)f++;for(var g=c.repeat(r);f{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class Qe{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Je{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return et(this,e)}}class Xe{constructor(e){this.decoders=e}or(e){return et(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const et=(e,t)=>new Xe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class tt{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new Qe(e,t,r),this.decoder=new Je(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const rt=({name:e,prefix:t,encode:r,decode:n})=>new tt(e,t,r,n),nt=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=Ke(r,t);return rt({prefix:e,name:t,encode:n,decode:e=>Ye(i(e))})},it=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>rt({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<((e,t,r,n)=>{const i={};for(let e=0;e=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,n,r,e)}),ot=rt({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var st=Object.freeze({__proto__:null,identity:ot});const at=it({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var ct=Object.freeze({__proto__:null,base2:at});const lt=it({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var ut=Object.freeze({__proto__:null,base8:lt});const ht=nt({prefix:"9",name:"base10",alphabet:"0123456789"});var dt=Object.freeze({__proto__:null,base10:ht});const pt=it({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),ft=it({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var gt=Object.freeze({__proto__:null,base16:pt,base16upper:ft});const mt=it({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),yt=it({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),wt=it({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),bt=it({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),vt=it({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),_t=it({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Et=it({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),xt=it({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Ct=it({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var St=Object.freeze({__proto__:null,base32:mt,base32upper:yt,base32pad:wt,base32padupper:bt,base32hex:vt,base32hexupper:_t,base32hexpad:Et,base32hexpadupper:xt,base32z:Ct});const At=nt({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),It=nt({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var kt=Object.freeze({__proto__:null,base36:At,base36upper:It});const Pt=nt({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ot=nt({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Rt=Object.freeze({__proto__:null,base58btc:Pt,base58flickr:Ot});const Mt=it({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Nt=it({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Tt=it({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),jt=it({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Lt=Object.freeze({__proto__:null,base64:Mt,base64pad:Nt,base64url:Tt,base64urlpad:jt});const Dt=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),$t=Dt.reduce(((e,t,r)=>(e[r]=t,e)),[]),Bt=Dt.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]),Ut=rt({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+$t[t]),"")},decode:function(e){const t=[];for(const r of e){const e=Bt[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var Ft=Object.freeze({__proto__:null,base256emoji:Ut}),zt=128,Wt=-128,Ht=Math.pow(2,31),Vt=Math.pow(2,7),qt=Math.pow(2,14),Gt=Math.pow(2,21),Zt=Math.pow(2,28),Kt=Math.pow(2,35),Yt=Math.pow(2,42),Qt=Math.pow(2,49),Jt=Math.pow(2,56),Xt=Math.pow(2,63),er=function e(t,r,n){r=r||[];for(var i=n=n||0;t>=Ht;)r[n++]=255&t|zt,t/=128;for(;t&Wt;)r[n++]=255&t|zt,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},tr=function(e){return e(er(e,t,r),t),nr=e=>tr(e),ir=(e,t)=>{const r=t.byteLength,n=nr(e),i=n+nr(r),o=new Uint8Array(i+r);return rr(e,o,0),rr(r,o,n),o.set(t,i),new or(e,r,t,o)};class or{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const sr=({name:e,code:t,encode:r})=>new ar(e,t,r);class ar{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?ir(this.code,t):t.then((e=>ir(this.code,e)))}throw Error("Unknown type, must be binary type")}}const cr=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),lr=sr({name:"sha2-256",code:18,encode:cr("SHA-256")}),ur=sr({name:"sha2-512",code:19,encode:cr("SHA-512")});Object.freeze({__proto__:null,sha256:lr,sha512:ur});const hr=Ye,dr={code:0,name:"identity",encode:hr,digest:e=>ir(0,hr(e))};Object.freeze({__proto__:null,identity:dr}),new TextEncoder,new TextDecoder;const pr={...st,...ct,...ut,...dt,...gt,...St,...kt,...Rt,...Lt,...Ft};function fr(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function gr(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const mr=gr("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),yr=gr("ascii","a",(e=>{let t="a";for(let r=0;r{const t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?fr(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let r=0;r{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=(0,$.generateChildLogger)(t,this.name)}get context(){return(0,$.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,(0,o.KC)(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?(0,o.IP)(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class tn{constructor(e,t,r){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),pe(fe(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=(0,o.Au)();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=fe(await this.getClientSeed()),r=(0,o.jd)(),n=xr;return await async function(e,t,r,n,i=(0,ee.fromMiliseconds)(Date.now())){const o={alg:"EdDSA",typ:"JWT"},s={iss:pe(n.publicKey),sub:e,aud:t,iat:i,exp:i+r},a=(c={header:o,payload:s},(0,he.m)([de(c.header),de(c.payload)].join("."),"utf8"));var c;return function(e){return[de(e.header),de(e.payload),(t=e.signature,(0,ue.B)(t,te))].join(".");var t}({header:o,payload:s,signature:J.Xx(n.secretKey,a)})}(r,e,n,t)},this.generateSharedKey=(e,t,r)=>{this.isInitialized();const n=this.getPrivateKey(e),i=(0,o.m$)(n,t);return this.setSymKey(i,r)},this.setSymKey=async(e,t)=>{this.isInitialized();const r=t||(0,o.Ym)(e);return await this.keychain.set(r,e),r},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,r)=>{this.isInitialized();const n=(0,o.EN)(r),i=P(t);if((0,o.Q8)(n)){const t=n.senderPublicKey,r=n.receiverPublicKey;e=await this.generateSharedKey(t,r)}const s=this.getSymKey(e),{type:a,senderPublicKey:c}=n;return(0,o.HI)({type:a,symKey:s,message:i,senderPublicKey:c})},this.decode=async(e,t,r)=>{this.isInitialized();const n=(0,o.Ll)(t,r);if((0,o.Q8)(n)){const t=n.receiverPublicKey,r=n.senderPublicKey;e=await this.generateSharedKey(t,r)}try{const r=this.getSymKey(e);return k((0,o.pe)({symKey:r,encoded:t}))}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>{const t=(0,o.vB)(e);return(0,o.WG)(t.type)},this.getPayloadSenderPublicKey=e=>{const t=(0,o.vB)(e);return t.senderPublicKey?(0,ge.BB)(t.senderPublicKey,o.AW):void 0},this.core=e,this.logger=(0,$.generateChildLogger)(t,this.name),this.keychain=r||new en(this.core,this.logger)}get context(){return(0,$.getLoggerContext)(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Er)}catch{e=(0,o.jd)(),await this.keychain.set(Er,e)}return function(e,t="utf8"){const r=wr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):fr(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class rn extends z{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=vr,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const r=(0,o.rj)(t);let n=this.messages.get(e);return typeof n>"u"&&(n={}),typeof n[r]<"u"||(n[r]=t,this.messages.set(e,n),await this.persist()),r},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>(this.isInitialized(),typeof this.get(e)[(0,o.rj)(t)]<"u"),this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=(0,$.generateChildLogger)(e,this.name),this.core=t}get context(){return(0,$.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,(0,o.KC)(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?(0,o.IP)(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class nn extends W{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new n.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,ee.toMiliseconds)(ee.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,r)=>{var n;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});try{const i=r?.ttl||Cr,s=(0,o._H)(r),a=r?.prompt||!1,c=r?.tag||0,l=r?.id||Se().toString(),u={topic:e,message:t,opts:{ttl:i,relay:s,prompt:a,tag:c,id:l}},h=setTimeout((()=>this.queue.set(l,u)),this.publishTimeout);try{await await(0,o.hF)(this.rpcPublish(e,t,i,s,a,c,l),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(l),this.relayer.events.emit(Mr,u)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(n=r?.internal)&&n.throwOnFailedPublish)throw this.removeRequestFromQueue(l),e;return}finally{clearTimeout(h)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=(0,$.generateChildLogger)(t,this.name),this.registerEventListeners()}get context(){return(0,$.getLoggerContext)(this.logger)}rpcPublish(e,t,r,n,i,s,a){var c,l,u,h;const d={method:(0,o.cO)(n.protocol).publish,params:{topic:e,message:t,ttl:r,prompt:i,tag:s},id:a};return(0,o.o8)(null==(c=d.params)?void 0:c.prompt)&&(null==(l=d.params)||delete l.prompt),(0,o.o8)(null==(u=d.params)?void 0:u.tag)&&(null==(h=d.params)||delete h.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:r,opts:n}=e;await this.publish(t,r,n)}))}registerEventListeners(){this.relayer.core.heartbeat.on(D.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(Rr);this.checkQueue()})),this.relayer.on(kr,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class on{constructor(){this.map=new Map,this.set=(e,t)=>{const r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,t))return;const n=r.filter((e=>e!==t));n.length?this.map.set(e,n):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var sn=Object.defineProperty,an=Object.defineProperties,cn=Object.getOwnPropertyDescriptors,ln=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,hn=Object.prototype.propertyIsEnumerable,dn=(e,t,r)=>t in e?sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pn=(e,t)=>{for(var r in t||(t={}))un.call(t,r)&&dn(e,r,t[r]);if(ln)for(var r of ln(t))hn.call(t,r)&&dn(e,r,t[r]);return e},fn=(e,t)=>an(e,cn(t));class gn extends q{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new on,this.events=new n.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=vr,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const r=(0,o._H)(t),n={topic:e,relay:r};this.pending.set(e,n);const i=await this.rpcSubscribe(e,r);return this.onSubscribe(i,n),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>!!this.topics.includes(e)||await new Promise(((t,r)=>{const n=new ee.Watch;n.start(this.pendingSubscriptionWatchLabel);const i=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),t(!0)),n.elapsed(this.pendingSubscriptionWatchLabel)>=Fr&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1)),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=(0,$.generateChildLogger)(t,this.name),this.clientId=""}get context(){return(0,$.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const r=this.topicMap.get(e);await Promise.all(r.map((async r=>await this.unsubscribeById(e,r,t))))}async unsubscribeById(e,t,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}});try{const n=(0,o._H)(r);await this.rpcUnsubscribe(e,t,n);const i=(0,o.D6)("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){const r={method:(0,o.cO)(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await(0,o.hF)(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Rr)}return(0,o.rj)(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,r={method:(0,o.cO)(t.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await(0,o.hF)(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Rr)}}rpcUnsubscribe(e,t,r){const n={method:(0,o.cO)(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n}),this.relayer.request(n)}onSubscribe(e,t){this.setSubscription(e,fn(pn({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,pn({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,r){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,r),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,pn({},t)),this.topicMap.set(t.topic,e),this.events.emit($r,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(Br,fn(pn({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit("subscription_sync")}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=(0,o.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);(0,o.qt)(t)&&this.onBatchSubscribe(t.map(((t,r)=>fn(pn({},e[r]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(D.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(Pr,(async()=>{await this.onConnect()})),this.relayer.on(Or,(()=>{this.onDisconnect()})),this.events.on($r,(async e=>{const t=$r;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(Br,(async e=>{const t=Br;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}}var mn=Object.defineProperty,yn=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,vn=(e,t,r)=>t in e?mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class _n extends H{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new n.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async e=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(e)}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(Pr)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit("relayer_error",e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Nr,this.onPayloadHandler),this.provider.on(Tr,this.onConnectHandler),this.provider.on(jr,this.onDisconnectHandler),this.provider.on(Lr,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?(0,$.generateChildLogger)(e.logger,this.name):(0,$.pino)((0,$.getDefaultLoggerOptions)({level:e.logger||"error"})),this.messages=new rn(this.logger,e.core),this.subscriber=new gn(this,this.logger),this.publisher=new nn(this,this.logger),this.relayUrl=e?.relayUrl||Sr,this.projectId=e.projectId,this.bundleId=(0,o.X_)(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${Ar}...`),await this.restartTransport(Ar)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return(0,$.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var r;this.isInitialized();let n,i=(null==(r=this.subscriber.topicMap.get(e))?void 0:r[0])||"";if(i)return i;const o=t=>{t.topic===e&&(this.subscriber.off($r,o),n())};return await Promise.all([new Promise((e=>{n=e,this.subscriber.on($r,o)})),new Promise((async r=>{i=await this.subscriber.subscribe(e,t),r()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await(0,o.hF)(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(Ur,(()=>{e()}))})),new Promise((async(e,t)=>{try{await(0,o.hF)(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){return void t(e)}e()}))])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.provider.events.emit(jr)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await(0,o.Gg)())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Fe(new He((0,o.$0)({sdkVersion:"2.11.0",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:r}=e;await this.messages.set(t,r)}async shouldIgnoreMessageEvent(e){const{topic:t,message:r}=e;if(!r||0===r.length)return this.logger.debug(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const n=this.messages.has(t,r);return n&&this.logger.debug(`Ignoring duplicate message: ${r}`),n}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),De(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:r,message:n,publishedAt:i}=t.data,o={topic:r,message:n,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var r in t||(t={}))wn.call(t,r)&&vn(e,r,t[r]);if(yn)for(var r of yn(t))bn.call(t,r)&&vn(e,r,t[r]);return e})({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else $e(e)&&this.events.emit(kr,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Ir,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=Ie(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(Nr,this.onPayloadHandler),this.provider.off(Tr,this.onConnectHandler),this.provider.off(jr,this.onDisconnectHandler),this.provider.off(Lr,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Rr,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await(0,o.Gg)();(0,o.uw)((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit(Or),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),(0,ee.toMiliseconds)(Dr)))}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}}var En=Object.defineProperty,xn=Object.getOwnPropertySymbols,Cn=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable,An=(e,t,r)=>t in e?En(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,In=(e,t)=>{for(var r in t||(t={}))Cn.call(t,r)&&An(e,r,t[r]);if(xn)for(var r of xn(t))Sn.call(t,r)&&An(e,r,t[r]);return e};class kn extends V{constructor(e,t,r,n=vr,i=void 0){super(e,t,r,n),this.core=e,this.logger=t,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=vr,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!(0,o.o8)(e)?this.map.set(this.getKey(e),e):(0,o.xW)(e)?this.map.set(e.id,e):(0,o.h1)(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((r=>qe()(t[r],e[r]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const r=In(In({},this.getData(e)),t);this.map.set(e,r),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=(0,$.generateChildLogger)(t,this.name),this.storagePrefix=n,this.getKey=i}get context(){return(0,$.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=(0,o.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Pn{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new(i()),this.initialized=!1,this.storagePrefix=vr,this.ignoredPayloadTypes=[o.rV],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const e=(0,o.jd)(),t=await this.core.crypto.setSymKey(e),r=(0,o.gn)(ee.FIVE_MINUTES),n={protocol:"irn"},i={topic:t,expiry:r,relay:n,active:!1},s=(0,o.Bv)({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:n});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,r),{topic:t,uri:s}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:r,relay:n}=(0,o.he)(e.uri);let i;if(this.pairings.keys.includes(t)&&(i=this.pairings.get(t),i.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const s=(0,o.gn)(ee.FIVE_MINUTES),a={topic:t,relay:n,expiry:s,active:!1};return await this.pairings.set(t,a),this.core.expirer.set(t,s),e.activatePairing&&await this.activate({topic:t}),this.events.emit(Wr,a),this.core.crypto.keychain.has(t)||(await this.core.crypto.setSymKey(r,t),await this.core.relayer.subscribe(t,{relay:n})),a},this.activate=async({topic:e})=>{this.isInitialized();const t=(0,o.gn)(ee.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:n,reject:i}=(0,o.H1)();this.events.once((0,o.E0)("pairing_ping",e),(({error:e})=>{e?i(e):n()})),await r()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",(0,o.D6)("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,r)=>{const n=Ae(t,r),i=await this.core.crypto.encode(e,n),o=zr[t].req;return this.core.history.set(e,n),this.core.relayer.publish(e,i,o),n.id},this.sendResult=async(e,t,r)=>{const n=Ie(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),s=zr[o.request.method].res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(n)},this.sendError=async(e,t,r)=>{const n=ke(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),s=zr[o.request.method]?zr[o.request.method].res:zr.unregistered_method.res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(n)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,(0,o.D6)("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>(0,o.Bw)(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:r}=e;switch(r.method){case"wc_pairingPing":return this.onPairingPingRequest(t,r);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,r);default:return this.onUnknownRpcMethodRequest(t,r)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.core.history.get(t,r.id)).request.method;return"wc_pairingPing"===n?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(n)},this.onPairingPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit("pairing_ping",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{const{id:r}=t;setTimeout((()=>{Be(t)?this.events.emit((0,o.E0)("pairing_ping",r),{}):Ue(t)&&this.events.emit((0,o.E0)("pairing_ping",r),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit("pairing_delete",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:r,method:n}=t;try{if(this.registeredMethods.includes(n))return;const t=(0,o.D6)("WC_METHOD_UNSUPPORTED",n);await this.sendError(r,e,t),this.logger.error(t)}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error((0,o.D6)("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!(0,o.jv)(e.uri)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const r=(0,o.he)(e.uri);if(null==(t=r?.relay)||!t.protocol){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==r||!r.symKey){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}},this.isValidPing=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!(0,o.M_)(e,!1)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if((0,o.Bw)(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=(0,o.Z7)("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=(0,$.generateChildLogger)(t,this.name),this.pairings=new kn(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,$.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Ir,(async e=>{const{topic:t,message:r}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;const n=await this.core.crypto.decode(t,r);try{De(n)?(this.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):$e(n)&&(await this.core.history.resolve(n),await this.onRelayEventResponse({topic:t,payload:n}),this.core.history.delete(t,n.id))}catch(e){this.logger.error(e)}}))}registerExpirerEvents(){this.core.expirer.on(Kr,(async e=>{const{topic:t}=(0,o.iP)(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit("pairing_expire",{topic:t}))}))}}class On extends F{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new n.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=vr,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:r}),this.records.has(t.id))return;const n={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r,expiry:(0,o.gn)(ee.THIRTY_DAYS)};this.records.set(n.id,n),this.events.emit(Hr,n)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=Ue(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(Vr,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((r=>{if(r.topic===e){if(typeof t<"u"&&r.id!==t)return;this.records.delete(r.id),this.events.emit(qr,r)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,$.generateChildLogger)(t,this.name)}get context(){return(0,$.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const r={topic:t.topic,request:Ae(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(r)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit("history_sync")}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=(0,o.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Hr,(e=>{const t=Hr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Vr,(e=>{const t=Vr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(qr,(e=>{const t=qr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(D.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{(0,ee.toMiliseconds)(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Rn extends G{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new n.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=vr,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const r=this.formatTarget(e),n={target:r,expiry:t};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(Gr,{target:r,expiration:n})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),r=this.getExpiration(t);this.expirations.delete(t),this.events.emit(Zr,{target:t,expiration:r})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,$.generateChildLogger)(t,this.name)}get context(){return(0,$.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return(0,o.Z4)(e);if("number"==typeof e)return(0,o.Gq)(e);const{message:t}=(0,o.Z7)("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit("expirer_sync")}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=(0,o.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:r}=t;(0,ee.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(Kr,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(D.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(Gr,(e=>{const t=Gr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(Kr,(e=>{const t=Kr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(Zr,(e=>{const t=Zr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Mn extends Z{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Yr,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||(0,o.b$)()||!(0,o.jU)())return;const t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=Jr;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(e?.verifyUrl);let r;try{r=await this.fetchAttestation(e.attestationId,t)}catch(n){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(n),r=await this.fetchAttestation(e.attestationId,Jr)}return r},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const r=this.startAbortTimer(2*ee.ONE_SECOND),n=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(r),200===n.status?await n.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=r=>{"verify_ready"===r.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((r=>{if(document.getElementById(Yr))return r();window.addEventListener("message",t);const n=document.createElement("iframe");n.id=Yr,n.src=`${this.verifyUrl}/${this.projectId}`,n.style.display="none",document.body.append(n),this.iframe=n,e=r})),new Promise(((e,r)=>setTimeout((()=>{window.removeEventListener("message",t),r("verify iframe load timeout")}),(0,ee.toMiliseconds)(ee.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||Qr;return Xr.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${Qr}`),t=Qr),t},this.logger=(0,$.generateChildLogger)(t,this.name),this.verifyUrl=Qr,this.abortController=new AbortController,this.isDevEnv=(0,o.UG)()&&process.env.IS_VITEST}get context(){return(0,$.getLoggerContext)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),(0,ee.toMiliseconds)(e))}}class Nn extends K{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{const{clientId:t,token:r,notificationType:n,enableEncrypted:i=!1}=e,o=`https://echo.walletconnect.com/${this.projectId}/clients`;await Ze()(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:n,token:r,always_raw:i})})},this.logger=(0,$.generateChildLogger)(t,this.context)}}var Tn=Object.defineProperty,jn=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable,$n=(e,t,r)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bn=(e,t)=>{for(var r in t||(t={}))Ln.call(t,r)&&$n(e,r,t[r]);if(jn)for(var r of jn(t))Dn.call(t,r)&&$n(e,r,t[r]);return e};class Un extends U{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=br,this.events=new n.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Sr,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,$.pino)((0,$.getDefaultLoggerOptions)({level:e?.logger||"error"}));this.logger=(0,$.generateChildLogger)(t,this.name),this.heartbeat=new D.HeartBeat,this.crypto=new tn(this,this.logger,e?.keychain),this.history=new On(this,this.logger),this.expirer=new Rn(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new L(Bn(Bn({},_r),e?.storageOptions)),this.relayer=new _n({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Pn(this,this.logger),this.verify=new Mn(this.projectId||"",this.logger),this.echoClient=new Nn(this.projectId||"",this.logger)}static async init(e){const t=new Un(e);await t.initialize();const r=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",r),t}get context(){return(0,$.getLoggerContext)(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const Fn=Un,zn="client",Wn=`wc@2:${zn}:`,Hn=zn,Vn="WALLETCONNECT_DEEPLINK_CHOICE",qn="Proposal expired",Gn=ee.SEVEN_DAYS,Zn={wc_sessionPropose:{req:{ttl:ee.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ee.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ee.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ee.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:ee.THIRTY_SECONDS,prompt:!1,tag:1115}}},Kn={min:ee.FIVE_MINUTES,max:ee.SEVEN_DAYS},Yn="IDLE",Qn="ACTIVE",Jn=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Xn=Object.defineProperty,ei=Object.defineProperties,ti=Object.getOwnPropertyDescriptors,ri=Object.getOwnPropertySymbols,ni=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable,oi=(e,t,r)=>t in e?Xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,si=(e,t)=>{for(var r in t||(t={}))ni.call(t,r)&&oi(e,r,t[r]);if(ri)for(var r of ri(t))ii.call(t,r)&&oi(e,r,t[r]);return e},ai=(e,t)=>ei(e,ti(t));class ci extends Q{constructor(e){super(e),this.name="engine",this.events=new(i()),this.initialized=!1,this.ignoredPayloadTypes=[o.rV],this.requestQueue={state:Yn,queue:[]},this.sessionRequestQueue={state:Yn,queue:[]},this.requestQueueDelay=ee.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Zn)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),(0,ee.toMiliseconds)(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=ai(si({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:r,requiredNamespaces:n,optionalNamespaces:i,sessionProperties:s,relays:a}=t;let c,l=r,u=!1;if(l&&(u=this.client.core.pairing.pairings.get(l).active),!l||!u){const{topic:e,uri:t}=await this.client.core.pairing.create();l=e,c=t}const h=await this.client.core.crypto.generateKeyPair(),d=si({requiredNamespaces:n,optionalNamespaces:i,relays:a??[{protocol:"irn"}],proposer:{publicKey:h,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:p,resolve:f,done:g}=(0,o.H1)(ee.FIVE_MINUTES,qn);if(this.events.once((0,o.E0)("session_connect"),(async({error:e,session:t})=>{if(e)p(e);else if(t){t.self.publicKey=h;const e=ai(si({},t),{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),l&&await this.client.core.pairing.updateMetadata({topic:l,metadata:t.peer.metadata}),f(e)}})),!l){const{message:e}=(0,o.Z7)("NO_MATCHING_KEY",`connect() pairing topic: ${l}`);throw new Error(e)}const m=await this.sendRequest({topic:l,method:"wc_sessionPropose",params:d}),y=(0,o.gn)(ee.FIVE_MINUTES);return await this.setProposal(m,si({id:m,expiry:y},d)),{uri:c,approval:g}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:r,namespaces:n,sessionProperties:i}=e,s=this.client.proposal.get(t);let{pairingTopic:a,proposer:c,requiredNamespaces:l,optionalNamespaces:u}=s;a=a||"",(0,o.L5)(l)||(l=(0,o.fc)(n,"approve()"));const h=await this.client.core.crypto.generateKeyPair(),d=c.publicKey,p=await this.client.core.crypto.generateSharedKey(h,d);a&&t&&(await this.client.core.pairing.updateMetadata({topic:a,metadata:c.metadata}),await this.sendResult({id:t,topic:a,result:{relay:{protocol:r??"irn"},responderPublicKey:h}}),await this.client.proposal.delete(t,(0,o.D6)("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:a}));const f=si({relay:{protocol:r??"irn"},namespaces:n,requiredNamespaces:l,optionalNamespaces:u,pairingTopic:a,controller:{publicKey:h,metadata:this.client.metadata},expiry:(0,o.gn)(Gn)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(p),await this.sendRequest({topic:p,method:"wc_sessionSettle",params:f,throwOnFailedPublish:!0});const g=ai(si({},f),{topic:p,pairingTopic:a,acknowledged:!1,self:f.controller,peer:{publicKey:c.publicKey,metadata:c.metadata},controller:h});return await this.client.session.set(p,g),await this.setExpiry(p,(0,o.gn)(Gn)),{topic:p,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(p))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:t,reason:r}=e,{pairingTopic:n}=this.client.proposal.get(t);n&&(await this.sendError(t,n,r),await this.client.proposal.delete(t,(0,o.D6)("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:r}=e,n=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:r}}),{done:i,resolve:s,reject:a}=(0,o.H1)();return this.events.once((0,o.E0)("session_update",n),(({error:e})=>{e?a(e):s()})),await this.client.session.update(t,{namespaces:r}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,r=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:n,resolve:i,reject:s}=(0,o.H1)();return this.events.once((0,o.E0)("session_extend",r),(({error:e})=>{e?s(e):i()})),await this.setExpiry(t,(0,o.gn)(Gn)),{acknowledged:n}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:r,topic:n,expiry:i}=e,s=Ce(),{done:a,resolve:c,reject:l}=(0,o.H1)(i,"Request expired. Please try again.");return this.events.once((0,o.E0)("session_request",s),(({error:e,result:t})=>{e?l(e):c(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:s,topic:n,method:"wc_sessionRequest",params:{request:r,chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>l(e))),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:t,id:s}),e()})),new Promise((async e=>{const t=await(0,o.bW)(this.client.core.storage,Vn);(0,o.Hh)({id:s,topic:n,wcDeepLink:t}),e()})),a()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:r}=e,{id:n}=r;Be(r)?await this.sendResult({id:n,topic:t,result:r.result,throwOnFailedPublish:!0}):Ue(r)&&await this.sendError(n,t,r.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:r,resolve:n,reject:i}=(0,o.H1)();this.events.once((0,o.E0)("session_ping",e),(({error:e})=>{e?i(e):n()})),await r()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:r,chainId:n}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:r,chainId:n}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.client.session.keys.includes(t)?(await this.sendRequest({topic:t,method:"wc_sessionDelete",params:(0,o.D6)("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(t)):await this.client.core.pairing.disconnect({topic:t})},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>(0,o.Ih)(t,e)))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter((r=>{var n,i;return(null==(n=r.peerMetadata)?void 0:n.url)&&(null==(i=r.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&r.topic&&r.topic!==t.topic}));if(0===r.length)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async(e,t)=>{const{self:r}=this.client.session.get(e);await this.client.core.relayer.unsubscribe(e),this.client.session.delete(e,(0,o.D6)("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(r.publicKey)&&await this.client.core.crypto.deleteKeyPair(r.publicKey),this.client.core.crypto.keychain.has(e)&&await this.client.core.crypto.deleteSymKey(e),t||this.client.core.expirer.del(e),this.client.core.storage.removeItem(Vn).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((t=>{t.topic===e&&this.deletePendingSessionRequest(t.id,(0,o.D6)("USER_DISCONNECTED"))}))},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,(0,o.D6)("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,r=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter((t=>t.id!==e)),r&&(this.sessionRequestQueue.state=Yn)},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,t.expiry)},this.setPendingSessionRequest=async e=>{const t=Zn.wc_sessionRequest.req.ttl,{id:r,topic:n,params:i,verifyContext:s}=e;await this.client.pendingRequest.set(r,{id:r,topic:n,params:i,verifyContext:s}),t&&this.client.core.expirer.set(r,(0,o.gn)(t))},this.sendRequest=async e=>{const{topic:t,method:r,params:n,expiry:i,relayRpcId:s,clientRpcId:a,throwOnFailedPublish:c}=e,l=Ae(r,n,a);if((0,o.jU)()&&Jn.includes(r)){const e=(0,o.rj)(JSON.stringify(l));this.client.core.verify.register({attestationId:e})}const u=await this.client.core.crypto.encode(t,l),h=Zn[r].req;return i&&(h.ttl=i),s&&(h.id=s),this.client.core.history.set(t,l),c?(h.internal=ai(si({},h.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,u,h)):this.client.core.relayer.publish(t,u,h).catch((e=>this.client.logger.error(e))),l.id},this.sendResult=async e=>{const{id:t,topic:r,result:n,throwOnFailedPublish:i}=e,o=Ie(t,n),s=await this.client.core.crypto.encode(r,o),a=await this.client.core.history.get(r,t),c=Zn[a.request.method].res;i?(c.internal=ai(si({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,s,c)):this.client.core.relayer.publish(r,s,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(o)},this.sendError=async(e,t,r)=>{const n=ke(e,r),i=await this.client.core.crypto.encode(t,n),o=await this.client.core.history.get(t,e),s=Zn[o.request.method].res;this.client.core.relayer.publish(t,i,s),await this.client.core.history.resolve(n)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{(0,o.Bw)(t.expiry)&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{(0,o.Bw)(e.expiry)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession(e))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==Qn){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Qn;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=Yn}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:r}=e,n=r.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeRequest(t,r);case"wc_sessionSettle":return this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return this.onSessionExtendRequest(t,r);case"wc_sessionPing":return this.onSessionPingRequest(t,r);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return this.onSessionRequest(t,r);case"wc_sessionEvent":return this.onSessionEventRequest(t,r);default:return this.client.logger.info(`Unsupported request method ${n}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.client.core.history.get(t,r.id)).request.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r);case"wc_sessionSettle":return this.onSessionSettleResponse(t,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,r);case"wc_sessionExtend":return this.onSessionExtendResponse(t,r);case"wc_sessionPing":return this.onSessionPingResponse(t,r);case"wc_sessionRequest":return this.onSessionRequestResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${n}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:r}=(0,o.Z7)("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(r)},this.onSessionProposeRequest=async(e,t)=>{const{params:r,id:n}=t;try{this.isValidConnect(si({},t.params));const i=(0,o.gn)(ee.FIVE_MINUTES),s=si({id:n,pairingTopic:e,expiry:i},r);await this.setProposal(n,s);const a=(0,o.rj)(JSON.stringify(t)),c=await this.getVerifyContext(a,s.proposer.metadata);this.client.events.emit("session_proposal",{id:n,params:s,verifyContext:c})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{const{id:r}=t;if(Be(t)){const{result:n}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:n});const i=this.client.proposal.get(r);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const o=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const s=n.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:s});const a=await this.client.core.crypto.generateSharedKey(o,s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:a});const c=await this.client.core.relayer.subscribe(a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else Ue(t)&&(await this.client.proposal.delete(r,(0,o.D6)("USER_DISCONNECTED")),this.events.emit((0,o.E0)("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidSessionSettleRequest(n);const{relay:r,controller:i,expiry:s,namespaces:a,requiredNamespaces:c,optionalNamespaces:l,sessionProperties:u,pairingTopic:h}=t.params,d=si({topic:e,relay:r,expiry:s,namespaces:a,acknowledged:!0,pairingTopic:h,requiredNamespaces:c,optionalNamespaces:l,controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},u&&{sessionProperties:u});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit((0,o.E0)("session_connect"),{session:d}),this.cleanupDuplicatePairings(d)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:r}=t;Be(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit((0,o.E0)("session_approve",r),{})):Ue(t)&&(await this.client.session.delete(e,(0,o.D6)("USER_DISCONNECTED")),this.events.emit((0,o.E0)("session_approve",r),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:r,id:n}=t;try{const t=`${e}_session_update`,i=o.O6.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidUpdate(si({topic:e},r)),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_update",{id:n,topic:e,params:r}),o.O6.set(t,n)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:r}=t;Be(t)?this.events.emit((0,o.E0)("session_update",r),{}):Ue(t)&&this.events.emit((0,o.E0)("session_update",r),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,(0,o.gn)(Gn)),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_extend",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{const{id:r}=t;Be(t)?this.events.emit((0,o.E0)("session_extend",r),{}):Ue(t)&&this.events.emit((0,o.E0)("session_extend",r),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_ping",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{const{id:r}=t;setTimeout((()=>{Be(t)?this.events.emit((0,o.E0)("session_ping",r),{}):Ue(t)&&this.events.emit((0,o.E0)("session_ping",r),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(Mr,(async()=>{t(await this.deleteSession(e))}))})),this.sendResult({id:r,topic:e,result:!0})]),this.client.events.emit("session_delete",{id:r,topic:e})}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidRequest(si({topic:e},n));const t=(0,o.rj)(JSON.stringify(Ae("wc_sessionRequest",n,r))),i=this.client.session.get(e),s={id:r,topic:e,params:n,verifyContext:await this.getVerifyContext(t,i.peer.metadata)};await this.setPendingSessionRequest(s),this.addSessionRequestToSessionRequestQueue(s),this.processSessionRequestQueue()}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:r}=t;Be(t)?this.events.emit((0,o.E0)("session_request",r),{result:t.result}):Ue(t)&&this.events.emit((0,o.E0)("session_request",r),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:r,params:n}=t;try{const t=`${e}_session_event_${n.event.name}`,i=o.O6.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidEmit(si({topic:e},n)),this.client.events.emit("session_event",{id:r,topic:e,params:n}),o.O6.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=Yn,this.processSessionRequestQueue()}),(0,ee.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Qn)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=Qn,this.client.events.emit("session_request",e)}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=e=>{if(e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,Ae("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:r,optionalNamespaces:n,sessionProperties:i,relays:s}=e;if((0,o.o8)(t)||await this.isValidPairingTopic(t),!(0,o.PM)(s,!0)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(e)}!(0,o.o8)(r)&&0!==(0,o.L5)(r)&&this.validateNamespaces(r,"requiredNamespaces"),!(0,o.o8)(n)&&0!==(0,o.L5)(n)&&this.validateNamespaces(n,"optionalNamespaces"),(0,o.o8)(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const r=(0,o.n)(e,"connect()",t);if(r)throw new Error(r.message)},this.isValidApprove=async e=>{if(!(0,o.EJ)(e))throw new Error((0,o.Z7)("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:r,relayProtocol:n,sessionProperties:i}=e;await this.isValidProposalId(t);const s=this.client.proposal.get(t),a=(0,o.in)(r,"approve()");if(a)throw new Error(a.message);const c=(0,o.rF)(s.requiredNamespaces,r,"approve()");if(c)throw new Error(c.message);if(!(0,o.M_)(n,!0)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`approve() relayProtocol: ${n}`);throw new Error(e)}(0,o.o8)(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:r}=e;if(await this.isValidProposalId(t),!(0,o.$t)(r)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:r,namespaces:n,expiry:i}=e;if(!(0,o.Z2)(t)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const s=(0,o.Dd)(r,"onSessionSettleRequest()");if(s)throw new Error(s.message);const a=(0,o.in)(n,"onSessionSettleRequest()");if(a)throw new Error(a.message);if((0,o.Bw)(i)){const{message:e}=(0,o.Z7)("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:r}=e;await this.isValidSessionTopic(t);const n=this.client.session.get(t),i=(0,o.in)(r,"update()");if(i)throw new Error(i.message);const s=(0,o.rF)(n.requiredNamespaces,r,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:r,chainId:n,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:s}=this.client.session.get(t);if(!(0,o.p8)(s,n)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`request() chainId: ${n}`);throw new Error(e)}if(!(0,o.hH)(r)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw new Error(e)}if(!(0,o.al)(s,n,r.method)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`request() method: ${r.method}`);throw new Error(e)}if(i&&!(0,o.ON)(i,Kn)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${Kn.min} and ${Kn.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:r,response:n}=e;try{await this.isValidSessionTopic(r)}catch(r){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),r}if(!(0,o.JT)(n)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:r,chainId:n}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!(0,o.p8)(i,n)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`emit() chainId: ${n}`);throw new Error(e)}if(!(0,o.nf)(r)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}if(!(0,o.sI)(i,n,r.name)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const r={verified:{verifyUrl:t.verifyUrl||Qr,validation:"UNKNOWN",origin:t.url||""}};try{const n=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});n&&(r.verified.origin=n.origin,r.verified.isScam=n.isScam,r.verified.validation=n.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.info(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(r)}`),r},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!(0,o.M_)(e,!1)){const{message:r}=(0,o.Z7)("MISSING_OR_INVALID",`${t} must be in Record format. Received: ${JSON.stringify(e)}`);throw new Error(r)}}))}}async isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Ir,(async e=>{const{topic:t,message:r}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(r)))return;const n=await this.client.core.crypto.decode(t,r);try{De(n)?(this.client.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):$e(n)?(await this.client.core.history.resolve(n),await this.onRelayEventResponse({topic:t,payload:n}),this.client.core.history.delete(t,n.id)):this.onRelayEventUnknownPayload({topic:t,payload:n})}catch(e){this.client.logger.error(e)}}))}registerExpirerEvents(){this.client.core.expirer.on(Kr,(async e=>{const{topic:t,id:r}=(0,o.iP)(e.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,(0,o.Z7)("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession(t,!0),this.client.events.emit("session_expire",{topic:t})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))}))}registerPairingEvents(){this.client.core.pairing.events.on(Wr,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!(0,o.M_)(e,!1)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if((0,o.Bw)(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=(0,o.Z7)("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!(0,o.M_)(e,!1)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if((0,o.Bw)(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:t}=(0,o.Z7)("EXPIRED",`session topic: ${e}`);throw new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if((0,o.M_)(e,!1)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!(0,o.Q0)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if((0,o.Bw)(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:t}=(0,o.Z7)("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class li extends kn{constructor(e,t){super(e,t,"proposal",Wn),this.core=e,this.logger=t}}class ui extends kn{constructor(e,t){super(e,t,"session",Wn),this.core=e,this.logger=t}}class hi extends kn{constructor(e,t){super(e,t,"request",Wn,(e=>e.id)),this.core=e,this.logger=t}}class di extends Y{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=Hn,this.events=new n.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||Hn,this.metadata=e?.metadata||(0,o.D)();const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,$.pino)((0,$.getDefaultLoggerOptions)({level:e?.logger||"error"}));this.core=e?.core||new Fn(e),this.logger=(0,$.generateChildLogger)(t,this.name),this.session=new ui(this.core,this.logger),this.proposal=new li(this.core,this.logger),this.pendingRequest=new hi(this.core,this.logger),this.engine=new ci(this)}static async init(e){const t=new di(e);return await t.initialize(),t}get context(){return(0,$.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var pi=r(4098),fi=r.n(pi);const gi={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class mi{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new n.EventEmitter,this.isAvailable=!1,this.registering=!1,!Te(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=P(e),r=await fi()(this.url,Object.assign(Object.assign({},gi),{body:t})),n=await r.json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Te(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.isAvailable)return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=P({id:1,jsonrpc:"2.0",method:"test",params:[]});await fi()(e,Object.assign(Object.assign({},gi),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?k(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),n=ke(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return Ee(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const yi=mi,wi="error",bi="wc@2:universal_provider:",vi="default_chain_changed";var _i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{},Ei={exports:{}};!function(e,t){(function(){var r,n="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",s=32,a=128,c=1/0,l=9007199254740991,u=NaN,h=4294967295,d=[["ary",a],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],p="[object Arguments]",f="[object Array]",g="[object Boolean]",m="[object Date]",y="[object Error]",w="[object Function]",b="[object GeneratorFunction]",v="[object Map]",_="[object Number]",E="[object Object]",x="[object Promise]",C="[object RegExp]",S="[object Set]",A="[object String]",I="[object Symbol]",k="[object WeakMap]",P="[object ArrayBuffer]",O="[object DataView]",R="[object Float32Array]",M="[object Float64Array]",N="[object Int8Array]",T="[object Int16Array]",j="[object Int32Array]",L="[object Uint8Array]",D="[object Uint8ClampedArray]",$="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,F=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,V=RegExp(W.source),q=RegExp(H.source),G=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,ee=RegExp(X.source),te=/^\s+/,re=/\s/,ne=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ie=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ae=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,le=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ue=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,fe=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,we=/['\n\r\u2028\u2029\\]/g,be="\\ud800-\\udfff",ve="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="["+be+"]",Ie="["+Se+"]",ke="["+ve+"]",Pe="\\d+",Oe="["+_e+"]",Re="["+Ee+"]",Me="[^"+be+Se+Pe+_e+Ee+xe+"]",Ne="\\ud83c[\\udffb-\\udfff]",Te="[^"+be+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Le="[\\ud800-\\udbff][\\udc00-\\udfff]",De="["+xe+"]",$e="\\u200d",Be="(?:"+Re+"|"+Me+")",Ue="(?:"+De+"|"+Me+")",Fe="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+ke+"|"+Ne+")?",He="["+Ce+"]?",Ve=He+We+"(?:"+$e+"(?:"+[Te,je,Le].join("|")+")"+He+We+")*",qe="(?:"+[Oe,je,Le].join("|")+")"+Ve,Ge="(?:"+[Te+ke+"?",ke,je,Le,Ae].join("|")+")",Ze=RegExp("['’]","g"),Ke=RegExp(ke,"g"),Ye=RegExp(Ne+"(?="+Ne+")|"+Ge+Ve,"g"),Qe=RegExp([De+"?"+Re+"+"+Fe+"(?="+[Ie,De,"$"].join("|")+")",Ue+"+"+ze+"(?="+[Ie,De+Be,"$"].join("|")+")",De+"?"+Be+"+"+Fe,De+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,qe].join("|"),"g"),Je=RegExp("["+$e+be+ve+Ce+"]"),Xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,et=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],tt=-1,rt={};rt[R]=rt[M]=rt[N]=rt[T]=rt[j]=rt[L]=rt[D]=rt[$]=rt[B]=!0,rt[p]=rt[f]=rt[P]=rt[g]=rt[O]=rt[m]=rt[y]=rt[w]=rt[v]=rt[_]=rt[E]=rt[C]=rt[S]=rt[A]=rt[k]=!1;var nt={};nt[p]=nt[f]=nt[P]=nt[O]=nt[g]=nt[m]=nt[R]=nt[M]=nt[N]=nt[T]=nt[j]=nt[v]=nt[_]=nt[E]=nt[C]=nt[S]=nt[A]=nt[I]=nt[L]=nt[D]=nt[$]=nt[B]=!0,nt[y]=nt[w]=nt[k]=!1;var it={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,st=parseInt,at="object"==typeof _i&&_i&&_i.Object===Object&&_i,ct="object"==typeof self&&self&&self.Object===Object&&self,lt=at||ct||Function("return this")(),ut=t&&!t.nodeType&&t,ht=ut&&e&&!e.nodeType&&e,dt=ht&&ht.exports===ut,pt=dt&&at.process,ft=function(){try{return ht&&ht.require&&ht.require("util").types||pt&&pt.binding&&pt.binding("util")}catch{}}(),gt=ft&&ft.isArrayBuffer,mt=ft&&ft.isDate,yt=ft&&ft.isMap,wt=ft&&ft.isRegExp,bt=ft&&ft.isSet,vt=ft&&ft.isTypedArray;function _t(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Et(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i-1}function kt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function Qt(e,t){for(var r=e.length;r--&&Dt(t,e[r],0)>-1;);return r}var Jt=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Xt=zt({"&":"&","<":"<",">":">",'"':""","'":"'"});function er(e){return"\\"+it[e]}function tr(e){return Je.test(e)}function rr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function nr(e,t){return function(r){return e(t(r))}}function ir(e,t){for(var r=-1,n=e.length,i=0,s=[];++r",""":'"',"'":"'"}),ur=function e(t){var re=(t=null==t?lt:ur.defaults(lt.Object(),t,ur.pick(lt,et))).Array,be=t.Date,ve=t.Error,_e=t.Function,Ee=t.Math,xe=t.Object,Ce=t.RegExp,Se=t.String,Ae=t.TypeError,Ie=re.prototype,ke=_e.prototype,Pe=xe.prototype,Oe=t["__core-js_shared__"],Re=ke.toString,Me=Pe.hasOwnProperty,Ne=0,Te=function(){var e=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),je=Pe.toString,Le=Re.call(xe),De=lt._,$e=Ce("^"+Re.call(Me).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=dt?t.Buffer:r,Ue=t.Symbol,Fe=t.Uint8Array,ze=Be?Be.allocUnsafe:r,We=nr(xe.getPrototypeOf,xe),He=xe.create,Ve=Pe.propertyIsEnumerable,qe=Ie.splice,Ge=Ue?Ue.isConcatSpreadable:r,Ye=Ue?Ue.iterator:r,Je=Ue?Ue.toStringTag:r,it=function(){try{var e=so(xe,"defineProperty");return e({},"",{}),e}catch{}}(),at=t.clearTimeout!==lt.clearTimeout&&t.clearTimeout,ct=be&&be.now!==lt.Date.now&&be.now,ut=t.setTimeout!==lt.setTimeout&&t.setTimeout,ht=Ee.ceil,pt=Ee.floor,ft=xe.getOwnPropertySymbols,Tt=Be?Be.isBuffer:r,zt=t.isFinite,hr=Ie.join,dr=nr(xe.keys,xe),pr=Ee.max,fr=Ee.min,gr=be.now,mr=t.parseInt,yr=Ee.random,wr=Ie.reverse,br=so(t,"DataView"),vr=so(t,"Map"),_r=so(t,"Promise"),Er=so(t,"Set"),xr=so(t,"WeakMap"),Cr=so(xe,"create"),Sr=xr&&new xr,Ar={},Ir=jo(br),kr=jo(vr),Pr=jo(_r),Or=jo(Er),Rr=jo(xr),Mr=Ue?Ue.prototype:r,Nr=Mr?Mr.valueOf:r,Tr=Mr?Mr.toString:r;function jr(e){if(Js(e)&&!Fs(e)&&!(e instanceof Br)){if(e instanceof $r)return e;if(Me.call(e,"__wrapped__"))return Lo(e)}return new $r(e)}var Lr=function(){function e(){}return function(t){if(!Qs(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function Dr(){}function $r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Br(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Ur(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function nn(e,t,n,i,o,s){var a,c=1&t,l=2&t,u=4&t;if(n&&(a=o?n(e,i,o,s):n(e)),a!==r)return a;if(!Qs(e))return e;var h=Fs(e);if(h){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return Ci(e,a)}else{var d=lo(e),f=d==w||d==b;if(Vs(e))return wi(e,c);if(d==E||d==p||f&&!o){if(a=l||f?{}:ho(e),!c)return l?function(e,t){return Si(e,co(e),t)}(e,function(e,t){return e&&Si(t,Pa(t),e)}(a,e)):function(e,t){return Si(e,ao(e),t)}(e,Xr(a,e))}else{if(!nt[d])return o?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case P:return bi(e);case g:case m:return new n(+e);case O:return function(e,t){var r=t?bi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case R:case M:case N:case T:case j:case L:case D:case $:case B:return vi(e,r);case v:return new n;case _:case A:return new n(e);case C:return function(e){var t=new e.constructor(e.source,ue.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new n;case I:return function(e){return Nr?xe(Nr.call(e)):{}}(e)}}(e,d,c)}}s||(s=new Hr);var y=s.get(e);if(y)return y;s.set(e,a),na(e)?e.forEach((function(r){a.add(nn(r,t,n,r,e,s))})):Xs(e)&&e.forEach((function(r,i){a.set(i,nn(r,t,n,i,e,s))}));var x=h?r:(u?l?Xi:Ji:l?Pa:ka)(e);return xt(x||e,(function(r,i){x&&(r=e[i=r]),Yr(a,i,nn(r,t,n,i,e,s))})),a}function on(e,t,n){var i=n.length;if(null==e)return!i;for(e=xe(e);i--;){var o=n[i],s=t[o],a=e[o];if(a===r&&!(o in e)||!s(a))return!1}return!0}function sn(e,t,i){if("function"!=typeof e)throw new Ae(n);return Ao((function(){e.apply(r,i)}),t)}function an(e,t,r,n){var i=-1,o=It,s=!0,a=e.length,c=[],l=t.length;if(!a)return c;r&&(t=Pt(t,Gt(r))),n?(o=kt,s=!1):t.length>=200&&(o=Kt,s=!1,t=new Wr(t));e:for(;++i-1},Fr.prototype.set=function(e,t){var r=this.__data__,n=Qr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Ur,map:new(vr||Fr),string:new Ur}},zr.prototype.delete=function(e){var t=io(this,e).delete(e);return this.size-=t?1:0,t},zr.prototype.get=function(e){return io(this,e).get(e)},zr.prototype.has=function(e){return io(this,e).has(e)},zr.prototype.set=function(e,t){var r=io(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Wr.prototype.add=Wr.prototype.push=function(e){return this.__data__.set(e,i),this},Wr.prototype.has=function(e){return this.__data__.has(e)},Hr.prototype.clear=function(){this.__data__=new Fr,this.size=0},Hr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Hr.prototype.get=function(e){return this.__data__.get(e)},Hr.prototype.has=function(e){return this.__data__.has(e)},Hr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Fr){var n=r.__data__;if(!vr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zr(n)}return r.set(e,t),this.size=r.size,this};var cn=ki(mn),ln=ki(yn,!0);function un(e,t){var r=!0;return cn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function hn(e,t,n){for(var i=-1,o=e.length;++i0&&r(a)?t>1?pn(a,t-1,r,n,i):Ot(i,a):n||(i[i.length]=a)}return i}var fn=Pi(),gn=Pi(!0);function mn(e,t){return e&&fn(e,t,ka)}function yn(e,t){return e&&gn(e,t,ka)}function wn(e,t){return At(t,(function(t){return Zs(e[t])}))}function bn(e,t){for(var n=0,i=(t=fi(t,e)).length;null!=e&&nt}function xn(e,t){return null!=e&&Me.call(e,t)}function Cn(e,t){return null!=e&&t in xe(e)}function Sn(e,t,n){for(var i=n?kt:It,o=e[0].length,s=e.length,a=s,c=re(s),l=1/0,u=[];a--;){var h=e[a];a&&t&&(h=Pt(h,Gt(t))),l=fr(h.length,l),c[a]=!n&&(t||o>=120&&h.length>=120)?new Wr(a&&h):r}h=e[0];var d=-1,p=c[0];e:for(;++d=a?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Un(e,t,r){for(var n=-1,i=t.length,o={};++n-1;)a!==e&&qe.call(a,c,1),qe.call(e,c,1);return e}function zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;fo(i)?qe.call(e,i,1):si(e,i)}}return e}function Wn(e,t){return e+pt(yr()*(t-e+1))}function Hn(e,t){var r="";if(!e||t<1||t>l)return r;do{t%2&&(r+=e),(t=pt(t/2))&&(e+=e)}while(t);return r}function Vn(e,t){return Io(Eo(e,t,ec),e+"")}function qn(e){return qr(Da(e))}function Gn(e,t){var r=Da(e);return Oo(r,rn(t,0,r.length))}function Zn(e,t,n,i){if(!Qs(e))return e;for(var o=-1,s=(t=fi(t,e)).length,a=s-1,c=e;null!=c&&++oi?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=re(i);++n>>1,s=e[o];null!==s&&!oa(s)&&(r?s<=t:s=200){var l=t?null:Hi(e);if(l)return or(l);s=!1,i=Kt,c=new Wr}else c=t?[]:a;e:for(;++n=i?e:Jn(e,t,n)}var yi=at||function(e){return lt.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var r=e.length,n=ze?ze(r):new e.constructor(r);return e.copy(n),n}function bi(e){var t=new e.constructor(e.byteLength);return new Fe(t).set(new Fe(e)),t}function vi(e,t){var r=t?bi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function _i(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,s=oa(e),a=t!==r,c=null===t,l=t==t,u=oa(t);if(!c&&!u&&!s&&e>t||s&&a&&l&&!c&&!u||i&&a&&l||!n&&l||!o)return 1;if(!i&&!s&&!u&&e1?n[o-1]:r,a=o>2?n[2]:r;for(s=e.length>3&&"function"==typeof s?(o--,s):r,a&&go(n[0],n[1],a)&&(s=o<3?r:s,o=1),t=xe(t);++i-1?o[s?t[a]:a]:r}}function Ti(e){return Qi((function(t){var i=t.length,o=i,s=$r.prototype.thru;for(e&&t.reverse();o--;){var a=t[o];if("function"!=typeof a)throw new Ae(n);if(s&&!c&&"wrapper"==to(a))var c=new $r([],!0)}for(o=c?o:i;++o1&&b.reverse(),d&&uc))return!1;var u=s.get(e),h=s.get(t);if(u&&h)return u==t&&h==e;var d=-1,p=!0,f=2&n?new Wr:r;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ne,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return xt(d,(function(r){var n="_."+r[0];t&r[1]&&!It(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ie);return t?t[1].split(oe):[]}(n),r)))}function Po(e){var t=0,n=0;return function(){var i=gr(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Oo(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,rs(e,n)}));function ls(e){var t=jr(e);return t.__chain__=!0,t}function us(e,t){return t(e)}var hs=Qi((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return tn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Br&&fo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:us,args:[o],thisArg:r}),new $r(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)})),ds=Ai((function(e,t,r){Me.call(e,r)?++e[r]:en(e,r,1)})),ps=Ni(Uo),fs=Ni(Fo);function gs(e,t){return(Fs(e)?xt:cn)(e,no(t,3))}function ms(e,t){return(Fs(e)?Ct:ln)(e,no(t,3))}var ys=Ai((function(e,t,r){Me.call(e,r)?e[r].push(t):en(e,r,[t])})),ws=Vn((function(e,t,r){var n=-1,i="function"==typeof t,o=Ws(e)?re(e.length):[];return cn(e,(function(e){o[++n]=i?_t(t,e,r):An(e,t,r)})),o})),bs=Ai((function(e,t,r){en(e,r,t)}));function vs(e,t){return(Fs(e)?Pt:Tn)(e,no(t,3))}var _s=Ai((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Es=Vn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&go(e,t[0],t[1])?t=[]:r>2&&go(t[0],t[1],t[2])&&(t=[t[0]]),Bn(e,pn(t,1),[])})),xs=ct||function(){return lt.Date.now()};function Cs(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,qi(e,a,r,r,r,r,t)}function Ss(e,t){var i;if("function"!=typeof t)throw new Ae(n);return e=ha(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var As=Vn((function(e,t,r){var n=1;if(r.length){var i=ir(r,ro(As));n|=s}return qi(e,n,t,r,i)})),Is=Vn((function(e,t,r){var n=3;if(r.length){var i=ir(r,ro(Is));n|=s}return qi(t,n,e,r,i)}));function ks(e,t,i){var o,s,a,c,l,u,h=0,d=!1,p=!1,f=!0;if("function"!=typeof e)throw new Ae(n);function g(t){var n=o,i=s;return o=s=r,h=t,c=e.apply(i,n)}function m(e){var n=e-u;return u===r||n>=t||n<0||p&&e-h>=a}function y(){var e=xs();if(m(e))return w(e);l=Ao(y,function(e){var r=t-(e-u);return p?fr(r,a-(e-h)):r}(e))}function w(e){return l=r,f&&o?g(e):(o=s=r,c)}function b(){var e=xs(),n=m(e);if(o=arguments,s=this,u=e,n){if(l===r)return function(e){return h=e,l=Ao(y,t),d?g(e):c}(u);if(p)return yi(l),l=Ao(y,t),g(u)}return l===r&&(l=Ao(y,t)),c}return t=pa(t)||0,Qs(i)&&(d=!!i.leading,a=(p="maxWait"in i)?pr(pa(i.maxWait)||0,t):a,f="trailing"in i?!!i.trailing:f),b.cancel=function(){l!==r&&yi(l),h=0,o=u=s=l=r},b.flush=function(){return l===r?c:w(xs())},b}var Ps=Vn((function(e,t){return sn(e,1,t)})),Os=Vn((function(e,t,r){return sn(e,pa(t)||0,r)}));function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Rs.Cache||zr),r}function Ms(e){if("function"!=typeof e)throw new Ae(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Rs.Cache=zr;var Ns=gi((function(e,t){var r=(t=1==t.length&&Fs(t[0])?Pt(t[0],Gt(no())):Pt(pn(t,1),Gt(no()))).length;return Vn((function(n){for(var i=-1,o=fr(n.length,r);++i=t})),Us=In(function(){return arguments}())?In:function(e){return Js(e)&&Me.call(e,"callee")&&!Ve.call(e,"callee")},Fs=re.isArray,zs=gt?Gt(gt):function(e){return Js(e)&&_n(e)==P};function Ws(e){return null!=e&&Ys(e.length)&&!Zs(e)}function Hs(e){return Js(e)&&Ws(e)}var Vs=Tt||pc,qs=mt?Gt(mt):function(e){return Js(e)&&_n(e)==m};function Gs(e){if(!Js(e))return!1;var t=_n(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ta(e)}function Zs(e){if(!Qs(e))return!1;var t=_n(e);return t==w||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ks(e){return"number"==typeof e&&e==ha(e)}function Ys(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function Qs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Js(e){return null!=e&&"object"==typeof e}var Xs=yt?Gt(yt):function(e){return Js(e)&&lo(e)==v};function ea(e){return"number"==typeof e||Js(e)&&_n(e)==_}function ta(e){if(!Js(e)||_n(e)!=E)return!1;var t=We(e);if(null===t)return!0;var r=Me.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Re.call(r)==Le}var ra=wt?Gt(wt):function(e){return Js(e)&&_n(e)==C},na=bt?Gt(bt):function(e){return Js(e)&&lo(e)==S};function ia(e){return"string"==typeof e||!Fs(e)&&Js(e)&&_n(e)==A}function oa(e){return"symbol"==typeof e||Js(e)&&_n(e)==I}var sa=vt?Gt(vt):function(e){return Js(e)&&Ys(e.length)&&!!rt[_n(e)]},aa=Fi(Nn),ca=Fi((function(e,t){return e<=t}));function la(e){if(!e)return[];if(Ws(e))return ia(e)?ar(e):Ci(e);if(Ye&&e[Ye])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ye]());var t=lo(e);return(t==v?rr:t==S?or:Da)(e)}function ua(e){return e?(e=pa(e))===c||e===-c?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ha(e){var t=ua(e),r=t%1;return t==t?r?t-r:t:0}function da(e){return e?rn(ha(e),0,h):0}function pa(e){if("number"==typeof e)return e;if(oa(e))return u;if(Qs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=qt(e);var r=de.test(e);return r||fe.test(e)?st(e.slice(2),r?2:8):he.test(e)?u:+e}function fa(e){return Si(e,Pa(e))}function ga(e){return null==e?"":ii(e)}var ma=Ii((function(e,t){if(bo(t)||Ws(t))Si(t,ka(t),e);else for(var r in t)Me.call(t,r)&&Yr(e,r,t[r])})),ya=Ii((function(e,t){Si(t,Pa(t),e)})),wa=Ii((function(e,t,r,n){Si(t,Pa(t),e,n)})),ba=Ii((function(e,t,r,n){Si(t,ka(t),e,n)})),va=Qi(tn),_a=Vn((function(e,t){e=xe(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&go(t[0],t[1],o)&&(i=1);++n1),t})),Si(e,Xi(e),r),n&&(r=nn(r,7,Ki));for(var i=t.length;i--;)si(r,t[i]);return r})),Na=Qi((function(e,t){return null==e?{}:function(e,t){return Un(e,t,(function(t,r){return Ca(e,r)}))}(e,t)}));function Ta(e,t){if(null==e)return{};var r=Pt(Xi(e),(function(e){return[e]}));return t=no(t),Un(e,r,(function(e,r){return t(e,r[0])}))}var ja=Vi(ka),La=Vi(Pa);function Da(e){return null==e?[]:Zt(e,ka(e))}var $a=Ri((function(e,t,r){return t=t.toLowerCase(),e+(r?Ba(t):t)}));function Ba(e){return Ga(ga(e).toLowerCase())}function Ua(e){return(e=ga(e))&&e.replace(me,Jt).replace(Ke,"")}var Fa=Ri((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),za=Ri((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Wa=Oi("toLowerCase"),Ha=Ri((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Va=Ri((function(e,t,r){return e+(r?" ":"")+Ga(t)})),qa=Ri((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ga=Oi("toUpperCase");function Za(e,t,n){return e=ga(e),(t=n?r:t)===r?function(e){return Xe.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Ka=Vn((function(e,t){try{return _t(e,r,t)}catch(e){return Gs(e)?e:new ve(e)}})),Ya=Qi((function(e,t){return xt(t,(function(t){t=To(t),en(e,t,As(e[t],e))})),e}));function Qa(e){return function(){return e}}var Ja=Ti(),Xa=Ti(!0);function ec(e){return e}function tc(e){return Rn("function"==typeof e?e:nn(e,1))}var rc=Vn((function(e,t){return function(r){return An(r,e,t)}})),nc=Vn((function(e,t){return function(r){return An(e,r,t)}}));function ic(e,t,r){var n=ka(t),i=wn(t,n);null==r&&(!Qs(t)||!i.length&&n.length)&&(r=t,t=e,e=this,i=wn(t,ka(t)));var o=!(Qs(r)&&"chain"in r&&!r.chain),s=Zs(e);return xt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ci(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Ot([this.value()],arguments))})})),e}function oc(){}var sc=$i(Pt),ac=$i(St),cc=$i(Nt);function lc(e){return mo(e)?Ft(To(e)):function(e){return function(t){return bn(t,e)}}(e)}var uc=Ui(),hc=Ui(!0);function dc(){return[]}function pc(){return!1}var fc=Di((function(e,t){return e+t}),0),gc=Wi("ceil"),mc=Di((function(e,t){return e/t}),1),yc=Wi("floor"),wc=Di((function(e,t){return e*t}),1),bc=Wi("round"),vc=Di((function(e,t){return e-t}),0);return jr.after=function(e,t){if("function"!=typeof t)throw new Ae(n);return e=ha(e),function(){if(--e<1)return t.apply(this,arguments)}},jr.ary=Cs,jr.assign=ma,jr.assignIn=ya,jr.assignInWith=wa,jr.assignWith=ba,jr.at=va,jr.before=Ss,jr.bind=As,jr.bindAll=Ya,jr.bindKey=Is,jr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Fs(e)?e:[e]},jr.chain=ls,jr.chunk=function(e,t,n){t=(n?go(e,t,n):t===r)?1:pr(ha(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,a=re(ht(i/t));oo?0:o+n),(i=i===r||i>o?o:ha(i))<0&&(i+=o),i=n>i?0:da(i);n>>0)?(e=ga(e))&&("string"==typeof t||null!=t&&!ra(t))&&!(t=ii(t))&&tr(e)?mi(ar(e),0,n):e.split(t,n):[]},jr.spread=function(e,t){if("function"!=typeof e)throw new Ae(n);return t=null==t?0:pr(ha(t),0),Vn((function(r){var n=r[t],i=mi(r,0,t);return n&&Ot(i,n),_t(e,this,i)}))},jr.tail=function(e){var t=null==e?0:e.length;return t?Jn(e,1,t):[]},jr.take=function(e,t,n){return e&&e.length?Jn(e,0,(t=n||t===r?1:ha(t))<0?0:t):[]},jr.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Jn(e,(t=i-(t=n||t===r?1:ha(t)))<0?0:t,i):[]},jr.takeRightWhile=function(e,t){return e&&e.length?ci(e,no(t,3),!1,!0):[]},jr.takeWhile=function(e,t){return e&&e.length?ci(e,no(t,3)):[]},jr.tap=function(e,t){return t(e),e},jr.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new Ae(n);return Qs(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),ks(e,t,{leading:i,maxWait:t,trailing:o})},jr.thru=us,jr.toArray=la,jr.toPairs=ja,jr.toPairsIn=La,jr.toPath=function(e){return Fs(e)?Pt(e,To):oa(e)?[e]:Ci(No(ga(e)))},jr.toPlainObject=fa,jr.transform=function(e,t,r){var n=Fs(e),i=n||Vs(e)||sa(e);if(t=no(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Qs(e)&&Zs(o)?Lr(We(e)):{}}return(i?xt:mn)(e,(function(e,n,i){return t(r,e,n,i)})),r},jr.unary=function(e){return Cs(e,1)},jr.union=Jo,jr.unionBy=Xo,jr.unionWith=es,jr.uniq=function(e){return e&&e.length?oi(e):[]},jr.uniqBy=function(e,t){return e&&e.length?oi(e,no(t,2)):[]},jr.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?oi(e,r,t):[]},jr.unset=function(e,t){return null==e||si(e,t)},jr.unzip=ts,jr.unzipWith=rs,jr.update=function(e,t,r){return null==e?e:ai(e,t,pi(r))},jr.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:ai(e,t,pi(n),i)},jr.values=Da,jr.valuesIn=function(e){return null==e?[]:Zt(e,Pa(e))},jr.without=ns,jr.words=Za,jr.wrap=function(e,t){return Ts(pi(t),e)},jr.xor=is,jr.xorBy=os,jr.xorWith=ss,jr.zip=as,jr.zipObject=function(e,t){return hi(e||[],t||[],Yr)},jr.zipObjectDeep=function(e,t){return hi(e||[],t||[],Zn)},jr.zipWith=cs,jr.entries=ja,jr.entriesIn=La,jr.extend=ya,jr.extendWith=wa,ic(jr,jr),jr.add=fc,jr.attempt=Ka,jr.camelCase=$a,jr.capitalize=Ba,jr.ceil=gc,jr.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=pa(n))==n?n:0),t!==r&&(t=(t=pa(t))==t?t:0),rn(pa(e),t,n)},jr.clone=function(e){return nn(e,4)},jr.cloneDeep=function(e){return nn(e,5)},jr.cloneDeepWith=function(e,t){return nn(e,5,t="function"==typeof t?t:r)},jr.cloneWith=function(e,t){return nn(e,4,t="function"==typeof t?t:r)},jr.conformsTo=function(e,t){return null==t||on(e,t,ka(t))},jr.deburr=Ua,jr.defaultTo=function(e,t){return null==e||e!=e?t:e},jr.divide=mc,jr.endsWith=function(e,t,n){e=ga(e),t=ii(t);var i=e.length,o=n=n===r?i:rn(ha(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},jr.eq=Ds,jr.escape=function(e){return(e=ga(e))&&q.test(e)?e.replace(H,Xt):e},jr.escapeRegExp=function(e){return(e=ga(e))&&ee.test(e)?e.replace(X,"\\$&"):e},jr.every=function(e,t,n){var i=Fs(e)?St:un;return n&&go(e,t,n)&&(t=r),i(e,no(t,3))},jr.find=ps,jr.findIndex=Uo,jr.findKey=function(e,t){return jt(e,no(t,3),mn)},jr.findLast=fs,jr.findLastIndex=Fo,jr.findLastKey=function(e,t){return jt(e,no(t,3),yn)},jr.floor=yc,jr.forEach=gs,jr.forEachRight=ms,jr.forIn=function(e,t){return null==e?e:fn(e,no(t,3),Pa)},jr.forInRight=function(e,t){return null==e?e:gn(e,no(t,3),Pa)},jr.forOwn=function(e,t){return e&&mn(e,no(t,3))},jr.forOwnRight=function(e,t){return e&&yn(e,no(t,3))},jr.get=xa,jr.gt=$s,jr.gte=Bs,jr.has=function(e,t){return null!=e&&uo(e,t,xn)},jr.hasIn=Ca,jr.head=Wo,jr.identity=ec,jr.includes=function(e,t,r,n){e=Ws(e)?e:Da(e),r=r&&!n?ha(r):0;var i=e.length;return r<0&&(r=pr(i+r,0)),ia(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Dt(e,t,r)>-1},jr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ha(r);return i<0&&(i=pr(n+i,0)),Dt(e,t,i)},jr.inRange=function(e,t,n){return t=ua(t),n===r?(n=t,t=0):n=ua(n),function(e,t,r){return e>=fr(t,r)&&e=-l&&e<=l},jr.isSet=na,jr.isString=ia,jr.isSymbol=oa,jr.isTypedArray=sa,jr.isUndefined=function(e){return e===r},jr.isWeakMap=function(e){return Js(e)&&lo(e)==k},jr.isWeakSet=function(e){return Js(e)&&"[object WeakSet]"==_n(e)},jr.join=function(e,t){return null==e?"":hr.call(e,t)},jr.kebabCase=Fa,jr.last=Go,jr.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=ha(n))<0?pr(i+o,0):fr(o,i-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Lt(e,Bt,o,!0)},jr.lowerCase=za,jr.lowerFirst=Wa,jr.lt=aa,jr.lte=ca,jr.max=function(e){return e&&e.length?hn(e,ec,En):r},jr.maxBy=function(e,t){return e&&e.length?hn(e,no(t,2),En):r},jr.mean=function(e){return Ut(e,ec)},jr.meanBy=function(e,t){return Ut(e,no(t,2))},jr.min=function(e){return e&&e.length?hn(e,ec,Nn):r},jr.minBy=function(e,t){return e&&e.length?hn(e,no(t,2),Nn):r},jr.stubArray=dc,jr.stubFalse=pc,jr.stubObject=function(){return{}},jr.stubString=function(){return""},jr.stubTrue=function(){return!0},jr.multiply=wc,jr.nth=function(e,t){return e&&e.length?$n(e,ha(t)):r},jr.noConflict=function(){return lt._===this&&(lt._=De),this},jr.noop=oc,jr.now=xs,jr.pad=function(e,t,r){e=ga(e);var n=(t=ha(t))?sr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Bi(pt(i),r)+e+Bi(ht(i),r)},jr.padEnd=function(e,t,r){e=ga(e);var n=(t=ha(t))?sr(e):0;return t&&nt){var i=e;e=t,t=i}if(n||e%1||t%1){var o=yr();return fr(e+o*(t-e+ot("1e-"+((o+"").length-1))),t)}return Wn(e,t)},jr.reduce=function(e,t,r){var n=Fs(e)?Rt:Wt,i=arguments.length<3;return n(e,no(t,4),r,i,cn)},jr.reduceRight=function(e,t,r){var n=Fs(e)?Mt:Wt,i=arguments.length<3;return n(e,no(t,4),r,i,ln)},jr.repeat=function(e,t,n){return t=(n?go(e,t,n):t===r)?1:ha(t),Hn(ga(e),t)},jr.replace=function(){var e=arguments,t=ga(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jr.result=function(e,t,n){var i=-1,o=(t=fi(t,e)).length;for(o||(o=1,e=r);++il)return[];var r=h,n=fr(e,h);t=no(t),e-=h;for(var i=Vt(n,t);++r=s)return e;var c=n-sr(i);if(c<1)return i;var l=a?mi(a,0,c).join(""):e.slice(0,c);if(o===r)return l+i;if(a&&(c+=l.length-c),ra(o)){if(e.slice(c).search(o)){var u,h=l;for(o.global||(o=Ce(o.source,ga(ue.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var d=u.index;l=l.slice(0,d===r?c:d)}}else if(e.indexOf(ii(o),c)!=c){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+i},jr.unescape=function(e){return(e=ga(e))&&V.test(e)?e.replace(W,lr):e},jr.uniqueId=function(e){var t=++Ne;return ga(e)+t},jr.upperCase=qa,jr.upperFirst=Ga,jr.each=gs,jr.eachRight=ms,jr.first=Wo,ic(jr,function(){var e={};return mn(jr,(function(t,r){Me.call(jr.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),jr.VERSION="4.17.21",xt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jr[e].placeholder=jr})),xt(["drop","take"],(function(e,t){Br.prototype[e]=function(n){n=n===r?1:pr(ha(n),0);var i=this.__filtered__&&!t?new Br(this):this.clone();return i.__filtered__?i.__takeCount__=fr(n,i.__takeCount__):i.__views__.push({size:fr(n,h),type:e+(i.__dir__<0?"Right":"")}),i},Br.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),xt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Br.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:no(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),xt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Br.prototype[e]=function(){return this[r](1).value()[0]}})),xt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Br.prototype[e]=function(){return this.__filtered__?new Br(this):this[r](1)}})),Br.prototype.compact=function(){return this.filter(ec)},Br.prototype.find=function(e){return this.filter(e).head()},Br.prototype.findLast=function(e){return this.reverse().find(e)},Br.prototype.invokeMap=Vn((function(e,t){return"function"==typeof e?new Br(this):this.map((function(r){return An(r,e,t)}))})),Br.prototype.reject=function(e){return this.filter(Ms(no(e)))},Br.prototype.slice=function(e,t){e=ha(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Br(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ha(t))<0?n.dropRight(-t):n.take(t-e)),n)},Br.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Br.prototype.toArray=function(){return this.take(h)},mn(Br.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=jr[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(jr.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,c=t instanceof Br,l=a[0],u=c||Fs(t),h=function(e){var t=o.apply(jr,Ot([e],a));return i&&d?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var d=this.__chain__,p=!!this.__actions__.length,f=s&&!d,g=c&&!p;if(!s&&u){t=g?t:new Br(this);var m=e.apply(t,a);return m.__actions__.push({func:us,args:[h],thisArg:r}),new $r(m,d)}return f&&g?e.apply(this,a):(m=this.thru(h),f?i?m.value()[0]:m.value():m)})})),xt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);jr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Fs(i)?i:[],e)}return this[r]((function(r){return t.apply(Fs(r)?r:[],e)}))}})),mn(Br.prototype,(function(e,t){var r=jr[t];if(r){var n=r.name+"";Me.call(Ar,n)||(Ar[n]=[]),Ar[n].push({name:t,func:r})}})),Ar[ji(r,2).name]=[{name:"wrapper",func:r}],Br.prototype.clone=function(){var e=new Br(this.__wrapped__);return e.__actions__=Ci(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ci(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ci(this.__views__),e},Br.prototype.reverse=function(){if(this.__filtered__){var e=new Br(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Br.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Fs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},jr.prototype.plant=function(e){for(var t,n=this;n instanceof Dr;){var i=Lo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},jr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Br){var t=e;return this.__actions__.length&&(t=new Br(this)),(t=t.reverse()).__actions__.push({func:us,args:[Qo],thisArg:r}),new $r(t,this.__chain__)}return this.thru(Qo)},jr.prototype.toJSON=jr.prototype.valueOf=jr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},jr.prototype.first=jr.prototype.head,Ye&&(jr.prototype[Ye]=function(){return this}),jr}();ht?((ht.exports=ur)._=ur,ut._=ur):lt._=ur}).call(_i)}(Ei,Ei.exports);var xi=Object.defineProperty,Ci=Object.defineProperties,Si=Object.getOwnPropertyDescriptors,Ai=Object.getOwnPropertySymbols,Ii=Object.prototype.hasOwnProperty,ki=Object.prototype.propertyIsEnumerable,Pi=(e,t,r)=>t in e?xi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Oi=(e,t)=>{for(var r in t||(t={}))Ii.call(t,r)&&Pi(e,r,t[r]);if(Ai)for(var r of Ai(t))ki.call(t,r)&&Pi(e,r,t[r]);return e},Ri=(e,t)=>Ci(e,Si(t));function Mi(e,t,r){var n;const i=(0,o.DQ)(e);return(null==(n=t.rpcMap)?void 0:n[i.reference])||`https://rpc.walletconnect.com/v1/?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function Ni(e){return e.includes(":")?e.split(":")[1]:e}function Ti(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function ji(e){var t,r,n,i;const s={};if(!(0,o.L5)(e))return s;for(const[a,c]of Object.entries(e)){const e=(0,o.gp)(a)?[a]:c.chains,l=c.methods||[],u=c.events||[],h=c.rpcMap||{},d=(0,o.M)(a);s[d]=Ri(Oi(Oi({},s[d]),c),{chains:(0,o.eG)(e,null==(t=s[d])?void 0:t.chains),methods:(0,o.eG)(l,null==(r=s[d])?void 0:r.methods),events:(0,o.eG)(u,null==(n=s[d])?void 0:n.events),rpcMap:Oi(Oi({},h),null==(i=s[d])?void 0:i.rpcMap)})}return s}function Li(e){return e.includes(":")?e.split(":")[2]:e}function Di(e){const t={};for(const[r,n]of Object.entries(e)){const e=n.methods||[],i=n.events||[],s=n.accounts||[],a=(0,o.gp)(r)?[r]:n.chains?n.chains:Ti(n.accounts);t[r]={chains:a,methods:e,events:i,accounts:s}}return t}function $i(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):e.includes(":")?Number(e.split(":")[1]):Number(e)}const Bi={},Ui=e=>Bi[e],Fi=(e,t)=>{Bi[e]=t};class zi{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Ui("events"),this.client=Ui("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(vi,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ni(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Mi(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Fe(new yi(r,Ui("disableProviderPing")))}}class Wi{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Ui("events"),this.client=Ui("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(vi,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const r=t||Mi(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Fe(new mi(r,Ui("disableProviderPing")))}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=parseInt(Ni(t));e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,r;let n=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const i=parseInt(n,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:n}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class Hi{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Ui("events"),this.client=Ui("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(vi,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ni(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Mi(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Fe(new yi(r,Ui("disableProviderPing")))}}class Vi{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Ui("events"),this.client=Ui("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(vi,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ni(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Mi(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Fe(new yi(r,Ui("disableProviderPing")))}}class qi{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Ui("events"),this.client=Ui("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(vi,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const r=this.getCardanoRPCUrl(t),n=Ni(t);e[n]=this.createHttpProvider(n,r)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||this.getCardanoRPCUrl(e);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Fe(new yi(r,Ui("disableProviderPing")))}}class Gi{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Ui("events"),this.client=Ui("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(vi,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ni(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Mi(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Fe(new yi(r,Ui("disableProviderPing")))}}class Zi{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Ui("events"),this.client=Ui("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(vi,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ni(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Mi(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Fe(new yi(r,Ui("disableProviderPing")))}}class Ki{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Ui("events"),this.client=Ui("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const r=t||Mi(`${this.name}:${e}`,this.namespace);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(vi,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Mi(e,this.namespace);return typeof r>"u"?void 0:new Fe(new yi(r,Ui("disableProviderPing")))}}var Yi=Object.defineProperty,Qi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Xi=Object.getOwnPropertySymbols,eo=Object.prototype.hasOwnProperty,to=Object.prototype.propertyIsEnumerable,ro=(e,t,r)=>t in e?Yi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,no=(e,t)=>{for(var r in t||(t={}))eo.call(t,r)&&ro(e,r,t[r]);if(Xi)for(var r of Xi(t))to.call(t,r)&&ro(e,r,t[r]);return e},io=(e,t)=>Qi(e,Ji(t));class oo{constructor(e){this.events=new(i()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,$.pino)((0,$.getDefaultLoggerOptions)({level:e?.logger||wi})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new oo(e);return await t.initialize(),t}async request(e,t){const[r,n]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(r).request({request:no({},e),chainId:`${r}:${n}`,topic:this.session.topic})}sendAsync(e,t,r){const n=(new Date).getTime();this.request(e,r).then((e=>t(null,Ie(n,e)))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:(0,o.D6)("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await n().then((e=>{this.session=e,this.namespaces||(this.namespaces=Di(e.namespaces),this.persist("namespaces",this.namespaces))})).catch((e=>{if(e.message!==qn)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[r,n]=this.validateChain(e);this.getProvider(r).setDefaultChain(n,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if((0,o.qt)(t)){for(const r of t)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await di.init({logger:this.providerOpts.logger||wi,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>(0,o.M)(e))))];Fi("client",this.client),Fi("events",this.events),Fi("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=function(e,t){const r=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!r.length)return[];const n=[];return r.forEach((e=>{const r=t.namespaces[e].accounts;n.push(...r)})),n}(e,this.session),r=Ti(t),n=function(e={},t={}){const r=ji(e),n=ji(t);return Ei.exports.merge(r,n)}(this.namespaces,this.optionalNamespaces),i=io(no({},n[e]),{accounts:t,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new Wi({namespace:i});break;case"solana":this.rpcProviders[e]=new Hi({namespace:i});break;case"cosmos":this.rpcProviders[e]=new Vi({namespace:i});break;case"polkadot":this.rpcProviders[e]=new zi({namespace:i});break;case"cip34":this.rpcProviders[e]=new qi({namespace:i});break;case"elrond":this.rpcProviders[e]=new Gi({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Zi({namespace:i});break;case"near":this.rpcProviders[e]=new Ki({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:r}=t;if("accountsChanged"===r.name){const e=r.data;e&&(0,o.qt)(e)&&this.events.emit("accountsChanged",e.map(Li))}else if("chainChanged"===r.name){const e=t.chainId,r=t.event.data,n=(0,o.M)(e),i=$i(e)!==$i(r)?`${n}:${$i(r)}`:e;this.onChainChanged(i)}else this.events.emit(r.name,r.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var r;const{namespaces:n}=t,i=null==(r=this.client)?void 0:r.session.get(e);this.session=io(no({},i),{namespaces:n}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",io(no({},(0,o.D6)("USER_DISCONNECTED")),{data:e.topic}))})),this.on(vi,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:r,sessionProperties:n}=e;t&&Object.keys(t).length&&(this.namespaces=t),r&&Object.keys(r).length&&(this.optionalNamespaces=r),this.sessionProperties=n,this.persist("namespaces",t),this.persist("optionalNamespaces",r)}validateChain(e){const[t,r]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,r];if(t&&!Object.keys(this.namespaces||{}).map((e=>(0,o.M)(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];const n=(0,o.M)(Object.keys(this.namespaces)[0]);return[n,this.rpcProviders[n].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var r;if(!this.namespaces)return;const[n,i]=this.validateChain(e);t||this.getProvider(n).setDefaultChain(i),(null!=(r=this.namespaces[n])?r:this.namespaces[`${n}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${bi}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${bi}/${e}`)}}const so=oo,ao=["eth_sendTransaction","personal_sign"],co=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],lo=["chainChanged","accountsChanged"],uo=["chainChanged","accountsChanged","message","disconnect","connect"];var ho=Object.defineProperty,po=Object.defineProperties,fo=Object.getOwnPropertyDescriptors,go=Object.getOwnPropertySymbols,mo=Object.prototype.hasOwnProperty,yo=Object.prototype.propertyIsEnumerable,wo=(e,t,r)=>t in e?ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bo=(e,t)=>{for(var r in t||(t={}))mo.call(t,r)&&wo(e,r,t[r]);if(go)for(var r of go(t))yo.call(t,r)&&wo(e,r,t[r]);return e},vo=(e,t)=>po(e,fo(t));function _o(e){return Number(e[0].split(":")[1])}function Eo(e){return`0x${e.toString(16)}`}class xo{constructor(){this.events=new n.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new xo;return await t.initialize(e),t}async request(e){return await this.signer.request(e,this.formatChainId(this.chainId))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:r}=function(e){const{chains:t,optionalChains:r,methods:n,optionalMethods:i,events:s,optionalEvents:a,rpcMap:c}=e;if(!(0,o.qt)(t))throw new Error("Invalid chains");const l={chains:t,methods:n||ao,events:s||lo,rpcMap:bo({},t.length?{[_o(t)]:c[_o(t)]}:{})},u=s?.filter((e=>!lo.includes(e))),h=n?.filter((e=>!ao.includes(e)));if(!(r||a||i||null!=u&&u.length||null!=h&&h.length))return{required:t.length?l:void 0};const d={chains:[...new Set(u?.length&&h?.length||!r?l.chains.concat(r||[]):r)],methods:[...new Set(l.methods.concat(null!=i&&i.length?i:co))],events:[...new Set(l.events.concat(null!=a&&a.length?a:uo))],rpcMap:c};return{required:t.length?l:void 0,optional:r.length?d:void 0}}(this.rpc);try{const n=await new Promise((async(n,i)=>{var o;this.rpc.showQrModal&&(null==(o=this.modal)||o.subscribeModal((e=>{!e.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),i(new Error("Connection request reset. Please try again.")))}))),await this.signer.connect(vo(bo({namespaces:bo({},t&&{[this.namespace]:t})},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:e?.pairingTopic})).then((e=>{n(e)})).catch((e=>{i(new Error(e.message))}))}));if(!n)return;const i=(0,o.gu)(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:Eo(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:r}=t;"accountsChanged"===r.name?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===r.name?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Eo(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",vo(bo({},(0,o.D6)("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{var t,r;this.rpc.showQrModal&&(null==(t=this.modal)||t.closeModal(),null==(r=this.modal)||r.openModal({uri:e})),this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))).map((e=>this.parseChainId(e)));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Eo(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,r,n]=e.split(":");return{chainId:`${t}:${r}`,address:n}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,r;const n=null!=(t=e?.chains)?t:[],i=null!=(r=e?.optionalChains)?r:[],o=n.concat(i);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const s=n.length?e?.methods||ao:[],a=n.length?e?.events||lo:[],c=e?.optionalMethods||[],l=e?.optionalEvents||[],u=e?.rpcMap||this.buildRpcMap(o,e.projectId),h=e?.qrModalOptions||void 0;return{chains:n?.map((e=>this.formatChainId(e))),optionalChains:i.map((e=>this.formatChainId(e))),methods:s,events:a,optionalMethods:c,optionalEvents:l,rpcMap:u,showQrModal:!(null==e||!e.showQrModal),qrModalOptions:h,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const r={};return e.forEach((e=>{r[e]=this.getRpcUrl(e,t)})),r}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?_o(this.rpc.chains):_o(this.rpc.optionalChains),this.signer=await so.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let e;try{const{WalletConnectModal:t}=await Promise.resolve().then(r.bind(r,9343));e=t}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(e)try{this.modal=new e(bo({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(e){throw this.signer.logger.error(e),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:r,rpcMap:n}=e;t&&(0,o.qt)(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)}))),r&&(0,o.qt)(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=r?.map((e=>this.formatChainId(e))),r.forEach((e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)})))}getRpcUrl(e,t){var r;return(null==(r=this.rpc.rpcMap)?void 0:r[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t?.accounts),this.setAccounts(t?.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const Co=xo},8200:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});class n{}},997:(e,t,r)=>{"use strict";r.r(t),r.d(t,{IEvents:()=>n.q});var n=r(8200)},2568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HEARTBEAT_EVENTS=t.HEARTBEAT_INTERVAL=void 0;const n=r(6736);t.HEARTBEAT_INTERVAL=n.FIVE_SECONDS,t.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},3401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(2568),t)},8969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartBeat=void 0;const n=r(655),i=r(7187),o=r(6736),s=r(1614),a=r(3401);class c extends s.IHeartBeat{constructor(e){super(e),this.events=new i.EventEmitter,this.interval=a.HEARTBEAT_INTERVAL,this.interval=(null==e?void 0:e.interval)||a.HEARTBEAT_INTERVAL}static init(e){return n.__awaiter(this,void 0,void 0,(function*(){const t=new c(e);return yield t.init(),t}))}init(){return n.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return n.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),o.toMiliseconds(this.interval))}))}pulse(){this.events.emit(a.HEARTBEAT_EVENTS.pulse)}}t.HeartBeat=c},772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(8969),t),n.__exportStar(r(1614),t),n.__exportStar(r(3401),t)},4174:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHeartBeat=void 0;const n=r(997);class i extends n.IEvents{constructor(e){super()}}t.IHeartBeat=i},1614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(4174),t)},5727:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PINO_CUSTOM_CONTEXT_KEY=t.PINO_LOGGER_DEFAULTS=void 0,t.PINO_LOGGER_DEFAULTS={level:"info"},t.PINO_CUSTOM_CONTEXT_KEY="custom_context"},9107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const n=r(655),i=n.__importDefault(r(6559));Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return i.default}}),n.__exportStar(r(5727),t),n.__exportStar(r(8048),t)},8048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateChildLogger=t.formatChildLoggerContext=t.getLoggerContext=t.setBrowserLoggerContext=t.getBrowserLoggerContext=t.getDefaultLoggerOptions=void 0;const n=r(5727);function i(e,t=n.PINO_CUSTOM_CONTEXT_KEY){return e[t]||""}function o(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){return e[r]=t,e}function s(e,t=n.PINO_CUSTOM_CONTEXT_KEY){let r="";return r=void 0===e.bindings?i(e,t):e.bindings().context||"",r}function a(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const i=s(e,r);return i.trim()?`${i}/${t}`:t}t.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null==e?void 0:e.level)||n.PINO_LOGGER_DEFAULTS.level})},t.getBrowserLoggerContext=i,t.setBrowserLoggerContext=o,t.getLoggerContext=s,t.formatChildLoggerContext=a,t.generateChildLogger=function(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const i=a(e,t,r);return o(e.child({context:i}),i,r)}},1882:()=>{},3014:()=>{},6900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(6869),t),n.__exportStar(r(8033),t)},6869:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},8033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},6736:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(4273),t),n.__exportStar(r(7001),t),n.__exportStar(r(2939),t),n.__exportStar(r(6900),t)},2939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(8766),t)},8766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0,t.IWatch=class{}},3207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const n=r(6900);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},3873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},4273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(3873),t),n.__exportStar(r(3207),t)},7001:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=r,t.default=r},9795:(e,t,r)=>{"use strict";r.d(t,{AW:()=>O,O6:()=>$t,rV:()=>T,gn:()=>xe,H1:()=>ye,hF:()=>we,WG:()=>H,pe:()=>q,m$:()=>F,vB:()=>G,HI:()=>V,E0:()=>Se,Gq:()=>_e,$0:()=>pe,Z4:()=>ve,Bv:()=>Fe,Au:()=>B,jd:()=>U,gu:()=>I,D:()=>he,X_:()=>ue,bW:()=>ke,Z7:()=>it,cO:()=>Re,_H:()=>Oe,fc:()=>Je,D6:()=>ot,Hh:()=>Ie,Ym:()=>z,rj:()=>W,jU:()=>ce,gp:()=>Xe,rF:()=>Mt,Bw:()=>Ce,UG:()=>se,Gg:()=>jt,xW:()=>ft,b$:()=>ae,Ih:()=>ht,h1:()=>gt,Q8:()=>Y,o8:()=>ct,qt:()=>st,Dd:()=>mt,$t:()=>St,nf:()=>kt,Q0:()=>xt,in:()=>vt,p8:()=>Pt,sI:()=>Rt,al:()=>Ot,L5:()=>at,EJ:()=>Ct,Z2:()=>_t,PM:()=>Et,hH:()=>At,ON:()=>Tt,n:()=>bt,JT:()=>It,M_:()=>lt,jv:()=>pt,KC:()=>ge,eG:()=>Ae,fK:()=>tt,IP:()=>me,DQ:()=>A,iP:()=>Ee,M:()=>et,he:()=>Be,uw:()=>Lt,Ll:()=>Z,EN:()=>K});var n=r(5501),i=r(512),o=r(1416),s=r(3294),a=r(7664),c=r(7466),l=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i{if(t.length&&!t.includes(n))return;const i=e[n];r.push(...i.accounts)})),r}function k(e,t){return e.includes(":")?[e]:t.chains||[]}const P="base10",O="base16",R="base64pad",M="utf8",N=0,T=1,j=0,L=1,D=12,$=32;function B(){const e=a.Au();return{privateKey:(0,c.BB)(e.secretKey,O),publicKey:(0,c.BB)(e.publicKey,O)}}function U(){const e=(0,o.randomBytes)($);return(0,c.BB)(e,O)}function F(e,t){const r=a.gi((0,c.mL)(e,O),(0,c.mL)(t,O),!0),n=new i.t(s.mE,r).expand($);return(0,c.BB)(n,O)}function z(e){const t=(0,s.vp)((0,c.mL)(e,O));return(0,c.BB)(t,O)}function W(e){const t=(0,s.vp)((0,c.mL)(e,M));return(0,c.BB)(t,O)}function H(e){return Number((0,c.BB)(e,P))}function V(e){const t=function(e){return(0,c.mL)(`${e}`,P)}(typeof e.type<"u"?e.type:N);if(H(t)===T&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?(0,c.mL)(e.senderPublicKey,O):void 0,i=typeof e.iv<"u"?(0,c.mL)(e.iv,O):(0,o.randomBytes)(D);return function(e){if(H(e.type)===T){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,c.BB)((0,c.zo)([e.type,e.senderPublicKey,e.iv,e.sealed]),R)}return(0,c.BB)((0,c.zo)([e.type,e.iv,e.sealed]),R)}({type:t,sealed:new n.OK((0,c.mL)(e.symKey,O)).seal(i,(0,c.mL)(e.message,M)),iv:i,senderPublicKey:r})}function q(e){const t=new n.OK((0,c.mL)(e.symKey,O)),{sealed:r,iv:i}=G(e.encoded),o=t.open(i,r);if(null===o)throw new Error("Failed to decrypt");return(0,c.BB)(o,M)}function G(e){const t=(0,c.mL)(e,R),r=t.slice(j,L),n=L;if(H(r)===T){const e=n+$,i=e+D,o=t.slice(n,e),s=t.slice(e,i);return{type:r,sealed:t.slice(i),iv:s,senderPublicKey:o}}const i=n+D,o=t.slice(n,i);return{type:r,sealed:t.slice(i),iv:o}}function Z(e,t){const r=G(e);return K({type:H(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?(0,c.BB)(r.senderPublicKey,O):void 0,receiverPublicKey:t?.receiverPublicKey})}function K(e){const t=e?.type||N;if(t===T){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function Y(e){return e.type===T&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var Q=Object.defineProperty,J=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,te=(e,t,r)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,re=(e,t)=>{for(var r in t||(t={}))X.call(t,r)&&te(e,r,t[r]);if(J)for(var r of J(t))ee.call(t,r)&&te(e,r,t[r]);return e};const ne="ReactNative",ie={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},oe="js";function se(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function ae(){return!(0,_.getDocument)()&&!!(0,_.getNavigator)()&&navigator.product===ne}function ce(){return!se()&&!!(0,_.getNavigator)()&&!!(0,_.getDocument)()}function le(){return ae()?ie.reactNative:se()?ie.node:ce()?ie.browser:ie.unknown}function ue(){var e;try{return ae()&&typeof r.g<"u"&&typeof(null==r.g?void 0:r.g.Application)<"u"?null==(e=r.g.Application)?void 0:e.applicationId:void 0}catch{return}}function he(){return(0,E.D)()||{name:"",description:"",url:"",icons:[""]}}function de(e,t,n){const i=function(){if(le()===ie.reactNative&&typeof r.g<"u"&&typeof(null==r.g?void 0:r.g.Platform)<"u"){const{OS:e,Version:t}=r.g.Platform;return[e,t].join("-")}const e=t?b(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new f:"undefined"!=typeof navigator?b(navigator.userAgent):"undefined"!=typeof process&&process.version?new h(process.version.slice(1)):null;var t;if(null===e)return"unknown";const n=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[n,e.name,e.version].join("-"):[n,e.version].join("-")}(),o=function(){var e;const t=le();return t===ie.browser?[t,(null==(e=(0,_.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[oe,n].join("-"),i,o].join("/")}function pe({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:i,projectId:o,useOnCloseEvent:s,bundleId:a}){const c=r.split("?"),l={auth:i,ua:de(e,t,n),projectId:o,useOnCloseEvent:s||void 0,origin:a||void 0},u=function(e,t){let r=x.parse(e);return r=re(re({},r),t),x.stringify(r)}(c[1]||"",l);return c[0]+"?"+u}function fe(e,t){return e.filter((e=>t.includes(e))).length===e.length}function ge(e){return Object.fromEntries(e.entries())}function me(e){return new Map(Object.entries(e))}function ye(e=v.FIVE_MINUTES,t){const r=(0,v.toMiliseconds)(e||v.FIVE_MINUTES);let n,i,o;return{resolve:e=>{o&&n&&(clearTimeout(o),n(e))},reject:e=>{o&&i&&(clearTimeout(o),i(e))},done:()=>new Promise(((e,s)=>{o=setTimeout((()=>{s(new Error(t))}),r),n=e,i=s}))}}function we(e,t,r){return new Promise((async(n,i)=>{const o=setTimeout((()=>i(new Error(r))),t);try{n(await e)}catch(e){i(e)}clearTimeout(o)}))}function be(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function ve(e){return be("topic",e)}function _e(e){return be("id",e)}function Ee(e){const[t,r]=e.split(":"),n={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)n.topic=r;else{if("id"!==t||!Number.isInteger(Number(r)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);n.id=Number(r)}return n}function xe(e,t){return(0,v.fromMiliseconds)((t||Date.now())+(0,v.toMiliseconds)(e))}function Ce(e){return Date.now()>=(0,v.toMiliseconds)(e)}function Se(e,t){return`${e}${t?`:${t}`:""}`}function Ae(e=[],t=[]){return[...new Set([...e,...t])]}async function Ie({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;const i="string"==typeof n?JSON.parse(n):n;let o=i?.href;if("string"!=typeof o)return;o.endsWith("/")&&(o=o.slice(0,-1));const s=`${o}/wc?requestId=${e}&sessionTopic=${t}`,a=le();a===ie.browser?s.startsWith("https://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):a===ie.reactNative&&typeof(null==r.g?void 0:r.g.Linking)<"u"&&await r.g.Linking.openURL(s)}catch(e){console.error(e)}}async function ke(e,t){try{return await e.getItem(t)||(ce()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}const Pe="irn";function Oe(e){return e?.relay||{protocol:Pe}}function Re(e){const t=C[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Me=Object.defineProperty,Ne=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Le=(e,t,r)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,De=(e,t)=>{for(var r in t||(t={}))Te.call(t,r)&&Le(e,r,t[r]);if(Ne)for(var r of Ne(t))je.call(t,r)&&Le(e,r,t[r]);return e};function $e(e,t="-"){const r={},n="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(n)){const i=t.replace(n,""),o=e[t];r[i]=o}})),r}function Be(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,n=e.substring(0,t),i=e.substring(t+1,r).split("@"),o=typeof r<"u"?e.substring(r):"",s=x.parse(o);return{protocol:n,topic:Ue(i[0]),version:parseInt(i[1],10),symKey:s.symKey,relay:$e(s)}}function Ue(e){return e.startsWith("//")?e.substring(2):e}function Fe(e){return`${e.protocol}:${e.topic}@${e.version}?`+x.stringify(De({symKey:e.symKey},function(e,t="-"){const r={};return Object.keys(e).forEach((n=>{const i="relay"+t+n;e[n]&&(r[i]=e[n])})),r}(e.relay)))}var ze=Object.defineProperty,We=Object.defineProperties,He=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ze=(e,t,r)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ke=(e,t)=>{for(var r in t||(t={}))qe.call(t,r)&&Ze(e,r,t[r]);if(Ve)for(var r of Ve(t))Ge.call(t,r)&&Ze(e,r,t[r]);return e},Ye=(e,t)=>We(e,He(t));function Qe(e){const t=[];return e.forEach((e=>{const[r,n]=e.split(":");t.push(`${r}:${n}`)})),t}function Je(e,t){const r=vt(e,t);if(r)throw new Error(r.message);const n={};for(const[t,r]of Object.entries(e))n[t]={methods:r.methods,events:r.events,chains:r.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return n}function Xe(e){return e.includes(":")}function et(e){return Xe(e)?e.split(":")[0]:e}function tt(e){var t,r,n;const i={};if(!at(e))return i;for(const[o,s]of Object.entries(e)){const e=Xe(o)?[o]:s.chains,a=s.methods||[],c=s.events||[],l=et(o);i[l]=Ye(Ke({},i[l]),{chains:Ae(e,null==(t=i[l])?void 0:t.chains),methods:Ae(a,null==(r=i[l])?void 0:r.methods),events:Ae(c,null==(n=i[l])?void 0:n.events)})}return i}const rt={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},nt={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function it(e,t){const{message:r,code:n}=nt[e];return{message:t?`${r} ${t}`:r,code:n}}function ot(e,t){const{message:r,code:n}=rt[e];return{message:t?`${r} ${t}`:r,code:n}}function st(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function at(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function ct(e){return typeof e>"u"}function lt(e,t){return!(!t||!ct(e))||"string"==typeof e&&!!e.trim().length}function ut(e,t){return!(!t||!ct(e))||"number"==typeof e&&!isNaN(e)}function ht(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),i=Object.keys(r);let o=!0;return!!fe(i,n)&&(n.forEach((t=>{const{accounts:n,methods:i,events:s}=e.namespaces[t],a=Qe(n),c=r[t];fe(k(t,c),a)&&fe(c.methods,i)&&fe(c.events,s)||(o=!1)})),o)}function dt(e){return!(!lt(e,!1)||!e.includes(":"))&&2===e.split(":").length}function pt(e){if(lt(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function ft(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}function gt(e){return e?.topic}function mt(e,t){let r=null;return lt(e?.publicKey,!1)||(r=it("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function yt(e){let t=!0;return st(e)?e.length&&(t=e.every((e=>lt(e,!1)))):t=!1,t}function wt(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=function(e,t){let r=null;return yt(e?.methods)?yt(e?.events)||(r=ot("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=ot("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}(e,`${t}, namespace`);n&&(r=n)})),r}function bt(e,t,r){let n=null;if(e&&at(e)){const i=wt(e,t);i&&(n=i);const o=function(e,t,r){let n=null;return Object.entries(e).forEach((([e,i])=>{if(n)return;const o=function(e,t,r){let n=null;return st(t)&&t.length?t.forEach((e=>{n||dt(e)||(n=ot("UNSUPPORTED_CHAINS",`${r}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):dt(e)||(n=ot("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}(e,k(e,i),`${t} ${r}`);o&&(n=o)})),n}(e,t,r);o&&(n=o)}else n=it("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}function vt(e,t){let r=null;if(e&&at(e)){const n=wt(e,t);n&&(r=n);const i=function(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=function(e,t){let r=null;return st(e)?e.forEach((e=>{r||function(e){if(lt(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&dt(e)}}return!1}(e)||(r=ot("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):r=ot("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}(e?.accounts,`${t} namespace`);n&&(r=n)})),r}(e,t);i&&(r=i)}else r=it("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function _t(e){return lt(e.protocol,!0)}function Et(e,t){let r=!1;return t&&!e?r=!0:e&&st(e)&&e.length&&e.forEach((e=>{r=_t(e)})),r}function xt(e){return"number"==typeof e}function Ct(e){return typeof e<"u"&&null!==typeof e}function St(e){return!!(e&&"object"==typeof e&&e.code&&ut(e.code,!1)&&e.message&<(e.message,!1))}function At(e){return!(ct(e)||!lt(e.method,!1))}function It(e){return!(ct(e)||ct(e.result)&&ct(e.error)||!ut(e.id,!1)||!lt(e.jsonrpc,!1))}function kt(e){return!(ct(e)||!lt(e.name,!1))}function Pt(e,t){return!(!dt(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...Qe(e.accounts))})),t}(e).includes(t))}function Ot(e,t,r){return!!lt(r,!1)&&function(e,t){const r=[];return Object.values(e).forEach((e=>{Qe(e.accounts).includes(t)&&r.push(...e.methods)})),r}(e,t).includes(r)}function Rt(e,t,r){return!!lt(r,!1)&&function(e,t){const r=[];return Object.values(e).forEach((e=>{Qe(e.accounts).includes(t)&&r.push(...e.events)})),r}(e,t).includes(r)}function Mt(e,t,r){let n=null;const i=function(e){const t={};return Object.keys(e).forEach((r=>{var n;r.includes(":")?t[r]=e[r]:null==(n=e[r].chains)||n.forEach((n=>{t[n]={methods:e[r].methods,events:e[r].events}}))})),t}(e),o=function(e){const t={};return Object.keys(e).forEach((r=>{if(r.includes(":"))t[r]=e[r];else{const n=Qe(e[r].accounts);n?.forEach((n=>{t[n]={accounts:e[r].accounts.filter((e=>e.includes(`${n}:`))),methods:e[r].methods,events:e[r].events}}))}})),t}(t),s=Object.keys(i),a=Object.keys(o),c=Nt(Object.keys(e)),l=Nt(Object.keys(t)),u=c.filter((e=>!l.includes(e)));return u.length&&(n=it("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n Required: ${u.toString()}\n Received: ${Object.keys(t).toString()}`)),fe(s,a)||(n=it("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.\n Required: ${s.toString()}\n Approved: ${a.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||n)return;const i=Qe(t[e].accounts);i.includes(e)||(n=it("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),s.forEach((e=>{n||(fe(i[e].methods,o[e].methods)?fe(i[e].events,o[e].events)||(n=it("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):n=it("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))})),n}function Nt(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function Tt(e,t){return ut(e,!1)&&e<=t.max&&e>=t.min}function jt(){const e=le();return new Promise((t=>{switch(e){case ie.browser:t(ce()&&navigator?.onLine);break;case ie.reactNative:t(async function(){if(ae()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo){const e=await(null==r.g?void 0:r.g.NetInfo.fetch());return e?.isConnected}return!0}());break;case ie.node:default:t(!0)}}))}function Lt(e){switch(le()){case ie.browser:!function(e){!ae()&&ce()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case ie.reactNative:!function(e){ae()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo&&r.g?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e);case ie.node:}}const Dt={};class $t{static get(e){return Dt[e]}static set(e,t){Dt[e]=t}static delete(e){delete Dt[e]}}},6151:(e,t,r)=>{"use strict";const n=r(610),i=r(4020),o=r(500),s=r(2806),a=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?i(e):e}function h(e){return Array.isArray(e)?e.sort():"object"==typeof e?h(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function d(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function p(e){const t=(e=d(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function g(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"colon-list-separator":return(e,r,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const i="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!i&&u(r,e).includes(e.arrayFormatSeparator);r=o?u(r,e):r;const s=i||o?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);n[t]=s};case"bracket-separator":return(t,r,n)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r?u(r,e):r);const o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const i of e.split("&")){if(""===i)continue;let[e,s]=o(t.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:u(s,t),r(u(e,t),s,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=f(r[e],t);else n[e]=f(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=h(r):e[t]=r,e}),Object.create(null))}t.extract=p,t.parse=g,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[",i,"]"].join("")]:[...r,[l(t,e),"[",l(i,e),"]=",l(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),":list="].join("")]:[...r,[l(t,e),":list=",l(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[l(r,e),t,l(i,e)].join("")]:[[n,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,l(t,e)]:[...r,[l(t,e),"=",l(n,e)].join("")]}}(t),i={};for(const t of Object.keys(e))r(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((r=>{const i=e[r];return void 0===i?"":null===i?l(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":i.reduce(n(r),[]).join("&"):l(r,t)+"="+l(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:g(p(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);const n=d(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),s=Object.assign(o,e.query);let c=t.stringify(s,r);c&&(c=`?${c}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[a]?l(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${c}${u}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);const{url:i,query:o,fragmentIdentifier:c}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:s(o,r),fragmentIdentifier:c},n)},t.exclude=(e,r,n)=>{const i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,i,n)}},2873:(e,t)=>{"use strict";function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function n(e){const t=r(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},5755:(e,t,r)=>{"use strict";t.D=void 0;const n=r(2873);t.D=function(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(e){return null}function r(...t){const r=e.getElementsByTagName("meta");for(let e=0;en.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=n.getAttribute("content");if(e)return e}}return""}const i=function(){let t=r("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:r("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const r=e.getElementsByTagName("link"),n=[];for(let e=0;e-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{const n=t.pathname.split("/");n.pop(),r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){const r=t.protocol+e;n.push(r)}else n.push(e)}}return n}(),name:i}}},5078:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3649),i=r(2403),o=function(){function e(){this._semaphore=new i.default(1)}return e.prototype.acquire=function(){return n.__awaiter(this,void 0,void 0,(function(){return n.__generator(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,e.sent()[1]]}}))}))},e.prototype.runExclusive=function(e){return this._semaphore.runExclusive((function(){return e()}))},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();t.default=o},2403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3649),i=function(){function e(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return e.prototype.acquire=function(){var e=this,t=this.isLocked(),r=new Promise((function(t){return e._queue.push(t)}));return t||this._dispatch(),r},e.prototype.runExclusive=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,r,i;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,this.acquire()];case 1:t=n.sent(),r=t[0],i=t[1],n.label=2;case 2:return n.trys.push([2,,4,5]),[4,e(r)];case 3:return[2,n.sent()];case 4:return i(),[7];case 5:return[2]}}))}))},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},e.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var r=!1;this._currentReleaser=function(){r||(r=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},e}();t.default=i},8125:(e,t,r)=>{"use strict";t.WU=void 0;var n=r(5078);Object.defineProperty(t,"WU",{enumerable:!0,get:function(){return n.default}});r(2403),r(1960)},1960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=void 0;var n=r(3649);t.withTimeout=function(e,t,r){var i=this;return void 0===r&&(r=new Error("timeout")),{acquire:function(){return new Promise((function(o,s){return n.__awaiter(i,void 0,void 0,(function(){var i,a;return n.__generator(this,(function(n){switch(n.label){case 0:return i=!1,setTimeout((function(){i=!0,s(r)}),t),[4,e.acquire()];case 1:return a=n.sent(),i?(Array.isArray(a)?a[1]:a)():o(a),[2]}}))}))}))},runExclusive:function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,r;return n.__generator(this,(function(n){switch(n.label){case 0:t=function(){},n.label=1;case 1:return n.trys.push([1,,7,8]),[4,this.acquire()];case 2:return r=n.sent(),Array.isArray(r)?(t=r[1],[4,e(r[0])]):[3,4];case 3:return[2,n.sent()];case 4:return t=r,[4,e()];case 5:return[2,n.sent()];case 6:return[3,8];case 7:return t(),[7];case 8:return[2]}}))}))},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],c=o[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,c)),u=0,h=c>0?s-4:s;for(r=0;r>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,l=n-i;al?l:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},7056:(e,t)=>{"use strict";var r;function n(e,t,n){if(!n||typeof n.value!==r.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+t+"> is not a method!");return{configurable:r.boolTrue,get:function(){var e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:r.boolTrue,writable:r.boolTrue}),e}}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.typeOfFunction="function",e.boolTrue=!0}(r||(r={})),t.bind=n,t.default=n},3550:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6601).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),c=t;c=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&s0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var l=1;l>>26,h=67108863&c,d=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=d;p++){var f=l-p|0;u+=(s=(i=0|e.words[f])*(o=0|t.words[p])+h)/67108864|0,h=67108863&s}r.words[l]=0|h,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=p[e],u=f[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modrn(u).toString(e);r=(h=h.idivn(u)).isZero()?g+r:d[l-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,p=0|s[1],f=8191&p,g=p>>>13,m=0|s[2],y=8191&m,w=m>>>13,b=0|s[3],v=8191&b,_=b>>>13,E=0|s[4],x=8191&E,C=E>>>13,S=0|s[5],A=8191&S,I=S>>>13,k=0|s[6],P=8191&k,O=k>>>13,R=0|s[7],M=8191&R,N=R>>>13,T=0|s[8],j=8191&T,L=T>>>13,D=0|s[9],$=8191&D,B=D>>>13,U=0|a[0],F=8191&U,z=U>>>13,W=0|a[1],H=8191&W,V=W>>>13,q=0|a[2],G=8191&q,Z=q>>>13,K=0|a[3],Y=8191&K,Q=K>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,le=ae>>>13,ue=0|a[8],he=8191&ue,de=ue>>>13,pe=0|a[9],fe=8191&pe,ge=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(l+(n=Math.imul(h,F))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,F)|0))<<13)|0;l=((o=Math.imul(d,z))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(f,F),i=(i=Math.imul(f,z))+Math.imul(g,F)|0,o=Math.imul(g,z);var ye=(l+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,H)|0))<<13)|0;l=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),i=(i=Math.imul(y,z))+Math.imul(w,F)|0,o=Math.imul(w,z),n=n+Math.imul(f,H)|0,i=(i=i+Math.imul(f,V)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,V)|0;var we=(l+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(d,G)|0))<<13)|0;l=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(v,F),i=(i=Math.imul(v,z))+Math.imul(_,F)|0,o=Math.imul(_,z),n=n+Math.imul(y,H)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(f,G)|0,i=(i=i+Math.imul(f,Z)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Z)|0;var be=(l+(n=n+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Y)|0))<<13)|0;l=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(x,F),i=(i=Math.imul(x,z))+Math.imul(C,F)|0,o=Math.imul(C,z),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(f,Y)|0,i=(i=i+Math.imul(f,Q)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Q)|0;var ve=(l+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,F),i=(i=Math.imul(A,z))+Math.imul(I,F)|0,o=Math.imul(I,z),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Q)|0,n=n+Math.imul(f,X)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var _e=(l+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,F),i=(i=Math.imul(P,z))+Math.imul(O,F)|0,o=Math.imul(O,z),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,V)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(f,re)|0,i=(i=i+Math.imul(f,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var Ee=(l+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(M,F),i=(i=Math.imul(M,z))+Math.imul(N,F)|0,o=Math.imul(N,z),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Q)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(f,oe)|0,i=(i=i+Math.imul(f,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0;var xe=(l+(n=n+Math.imul(h,ce)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(d,ce)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,F),i=(i=Math.imul(j,z))+Math.imul(L,F)|0,o=Math.imul(L,z),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,V)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Q)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,n=n+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,le)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,le)|0;var Ce=(l+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul($,F),i=(i=Math.imul($,z))+Math.imul(B,F)|0,o=Math.imul(B,z),n=n+Math.imul(j,H)|0,i=(i=i+Math.imul(j,V)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,V)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(w,ce)|0,o=o+Math.imul(w,le)|0,n=n+Math.imul(f,he)|0,i=(i=i+Math.imul(f,de)|0)+Math.imul(g,he)|0,o=o+Math.imul(g,de)|0;var Se=(l+(n=n+Math.imul(h,fe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ge)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul($,H),i=(i=Math.imul($,V))+Math.imul(B,H)|0,o=Math.imul(B,V),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(L,G)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(y,he)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(w,he)|0,o=o+Math.imul(w,de)|0;var Ae=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(g,fe)|0))<<13)|0;l=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul($,G),i=(i=Math.imul($,Z))+Math.imul(B,G)|0,o=Math.imul(B,Z),n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,Q)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,Q)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,se)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,le)|0,n=n+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,de)|0;var Ie=(l+(n=n+Math.imul(y,fe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(w,fe)|0))<<13)|0;l=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul($,Y),i=(i=Math.imul($,Q))+Math.imul(B,Y)|0,o=Math.imul(B,Q),n=n+Math.imul(j,X)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,le)|0,n=n+Math.imul(x,he)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(C,he)|0,o=o+Math.imul(C,de)|0;var ke=(l+(n=n+Math.imul(v,fe)|0)|0)+((8191&(i=(i=i+Math.imul(v,ge)|0)+Math.imul(_,fe)|0))<<13)|0;l=((o=o+Math.imul(_,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul($,X),i=(i=Math.imul($,ee))+Math.imul(B,X)|0,o=Math.imul(B,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,n=n+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,le)|0,n=n+Math.imul(A,he)|0,i=(i=i+Math.imul(A,de)|0)+Math.imul(I,he)|0,o=o+Math.imul(I,de)|0;var Pe=(l+(n=n+Math.imul(x,fe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,fe)|0))<<13)|0;l=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul($,re),i=(i=Math.imul($,ne))+Math.imul(B,re)|0,o=Math.imul(B,ne),n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,se)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,se)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(N,ce)|0,o=o+Math.imul(N,le)|0,n=n+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(l+(n=n+Math.imul(A,fe)|0)|0)+((8191&(i=(i=i+Math.imul(A,ge)|0)+Math.imul(I,fe)|0))<<13)|0;l=((o=o+Math.imul(I,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul($,oe),i=(i=Math.imul($,se))+Math.imul(B,oe)|0,o=Math.imul(B,se),n=n+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,le)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,le)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(l+(n=n+Math.imul(P,fe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(O,fe)|0))<<13)|0;l=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul($,ce),i=(i=Math.imul($,le))+Math.imul(B,ce)|0,o=Math.imul(B,le),n=n+Math.imul(j,he)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(L,he)|0,o=o+Math.imul(L,de)|0;var Me=(l+(n=n+Math.imul(M,fe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(N,fe)|0))<<13)|0;l=((o=o+Math.imul(N,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul($,he),i=(i=Math.imul($,de))+Math.imul(B,he)|0,o=Math.imul(B,de);var Ne=(l+(n=n+Math.imul(j,fe)|0)|0)+((8191&(i=(i=i+Math.imul(j,ge)|0)+Math.imul(L,fe)|0))<<13)|0;l=((o=o+Math.imul(L,ge)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Te=(l+(n=Math.imul($,fe))|0)+((8191&(i=(i=Math.imul($,ge))+Math.imul(B,fe)|0))<<13)|0;return l=((o=Math.imul(B,ge))+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,c[0]=me,c[1]=ye,c[2]=we,c[3]=be,c[4]=ve,c[5]=_e,c[6]=Ee,c[7]=xe,c[8]=Ce,c[9]=Se,c[10]=Ae,c[11]=Ie,c[12]=ke,c[13]=Pe,c[14]=Oe,c[15]=Re,c[16]=Me,c[17]=Ne,c[18]=Te,0!==l&&(c[19]=l,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function w(e,t,r){return y(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=g),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?g(this,e,t):r<1024?y(this,e,t):w(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,l=0;l=0&&(0!==u||l>=i);l--){var h=0|this.words[l];this.words[l]=u<<26-o|h>>>o,u=h&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var l=0;l=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var d=0,p=1;0==(t.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var f=0,g=1;0==(r.words[0]&g)&&f<26;++f,g<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(h)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(c)):(r.isub(t),a.isub(i),c.isub(s))}return{a,b:c,gcd:r.iushln(l)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0==(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(E,_),E.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new x;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return v[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var h=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),f=s;0!==p.cmp(a);){for(var g=p,m=0;0!==g.cmp(a);m++)g=g.redSqr();n(m=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var h=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===n&&0===u)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new I(e)},i(I,A),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return u(e),a(e<0?0:0|f(e))}function d(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function k(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function T(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function j(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function L(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=J((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=J((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||M(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=J((function(e,t=0){return T(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=J((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=J((function(e,t=0){return T(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=J((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function W(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw W(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function q(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function J(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},1924:(e,t,r)=>{"use strict";var n=r(210),i=r(5559),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),i=r(210),o=r(7771),s=i("%TypeError%"),a=i("%Function.prototype.apply%"),c=i("%Function.prototype.call%"),l=i("%Reflect.apply%",!0)||n.call(c,a),u=i("%Object.defineProperty%",!0),h=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){if("function"!=typeof e)throw new s("a function is required");var t=l(n,c,arguments);return o(t,1+h(0,e.length-(arguments.length-1)),!0)};var d=function(){return l(n,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6010:(e,t,r)=>{"use strict";function n(e){var t,r,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ti,default:()=>o});const o=i},4098:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function v(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];_.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function x(e,r){return new Promise((function(n,o){var s=new b(e,r);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new _(i,r))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}x.polyfill=!0,e.fetch||(e.fetch=x,e.Headers=d,e.Request=b,e.Response=_),t.Headers=d,t.Request=b,t.Response=_,t.fetch=x,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},7484:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,r="millisecond",n="second",i="minute",o="hour",s="day",a="week",c="month",l="quarter",u="year",h="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},m=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},y={s:m,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+m(n,2,"0")+":"+m(i,2,"0")},m:function e(t,r){if(t.date()1)return e(s[0])}else{var a=t.name;b[a]=t,i=a}return!n&&i&&(w=i),i||!n&&w},x=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new S(r)},C=y;C.l=E,C.i=_,C.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function g(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[v]=!0}var m=g.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return C},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(e,t){var r=x(e);return this.startOf(t)<=r&&r<=this.endOf(t)},m.isAfter=function(e,t){return x(e)0,m<=g.r||!g.r){m<=1&&f>0&&(g=d[f-1]);var y=h[g.l];a&&(m=a(""+m)),l="string"==typeof y?y.replace("%d",m):y(m,n,g.l,u);break}}if(n)return l;var w=u?h.future:h.past;return"function"==typeof w?w(l):w.replace("%s",l)},n.to=function(e,t){return o(e,t,this,!0)},n.from=function(e,t){return o(e,t,this)};var s=function(e){return e.$u?r.utc():r()};n.toNow=function(e){return this.to(s(this),e)},n.fromNow=function(e){return this.from(s(this),e)}}}()},660:function(e){e.exports=function(){"use strict";return function(e,t,r){r.updateLocale=function(e,t){var n=r.Ls[e];if(n)return(t?Object.keys(t):[]).forEach((function(e){n[e]=t[e]})),n}}}()},1227:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(2447)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];r=o.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function i(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],i(r),i(n))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r)||[],n=1;n{"use strict";var n=r(1044)(),i=r(210),o=n&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(e){o=!1}var s=i("%SyntaxError%"),a=i("%TypeError%"),c=r(7296);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!c&&c(e,t);if(o)o(e,t,{configurable:null===l&&h?h.configurable:!l,enumerable:null===n&&h?h.enumerable:!n,value:r,writable:null===i&&h?h.writable:!i});else{if(!u&&(n||i||l))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},5987:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,n){var i={},o={};o[r]=0;var s,a,c,l,u,h,d,p=t.PriorityQueue.make();for(p.push(r,0);!p.empty();)for(c in a=(s=p.pop()).value,l=s.cost,u=e[a]||{})u.hasOwnProperty(c)&&(h=l+u[c],d=o[c],(void 0===o[c]||d>h)&&(o[c]=h,p.push(c,h),i[c]=a));if(void 0!==n&&void 0===o[n]){var f=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var i=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,i={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},2378:e=>{"use strict";e.exports=function(e){for(var t=[],r=e.length,n=0;n=55296&&i<=56319&&r>n+1){var o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,n+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},190:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBlockTracker=void 0;const i=n(r(9394)),o=(e,t)=>e+t,s=["sync","latest"];class a extends i.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||2e4,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise((e=>this.once("latest",e)))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){s.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return s.map((e=>this.listenerCount(e))).reduce(o)}_newPotentialLatest(e){const t=this._currentBlock;t&&c(e)<=c(t)||this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}function c(e){return Number.parseInt(e,16)}t.BaseBlockTracker=a},790:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PollingBlockTracker=void 0;const i=n(r(3420)),o=n(r(2352)),s=r(190),a=r(9579),c=(0,a.createModuleLogger)(a.projectLogger,"polling-block-tracker"),l=(0,i.default)();class u extends s.BaseBlockTracker{constructor(e={}){var t;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super({blockResetDuration:null!==(t=e.blockResetDuration)&&void 0!==t?t:e.pollingInterval}),this._provider=e.provider,this._pollingInterval=e.pollingInterval||2e4,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=void 0===e.keepEventLoopActive||e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const e=h(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await e}catch(t){const r=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${null!==(e=t.stack)&&void 0!==e?e:t}`);try{this.emit("error",r)}catch(e){console.error(r)}const n=h(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await n}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:l(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),c("Making request",e);const t=await(0,o.default)((t=>this._provider.sendAsync(e,t)))();if(c("Got response",t),t.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${t.error.message}`);return t.result}}function h(e,t){return new Promise((r=>{const n=setTimeout(r,e);n.unref&&t&&n.unref()}))}t.PollingBlockTracker=u},6767:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SubscribeBlockTracker=void 0;const i=n(r(3420)),o=r(190),s=(0,i.default)();class a extends o.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(void 0===this._subscriptionId||null===this._subscriptionId)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(null!==this._subscriptionId&&void 0!==this._subscriptionId)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}_call(e,...t){return new Promise(((r,n)=>{this._provider.sendAsync({id:s(),method:e,params:t,jsonrpc:"2.0"},((e,t)=>{e?n(e):r(t.result)}))}))}_handleSubData(e,t){var r;"eth_subscription"===t.method&&(null===(r=t.params)||void 0===r?void 0:r.subscription)===this._subscriptionId&&this._newPotentialLatest(t.params.result.number)}}t.SubscribeBlockTracker=a},6842:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(790),t),i(r(6767),t),i(r(7627),t)},9579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const n=r(2451);Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return n.createModuleLogger}}),t.projectLogger=(0,n.createProjectLogger)("eth-block-tracker")},7627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3256:(e,t,r)=>{const n=r(6622);e.exports=class extends n{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}}},6622:(e,t,r)=>{const n=r(9394).default;e.exports=class extends n{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach((e=>this.emit("update",e)))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}}},2785:(e,t,r)=>{const n=r(6622),i=r(207),{incrementHexInt:o}=r(8112);e.exports=class extends n{constructor({provider:e,params:t}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:t}){const r=t,n=o(e),s=(await i({provider:this.provider,fromBlock:n,toBlock:r})).map((e=>e.hash));this.addResults(s)}}},207:e=>{function t(e){return null==e?e:Number.parseInt(e,16)}function r(e){return null==e?e:"0x"+e.toString(16)}function n(e,t){return new Promise(((r,n)=>{e.sendAsync(t,((e,t)=>{e?n(e):t.error?n(t.error):t.result?r(t.result):n(new Error("Result was empty"))}))}))}e.exports=async function({provider:e,fromBlock:i,toBlock:o}){i||(i=o);const s=t(i),a=t(o),c=Array(a-s+1).fill().map(((e,t)=>s+t)).map(r);return await Promise.all(c.map((t=>async function(e,t,r){for(let t=0;t<3;t++)try{return await n(e,{id:1,jsonrpc:"2.0",method:"eth_getBlockByNumber",params:r})}catch(e){console.error(`provider.sendAsync failed: ${e.stack||e.message||e}`)}throw new Error(`Block not found for params: ${JSON.stringify(r)}`)}(e,0,[t,!1]))))}},8112:e=>{function t(e){return e.sort(((e,t)=>"latest"===e||"earliest"===t?1:"latest"===t||"earliest"===e?-1:r(e)-r(t)))}function r(e){return null==e?e:Number.parseInt(e,16)}function n(e){if(null==e)return e;let t=e.toString(16);return t.length%2&&(t="0"+t),"0x"+t}function i(){return Math.floor(16*Math.random()).toString(16)}e.exports={minBlockRef:function(...e){return t(e)[0]},maxBlockRef:function(...e){const r=t(e);return r[r.length-1]},sortBlockRefs:t,bnToHex:function(e){return"0x"+e.toString(16)},blockRefIsNumber:function(e){return e&&!["earliest","latest","pending"].includes(e)},hexToInt:r,incrementHexInt:function(e){return null==e?e:n(r(e)+1)},intToHex:n,unsafeRandomBytes:function(e){let t="0x";for(let r=0;r{const n=r(8125).WU,{createAsyncMiddleware:i,createScaffoldMiddleware:o}=r(8625),s=r(1663),a=r(2785),c=r(5792),{intToHex:l,hexToInt:u}=r(8112);function h(e){return d((async(...t)=>{const r=await e(...t);return l(r.id)}))}function d(e){return i((async(t,r)=>{const n=await e.apply(null,t.params);r.result=n}))}function p(e,t){const r=[];for(let t in e)r.push(e[t]);return r}e.exports=function({blockTracker:e,provider:t}){let r=0,i={};const f=new n,g=function({mutex:e}){return t=>async(r,n,i,o)=>{(await e.acquire())(),t(r,n,i,o)}}({mutex:f}),m=o({eth_newFilter:g(h(w)),eth_newBlockFilter:g(h(b)),eth_newPendingTransactionFilter:g(h(v)),eth_uninstallFilter:g(d(x)),eth_getFilterChanges:g(d(_)),eth_getFilterLogs:g(d(E))}),y=async({oldBlock:e,newBlock:t})=>{if(0===i.length)return;const r=await f.acquire();try{await Promise.all(p(i).map((async r=>{try{await r.update({oldBlock:e,newBlock:t})}catch(e){console.error(e)}})))}catch(e){console.error(e)}r()};return m.newLogFilter=w,m.newBlockFilter=b,m.newPendingTransactionFilter=v,m.uninstallFilter=x,m.getFilterChanges=_,m.getFilterLogs=E,m.destroy=()=>{!async function(){const e=p(i).length;i={},S({prevFilterCount:e,newFilterCount:0})}()},m;async function w(e){const r=new s({provider:t,params:e});return await C(r),r}async function b(){const e=new a({provider:t});return await C(e),e}async function v(){const e=new c({provider:t});return await C(e),e}async function _(e){const t=u(e),r=i[t];if(!r)throw new Error(`No filter for index "${t}"`);return r.getChangesAndClear()}async function E(e){const t=u(e),r=i[t];if(!r)throw new Error(`No filter for index "${t}"`);let n=[];return"log"===r.type&&(n=r.getAllResults()),n}async function x(e){const t=u(e),r=i[t],n=Boolean(r);return n&&await async function(e){const t=p(i).length;delete i[e];S({prevFilterCount:t,newFilterCount:p(i).length})}(t),n}async function C(t){const n=p(i).length,o=await e.getLatestBlock();return await t.initialize({currentBlock:o}),r++,i[r]=t,t.id=r,t.idHex=l(r),S({prevFilterCount:n,newFilterCount:p(i).length}),r}function S({prevFilterCount:t,newFilterCount:r}){0===t&&r>0?e.on("sync",y):t>0&&0===r&&e.removeListener("sync",y)}}},1663:(e,t,r)=>{const n=r(5682),i=r(6417),o=r(3256),{bnToHex:s,hexToInt:a,incrementHexInt:c,minBlockRef:l,blockRefIsNumber:u}=r(8112);e.exports=class extends o{constructor({provider:e,params:t}){super(),this.type="log",this.ethQuery=new n(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},t),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((e=>e.toLowerCase())))}async initialize({currentBlock:e}){let t=this.params.fromBlock;["latest","pending"].includes(t)&&(t=e),"earliest"===t&&(t="0x0"),this.params.fromBlock=t;const r=l(this.params.toBlock,e),n=Object.assign({},this.params,{toBlock:r}),i=await this._fetchLogs(n);this.addInitialResults(i)}async update({oldBlock:e,newBlock:t}){const r=t;let n;n=e?c(e):t;const i=Object.assign({},this.params,{fromBlock:n,toBlock:r}),o=(await this._fetchLogs(i)).filter((e=>this.matchLog(e)));this.addResults(o)}async _fetchLogs(e){return await i((t=>this.ethQuery.getLogs(e,t)))()}matchLog(e){if(a(this.params.fromBlock)>=a(e.blockNumber))return!1;if(u(this.params.toBlock)&&a(this.params.toBlock)<=a(e.blockNumber))return!1;const t=e.address&&e.address.toLowerCase();return!(this.params.address&&t&&!this.params.address.includes(t))&&this.params.topics.every(((t,r)=>{let n=e.topics[r];if(!n)return!1;n=n.toLowerCase();let i=Array.isArray(t)?t:[t];return!!i.includes(null)||(i=i.map((e=>e.toLowerCase())),i.includes(n))}))}}},6417:e=>{"use strict";const t=(e,t,r,n)=>function(...i){return new(0,t.promiseModule)(((o,s)=>{t.multiArgs?i.push(((...e)=>{t.errorFirst?e[0]?s(e):(e.shift(),o(e)):o(e)})):t.errorFirst?i.push(((e,t)=>{e?s(e):o(t)})):i.push(o);const a=this===r?n:this;Reflect.apply(e,a,i)}))},r=new WeakMap;e.exports=(e,n)=>{n={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...n};const i=typeof e;if(null===e||"object"!==i&&"function"!==i)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===e?"null":i}\``);const o=new WeakMap,s=new Proxy(e,{apply(e,r,i){const a=o.get(e);if(a)return Reflect.apply(a,r,i);const c=n.excludeMain?e:t(e,n,s,e);return o.set(e,c),Reflect.apply(c,r,i)},get(e,i){const a=e[i];if(!((e,t)=>{let i=r.get(e);if(i||(i={},r.set(e,i)),t in i)return i[t];const o=e=>"string"==typeof e||"symbol"==typeof t?t===e:e.test(t),s=Reflect.getOwnPropertyDescriptor(e,t),a=void 0===s||s.writable||s.configurable,c=(n.include?n.include.some(o):!n.exclude.some(o))&&a;return i[t]=c,c})(e,i)||a===Function.prototype[i])return a;const c=o.get(a);if(c)return c;if("function"==typeof a){const r=t(a,n,s,e);return o.set(a,r),r}return a}});return s}},8961:(e,t,r)=>{const n=r(9394).default,{createAsyncMiddleware:i,createScaffoldMiddleware:o}=r(8625),s=r(8406),{unsafeRandomBytes:a,incrementHexInt:c}=r(8112),l=r(207);function u(e){return null==e?null:{hash:e.hash,parentHash:e.parentHash,sha3Uncles:e.sha3Uncles,miner:e.miner,stateRoot:e.stateRoot,transactionsRoot:e.transactionsRoot,receiptsRoot:e.receiptsRoot,logsBloom:e.logsBloom,difficulty:e.difficulty,number:e.number,gasLimit:e.gasLimit,gasUsed:e.gasUsed,nonce:e.nonce,mixHash:e.mixHash,timestamp:e.timestamp,extraData:e.extraData}}e.exports=function({blockTracker:e,provider:t}){const r={},h=s({blockTracker:e,provider:t});let d=!1;const p=new n,f=o({eth_subscribe:i((async function(n,i){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const o=n.params[0],s=a(16);let p;switch(o){case"newHeads":p=function({subId:r}){const n={type:o,destroy:async()=>{e.removeListener("sync",n.update)},update:async({oldBlock:e,newBlock:n})=>{const i=n,o=c(e);(await l({provider:t,fromBlock:o,toBlock:i})).map(u).filter((e=>null!==e)).forEach((e=>{g(r,e)}))}};return e.on("sync",n.update),n}({subId:s});break;case"logs":const r=n.params[1];p=function({subId:e,filter:t}){return t.on("update",(t=>g(e,t))),{type:o,destroy:async()=>await h.uninstallFilter(t.idHex)}}({subId:s,filter:await h.newLogFilter(r)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${o}"`)}return r[s]=p,void(i.result=s)})),eth_unsubscribe:i((async function(e,t){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const n=e.params[0],i=r[n];i?(delete r[n],await i.destroy(),t.result=!0):t.result=!1}))});return f.destroy=function(){p.removeAllListeners();for(const e in r)r[e].destroy(),delete r[e];d=!0},{events:p,middleware:f};function g(e,t){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:e,result:t}})}}},5792:(e,t,r)=>{const n=r(6622),i=r(207),{incrementHexInt:o}=r(8112);e.exports=class extends n{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){const t=e,r=o(e),n=await i({provider:this.provider,fromBlock:r,toBlock:t}),s=[];for(const e of n)s.push(...e.transactions);this.addResults(s)}}},5682:(e,t,r)=>{const n=r(7529),i=r(3420)();function o(e){this.currentProvider=e}function s(e){return function(){var t=[].slice.call(arguments),r=t.pop();this.sendAsync({method:e,params:t},r)}}function a(e,t){return function(){var r=[].slice.call(arguments),n=r.pop();r.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const n=r(4445);class i extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),o,2)}}function o(e,t){if("[Circular]"!==t)return t}t.EthereumRpcError=i,t.EthereumProviderError=class extends i{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},2662:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},8797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const n=r(2294),i=r(8753),o=r(2662);function s(e,t){const[r,o]=c(t);return new n.EthereumRpcError(e,r||i.getMessageFromCode(e),o)}function a(e,t){const[r,o]=c(t);return new n.EthereumProviderError(e,r||i.getMessageFromCode(e),o)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}t.ethErrors={rpc:{parse:e=>s(o.errorCodes.rpc.parse,e),invalidRequest:e=>s(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(o.errorCodes.rpc.methodNotFound,e),internal:e=>s(o.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(o.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(o.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,i)}}}},9826:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const n=r(2294);Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const i=r(8753);Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=r(8797);Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=r(2662);Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})},8753:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(2662),i=r(2294),o=n.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(e)){const r=e.toString();if(h(n.errorValues,r))return n.errorValues[r].message;if(l(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function u(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=c,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!1}={}){var n,o;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const l={};if(e&&"object"==typeof e&&!Array.isArray(e)&&h(e,"code")&&c(e.code)){const t=e;l.code=t.code,t.message&&"string"==typeof t.message?(l.message=t.message,h(t,"data")&&(l.data=t.data)):(l.message=a(l.code),l.data={originalError:u(e)})}else{l.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;l.message=r&&"string"==typeof r?r:t.message,l.data={originalError:u(e)}}const d=null===(o=e)||void 0===o?void 0:o.stack;return r&&e&&d&&"string"==typeof d&&(l.stack=d),l}},6729:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,s,l;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=f(c,l);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4445:e=>{e.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=o()),c(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,d(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var l=n.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return a}function a(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:e}),n.push([o,r,t,s])):i.push([t,r,e]):(o[r]=e,n.push([o,r,t]))}function c(e,n,i,o,s,l,u){var h;if(l+=1,"object"==typeof e&&null!==e){for(h=0;hu.depthLimit)return void a(t,e,n,s);if(void 0!==u.edgesLimit&&i+1>u.edgesLimit)return void a(t,e,n,s);if(o.push(e),Array.isArray(e))for(h=0;ht?1:0}function u(e,t,r,s){void 0===s&&(s=o());var a,c=h(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(c,t,r):JSON.stringify(c,d(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var l=n.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return a}function h(e,i,o,s,c,u,d){var p;if(u+=1,"object"==typeof e&&null!==e){for(p=0;pd.depthLimit)return void a(t,e,i,c);if(void 0!==d.edgesLimit&&o+1>d.edgesLimit)return void a(t,e,i,c);if(s.push(e),Array.isArray(e))for(p=0;p0)for(var n=0;n{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},210:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var l=function(){throw new s},u=c?function(){try{return l}catch(e){try{return c(arguments,"callee").get}catch(e){return l}}}():l,h=r(1405)(),d=r(8185)(),p=Object.getPrototypeOf||(d?function(e){return e.__proto__}:null),f={},g="undefined"!=typeof Uint8Array&&p?p(Uint8Array):n,m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":h&&p?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h&&p?p(p([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h&&p?p((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h&&p?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h&&p?p(""[Symbol.iterator]()):n,"%Symbol%":h?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(p)try{null.error}catch(e){var y=p(p(e));m["%Error.prototype%"]=y}var w=function e(t){var r;if("%AsyncFunction%"===t)r=a("async function () {}");else if("%GeneratorFunction%"===t)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=a("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&p&&(r=p(i.prototype))}return m[t]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=r(8612),_=r(8824),E=v.call(Function.call,Array.prototype.concat),x=v.call(Function.apply,Array.prototype.splice),C=v.call(Function.call,String.prototype.replace),S=v.call(Function.call,String.prototype.slice),A=v.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,k=/\\(\\)?/g,P=function(e,t){var r,n=e;if(_(b,n)&&(n="%"+(r=b[n])[0]+"%"),_(m,n)){var o=m[n];if(o===f&&(o=w(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=S(e,0,1),r=S(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return C(e,I,(function(e,t,r,i){n[n.length]=r?C(i,k,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=P("%"+n+"%",t),a=o.name,l=o.value,u=!1,h=o.alias;h&&(n=h[0],x(r,E([0,1],h)));for(var d=1,p=!0;d=r.length){var w=c(l,f);l=(p=!!w)&&"get"in w&&!("originalValue"in w.get)?w.get:l[f]}else p=_(l,f),l=l[f];p&&!u&&(m[a]=l)}}return l}},7296:(e,t,r)=>{"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},1044:(e,t,r)=>{"use strict";var n=r(210)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},8185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(5419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},8824:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(8612);e.exports=o.call(n,i)},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<>1,u=-7,h=r?i-1:0,d=r?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=l}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,l=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=f,a/=256,i-=8);for(s=s<0;e[r+p]=255&s,p+=f,s/=256,l-=8);e[r+p-f]|=128*g}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},204:(e,t,r)=>{e.exports=self.fetch||(self.fetch=r(5869).default||r(5869))},7398:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcEngine=void 0;const i=n(r(9394)),o=r(2374);class s extends i.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[i,o,a]=await s._runAllMiddleware(e,t,this._middleware);return o?(await s._runReturnHandlers(a),n(i)):r((async e=>{try{await s._runReturnHandlers(a)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:void 0,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const r=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},e),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(e){i=e}return i&&(delete n.result,n.error||(n.error=o.serializeError(i))),t(i,n)}async _processRequest(e,t){const[r,n,i]=await s._runAllMiddleware(e,t,this._middleware);if(s._checkForCompletion(e,t,n),await s._runReturnHandlers(i),r)throw r}static async _runAllMiddleware(e,t,r){const n=[];let i=null,o=!1;for(const a of r)if([i,o]=await s._runMiddleware(e,t,a,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((i=>{const s=e=>{const r=e||t.error;r&&(t.error=o.serializeError(r)),i([r,!0])},c=r=>{t.error?s(t.error):(r&&("function"!=typeof r&&s(new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${a(e)}`,{request:e})),n.push(r)),i([null,!1]))};try{r(e,t,c,s)}catch(e){s(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(e)}`,{request:e});if(!r)throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(e)}`,{request:e})}}function a(e){return JSON.stringify(e,null,2)}t.JsonRpcEngine=s},1841:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAsyncMiddleware=void 0,t.createAsyncMiddleware=function(e){return async(t,r,n,i)=>{let o;const s=new Promise((e=>{o=e}));let a=null,c=!1;const l=async()=>{c=!0,n((e=>{a=e,o()})),await s};try{await e(t,r,l),c?(await s,a(null)):i(null)}catch(e){a?a(e):i(e)}}}},8508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createScaffoldMiddleware=void 0,t.createScaffoldMiddleware=function(e){return(t,r,n,i)=>{const o=e[t.method];return void 0===o?n():"function"==typeof o?o(t,r,n,i):(r.result=o,i())}}},3107:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUniqueId=void 0;const r=4294967295;let n=Math.floor(Math.random()*r);t.getUniqueId=function(){return n=(n+1)%r,n}},5086:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createIdRemapMiddleware=void 0;const n=r(3107);t.createIdRemapMiddleware=function(){return(e,t,r,i)=>{const o=e.id,s=n.getUniqueId();e.id=s,t.id=s,r((r=>{e.id=o,t.id=o,r()}))}}},8625:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(5086),t),i(r(1841),t),i(r(8508),t),i(r(3107),t),i(r(7398),t),i(r(9962),t)},9962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMiddleware=void 0;const n=r(7398);t.mergeMiddleware=function(e){const t=new n.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}},10:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const n=r(4445);class i extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),o,2)}}function o(e,t){if("[Circular]"!==t)return t}t.EthereumRpcError=i,t.EthereumProviderError=class extends i{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},2608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},6152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const n=r(10),i=r(5548),o=r(2608);function s(e,t){const[r,o]=c(t);return new n.EthereumRpcError(e,r||i.getMessageFromCode(e),o)}function a(e,t){const[r,o]=c(t);return new n.EthereumProviderError(e,r||i.getMessageFromCode(e),o)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}t.ethErrors={rpc:{parse:e=>s(o.errorCodes.rpc.parse,e),invalidRequest:e=>s(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(o.errorCodes.rpc.methodNotFound,e),internal:e=>s(o.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(o.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(o.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,i)}}}},2374:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const n=r(10);Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const i=r(5548);Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=r(6152);Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=r(2608);Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})},5548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(2608),i=r(10),o=n.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(e)){const r=e.toString();if(h(n.errorValues,r))return n.errorValues[r].message;if(l(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function u(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=c,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!1}={}){var n,o;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const l={};if(e&&"object"==typeof e&&!Array.isArray(e)&&h(e,"code")&&c(e.code)){const t=e;l.code=t.code,t.message&&"string"==typeof t.message?(l.message=t.message,h(t,"data")&&(l.data=t.data)):(l.message=a(l.code),l.data={originalError:u(e)})}else{l.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;l.message=r&&"string"==typeof r?r:t.message,l.data={originalError:u(e)}}const d=null===(o=e)||void 0===o?void 0:o.stack;return r&&e&&d&&"string"==typeof d&&(l.stack=d),l}},3420:e=>{e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},8598:(e,t,r)=>{e.exports=r(6066)(r(9483))},6066:(e,t,r)=>{const n=r(7016),i=r(5675);e.exports=function(e){const t=n(e),r=i(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+e)}}}},7016:(e,t,r)=>{const{Transform:n}=r(8473);e.exports=e=>class t extends n{constructor(t,r,n,i,o){super(o),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=o,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},5675:(e,t,r)=>{const{Transform:n}=r(8473);e.exports=e=>class t extends n{constructor(t,r,n,i){super(i),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},4040:(e,t)=>{const r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(let t=0;t<24;++t){const n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],u=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],d=e[9]^e[19]^e[29]^e[39]^e[49];let p=h^(o<<1|s>>>31),f=d^(s<<1|o>>>31);const g=e[0]^p,m=e[1]^f,y=e[10]^p,w=e[11]^f,b=e[20]^p,v=e[21]^f,_=e[30]^p,E=e[31]^f,x=e[40]^p,C=e[41]^f;p=n^(a<<1|c>>>31),f=i^(c<<1|a>>>31);const S=e[2]^p,A=e[3]^f,I=e[12]^p,k=e[13]^f,P=e[22]^p,O=e[23]^f,R=e[32]^p,M=e[33]^f,N=e[42]^p,T=e[43]^f;p=o^(l<<1|u>>>31),f=s^(u<<1|l>>>31);const j=e[4]^p,L=e[5]^f,D=e[14]^p,$=e[15]^f,B=e[24]^p,U=e[25]^f,F=e[34]^p,z=e[35]^f,W=e[44]^p,H=e[45]^f;p=a^(h<<1|d>>>31),f=c^(d<<1|h>>>31);const V=e[6]^p,q=e[7]^f,G=e[16]^p,Z=e[17]^f,K=e[26]^p,Y=e[27]^f,Q=e[36]^p,J=e[37]^f,X=e[46]^p,ee=e[47]^f;p=l^(n<<1|i>>>31),f=u^(i<<1|n>>>31);const te=e[8]^p,re=e[9]^f,ne=e[18]^p,ie=e[19]^f,oe=e[28]^p,se=e[29]^f,ae=e[38]^p,ce=e[39]^f,le=e[48]^p,ue=e[49]^f,he=g,de=m,pe=w<<4|y>>>28,fe=y<<4|w>>>28,ge=b<<3|v>>>29,me=v<<3|b>>>29,ye=E<<9|_>>>23,we=_<<9|E>>>23,be=x<<18|C>>>14,ve=C<<18|x>>>14,_e=S<<1|A>>>31,Ee=A<<1|S>>>31,xe=k<<12|I>>>20,Ce=I<<12|k>>>20,Se=P<<10|O>>>22,Ae=O<<10|P>>>22,Ie=M<<13|R>>>19,ke=R<<13|M>>>19,Pe=N<<2|T>>>30,Oe=T<<2|N>>>30,Re=L<<30|j>>>2,Me=j<<30|L>>>2,Ne=D<<6|$>>>26,Te=$<<6|D>>>26,je=U<<11|B>>>21,Le=B<<11|U>>>21,De=F<<15|z>>>17,$e=z<<15|F>>>17,Be=H<<29|W>>>3,Ue=W<<29|H>>>3,Fe=V<<28|q>>>4,ze=q<<28|V>>>4,We=Z<<23|G>>>9,He=G<<23|Z>>>9,Ve=K<<25|Y>>>7,qe=Y<<25|K>>>7,Ge=Q<<21|J>>>11,Ze=J<<21|Q>>>11,Ke=ee<<24|X>>>8,Ye=X<<24|ee>>>8,Qe=te<<27|re>>>5,Je=re<<27|te>>>5,Xe=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=se<<7|oe>>>25,rt=oe<<7|se>>>25,nt=ae<<8|ce>>>24,it=ce<<8|ae>>>24,ot=le<<14|ue>>>18,st=ue<<14|le>>>18;e[0]=he^~xe&je,e[1]=de^~Ce&Le,e[10]=Fe^~Xe&ge,e[11]=ze^~et&me,e[20]=_e^~Ne&Ve,e[21]=Ee^~Te&qe,e[30]=Qe^~pe&Se,e[31]=Je^~fe&Ae,e[40]=Re^~We&tt,e[41]=Me^~He&rt,e[2]=xe^~je&Ge,e[3]=Ce^~Le&Ze,e[12]=Xe^~ge&Ie,e[13]=et^~me&ke,e[22]=Ne^~Ve&nt,e[23]=Te^~qe&it,e[32]=pe^~Se&De,e[33]=fe^~Ae&$e,e[42]=We^~tt&ye,e[43]=He^~rt&we,e[4]=je^~Ge&ot,e[5]=Le^~Ze&st,e[14]=ge^~Ie&Be,e[15]=me^~ke&Ue,e[24]=Ve^~nt&be,e[25]=qe^~it&ve,e[34]=Se^~De&Ke,e[35]=Ae^~$e&Ye,e[44]=tt^~ye&Pe,e[45]=rt^~we&Oe,e[6]=Ge^~ot&he,e[7]=Ze^~st&de,e[16]=Ie^~Be&Fe,e[17]=ke^~Ue&ze,e[26]=nt^~be&_e,e[27]=it^~ve&Ee,e[36]=De^~Ke&Qe,e[37]=$e^~Ye&Je,e[46]=ye^~Pe&Re,e[47]=we^~Oe&Me,e[8]=ot^~he&xe,e[9]=st^~de&Ce,e[18]=Be^~Fe&Xe,e[19]=Ue^~ze&et,e[28]=be^~_e&Ne,e[29]=ve^~Ee&Te,e[38]=Ke^~Qe&pe,e[39]=Ye^~Je&fe,e[48]=Pe^~Re&We,e[49]=Oe^~Me&He,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},9483:(e,t,r)=>{const n=r(4040);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(let t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return t},i.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i},2307:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",f="[object GeneratorFunction]",g="[object Map]",m="[object Number]",y="[object Null]",w="[object Object]",b="[object Promise]",v="[object Proxy]",_="[object RegExp]",E="[object Set]",x="[object String]",C="[object Undefined]",S="[object WeakMap]",A="[object ArrayBuffer]",I="[object DataView]",k=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[a]=O[c]=O[A]=O[u]=O[I]=O[h]=O[d]=O[p]=O[g]=O[m]=O[w]=O[_]=O[E]=O[x]=O[S]=!1;var R="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,M="object"==typeof self&&self&&self.Object===Object&&self,N=R||M||Function("return this")(),T=t&&!t.nodeType&&t,j=T&&e&&!e.nodeType&&e,L=j&&j.exports===T,D=L&&R.process,$=function(){try{return D&&D.binding&&D.binding("util")}catch(e){}}(),B=$&&$.isTypedArray;function U(e,t){for(var r=-1,n=null==e?0:e.length;++rl))return!1;var h=a.get(e);if(h&&a.get(t))return h==t;var d=-1,p=!0,f=r&o?new Ae:void 0;for(a.set(e,t),a.set(t,e);++d-1},Ce.prototype.set=function(e,t){var r=this.__data__,n=ke(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Se.prototype.clear=function(){this.size=0,this.__data__={hash:new xe,map:new(he||Ce),string:new xe}},Se.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},Se.prototype.get=function(e){return Te(this,e).get(e)},Se.prototype.has=function(e){return Te(this,e).has(e)},Se.prototype.set=function(e,t){var r=Te(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Ae.prototype.add=Ae.prototype.push=function(e){return this.__data__.set(e,n),this},Ae.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new Ce,this.size=0},Ie.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ce){var n=r.__data__;if(!he||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Se(n)}return r.set(e,t),this.size=r.size,this};var Le=ae?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,i=null==t?0:t.length,o=0,s=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=s}function qe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var Ze=B?function(e){return function(t){return e(t)}}(B):function(e){return Ge(e)&&Ve(e.length)&&!!O[Pe(e)]};function Ke(e){return null!=(t=e)&&Ve(t.length)&&!He(t)?function(e,t){var r=ze(e),n=!r&&Fe(e),i=!r&&!n&&We(e),o=!r&&!n&&!i&&Ze(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r{var t=1e3,r=60*t,n=60*r,i=24*n;function o(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,c,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===l&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=i?o(a,c,i,"day"):c>=n?o(a,c,n,"hour"):c>=r?o(a,c,r,"minute"):c>=t?o(a,c,t,"second"):a+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=n?Math.round(e/n)+"h":o>=r?Math.round(e/r)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},631:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&c&&"function"==typeof c.get?c.get:null,u=a&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,w=String.prototype.slice,b=String.prototype.replace,v=String.prototype.toUpperCase,_=String.prototype.toLowerCase,E=RegExp.prototype.test,x=Array.prototype.concat,C=Array.prototype.join,S=Array.prototype.slice,A=Math.floor,I="function"==typeof BigInt?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,O="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function T(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-A(-e):A(e);if(n!==e){var i=String(n),o=w.call(t,i.length+1);return b.call(i,r,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var j=r(4654),L=j.custom,D=z(L)?L:null;function $(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function B(e){return b.call(String(e),/"/g,""")}function U(e){return!("[object Array]"!==V(e)||R&&"object"==typeof e&&R in e)}function F(e){return!("[object RegExp]"!==V(e)||R&&"object"==typeof e&&R in e)}function z(e){if(O)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,i,a){var c=n||{};if(H(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!H(c,"customInspect")||c.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return v?T(t,E):E}if("bigint"==typeof t){var A=String(t)+"n";return v?T(t,A):A}var k=void 0===c.depth?5:c.depth;if(void 0===i&&(i=0),i>=k&&k>0&&"object"==typeof t)return U(t)?"[Array]":"[Object]";var L,W=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=C.call(Array(e.indent+1)," ")}return{base:r,prev:C.call(Array(t+1),r)}}(c,i);if(void 0===a)a=[];else if(q(a,t)>=0)return"[Circular]";function Z(t,r,n){if(r&&(a=S.call(a)).push(r),n){var o={depth:c.depth};return H(c,"quoteStyle")&&(o.quoteStyle=c.quoteStyle),e(t,o,i+1,a)}return e(t,c,i+1,a)}if("function"==typeof t&&!F(t)){var ee=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=X(t,Z);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+C.call(te,", ")+" }":"")}if(z(t)){var re=O?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||O?re:K(re)}if((L=t)&&"object"==typeof L&&("undefined"!=typeof HTMLElement&&L instanceof HTMLElement||"string"==typeof L.nodeName&&"function"==typeof L.getAttribute)){for(var ne="<"+_.call(String(t.nodeName)),ie=t.attributes||[],oe=0;oe"}if(U(t)){if(0===t.length)return"[]";var se=X(t,Z);return W&&!function(e){for(var t=0;t=0)return!1;return!0}(se)?"["+J(se,W)+"]":"[ "+C.call(se,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||R&&"object"==typeof e&&R in e)}(t)){var ae=X(t,Z);return"cause"in Error.prototype||!("cause"in t)||M.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+C.call(ae,", ")+" }":"{ ["+String(t)+"] "+C.call(x.call("[cause]: "+Z(t.cause),ae),", ")+" }"}if("object"==typeof t&&g){if(D&&"function"==typeof t[D]&&j)return j(t,{depth:k-i});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return s&&s.call(t,(function(e,r){ce.push(Z(r,t,!0)+" => "+Z(e,t))})),Q("Map",o.call(t),ce,W)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return u&&u.call(t,(function(e){le.push(Z(e,t))})),Q("Set",l.call(t),le,W)}if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==V(e)||R&&"object"==typeof e&&R in e)}(t))return K(Z(Number(t)));if(function(e){if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}(t))return K(Z(I.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||R&&"object"==typeof e&&R in e)}(t))return K(f.call(t));if(function(e){return!("[object String]"!==V(e)||R&&"object"==typeof e&&R in e)}(t))return K(Z(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==V(e)||R&&"object"==typeof e&&R in e)}(t)&&!F(t)){var ue=X(t,Z),he=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",pe=!he&&R&&Object(t)===t&&R in t?w.call(V(t),8,-1):de?"Object":"",fe=(he||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||de?"["+C.call(x.call([],pe||[],de||[]),": ")+"] ":"");return 0===ue.length?fe+"{}":W?fe+"{"+J(ue,W)+"}":fe+"{ "+C.call(ue,", ")+" }"}return String(t)};var W=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return W.call(e,t)}function V(e){return g.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return G(w.call(e,0,t.maxStringLength),t)+n}return $(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Z),"single",t)}function Z(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+v.call(t.toString(16))}function K(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,r,n){return e+" ("+t+") {"+(n?J(r,n):C.call(r,", "))+"}"}function J(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+C.call(e,","+r)+"\n"+t.prev}function X(e,t){var r=U(e),n=[];if(r){n.length=e.length;for(var i=0;i{"use strict";const t=(e,t)=>function(){const r=t.promiseModule,n=new Array(arguments.length);for(let e=0;e{t.errorFirst?n.push((function(e,n){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=e=>{const t=t=>"string"==typeof t?e===t:t.test(e);return r.include?r.include.some(t):!r.exclude.some(t)};let i;i="function"==typeof e?function(){return r.excludeMain?e.apply(this,arguments):t(e,r).apply(this,arguments)}:Object.create(Object.getPrototypeOf(e));for(const o in e){const s=e[o];i[o]="function"==typeof s&&n(o)?t(s,r):s}return i}},6400:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Component:()=>E,Fragment:()=>_,cloneElement:()=>H,createContext:()=>V,createElement:()=>w,createRef:()=>v,h:()=>w,hydrate:()=>W,isValidElement:()=>s,options:()=>i,render:()=>z,toChildArray:()=>O});var n,i,o,s,a,c,l,u,h,d={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(e,t){for(var r in t)e[r]=t[r];return e}function y(e){var t=e.parentNode;t&&t.removeChild(e)}function w(e,t,r){var i,o,s,a={};for(s in t)"key"==s?i=t[s]:"ref"==s?o=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return b(e,a,i,o,null)}function b(e,t,r,n,s){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++o:s,__i:-1,__u:0};return null==s&&null!=i.vnode&&i.vnode(a),a}function v(){return{current:null}}function _(e){return e.children}function E(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__i+1):null;for(var r;tt&&a.sort(u));A.__r=0}function I(e,t,r,n,i,o,s,a,c,l,u){var h,f,g,m,y,w=n&&n.__k||p,b=t.length;for(r.__d=c,k(r,t,w),c=r.__d,h=0;h0?b(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=R(i,r,s=n+h,u),i.__i=a,o=null,-1!==a&&(u--,(o=r[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&h--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a===s+1?h++:a>s?u>c-s?h+=a-s:h--:h=a(null!=c&&0==(131072&c.__u)?1:0))for(;s>=0||a=0){if((c=t[s])&&0==(131072&c.__u)&&i==c.key&&o===c.type)return s;s--}if(a2&&(c.children=arguments.length>3?n.call(arguments,2):r),b(e.type,c,i||e.key,o||e.ref,null)}function V(e,t){var r={__c:t="__cC"+h++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,S(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}n=p.slice,i={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},o=0,s=function(e){return null!=e&&null==e.constructor},E.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},r),this.props)),e&&m(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),S(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},E.prototype.render=_,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},A.__r=0,h=0},396:(e,t,r)=>{"use strict";r.r(t),r.d(t,{useCallback:()=>C,useContext:()=>S,useDebugValue:()=>A,useEffect:()=>b,useErrorBoundary:()=>I,useId:()=>k,useImperativeHandle:()=>E,useLayoutEffect:()=>v,useMemo:()=>x,useReducer:()=>w,useRef:()=>_,useState:()=>y});var n,i,o,s,a=r(6400),c=0,l=[],u=[],h=a.options.__b,d=a.options.__r,p=a.options.diffed,f=a.options.__c,g=a.options.unmount;function m(e,t){a.options.__h&&a.options.__h(i,e,c||t),c=0;var r=i.__H||(i.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:u}),r.__[e]}function y(e){return c=1,w(j,e)}function w(e,t,r){var o=m(n++,2);if(o.t=e,!o.__c&&(o.__=[r?r(t):j(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,e);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.u)){var s=function(e,t,r){if(!o.__c.__H)return!0;var n=o.__c.__H.__.filter((function(e){return e.__c}));if(n.every((function(e){return!e.__N})))return!a||a.call(this,e,t,r);var i=!1;return n.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&o.__c.props===e)&&(!a||a.call(this,e,t,r))};i.u=!0;var a=i.shouldComponentUpdate,c=i.componentWillUpdate;i.componentWillUpdate=function(e,t,r){if(this.__e){var n=a;a=void 0,s(e,t,r),a=n}c&&c.call(this,e,t,r)},i.shouldComponentUpdate=s}return o.__N||o.__}function b(e,t){var r=m(n++,3);!a.options.__s&&T(r.__H,t)&&(r.__=e,r.i=t,i.__H.__h.push(r))}function v(e,t){var r=m(n++,4);!a.options.__s&&T(r.__H,t)&&(r.__=e,r.i=t,i.__h.push(r))}function _(e){return c=5,x((function(){return{current:e}}),[])}function E(e,t,r){c=6,v((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function x(e,t){var r=m(n++,7);return T(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function C(e,t){return c=8,x((function(){return e}),t)}function S(e){var t=i.context[e.__c],r=m(n++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(i)),t.props.value):e.__}function A(e,t){a.options.useDebugValue&&a.options.useDebugValue(t?t(e):e)}function I(e){var t=m(n++,10),r=y();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]}function k(){var e=m(n++,11);if(!e.__){for(var t=i.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function P(){for(var e;e=l.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(M),e.__H.__h.forEach(N),e.__H.__h=[]}catch(t){e.__H.__h=[],a.options.__e(t,e.__v)}}a.options.__b=function(e){i=null,h&&h(e)},a.options.__r=function(e){d&&d(e),n=0;var t=(i=e.__c).__H;t&&(o===i?(t.__h=[],i.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=u,e.__N=e.i=void 0}))):(t.__h.forEach(M),t.__h.forEach(N),t.__h=[],n=0)),o=i},a.options.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==l.push(t)&&s===a.options.requestAnimationFrame||((s=a.options.requestAnimationFrame)||R)(P)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==u&&(e.__=e.__V),e.i=void 0,e.__V=u}))),o=i=null},a.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(M),e.__h=e.__h.filter((function(e){return!e.__||N(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],a.options.__e(r,e.__v)}})),f&&f(e,t)},a.options.unmount=function(e){g&&g(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{M(e)}catch(e){t=e}})),r.__H=void 0,t&&a.options.__e(t,r.__v))};var O="function"==typeof requestAnimationFrame;function R(e){var t,r=function(){clearTimeout(n),O&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);O&&(t=requestAnimationFrame(r))}function M(e){var t=i,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),i=t}function N(e){var t=i;e.__c=e.__(),i=t}function T(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function j(e,t){return"function"==typeof t?t(e):t}},2592:(e,t,r)=>{const n=r(7138),i=r(5115),o=r(6907),s=r(3776);function a(e,t,r,o,s){const a=[].slice.call(arguments,1),c=a.length,l="function"==typeof a[c-1];if(!l&&!n())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(r=t,t=o=void 0):2!==c||t.getContext||(o=r,r=t,t=void 0),new Promise((function(n,s){try{const s=i.create(r,o);n(e(s,t,o))}catch(e){s(e)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(s=r,r=t,t=o=void 0):3===c&&(t.getContext&&void 0===s?(s=o,o=void 0):(s=o,o=r,r=t,t=void 0));try{const n=i.create(r,o);s(null,e(n,t,o))}catch(e){s(e)}}t.create=i.create,t.toCanvas=a.bind(null,o.render),t.toDataURL=a.bind(null,o.renderToDataURL),t.toString=a.bind(null,(function(e,t,r){return s.render(e,r)}))},7138:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},1845:(e,t,r)=>{const n=r(4466).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),o=[r-7];for(let e=1;e{const n=r(6910),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=n.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},7245:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},3280:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},3424:(e,t,r)=>{const n=r(2378),i=r(6910);function o(e){this.mode=i.BYTE,"string"==typeof e&&(e=n(e)),this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,r=this.data.length;t{const n=r(4908),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case n.L:return i[4*(e-1)+0];case n.M:return i[4*(e-1)+1];case n.Q:return i[4*(e-1)+2];case n.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return o[4*(e-1)+0];case n.M:return o[4*(e-1)+1];case n.Q:return o[4*(e-1)+2];case n.H:return o[4*(e-1)+3];default:return}}},4908:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},6526:(e,t,r)=>{const n=r(4466).getSymbolSize;t.getPositions=function(e){const t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},1642:(e,t,r)=>{const n=r(4466),i=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){const r=e.bit<<3|t;let o=r<<10;for(;n.getBCHDigit(o)-i>=0;)o^=1335<{const r=new Uint8Array(512),n=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},5442:(e,t,r)=>{const n=r(6910),i=r(4466);function o(e){this.mode=n.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=o},7126:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function r(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(r+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return r*n%2+r*n%3==0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,n=0,i=0,o=null,s=null;for(let a=0;a=5&&(r+=n-5+3),o=t,n=1),t=e.get(c,a),t===s?i++:(i>=5&&(r+=i-5+3),s=t,i=1)}n>=5&&(r+=n-5+3),i>=5&&(r+=i-5+3)}return r},t.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n=10&&(1488===n||93===n)&&r++,i=i<<1&2047|e.get(s,o),s>=10&&(1488===i||93===i)&&r++}return 40*r},t.getPenaltyN4=function(e){let t=0;const r=e.data.length;for(let n=0;n{const n=r(3114),i=r(7007);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},1085:(e,t,r)=>{const n=r(6910);function i(e){this.mode=n.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))},e.exports=i},6143:(e,t,r)=>{const n=r(9729);t.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let i=0;i=0;){const e=r[0];for(let i=0;i{const n=r(4466),i=r(4908),o=r(7245),s=r(3280),a=r(1845),c=r(6526),l=r(7126),u=r(5393),h=r(2882),d=r(3103),p=r(1642),f=r(6910),g=r(6130);function m(e,t,r){const n=e.size,i=p.getEncodedBits(t,r);let o,s;for(o=0;o<15;o++)s=1==(i>>o&1),o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(n-15+o,8,s,!0),o<8?e.set(8,n-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(n-8,8,1,!0)}function y(e,t,r,i){let p;if(Array.isArray(e))p=g.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=g.rawSplit(e);n=d.getBestVersionForData(t,r)}p=g.fromString(e,n||40)}}const y=d.getBestVersionForData(p,r);if(!y)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(i+t,o+n,!0,!0):e.set(i+t,o+n,!1,!0))}}(v,t),function(e){const t=e.size;for(let r=8;r=7&&function(e,t){const r=e.size,n=d.getEncodedBits(t);let i,o,s;for(let t=0;t<18;t++)i=Math.floor(t/3),o=t%3+r-8-3,s=1==(n>>t&1),e.set(i,o,s,!0),e.set(o,i,s,!0)}(v,t),function(e,t){const r=e.size;let n=-1,i=r-1,o=7,s=0;for(let a=r-1;a>0;a-=2)for(6===a&&a--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,a-r)){let n=!1;s>>o&1)),e.set(i,a-r,n),o--,-1===o&&(s++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(v,w),isNaN(i)&&(i=l.getBestMask(v,m.bind(null,v,r))),l.applyMask(i,v),m(v,r,i),{modules:v,version:t,errorCorrectionLevel:r,maskPattern:i,segments:p}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,o,s=i.M;return void 0!==t&&(s=i.from(t.errorCorrectionLevel,i.M),r=d.from(t.version),o=l.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),y(e,r,s,o)}},2882:(e,t,r)=>{const n=r(6143);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=i},7007:(e,t)=>{const r="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+n+"$"),s=new RegExp("^"+r+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return a.test(e)}},6130:(e,t,r)=>{const n=r(6910),i=r(1085),o=r(8260),s=r(3424),a=r(5442),c=r(7007),l=r(4466),u=r(5987);function h(e){return unescape(encodeURIComponent(e)).length}function d(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function p(e){const t=d(c.NUMERIC,n.NUMERIC,e),r=d(c.ALPHANUMERIC,n.ALPHANUMERIC,e);let i,o;return l.isKanjiModeEnabled()?(i=d(c.BYTE,n.BYTE,e),o=d(c.KANJI,n.KANJI,e)):(i=d(c.BYTE_KANJI,n.BYTE,e),o=[]),t.concat(r,i,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function f(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return o.getBitsLength(e);case n.KANJI:return a.getBitsLength(e);case n.BYTE:return s.getBitsLength(e)}}function g(e,t){let r;const c=n.getBestModeForData(e);if(r=n.from(t,c),r!==n.BYTE&&r.bit=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[]))},t.rawSplit=function(e){return t.fromArray(p(e,l.isKanjiModeEnabled()))}},4466:(e,t)=>{let r;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return n[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},3114:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},3103:(e,t,r)=>{const n=r(4466),i=r(5393),o=r(4908),s=r(6910),a=r(3114),c=n.getBCHDigit(7973);function l(e,t){return s.getCharCountIndicator(e,t)+4}function u(e,t){let r=0;return e.forEach((function(e){const n=l(e.mode,t);r+=n+e.getBitsLength()})),r}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=s.BYTE);const o=8*(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(r===s.MIXED)return o;const c=o-l(r,e);switch(r){case s.NUMERIC:return Math.floor(c/10*3);case s.ALPHANUMERIC:return Math.floor(c/11*2);case s.KANJI:return Math.floor(c/13);case s.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,r){let n;const i=o.from(r,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let n=1;n<=40;n++)if(u(e,n)<=t.getCapacity(n,r,s.MIXED))return n}(e,i);if(0===e.length)return 1;n=e[0]}else n=e;return function(e,r,n){for(let i=1;i<=40;i++)if(r<=t.getCapacity(i,n,e))return i}(n.mode,n.getLength(),i)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-c>=0;)t^=7973<{const n=r(9653);t.render=function(e,t,r){let i=r,o=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);const s=n.getImageWidth(e.modules.size,i),a=o.getContext("2d"),c=a.createImageData(s,s);return n.qrToImageData(c.data,e,i),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(a,o,s),a.putImageData(c,0,0),o},t.renderToDataURL=function(e,r,n){let i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});const o=t.render(e,r,i),s=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}},3776:(e,t,r)=>{const n=r(9653);function i(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}t.render=function(e,t,r){const s=n.getOptions(t),a=e.modules.size,c=e.modules.data,l=a+2*s.margin,u=s.color.light.a?"':"",h="0&&l>0&&e[c-1]||(n+=s?o("M",l+r,.5+u+r):o("m",i,0),i=0,s=!1),l+1',d='viewBox="0 0 '+l+" "+l+'"',p=''+u+h+"\n";return"function"==typeof r&&r(null,p),p}},9653:(e,t)=>{function r(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){const n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){const i=r.modules.size,o=r.modules.data,s=t.getScale(i,n),a=Math.floor((i+2*n.margin)*s),c=n.margin*s,l=[n.color.light,n.color.dark];for(let t=0;t=c&&r>=c&&t{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},129:(e,t,r)=>{"use strict";var n=r(8261),i=r(5235),o=r(5798);e.exports={formats:o,parse:i,stringify:n}},5235:(e,t,r)=>{"use strict";var n=r(2769),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),l=a?o.slice(0,a.index):o,u=[];if(l){if(!r.plainObjects&&i.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var h=0;r.depth>0&&null!==(a=s.exec(o))&&h=0;--o){var s,a=e[o];if("[]"===a&&r.parseArrays)s=[].concat(i);else{s=r.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(l,10);r.parseArrays||""!==l?!isNaN(u)&&a!==l&&String(u)===l&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(s=[])[u]=i:"__proto__"!==l&&(s[l]=i):s={0:i}}i=s}return i}(u,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return s;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?s.charset:e.charset;return{allowDots:void 0===e.allowDots?s.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var r,l={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,h),p=-1,f=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(m=o(m)?[m]:m),i.call(l,g)?l[g]=n.combine(l[g],m):l[g]=m}return l}(e,r):e,h=r.plainObjects?Object.create(null):{},d=Object.keys(u),p=0;p{"use strict";var n=r(7478),i=r(2769),o=r(5798),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,c(t)?t:[t])},h=Date.prototype.toISOString,d=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:d,formatter:o.formatters[d],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},f={},g=function e(t,r,o,s,a,l,h,d,g,m,y,w,b,v,_,E){for(var x,C=t,S=E,A=0,I=!1;void 0!==(S=S.get(f))&&!I;){var k=S.get(t);if(A+=1,void 0!==k){if(k===A)throw new RangeError("Cyclic object value");I=!0}void 0===S.get(f)&&(A=0)}if("function"==typeof d?C=d(r,C):C instanceof Date?C=y(C):"comma"===o&&c(C)&&(C=i.maybeMap(C,(function(e){return e instanceof Date?y(e):e}))),null===C){if(a)return h&&!v?h(r,p.encoder,_,"key",w):r;C=""}if("string"==typeof(x=C)||"number"==typeof x||"boolean"==typeof x||"symbol"==typeof x||"bigint"==typeof x||i.isBuffer(C))return h?[b(v?r:h(r,p.encoder,_,"key",w))+"="+b(h(C,p.encoder,_,"value",w))]:[b(r)+"="+b(String(C))];var P,O=[];if(void 0===C)return O;if("comma"===o&&c(C))v&&h&&(C=i.maybeMap(C,h)),P=[{value:C.length>0?C.join(",")||null:void 0}];else if(c(d))P=d;else{var R=Object.keys(C);P=g?R.sort(g):R}for(var M=s&&c(C)&&1===C.length?r+"[]":r,N=0;N0?_+v:""}},2769:(e,t,r)=>{"use strict";var n=r(5798),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===n.RFC1738&&(40===u||41===u)?c+=a.charAt(l):u<128?c+=s[u]:u<2048?c+=s[192|u>>6]+s[128|63&u]:u<55296||u>=57344?c+=s[224|u>>12]+s[128|u>>6&63]+s[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&a.charCodeAt(l)),c+=s[240|u>>18]+s[128|u>>12&63]+s[128|u>>6&63]+s[128|63&u])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"==typeof e&&null!==e){var o=r.length+1;if(1===o)return e;var s=new Array(o);s[0]=i(e);for(var a=1;a-1?h:0,e.charCodeAt(p+1)){case 100:case 102:if(u>=c)break;if(null==r[u])break;h=c)break;if(null==r[u])break;h=c)break;if(void 0===r[u])break;h",h=p+2,p++;break}l+=i(r[u]),h=p+2,p++;break;case 115:if(u>=c)break;h{"use strict";Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.iterator;var r={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},n=Object.assign,i={};function o(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}function s(){}function a(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}o.prototype.isReactComponent={},o.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},s.prototype=o.prototype;var c=a.prototype=new s;c.constructor=a,n(c,o.prototype),c.isPureReactComponent=!0;Array.isArray,Object.prototype.hasOwnProperty},7294:(e,t,r)=>{"use strict";r(2408)},4281:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,a,c;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var l=("number"!=typeof c&&(c=0),c+1>(a=e).length||-1===a.indexOf(".",c)?"argument":"property");s='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(n(t,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var i=r(9481),o=r(4229);r(5717)(l,i);for(var s=n(o.prototype),a=0;a{"use strict";e.exports=i;var n=r(4605);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(5717)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},9481:(e,t,r)=>{"use strict";var n;e.exports=C,C.ReadableState=x,r(7187).EventEmitter;var i,o=function(e,t){return e.listeners(t).length},s=r(2503),a=r(8764).Buffer,c=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(4616);i=l&&l.debuglog?l.debuglog("stream"):function(){};var u,h,d,p=r(7327),f=r(1195),g=r(2457).getHighWaterMark,m=r(4281).q,y=m.ERR_INVALID_ARG_TYPE,w=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(C,s);var _=f.errorOrDestroy,E=["error","close","destroy","pause","resume"];function x(e,t,i){n=n||r(6753),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=r(2553).s),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function C(e){if(n=n||r(6753),!(this instanceof C))return new C(e);var t=this instanceof n;this._readableState=new x(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function S(e,t,r,n,o){i("readableAddChunk",t);var s,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,l);else if(o||(s=function(e,t){var r,n;return n=t,a.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t)),r}(l,t)),s)_(e,s);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)l.endEmitted?_(e,new v):A(e,l,t,!0);else if(l.ended)_(e,new w);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!r?(t=l.decoder.write(t),l.objectMode||0!==t.length?A(e,l,t,!1):R(e,l)):A(e,l,t,!1)}else n||(l.reading=!1,R(e,l));return!l.ended&&(l.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function P(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(O,e))}function O(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function R(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function T(e){i("readable nexttick read 0"),e.read(0)}function j(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function $(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(B,t,e))}function B(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?$(this):P(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&$(this),null;var n,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&$(this)),null!==n&&this.emit("data",n),n},C.prototype._read=function(e){_(this,new b("_read()"))},C.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===process.stdout||e===process.stderr?f:a;function a(){i("onend"),e.end()}n.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",(function t(o,s){i("onunpipe"),o===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",f),r.removeListener("data",u),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",c);var l=!1;function u(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!l&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){i("onerror",t),f(),e.removeListener("error",h),0===o(e,"error")&&_(e,t)}function d(){e.removeListener("finish",p),f()}function p(){i("onfinish"),e.removeListener("close",d),f()}function f(){i("unpipe"),r.unpipe(e)}return r.on("data",u),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},C.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?P(this):n.reading||process.nextTick(T,this))),r},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(N,this),r},C.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(N,this),t},C.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(j,e,t))}(this,e)),e.paused=!1,this},C.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s{"use strict";e.exports=u;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(6753);function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=C,C.WritableState=x;var o,s={deprecate:r(4927)},a=r(2503),c=r(8764).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},u=r(1195),h=r(2457).getHighWaterMark,d=r(4281).q,p=d.ERR_INVALID_ARG_TYPE,f=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,w=d.ERR_STREAM_NULL_VALUES,b=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;function E(){}function x(e,t,o){i=i||r(6753),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(O,e,t),e._writableState.errorEmitted=!0,_(e,n)):(i(n),e._writableState.errorEmitted=!0,_(e,n),O(e,t))}(e,r,n,t,i);else{var o=k(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||I(e,r),n?process.nextTick(A,e,r,o,i):A(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function C(e){var t=this instanceof(i=i||r(6753));if(!t&&!o.call(C,this))return new C(e);this._writableState=new x(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function S(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function I(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var a=0,c=!0;r;)o[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;o.allBuffers=c,S(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,h=r.callback;if(S(e,t,!1,t.objectMode?1:l.length,l,u,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function P(e,t){e._final((function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=k(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(P,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(5717)(C,a),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===C&&e&&e._writableState instanceof x}})):o=function(e){return e instanceof this},C.prototype.pipe=function(){_(this,new m)},C.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=e,c.isBuffer(n)||n instanceof l);return s&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=E),i.ending?function(e,t){var r=new b;_(e,r),process.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i;return null===r?i=new w:"string"==typeof r||t.objectMode||(i=new p("chunk",["string","Buffer"],r)),!i||(_(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var l=t.length-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(e,t,r){r(new f("_write()"))},C.prototype._writev=null,C.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),C.prototype.destroy=u.destroy,C.prototype._undestroy=u.undestroy,C.prototype._destroy=function(e,t){t(e)}},5850:(e,t,r)=>{"use strict";var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(8610),s=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function f(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[u]=null,e[s]=null,e[a]=null,t(p(r,!1)))}}function g(e){process.nextTick(f,e)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[l]?r(p(void 0,!0)):t[h](r,n)}),n)}}(n,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(p(i,!1));r=new Promise(this[h])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),m);e.exports=function(e){var t,r=Object.create(y,(i(t={},d,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var n=r[d].read();n?(r[u]=null,r[s]=null,r[a]=null,e(p(n,!1))):(r[s]=e,r[a]=t)},writable:!0}),t));return r[u]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[u]=null,r[s]=null,r[a]=null,t(e)),void(r[c]=e)}var n=r[s];null!==n&&(r[u]=null,r[s]=null,r[a]=null,n(p(void 0,!0))),r[l]=!0})),e.on("readable",g.bind(null,r)),r}},7327:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,r,n,i=c.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,c.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return l(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},1195:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(e,t,r)=>{"use strict";var n,i=r(4281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i0,(function(e){u||(u=e),e&&d.forEach(c),o||(d.forEach(c),h(u))}))}));return t.reduce(l)}},2457:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},2503:(e,t,r)=>{e.exports=r(7187).EventEmitter},8473:(e,t,r)=>{(t=e.exports=r(9481)).Stream=t,t.Readable=t,t.Writable=r(4229),t.Duplex=r(6753),t.Transform=r(4605),t.PassThrough=r(2725),t.finished=r(8610),t.pipeline=r(9946)},4143:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ArgumentOutOfRangeError:()=>O.W,AsyncSubject:()=>u.c,BehaviorSubject:()=>c.X,ConnectableObservable:()=>i.c,EMPTY:()=>K.E,EmptyError:()=>R.K,GroupedObservable:()=>o.T,NEVER:()=>he,Notification:()=>S.P,NotificationKind:()=>S.W,ObjectUnsubscribedError:()=>M.N,Observable:()=>n.y,ReplaySubject:()=>l.t,Scheduler:()=>E.b,Subject:()=>a.xQ,Subscriber:()=>C.L,Subscription:()=>x.w,TimeoutError:()=>T.W,UnsubscriptionError:()=>N.B,VirtualAction:()=>_,VirtualTimeScheduler:()=>v,animationFrame:()=>b,animationFrameScheduler:()=>w,asap:()=>h.e,asapScheduler:()=>h.E,async:()=>d.P,asyncScheduler:()=>d.z,bindCallback:()=>B,bindNodeCallback:()=>z,combineLatest:()=>q.aj,concat:()=>G.z,config:()=>Pe.v,defer:()=>Z.P,empty:()=>K.c,forkJoin:()=>J,from:()=>Q.D,fromEvent:()=>te,fromEventPattern:()=>ne,generate:()=>ie,identity:()=>k.y,iif:()=>se,interval:()=>ce,isObservable:()=>P,merge:()=>ue.T,never:()=>de,noop:()=>I.Z,observable:()=>s.L,of:()=>pe.of,onErrorResumeNext:()=>fe,pairs:()=>ge,partition:()=>ve,pipe:()=>A.z,queue:()=>p.c,queueScheduler:()=>p.N,race:()=>_e.S3,range:()=>Ee,scheduled:()=>ke.x,throwError:()=>Ce._,timer:()=>Se.H,using:()=>Ae,zip:()=>Ie.$R});var n=r(2772),i=r(3140),o=r(1120),s=r(5050),a=r(211),c=r(9233),l=r(2630),u=r(364),h=r(6650),d=r(964),p=r(2546),f=r(655),g=r(6114),m=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return f.__extends(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(cancelAnimationFrame(r),t.scheduled=void 0)},t}(g.o),y=r(8399),w=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f.__extends(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,i=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++nt.index?1:-1:e.delay>t.delay?1:-1},t}(g.o),E=r(8725),x=r(8760),C=r(979),S=r(2632),A=r(2561),I=r(3306),k=r(3608);function P(e){return!!e&&(e instanceof n.y||"function"==typeof e.lift&&"function"==typeof e.subscribe)}var O=r(6565),R=r(6929),M=r(1016),N=r(8782),T=r(1462),j=r(5709),L=r(3642),D=r(9026),$=r(7507);function B(e,t,r){if(t){if(!(0,$.K)(t))return function(){for(var n=[],i=0;i1?n.next(Array.prototype.slice.call(arguments)):n.next(e)}),n,r)}))}function re(e,t,r,n,i){var o;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var s=e;e.addEventListener(t,r,i),o=function(){return s.removeEventListener(t,r,i)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var a=e;e.on(t,r),o=function(){return a.off(t,r)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var c=e;e.addListener(t,r),o=function(){return c.removeListener(t,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,u=e.length;l=t){n.complete();break}if(n.next(o++),n.closed)break}}))}function xe(e){var t=e.start,r=e.index,n=e.count,i=e.subscriber;r>=n?i.complete():(i.next(t),i.closed||(e.index=r+1,e.start=t+1,this.schedule(e)))}var Ce=r(4944),Se=r(9604);function Ae(e,t){return new n.y((function(r){var n,i;try{n=e()}catch(e){return void r.error(e)}try{i=t(n)}catch(e){return void r.error(e)}var o=(i?(0,Q.D)(i):K.E).subscribe(r);return function(){o.unsubscribe(),n&&n.unsubscribe()}}))}var Ie=r(5080),ke=r(8107),Pe=r(150)},364:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});var n=r(655),i=r(211),o=r(8760),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return n.__extends(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),o.w.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),o.w.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.xQ)},9233:(e,t,r)=>{"use strict";r.d(t,{X:()=>s});var n=r(655),i=r(211),o=r(1016),s=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return n.__extends(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.N;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.xQ)},2632:(e,t,r)=>{"use strict";r.d(t,{P:()=>a,W:()=>n});var n,i=r(5631),o=r(8170),s=r(4944);n||(n={});var a=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return(0,o.of)(this.value);case"E":return(0,s._)(this.error);case"C":return(0,i.c)()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},2772:(e,t,r)=>{"use strict";r.d(t,{y:()=>u});var n=r(3642),i=r(979),o=r(3142),s=r(2174),a=r(5050),c=r(2561),l=r(150),u=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,a=function(e,t,r){if(e){if(e instanceof i.L)return e;if(e[o.b])return e[o.b]()}return e||t||r?new i.L(e,t,r):new i.L(s.c)}(e,t,r);if(n?a.add(n.call(a,this.source)):a.add(this.source||l.v.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),l.v.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){l.v.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),(0,n._)(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=h(t))((function(t,n){var i;i=r.subscribe((function(t){try{e(t)}catch(e){n(e),i&&i.unsubscribe()}}),n,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[a.L]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t{"use strict";r.d(t,{c:()=>o});var n=r(150),i=r(1644),o={closed:!0,next:function(e){},error:function(e){if(n.v.useDeprecatedSynchronousErrorHandling)throw e;(0,i.z)(e)},complete:function(){}}},2039:(e,t,r)=>{"use strict";r.d(t,{L:()=>i});var n=r(655),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(r(979).L)},2630:(e,t,r)=>{"use strict";r.d(t,{t:()=>u});var n=r(655),i=r(211),o=r(2546),s=r(8760),a=r(9276),c=r(1016),l=r(8253),u=function(e){function t(t,r,n){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var i=e.call(this)||this;return i.scheduler=n,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return n.__extends(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new h(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=n.length;if(this.closed)throw new c.N;if(this.isStopped||this.hasError?t=s.w.EMPTY:(this.observers.push(e),t=new l.W(this,e)),i&&e.add(e=new a.ht(e,i)),r)for(var u=0;ut&&(o=Math.max(o,i-t)),o>0&&n.splice(0,o),n},t}(i.xQ),h=function(){return function(e,t){this.time=e,this.value=t}}()},8725:(e,t,r)=>{"use strict";r.d(t,{b:()=>n});var n=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}()},211:(e,t,r)=>{"use strict";r.d(t,{Yc:()=>u,xQ:()=>h});var n=r(655),i=r(2772),o=r(979),s=r(8760),a=r(1016),c=r(8253),l=r(3142),u=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return n.__extends(t,e),t}(o.L),h=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return n.__extends(t,e),t.prototype[l.b]=function(){return new u(this)},t.prototype.lift=function(e){var t=new d(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new a.N;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),i=0;i{"use strict";r.d(t,{W:()=>i});var n=r(655),i=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return n.__extends(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(r(8760).w)},979:(e,t,r)=>{"use strict";r.d(t,{L:()=>u});var n=r(655),i=r(4156),o=r(2174),s=r(8760),a=r(3142),c=r(150),l=r(1644),u=function(e){function t(r,n,i){var s=e.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=o.c;break;case 1:if(!r){s.destination=o.c;break}if("object"==typeof r){r instanceof t?(s.syncErrorThrowable=r.syncErrorThrowable,s.destination=r,r.add(s)):(s.syncErrorThrowable=!0,s.destination=new h(s,r));break}default:s.syncErrorThrowable=!0,s.destination=new h(s,r,n,i)}return s}return n.__extends(t,e),t.prototype[a.b]=function(){return this},t.create=function(e,r,n){var i=new t(e,r,n);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.w),h=function(e){function t(t,r,n,s){var a,c=e.call(this)||this;c._parentSubscriber=t;var l=c;return(0,i.m)(r)?a=r:r&&(a=r.next,n=r.error,s=r.complete,r!==o.c&&(l=Object.create(r),(0,i.m)(l.unsubscribe)&&c.add(l.unsubscribe.bind(l)),l.unsubscribe=c.unsubscribe.bind(c))),c._context=l,c._next=a,c._error=n,c._complete=s,c}return n.__extends(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;c.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=c.v.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):(0,l.z)(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;(0,l.z)(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};c.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),c.v.useDeprecatedSynchronousErrorHandling)throw e;(0,l.z)(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!c.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(t){return c.v.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):((0,l.z)(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(u)},8760:(e,t,r)=>{"use strict";r.d(t,{w:()=>a});var n=r(9026),i=r(7888),o=r(4156),s=r(8782),a=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r=this,a=r._parentOrParents,l=r._ctorUnsubscribe,u=r._unsubscribe,h=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,a instanceof e)a.remove(this);else if(null!==a)for(var d=0;d{"use strict";r.d(t,{v:()=>i});var n=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,n=e},get useDeprecatedSynchronousErrorHandling(){return n}}},7604:(e,t,r)=>{"use strict";r.d(t,{Ds:()=>c,IY:()=>a,ft:()=>l});var n=r(655),i=r(979),o=r(2772),s=r(7843),a=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return n.__extends(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.L),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.L);function l(e,t){if(!t.closed){if(e instanceof o.y)return e.subscribe(t);var r;try{r=(0,s.s)(e)(t)}catch(e){t.error(e)}return r}}},3140:(e,t,r)=>{"use strict";r.d(t,{N:()=>l,c:()=>c});var n=r(655),i=r(211),o=r(2772),s=r(8760),a=r(3018),c=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return n.__extends(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new s.w).add(this.source.subscribe(new u(this.getSubject(),this))),e.closed&&(this._connection=null,e=s.w.EMPTY)),e},t.prototype.refCount=function(){return(0,a.x)()(this)},t}(o.y),l=function(){var e=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}}}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return n.__extends(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(i.Yc)},5142:(e,t,r)=>{"use strict";r.d(t,{Ms:()=>h,aj:()=>u});var n=r(655),i=r(7507),o=r(9026),s=r(2039),a=r(2080),c=r(3375),l={};function u(){for(var e=[],t=0;t{"use strict";r.d(t,{z:()=>o});var n=r(8170),i=r(7503);function o(){for(var e=[],t=0;t{"use strict";r.d(t,{P:()=>s});var n=r(2772),i=r(5760),o=r(5631);function s(e){return new n.y((function(t){var r;try{r=e()}catch(e){return void t.error(e)}return(r?(0,i.D)(r):(0,o.c)()).subscribe(t)}))}},5631:(e,t,r)=>{"use strict";r.d(t,{E:()=>i,c:()=>o});var n=r(2772),i=new n.y((function(e){return e.complete()}));function o(e){return e?function(e){return new n.y((function(t){return e.schedule((function(){return t.complete()}))}))}(e):i}},5760:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(2772),i=r(7843),o=r(8107);function s(e,t){return t?(0,o.x)(e,t):e instanceof n.y?e:new n.y((0,i.s)(e))}},3375:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});var n=r(2772),i=r(2016),o=r(3109);function s(e,t){return t?(0,o.r)(e,t):new n.y((0,i.V)(e))}},4370:(e,t,r)=>{"use strict";r.d(t,{T:()=>a});var n=r(2772),i=r(7507),o=r(2556),s=r(3375);function a(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof c&&(r=e.pop()),null===a&&1===e.length&&e[0]instanceof n.y?e[0]:(0,o.J)(r)((0,s.n)(e,a))}},8170:(e,t,r)=>{"use strict";r.d(t,{of:()=>s});var n=r(7507),i=r(3375),o=r(3109);function s(){for(var e=[],t=0;t{"use strict";r.d(t,{S3:()=>c});var n=r(655),i=r(9026),o=r(3375),s=r(2039),a=r(2080);function c(){for(var e=[],t=0;t{"use strict";r.d(t,{_:()=>i});var n=r(2772);function i(e,t){return t?new n.y((function(r){return t.schedule(o,0,{error:e,subscriber:r})})):new n.y((function(t){return t.error(e)}))}function o(e){var t=e.error;e.subscriber.error(t)}},9604:(e,t,r)=>{"use strict";r.d(t,{H:()=>a});var n=r(2772),i=r(964),o=r(5812),s=r(7507);function a(e,t,r){void 0===e&&(e=0);var a=-1;return(0,o.k)(t)?a=Number(t)<1?1:Number(t):(0,s.K)(t)&&(r=t),(0,s.K)(r)||(r=i.P),new n.y((function(t){var n=(0,o.k)(e)?e:+e-r.now();return r.schedule(c,n,{index:0,period:a,subscriber:t})}))}function c(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}},5080:(e,t,r)=>{"use strict";r.d(t,{$R:()=>l,mx:()=>u});var n=r(655),i=r(3375),o=r(9026),s=r(979),a=r(999),c=r(7604);function l(){for(var e=[],t=0;tthis.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),f=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.parent=r,i.observable=n,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return n.__extends(t,e),t.prototype[a.hZ]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return(0,c.ft)(this.observable,new c.IY(this))},t}(c.Ds)},7503:(e,t,r)=>{"use strict";r.d(t,{u:()=>i});var n=r(2556);function i(){return(0,n.J)(1)}},2616:(e,t,r)=>{"use strict";r.d(t,{h:()=>o});var n=r(655),i=r(979);function o(e,t){return function(r){return r.lift(new s(e,t))}}var s=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate,this.thisArg))},e}(),a=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.count=0,i}return n.__extends(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(i.L)},1120:(e,t,r)=>{"use strict";r.d(t,{T:()=>d,v:()=>c});var n=r(655),i=r(979),o=r(8760),s=r(2772),a=r(211);function c(e,t,r,n){return function(i){return i.lift(new l(e,t,r,n))}}var l=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),u=function(e){function t(t,r,n,i,o){var s=e.call(this,t)||this;return s.keySelector=r,s.elementSelector=n,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return n.__extends(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){return void this.error(e)}this._group(e,t)},t.prototype._group=function(e,t){var r=this.groups;r||(r=this.groups=new Map);var n,i=r.get(t);if(this.elementSelector)try{n=this.elementSelector(e)}catch(e){this.error(e)}else n=e;if(!i){i=this.subjectSelector?this.subjectSelector():new a.xQ,r.set(t,i);var o=new d(t,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new d(t,i))}catch(e){return void this.error(e)}this.add(s.subscribe(new h(t,i,this)))}}i.closed||i.next(n)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach((function(t,r){t.error(e)})),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach((function(e,t){e.complete()})),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.L),h=function(e){function t(t,r,n){var i=e.call(this,r)||this;return i.key=t,i.group=r,i.parent=n,i}return n.__extends(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.L),d=function(e){function t(t,r,n){var i=e.call(this)||this;return i.key=t,i.groupSubject=r,i.refCountSubscription=n,i}return n.__extends(t,e),t.prototype._subscribe=function(e){var t=new o.w,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new p(r)),t.add(n.subscribe(e)),t},t}(s.y),p=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return n.__extends(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(o.w)},5709:(e,t,r)=>{"use strict";r.d(t,{U:()=>o});var n=r(655),i=r(979);function o(e,t){return function(r){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new s(e,t))}}var s=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.project,this.thisArg))},e}(),a=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.project=r,i.count=0,i.thisArg=n||i,i}return n.__extends(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(i.L)},2556:(e,t,r)=>{"use strict";r.d(t,{J:()=>o});var n=r(7746),i=r(3608);function o(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),(0,n.zg)(i.y,e)}},7746:(e,t,r)=>{"use strict";r.d(t,{VS:()=>u,zg:()=>a});var n=r(655),i=r(5709),o=r(5760),s=r(7604);function a(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?function(n){return n.pipe(a((function(r,n){return(0,o.D)(e(r,n)).pipe((0,i.U)((function(e,i){return t(r,e,n,i)})))}),r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new c(e,r))})}var c=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.project,this.concurrent))},e}(),l=function(e){function t(t,r,n){void 0===n&&(n=Number.POSITIVE_INFINITY);var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return n.__extends(t,e),t.prototype._next=function(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.Ds),u=a},9276:(e,t,r)=>{"use strict";r.d(t,{QV:()=>s,ht:()=>c});var n=r(655),i=r(979),o=r(2632);function s(e,t){return void 0===t&&(t=0),function(r){return r.lift(new a(e,t))}}var a=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.scheduler,this.delay))},e}(),c=function(e){function t(t,r,n){void 0===n&&(n=0);var i=e.call(this,t)||this;return i.scheduler=r,i.delay=n,i}return n.__extends(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new l(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(o.P.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(o.P.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(o.P.createComplete()),this.unsubscribe()},t}(i.L),l=function(){return function(e,t){this.notification=e,this.destination=t}}()},3018:(e,t,r)=>{"use strict";r.d(t,{x:()=>o});var n=r(655),i=r(979);function o(){return function(e){return e.lift(new s(e))}}var s=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new a(e,r),i=t.subscribe(n);return n.closed||(n.connection=r.connect()),i},e}(),a=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return n.__extends(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var r=this.connection,n=e._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},t}(i.L)},3109:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(2772),i=r(8760);function o(e,t){return new n.y((function(r){var n=new i.w,o=0;return n.add(t.schedule((function(){o!==e.length?(r.next(e[o++]),r.closed||n.add(this.schedule())):r.complete()}))),n}))}},8107:(e,t,r)=>{"use strict";r.d(t,{x:()=>u});var n=r(2772),i=r(8760),o=r(5050),s=r(3109),a=r(999),c=r(336),l=r(9217);function u(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[o.L]}(e))return function(e,t){return new n.y((function(r){var n=new i.w;return n.add(t.schedule((function(){var i=e[o.L]();n.add(i.subscribe({next:function(e){n.add(t.schedule((function(){return r.next(e)})))},error:function(e){n.add(t.schedule((function(){return r.error(e)})))},complete:function(){n.add(t.schedule((function(){return r.complete()})))}}))}))),n}))}(e,t);if((0,c.t)(e))return function(e,t){return new n.y((function(r){var n=new i.w;return n.add(t.schedule((function(){return e.then((function(e){n.add(t.schedule((function(){r.next(e),n.add(t.schedule((function(){return r.complete()})))})))}),(function(e){n.add(t.schedule((function(){return r.error(e)})))}))}))),n}))}(e,t);if((0,l.z)(e))return(0,s.r)(e,t);if(function(e){return e&&"function"==typeof e[a.hZ]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.y((function(r){var n,o=new i.w;return o.add((function(){n&&"function"==typeof n.return&&n.return()})),o.add(t.schedule((function(){n=e[a.hZ](),o.add(t.schedule((function(){if(!r.closed){var e,t;try{var i=n.next();e=i.value,t=i.done}catch(e){return void r.error(e)}t?r.complete():(r.next(e),this.schedule())}})))}))),o}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}},6114:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(655),i=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return n.__extends(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||new Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,r){return e.call(this)||this}return n.__extends(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(8760).w))},8399:(e,t,r)=>{"use strict";r.d(t,{v:()=>o});var n=r(655),i=r(8725),o=function(e){function t(r,n){void 0===n&&(n=i.b.now);var o=e.call(this,r,(function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return n.__extends(t,e),t.prototype.schedule=function(r,n,i){return void 0===n&&(n=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,n,i):e.prototype.schedule.call(this,r,n,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(i.b)},6650:(e,t,r)=>{"use strict";r.d(t,{e:()=>u,E:()=>l});var n=r(655),i=1,o=function(){return Promise.resolve()}(),s={};function a(e){return e in s&&(delete s[e],!0)}var c=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return n.__extends(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=(c=t.flush.bind(t,null),l=i++,s[l]=!0,o.then((function(){return a(l)&&c()})),l)));var c,l},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(a(r),t.scheduled=void 0)},t}(r(6114).o),l=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,i=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++n{"use strict";r.d(t,{P:()=>o,z:()=>i});var n=r(6114),i=new(r(8399).v)(n.o),o=i},2546:(e,t,r)=>{"use strict";r.d(t,{c:()=>s,N:()=>o});var n=r(655),i=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return n.__extends(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(r(6114).o),o=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(r(8399).v))(i),s=o},999:(e,t,r)=>{"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}r.d(t,{hZ:()=>i});var i=n()},5050:(e,t,r)=>{"use strict";r.d(t,{L:()=>n});var n=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},3142:(e,t,r)=>{"use strict";r.d(t,{b:()=>n});var n=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},6565:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});var n=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},6929:(e,t,r)=>{"use strict";r.d(t,{K:()=>n});var n=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},1016:(e,t,r)=>{"use strict";r.d(t,{N:()=>n});var n=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},1462:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});var n=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},8782:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});var n=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},3642:(e,t,r)=>{"use strict";r.d(t,{_:()=>i});var n=r(979);function i(e){for(;e;){var t=e,r=t.closed,i=t.destination,o=t.isStopped;if(r||o)return!1;e=i&&i instanceof n.L?i:null}return!0}},1644:(e,t,r)=>{"use strict";function n(e){setTimeout((function(){throw e}),0)}r.d(t,{z:()=>n})},3608:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{y:()=>n})},9026:(e,t,r)=>{"use strict";r.d(t,{k:()=>n});var n=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}()},9217:(e,t,r)=>{"use strict";r.d(t,{z:()=>n});var n=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},4156:(e,t,r)=>{"use strict";function n(e){return"function"==typeof e}r.d(t,{m:()=>n})},5812:(e,t,r)=>{"use strict";r.d(t,{k:()=>i});var n=r(9026);function i(e){return!(0,n.k)(e)&&e-parseFloat(e)+1>=0}},7888:(e,t,r)=>{"use strict";function n(e){return null!==e&&"object"==typeof e}r.d(t,{K:()=>n})},336:(e,t,r)=>{"use strict";function n(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}r.d(t,{t:()=>n})},7507:(e,t,r)=>{"use strict";function n(e){return e&&"function"==typeof e.schedule}r.d(t,{K:()=>n})},3306:(e,t,r)=>{"use strict";function n(){}r.d(t,{Z:()=>n})},8463:(e,t,r)=>{"use strict";function n(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}r.d(t,{f:()=>n})},2561:(e,t,r)=>{"use strict";r.d(t,{U:()=>o,z:()=>i});var n=r(3608);function i(){for(var e=[],t=0;t{"use strict";r.d(t,{s:()=>u});var n=r(2016),i=r(1644),o=r(999),s=r(5050),a=r(9217),c=r(336),l=r(7888),u=function(e){if(e&&"function"==typeof e[s.L])return u=e,function(e){var t=u[s.L]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if((0,a.z)(e))return(0,n.V)(e);if((0,c.t)(e))return r=e,function(e){return r.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,i.z),e};if(e&&"function"==typeof e[o.hZ])return t=e,function(e){for(var r=t[o.hZ]();;){var n=void 0;try{n=r.next()}catch(t){return e.error(t),e}if(n.done){e.complete();break}if(e.next(n.value),e.closed)break}return"function"==typeof r.return&&e.add((function(){r.return&&r.return()})),e};var t,r,u,h=(0,l.K)(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+h+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},2016:(e,t,r)=>{"use strict";r.d(t,{V:()=>n});var n=function(e){return function(t){for(var r=0,n=e.length;r{"use strict";r.d(t,{D:()=>a});var n=r(655),i=function(e){function t(t,r,n){var i=e.call(this)||this;return i.parent=t,i.outerValue=r,i.outerIndex=n,i.index=0,i}return n.__extends(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(r(979).L),o=r(7843),s=r(2772);function a(e,t,r,n,a){if(void 0===a&&(a=new i(e,r,n)),!a.closed)return t instanceof s.y?t.subscribe(a):(0,o.s)(t)(a)}},1717:(e,t,r)=>{"use strict";r.r(t),r.d(t,{audit:()=>o,auditTime:()=>u,buffer:()=>h,bufferCount:()=>g,bufferTime:()=>v,bufferToggle:()=>O,bufferWhen:()=>N,catchError:()=>L,combineAll:()=>U,combineLatest:()=>W,concat:()=>V,concatAll:()=>q.u,concatMap:()=>Z,concatMapTo:()=>K,count:()=>Y,debounce:()=>X,debounceTime:()=>re,defaultIfEmpty:()=>se,delay:()=>he,delayWhen:()=>me,dematerialize:()=>_e,distinct:()=>Ce,distinctUntilChanged:()=>Ie,distinctUntilKeyChanged:()=>Oe,elementAt:()=>ze,endWith:()=>He,every:()=>Ve,exhaust:()=>Ze,exhaustMap:()=>Je,expand:()=>tt,filter:()=>Me.h,finalize:()=>it,find:()=>at,findIndex:()=>ut,first:()=>dt,flatMap:()=>G.VS,groupBy:()=>pt.v,ignoreElements:()=>ft,isEmpty:()=>yt,last:()=>xt,map:()=>Qe.U,mapTo:()=>Ct,materialize:()=>It,max:()=>jt,merge:()=>Dt,mergeAll:()=>$t.J,mergeMap:()=>G.zg,mergeMapTo:()=>Bt,mergeScan:()=>Ut,min:()=>Wt,multicast:()=>Vt,observeOn:()=>Gt.QV,onErrorResumeNext:()=>Zt,pairwise:()=>Qt,partition:()=>tr,pluck:()=>rr,publish:()=>ir,publishBehavior:()=>sr,publishLast:()=>cr,publishReplay:()=>ur,race:()=>dr,reduce:()=>Tt,refCount:()=>Sr.x,repeat:()=>pr,repeatWhen:()=>mr,retry:()=>br,retryWhen:()=>Er,sample:()=>Ar,sampleTime:()=>Pr,scan:()=>Ot,sequenceEqual:()=>Nr,share:()=>$r,shareReplay:()=>Br,single:()=>Ur,skip:()=>Wr,skipLast:()=>qr,skipUntil:()=>Kr,skipWhile:()=>Jr,startWith:()=>tn,subscribeOn:()=>sn,switchAll:()=>hn,switchMap:()=>cn,switchMapTo:()=>dn,take:()=>Be,takeLast:()=>vt,takeUntil:()=>pn,takeWhile:()=>mn,tap:()=>_n,throttle:()=>Sn,throttleTime:()=>kn,throwIfEmpty:()=>Te,timeInterval:()=>Nn,timeout:()=>Un,timeoutWith:()=>Ln,timestamp:()=>Fn,toArray:()=>Hn,window:()=>Vn,windowCount:()=>Zn,windowTime:()=>Qn,windowToggle:()=>ii,windowWhen:()=>ai,withLatestFrom:()=>ui,zip:()=>fi,zipAll:()=>gi});var n=r(655),i=r(7604);function o(e){return function(t){return t.lift(new s(e))}}var s=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.durationSelector))},e}(),a=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return n.__extends(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var r=(0,i.ft)(t,new i.IY(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this,t=e.value,r=e.hasValue,n=e.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),r&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.Ds),c=r(964),l=r(9604);function u(e,t){return void 0===t&&(t=c.P),o((function(){return(0,l.H)(e,t)}))}function h(e){return function(t){return t.lift(new d(e))}}var d=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.closingNotifier))},e}(),p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add((0,i.ft)(r,new i.IY(n))),n}return n.__extends(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.Ds),f=r(979);function g(e,t){return void 0===t&&(t=null),function(r){return r.lift(new m(e,t))}}var m=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,this.subscriberClass=t&&e!==t?w:y}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),y=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return n.__extends(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(f.L),w=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.bufferSize=r,i.startBufferEvery=n,i.buffers=[],i.count=0,i}return n.__extends(t,e),t.prototype._next=function(e){var t=this,r=t.bufferSize,n=t.startBufferEvery,i=t.buffers,o=t.count;this.count++,o%n==0&&i.push([]);for(var s=i.length;s--;){var a=i[s];a.push(e),a.length===r&&(i.splice(s,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(f.L),b=r(7507);function v(e){var t=arguments.length,r=c.P;(0,b.K)(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var i=Number.POSITIVE_INFINITY;return t>=3&&(i=arguments[2]),function(t){return t.lift(new _(e,n,i,r))}}var _=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new x(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),E=function(){return function(){this.buffer=[]}}(),x=function(e){function t(t,r,n,i,o){var s=e.call(this,t)||this;s.bufferTimeSpan=r,s.bufferCreationInterval=n,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==n||n<0,s.timespanOnly){var c={subscriber:s,context:a,bufferTimeSpan:r};s.add(a.closeAction=o.schedule(C,r,c))}else{var l={subscriber:s,context:a},u={bufferTimeSpan:r,bufferCreationInterval:n,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(A,r,l)),s.add(o.schedule(S,n,u))}return s}return n.__extends(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,i=0;i0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(C,r,n))}},t.prototype.openContext=function(){var e=new E;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(f.L);function C(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function S(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,i=e.scheduler,o=n.openContext();n.closed||(n.add(o.closeAction=i.schedule(A,r,{subscriber:n,context:o})),this.schedule(e,t))}function A(e){var t=e.subscriber,r=e.context;t.closeContext(r)}var I=r(8760),k=r(2080),P=r(2039);function O(e,t){return function(r){return r.lift(new R(e,t))}}var R=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new M(e,this.openings,this.closingSelector))},e}(),M=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.closingSelector=n,i.contexts=[],i.add((0,k.D)(i,r)),i}return n.__extends(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new I.w,n={buffer:[],subscription:r};t.push(n);var i=(0,k.D)(this,e,n);!i||i.closed?this.closeBuffer(n):(i.context=n,this.add(i),r.add(i))},t}(P.L);function N(e){return function(t){return t.lift(new T(e))}}var T=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new j(e,this.closingSelector))},e}(),j=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return n.__extends(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t,r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{t=(0,this.closingSelector)()}catch(e){return this.error(e)}e=new I.w,this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add((0,i.ft)(t,new i.IY(this))),this.subscribing=!1},t}(i.Ds);function L(e){return function(t){var r=new D(e),n=t.lift(r);return r.caught=n}}var D=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new $(e,this.selector,this.caught))},e}(),$=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.selector=r,i.caught=n,i}return n.__extends(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught)}catch(t){return void e.prototype.error.call(this,t)}this._unsubscribeAndRecycle();var n=new i.IY(this);this.add(n);var o=(0,i.ft)(r,n);o!==n&&this.add(o)}},t}(i.Ds),B=r(5142);function U(e){return function(t){return t.lift(new B.Ms(e))}}var F=r(9026),z=r(5760);function W(){for(var e=[],t=0;t0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var o=Math.max(0,r[0].time-n.now());this.schedule(e,o)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new fe(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(ue.P.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(ue.P.createComplete()),this.unsubscribe()},t}(f.L),fe=function(){return function(e,t){this.time=e,this.notification=t}}(),ge=r(2772);function me(e,t){return t?function(r){return new be(r,t).lift(new ye(e))}:function(t){return t.lift(new ye(e))}}var ye=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new we(e,this.delayDurationSelector))},e}(),we=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return n.__extends(t,e),t.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(e),this.removeSubscription(i),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return-1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=(0,k.D)(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(P.L),be=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return n.__extends(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new ve(e,this.source))},t}(ge.y),ve=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return n.__extends(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(f.L);function _e(){return function(e){return e.lift(new Ee)}}var Ee=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new xe(e))},e}(),xe=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(f.L);function Ce(e,t){return function(r){return r.lift(new Se(e,t))}}var Se=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new Ae(e,this.keySelector,this.flushes))},e}(),Ae=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=r,o.values=new Set,n&&o.add((0,i.ft)(n,new i.IY(o))),o}return n.__extends(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(e){return void r.error(e)}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(i.Ds);function Ie(e,t){return function(r){return r.lift(new ke(e,t))}}var ke=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new Pe(e,this.compare,this.keySelector))},e}(),Pe=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.keySelector=n,i.hasKey=!1,"function"==typeof r&&(i.compare=r),i}return n.__extends(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){var t;try{var r=this.keySelector;t=r?r(e):e}catch(e){return this.destination.error(e)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},t}(f.L);function Oe(e,t){return Ie((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}var Re=r(6565),Me=r(2616),Ne=r(6929);function Te(e){return void 0===e&&(e=De),function(t){return t.lift(new je(e))}}var je=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new Le(e,this.errorFactory))},e}(),Le=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return n.__extends(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(f.L);function De(){return new Ne.K}var $e=r(5631);function Be(e){return function(t){return 0===e?(0,$e.c)():t.lift(new Ue(e))}}var Ue=function(){function e(e){if(this.total=e,this.total<0)throw new Re.W}return e.prototype.call=function(e,t){return t.subscribe(new Fe(e,this.total))},e}(),Fe=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return n.__extends(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(f.L);function ze(e,t){if(e<0)throw new Re.W;var r=arguments.length>=2;return function(n){return n.pipe((0,Me.h)((function(t,r){return r===e})),Be(1),r?se(t):Te((function(){return new Re.W})))}}var We=r(8170);function He(){for(var e=[],t=0;t0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.Ds);function it(e){return function(t){return t.lift(new ot(e))}}var ot=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new st(e,this.callback))},e}(),st=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new I.w(r)),n}return n.__extends(t,e),t}(f.L);function at(e,t){if("function"!=typeof e)throw new TypeError("predicate is not a function");return function(r){return r.lift(new ct(e,r,!1,t))}}var ct=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new lt(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}(),lt=function(e){function t(t,r,n,i,o){var s=e.call(this,t)||this;return s.predicate=r,s.source=n,s.yieldIndex=i,s.thisArg=o,s.index=0,s}return n.__extends(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(f.L);function ut(e,t){return function(r){return r.lift(new ct(e,r,!0,t))}}var ht=r(3608);function dt(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?(0,Me.h)((function(t,r){return e(t,r,n)})):ht.y,Be(1),r?se(t):Te((function(){return new Ne.K})))}}var pt=r(1120);function ft(){return function(e){return e.lift(new gt)}}var gt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new mt(e))},e}(),mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype._next=function(e){},t}(f.L);function yt(){return function(e){return e.lift(new wt)}}var wt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new bt(e))},e}(),bt=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(f.L);function vt(e){return function(t){return 0===e?(0,$e.c)():t.lift(new _t(e))}}var _t=function(){function e(e){if(this.total=e,this.total<0)throw new Re.W}return e.prototype.call=function(e,t){return t.subscribe(new Et(e,this.total))},e}(),Et=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=new Array,n.count=0,n}return n.__extends(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,i=0;i=2;return function(n){return n.pipe(e?(0,Me.h)((function(t,r){return e(t,r,n)})):ht.y,vt(1),r?se(t):Te((function(){return new Ne.K})))}}function Ct(e){return function(t){return t.lift(new St(e))}}var St=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new At(e,this.value))},e}(),At=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return n.__extends(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(f.L);function It(){return function(e){return e.lift(new kt)}}var kt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Pt(e))},e}(),Pt=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.prototype._next=function(e){this.destination.next(ue.P.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(ue.P.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(ue.P.createComplete()),e.complete()},t}(f.L);function Ot(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new Rt(e,t,r))}}var Rt=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new Mt(e,this.accumulator,this.seed,this.hasSeed))},e}(),Mt=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return o.accumulator=r,o._seed=n,o.hasSeed=i,o.index=0,o}return n.__extends(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(f.L),Nt=r(2561);function Tt(e,t){return arguments.length>=2?function(r){return(0,Nt.z)(Ot(e,t),vt(1),se(t))(r)}:function(t){return(0,Nt.z)(Ot((function(t,r,n){return e(t,r,n+1)})),vt(1))(t)}}function jt(e){return Tt("function"==typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}var Lt=r(4370);function Dt(){for(var e=[],t=0;t0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.Ds);function Wt(e){return Tt("function"==typeof e?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(f.L);function mr(e){return function(t){return t.lift(new yr(e))}}var yr=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new wr(e,this.notifier,t))},e}(),wr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.notifier=r,i.source=n,i.sourceIsBeingSubscribedTo=!0,i}return n.__extends(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){var t;this.notifications=new nr.xQ;try{t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=(0,i.ft)(t,new i.IY(this))},t}(i.Ds);function br(e){return void 0===e&&(e=-1),function(t){return t.lift(new vr(e,t))}}var vr=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new _r(e,this.count,this.source))},e}(),_r=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.count=r,i.source=n,i}return n.__extends(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(f.L);function Er(e){return function(t){return t.lift(new xr(e,t))}}var xr=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new Cr(e,this.notifier,this.source))},e}(),Cr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.notifier=r,i.source=n,i}return n.__extends(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new nr.xQ;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=(0,i.ft)(n,new i.IY(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(i.Ds),Sr=r(3018);function Ar(e){return function(t){return t.lift(new Ir(e))}}var Ir=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new kr(e),n=t.subscribe(r);return n.add((0,i.ft)(this.notifier,new i.IY(r))),n},e}(),kr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return n.__extends(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.Ds);function Pr(e,t){return void 0===t&&(t=c.P),function(r){return r.lift(new Or(e,t))}}var Or=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new Rr(e,this.period,this.scheduler))},e}(),Rr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.period=r,i.scheduler=n,i.hasValue=!1,i.add(n.schedule(Mr,r,{subscriber:i,period:r})),i}return n.__extends(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(f.L);function Mr(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}function Nr(e,t){return function(r){return r.lift(new Tr(e,t))}}var Tr=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new jr(e,this.compareTo,this.comparator))},e}(),jr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.compareTo=r,i.comparator=n,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(r.subscribe(new Lr(t,i))),i}return n.__extends(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this,t=e._a,r=e._b,n=e.comparator;t.length>0&&r.length>0;){var i=t.shift(),o=r.shift(),s=!1;try{s=n?n(i,o):i===o}catch(e){this.destination.error(e)}s||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(f.L),Lr=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return n.__extends(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(f.L);function Dr(){return new nr.xQ}function $r(){return function(e){return(0,Sr.x)()(Vt(Dr)(e))}}function Br(e,t,r){var n;return n=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){return e.lift(function(e){var t,r,n=e.bufferSize,i=void 0===n?Number.POSITIVE_INFINITY:n,o=e.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,a=e.refCount,c=e.scheduler,l=0,u=!1,h=!1;return function(e){var n;l++,!t||u?(u=!1,t=new lr.t(i,s,c),n=t.subscribe(this),r=e.subscribe({next:function(e){t.next(e)},error:function(e){u=!0,t.error(e)},complete:function(){h=!0,r=void 0,t.complete()}}),h&&(r=void 0)):n=t.subscribe(this),this.add((function(){l--,n.unsubscribe(),n=void 0,r&&!h&&a&&0===l&&(r.unsubscribe(),r=void 0,t=void 0)}))}}(n))}}function Ur(e){return function(t){return t.lift(new Fr(e,t))}}var Fr=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new zr(e,this.predicate,this.source))},e}(),zr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.source=n,i.seenValue=!1,i.index=0,i}return n.__extends(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new Ne.K)},t}(f.L);function Wr(e){return function(t){return t.lift(new Hr(e))}}var Hr=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new Vr(e,this.total))},e}(),Vr=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return n.__extends(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(f.L);function qr(e){return function(t){return t.lift(new Gr(e))}}var Gr=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new Re.W}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new f.L(e)):t.subscribe(new Zr(e,this._skipCount))},e}(),Zr=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=new Array(r),n}return n.__extends(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,i=this.windows,o=i.length,s=0;s=0&&a%t==0&&!this.closed&&i.shift().complete(),++this.count%t==0&&!this.closed){var c=new nr.xQ;i.push(c),r.next(c)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(f.L);function Qn(e){var t=c.P,r=null,n=Number.POSITIVE_INFINITY;return(0,b.K)(arguments[3])&&(t=arguments[3]),(0,b.K)(arguments[2])?t=arguments[2]:(0,nn.k)(arguments[2])&&(n=Number(arguments[2])),(0,b.K)(arguments[1])?t=arguments[1]:(0,nn.k)(arguments[1])&&(r=Number(arguments[1])),function(i){return i.lift(new Jn(e,r,n,t))}}var Jn=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new ei(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),Xn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return n.__extends(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(nr.xQ),ei=function(e){function t(t,r,n,i,o){var s=e.call(this,t)||this;s.destination=t,s.windowTimeSpan=r,s.windowCreationInterval=n,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==n&&n>=0){var c={subscriber:s,window:a,context:null},l={windowTimeSpan:r,windowCreationInterval:n,subscriber:s,scheduler:o};s.add(o.schedule(ni,r,c)),s.add(o.schedule(ri,n,l))}else{var u={subscriber:s,window:a,windowTimeSpan:r};s.add(o.schedule(ti,r,u))}return s}return n.__extends(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n=this.maxWindowSize&&this.closeWindow(i))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new Xn;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(f.L);function ti(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function ri(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,i=e.windowCreationInterval,o=r.openWindow(),s=this,a={action:s,subscription:null},c={subscriber:r,window:o,context:a};a.subscription=n.schedule(ni,t,c),s.add(a.subscription),s.schedule(e,i)}function ni(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}function ii(e,t){return function(r){return r.lift(new oi(e,t))}}var oi=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new si(e,this.openings,this.closingSelector))},e}(),si=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.openings=r,i.closingSelector=n,i.contexts=[],i.add(i.openSubscription=(0,k.D)(i,r,r)),i}return n.__extends(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n0){var i=n.indexOf(r);-1!==i&&n.splice(i,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(P.L),pi=r(5080);function fi(){for(var e=[],t=0;t{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2257:(e,t,r)=>{const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),l("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new h(e.value,t).test(this.value):""===e.operator?""===e.value||new h(this.value,t).test(e.semver):!((t=o(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=i;const o=r(2893),{safeRe:s,t:a}=r(5765),c=r(7539),l=r(4225),u=r(6376),h=r(6902)},6902:(e,t,r)=>{class n{constructor(e,t){if(t=o(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&g))+":"+e,r=i.get(t);if(r)return r;const n=this.options.loose,o=n?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(o,P(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(l[u.COMPARATORTRIM],h),a("comparator trim",e),e=e.replace(l[u.TILDETRIM],d),a("tilde trim",e),e=e.replace(l[u.CARETTRIM],p),a("caret trim",e);let c=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>k(e,this.options)));n&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(l[u.COMPARATORLOOSE]))))),a("range list",c);const y=new Map,w=c.map((e=>new s(e,this.options)));for(const e of w){if(m(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const v=[...y.values()];return i.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>w(r,t)&&e.set.some((e=>w(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,y=e=>""===e.value,w=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},b=(e,t)=>(a("comp",e,t),e=x(e,t),a("caret",e),e=_(e,t),a("tildes",e),e=S(e,t),a("xrange",e),e=I(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const r=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(r,((t,r,n,i,o)=>{let s;return a("tilde",e,t,r,n,i,o),v(r)?s="":v(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:v(i)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,a("tilde return",s),s}))},x=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{a("caret",e,t);const r=t.loose?l[u.CARETLOOSE]:l[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,o,s)=>{let c;return a("caret",e,t,r,i,o,s),v(r)?c="":v(i)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(o)?c="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===r?"0"===i?`>=${r}.${i}.${o}-${s} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${s} <${+r+1}.0.0-0`):(a("no pr"),c="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),a("caret return",c),c}))},S=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>A(e,t))).join(" ")),A=(e,t)=>{e=e.trim();const r=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(r,((r,n,i,o,s,c)=>{a("xRange",e,r,n,i,o,s,c);const l=v(i),u=l||v(o),h=u||v(s),d=h;return"="===n&&d&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(o=0),s=0,">"===n?(n=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",u?i=+i+1:o=+o+1),"<"===n&&(c="-0"),r=`${n+i}.${o}.${s}${c}`):u?r=`>=${i}.0.0${c} <${+i+1}.0.0-0`:h&&(r=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),a("xRange return",r),r}))},I=(e,t)=>(a("replaceStars",e,t),e.trim().replace(l[u.STAR],"")),k=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),P=e=>(t,r,n,i,o,s,a,c,l,u,h,d,p)=>`${r=v(n)?"":v(i)?`>=${n}.0.0${e?"-0":""}`:v(o)?`>=${n}.${i}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=v(l)?"":v(u)?`<${+l+1}.0.0-0`:v(h)?`<${l}.${+u+1}.0-0`:d?`<=${l}.${u}.${h}-${d}`:e?`<${l}.${u}.${+h+1}-0`:`<=${c}`}`.trim(),O=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},6376:(e,t,r)=>{const n=r(4225),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(3295),{safeRe:s,t:a}=r(5765),c=r(2893),{compareIdentifiers:l}=r(6742);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},3507:(e,t,r)=>{const n=r(3959);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},7539:(e,t,r)=>{const n=r(8718),i=r(1194),o=r(1312),s=r(5903),a=r(1544),c=r(2056);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return i(e,r,l);case">":return o(e,r,l);case">=":return s(e,r,l);case"<":return a(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError(`Invalid operator: ${t}`)}}},9038:(e,t,r)=>{const n=r(6376),i=r(3959),{safeRe:o,t:s}=r(5765);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else r=e.match(o[s.COERCE]);return null===r?null:i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},8880:(e,t,r)=>{const n=r(6376);e.exports=(e,t,r)=>{const i=new n(e,r),o=new n(t,r);return i.compare(o)||i.compareBuild(o)}},7880:(e,t,r)=>{const n=r(6269);e.exports=(e,t)=>n(e,t,!0)},6269:(e,t,r)=>{const n=r(6376);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},8419:(e,t,r)=>{const n=r(3959);e.exports=(e,t)=>{const r=n(e,null,!0),i=n(t,null,!0),o=r.compare(i);if(0===o)return null;const s=o>0,a=s?r:i,c=s?i:r,l=!!a.prerelease.length;if(c.prerelease.length&&!l)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const u=l?"pre":"";return r.major!==i.major?u+"major":r.minor!==i.minor?u+"minor":r.patch!==i.patch?u+"patch":"prerelease"}},8718:(e,t,r)=>{const n=r(6269);e.exports=(e,t,r)=>0===n(e,t,r)},1312:(e,t,r)=>{const n=r(6269);e.exports=(e,t,r)=>n(e,t,r)>0},5903:(e,t,r)=>{const n=r(6269);e.exports=(e,t,r)=>n(e,t,r)>=0},253:(e,t,r)=>{const n=r(6376);e.exports=(e,t,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,o).version}catch(e){return null}}},1544:(e,t,r)=>{const n=r(6269);e.exports=(e,t,r)=>n(e,t,r)<0},2056:(e,t,r)=>{const n=r(6269);e.exports=(e,t,r)=>n(e,t,r)<=0},8679:(e,t,r)=>{const n=r(6376);e.exports=(e,t)=>new n(e,t).major},7789:(e,t,r)=>{const n=r(6376);e.exports=(e,t)=>new n(e,t).minor},1194:(e,t,r)=>{const n=r(6269);e.exports=(e,t,r)=>0!==n(e,t,r)},3959:(e,t,r)=>{const n=r(6376);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},2358:(e,t,r)=>{const n=r(6376);e.exports=(e,t)=>new n(e,t).patch},7559:(e,t,r)=>{const n=r(3959);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},6:(e,t,r)=>{const n=r(6269);e.exports=(e,t,r)=>n(t,e,r)},3657:(e,t,r)=>{const n=r(8880);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},5712:(e,t,r)=>{const n=r(6902);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},1100:(e,t,r)=>{const n=r(8880);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},6397:(e,t,r)=>{const n=r(3959);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},1249:(e,t,r)=>{const n=r(5765),i=r(3295),o=r(6376),s=r(6742),a=r(3959),c=r(6397),l=r(3507),u=r(253),h=r(8419),d=r(8679),p=r(7789),f=r(2358),g=r(7559),m=r(6269),y=r(6),w=r(7880),b=r(8880),v=r(1100),_=r(3657),E=r(1312),x=r(1544),C=r(8718),S=r(1194),A=r(5903),I=r(2056),k=r(7539),P=r(9038),O=r(2257),R=r(6902),M=r(5712),N=r(1042),T=r(3351),j=r(1657),L=r(5316),D=r(9042),$=r(6826),B=r(7606),U=r(32),F=r(2937),z=r(7908),W=r(799);e.exports={parse:a,valid:c,clean:l,inc:u,diff:h,major:d,minor:p,patch:f,prerelease:g,compare:m,rcompare:y,compareLoose:w,compareBuild:b,sort:v,rsort:_,gt:E,lt:x,eq:C,neq:S,gte:A,lte:I,cmp:k,coerce:P,Comparator:O,Range:R,satisfies:M,toComparators:N,maxSatisfying:T,minSatisfying:j,minVersion:L,validRange:D,outside:$,gtr:B,ltr:U,intersects:F,simplifyRange:z,subset:W,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},3295:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},4225:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},6742:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:er(t,e)}},2893:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},5765:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=r(3295),s=r(4225),a=(t=e.exports={}).re=[],c=t.safeRe=[],l=t.src=[],u=t.t={};let h=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",o],[d,i]],f=(e,t,r)=>{const n=(e=>{for(const[t,r]of p)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=h++;s(e,i,t),u[e]=i,l[i]=t,a[i]=new RegExp(t,r?"g":void 0),c[i]=new RegExp(n,r?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),f("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${d}+`),f("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),f("FULL",`^${l[u.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),f("LOOSE",`^${l[u.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),f("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),f("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),f("COERCERTL",l[u.COERCE],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},6062:(e,t,r)=>{"use strict";const n=r(4411),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),u=Symbol("noDisposeOnSet"),h=Symbol("lruList"),d=Symbol("cache"),p=Symbol("updateAgeOnGet"),f=()=>1,g=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(m(e,t)){if(w(e,n),!e[a])return}else r&&(e[p]&&(n.value.now=Date.now()),e[h].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},y=e=>{if(e[o]>e[i])for(let t=e[h].tail;e[o]>e[i]&&null!==t;){const r=t.prev;w(e,t),t=r}},w=(e,t)=>{if(t){const r=t.value;e[l]&&e[l](r.key,r.value),e[o]-=r.length,e[d].delete(r.key),e[h].removeNode(t)}};class b{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const v=(e,t,r,n)=>{let i=r.value;m(e,i)&&(w(e,r),e[a]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[l]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,y(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,y(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[o]=0,this[h].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),y(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let r=this[h].tail;null!==r;){const n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[h].head;null!==r;){const n=r.next;v(this,e,r,t),r=n}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){this[l]&&this[h]&&this[h].length&&this[h].forEach((e=>this[l](e.key,e.value))),this[d]=new Map,this[h]=new n,this[o]=0}dump(){return this[h].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[d].has(e)){if(a>this[i])return w(this,this[d].get(e)),!1;const s=this[d].get(e).value;return this[l]&&(this[u]||this[l](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),y(this),!0}const p=new b(e,t,a,n,r);return p.length>this[i]?(this[l]&&this[l](e,t),!1):(this[o]+=p.length,this[h].unshift(p),this[d].set(e,this[h].head),y(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[h].tail;return e?(w(this,e),e.value):null}del(e){w(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach(((e,t)=>g(this,t,!1)))}}},7606:(e,t,r)=>{const n=r(6826);e.exports=(e,t,r)=>n(e,t,">",r)},2937:(e,t,r)=>{const n=r(6902);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},32:(e,t,r)=>{const n=r(6826);e.exports=(e,t,r)=>n(e,t,"<",r)},3351:(e,t,r)=>{const n=r(6376),i=r(6902);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},1657:(e,t,r)=>{const n=r(6376),i=r(6902);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},5316:(e,t,r)=>{const n=r(6376),i=r(6902),o=r(1312);e.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!o(r,s)||(r=s)}return r&&e.test(r)?r:null}},6826:(e,t,r)=>{const n=r(6376),i=r(2257),{ANY:o}=i,s=r(6902),a=r(5712),c=r(1312),l=r(1544),u=r(2056),h=r(5903);e.exports=(e,t,r,d)=>{let p,f,g,m,y;switch(e=new n(e,d),t=new s(t,d),r){case">":p=c,f=u,g=l,m=">",y=">=";break;case"<":p=l,f=h,g=c,m="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d))return!1;for(let r=0;r{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,p(e.semver,s.semver,d)?s=e:g(e.semver,a.semver,d)&&(a=e)})),s.operator===m||s.operator===y)return!1;if((!a.operator||a.operator===m)&&f(e,a.semver))return!1;if(a.operator===y&&g(e,a.semver))return!1}return!0}},7908:(e,t,r)=>{const n=r(5712),i=r(6269);e.exports=(e,t,r)=>{const o=[];let s=null,a=null;const c=e.sort(((e,t)=>i(e,t,r)));for(const e of c)n(e,t,r)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const l=[];for(const[e,t]of o)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");const u=l.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return u.length{const n=r(6902),i=r(2257),{ANY:o}=i,s=r(5712),a=r(6269),c=[new i(">=0.0.0-0")],l=[new i(">=0.0.0")],u=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?c:l}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=l}const n=new Set;let i,u,p,f,g,m,y;for(const t of e)">"===t.operator||">="===t.operator?i=h(i,t,r):"<"===t.operator||"<="===t.operator?u=d(u,t,r):n.add(t.semver);if(n.size>1)return null;if(i&&u){if(p=a(i.semver,u.semver,r),p>0)return null;if(0===p&&(">="!==i.operator||"<="!==u.operator))return null}for(const e of n){if(i&&!s(e,String(i),r))return null;if(u&&!s(e,String(u),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let w=!(!u||r.includePrerelease||!u.semver.prerelease.length)&&u.semver,b=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;w&&1===w.prerelease.length&&"<"===u.operator&&0===w.prerelease[0]&&(w=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,i)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(f=h(i,e,r),f===e&&f!==i)return!1}else if(">="===i.operator&&!s(i.semver,String(e),r))return!1;if(u)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),"<"===e.operator||"<="===e.operator){if(g=d(u,e,r),g===e&&g!==u)return!1}else if("<="===u.operator&&!s(u.semver,String(e),r))return!1;if(!e.operator&&(u||i)&&0!==p)return!1}return!(i&&m&&!u&&0!==p||u&&y&&!i&&0!==p||b||w)},h=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(const n of e.set){for(const e of t.set){const t=u(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},1042:(e,t,r)=>{const n=r(6902);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9042:(e,t,r)=>{const n=r(6902);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},7771:(e,t,r)=>{"use strict";var n=r(210),i=r(2296),o=r(1044)(),s=r(7296),a=n("%TypeError%"),c=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,l=!0;if("length"in e&&s){var u=s(e,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(l=!1)}return(n||l||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},4189:(e,t,r)=>{var n=r(9509).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},9072:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(4448),n.sha1=r(8336),n.sha224=r(8432),n.sha256=r(7499),n.sha384=r(1686),n.sha512=r(7816)},4448:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function l(e){return e<<30|e>>>2}function u(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var d=0;d<80;++d){var p=~~(d/20),f=0|((t=n)<<5|t>>>27)+u(p,i,o,a)+c+r[d]+s[p];c=a,a=o,o=l(i),i=n,n=f}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},8336:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function c(){this.init(),this._w=a,i.call(this,64,56)}function l(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var p=0;p<80;++p){var f=~~(p/20),g=l(n)+h(f,i,o,a)+c+r[p]+s[f]|0;c=a,a=o,o=u(i),i=n,n=g}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},8432:(e,t,r)=>{var n=r(5717),i=r(7499),o=r(4189),s=r(9509).Buffer,a=new Array(64);function c(){this.init(),this._w=a,o.call(this,64,56)}n(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},7499:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[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],a=new Array(64);function c(){this.init(),this._w=a,i.call(this,64,56)}function l(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,c=0|this._e,f=0|this._f,g=0|this._g,m=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+p(r[y-15])+r[y-16];for(var w=0;w<64;++w){var b=m+d(c)+l(c,f,g)+s[w]+r[w]|0,v=h(n)+u(n,i,o)|0;m=g,g=f,f=c,c=a+b|0,a=o,o=i,i=n,n=b+v|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=c+this._e|0,this._f=f+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},1686:(e,t,r)=>{var n=r(5717),i=r(7816),o=r(4189),s=r(9509).Buffer,a=new Array(160);function c(){this.init(),this._w=a,o.call(this,128,112)}n(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},7816:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function c(){this.init(),this._w=a,i.call(this,128,112)}function l(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0>>0?1:0}n(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,c=0|this._fh,w=0|this._gh,b=0|this._hh,v=0|this._al,_=0|this._bl,E=0|this._cl,x=0|this._dl,C=0|this._el,S=0|this._fl,A=0|this._gl,I=0|this._hl,k=0;k<32;k+=2)t[k]=e.readInt32BE(4*k),t[k+1]=e.readInt32BE(4*k+4);for(;k<160;k+=2){var P=t[k-30],O=t[k-30+1],R=p(P,O),M=f(O,P),N=g(P=t[k-4],O=t[k-4+1]),T=m(O,P),j=t[k-14],L=t[k-14+1],D=t[k-32],$=t[k-32+1],B=M+L|0,U=R+j+y(B,M)|0;U=(U=U+N+y(B=B+T|0,T)|0)+D+y(B=B+$|0,$)|0,t[k]=U,t[k+1]=B}for(var F=0;F<160;F+=2){U=t[F],B=t[F+1];var z=u(r,n,i),W=u(v,_,E),H=h(r,v),V=h(v,r),q=d(a,C),G=d(C,a),Z=s[F],K=s[F+1],Y=l(a,c,w),Q=l(C,S,A),J=I+G|0,X=b+q+y(J,I)|0;X=(X=(X=X+Y+y(J=J+Q|0,Q)|0)+Z+y(J=J+K|0,K)|0)+U+y(J=J+B|0,B)|0;var ee=V+W|0,te=H+z+y(ee,V)|0;b=w,I=A,w=c,A=S,c=a,S=C,a=o+X+y(C=x+J|0,x)|0,o=i,x=E,i=n,E=_,n=r,_=v,r=X+te+y(v=J+ee|0,J)|0}this._al=this._al+v|0,this._bl=this._bl+_|0,this._cl=this._cl+E|0,this._dl=this._dl+x|0,this._el=this._el+C|0,this._fl=this._fl+S|0,this._gl=this._gl+A|0,this._hl=this._hl+I|0,this._ah=this._ah+r+y(this._al,v)|0,this._bh=this._bh+n+y(this._bl,_)|0,this._ch=this._ch+i+y(this._cl,E)|0,this._dh=this._dh+o+y(this._dl,x)|0,this._eh=this._eh+a+y(this._el,C)|0,this._fh=this._fh+c+y(this._fl,S)|0,this._gh=this._gh+w+y(this._gl,A)|0,this._hh=this._hh+b+y(this._hl,I)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},7478:(e,t,r)=>{"use strict";var n=r(210),i=r(1924),o=r(631),s=n("%TypeError%"),a=n("%WeakMap%",!0),c=n("%Map%",!0),l=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),p=i("Map.prototype.set",!0),f=i("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new s("Side channel does not contain "+o(e))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return l(e,n)}else if(c){if(t)return d(t,n)}else if(r)return function(e,t){var r=g(e,t);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return h(e,n)}else if(c){if(t)return f(t,n)}else if(r)return function(e,t){return!!g(e,t)}(r,n);return!1},set:function(n,i){a&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new a),u(e,n,i)):c?(t||(t=new c),p(t,n,i)):(r||(r={key:{},next:null}),function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,i))}};return n}},500:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},610:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},655:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>v,__asyncGenerator:()=>b,__asyncValues:()=>_,__await:()=>w,__awaiter:()=>u,__classPrivateFieldGet:()=>S,__classPrivateFieldSet:()=>A,__createBinding:()=>d,__decorate:()=>a,__exportStar:()=>p,__extends:()=>i,__generator:()=>h,__importDefault:()=>C,__importStar:()=>x,__makeTemplateObject:()=>E,__metadata:()=>l,__param:()=>c,__read:()=>g,__rest:()=>s,__spread:()=>m,__spreadArrays:()=>y,__values:()=>f});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function h(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function m(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof w?Promise.resolve(r.value.v).then(c,l):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function v(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:w(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function S(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},5869:(e,t,r)=>{"use strict";function n(e,t){return t=t||{},new Promise((function(r,n){var i=new XMLHttpRequest,o=[],s=[],a={},c=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var l in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,r){o.push(t=t.toLowerCase()),s.push([t,r]),a[t]=a[t]?a[t]+","+r:r})),r(c())},i.onerror=n,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(l,t.headers[l]);i.send(t.body||null)}))}r.r(t),r.d(t,{default:()=>n})},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},7026:e=>{"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},7529:e=>{e.exports=function(){for(var e={},r=0;r{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4411:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n{},6601:()=>{},4654:()=>{},2361:()=>{},4616:()=>{},6559:(e,t,r)=>{"use strict";const n=r(5346);e.exports=s;const i=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},o={mapHttpRequest:d,mapHttpResponse:d,wrapRequestSerializer:p,wrapResponseSerializer:p,wrapErrorSerializer:p,req:d,res:d,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}};function s(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,n);let d=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(d=!1),"function"==typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===e.enabled&&(e.level="silent");const p=e.level||"info",g=Object.create(r);g.log||(g.log=f),Object.defineProperty(g,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(g,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,a(m,g,"error","log"),a(m,g,"fatal","error"),a(m,g,"warn","error"),a(m,g,"info","log"),a(m,g,"debug","log"),a(m,g,"trace","log")}});const m={transmit:t,serialize:o,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:h(e)};return g.levels=s.levels,g.level=p,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=f,g.serializers=n,g._serialize=o,g._stdErrSerialize=d,g.child=function(r,i){if(!r)throw new Error("missing bindings for child Pino");i=i||{},o&&r.serializers&&(i.serializers=r.serializers);const s=i.serializers;if(o&&s){var a=Object.assign({},n,s),h=!0===e.browser.serialize?Object.keys(a):o;delete r.serializers,c([r],h,a,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.error=l(e,r,"error"),this.fatal=l(e,r,"fatal"),this.warn=l(e,r,"warn"),this.info=l(e,r,"info"),this.debug=l(e,r,"debug"),this.trace=l(e,r,"trace"),a&&(this.serializers=a,this._serialize=h),t&&(this._logEvent=u([].concat(e._logEvent.bindings,r)))}return d.prototype=this,new d(this)},t&&(g._logEvent=u()),g}function a(e,t,r,o){const a=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?f:a[r]?a[r]:i[r]||i[o]||f,function(e,t,r){var o;(e.transmit||t[r]!==f)&&(t[r]=(o=t[r],function(){const a=e.timestamp(),l=new Array(arguments.length),h=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var d=0;d-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function l(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var i=1;i{"use strict";r.r(t),r.d(t,{Struct:()=>u,StructError:()=>n,any:()=>S,array:()=>A,assert:()=>h,assign:()=>m,bigint:()=>I,boolean:()=>k,coerce:()=>Y,create:()=>d,date:()=>P,defaulted:()=>Q,define:()=>y,deprecated:()=>w,dynamic:()=>b,empty:()=>X,enums:()=>O,func:()=>R,instance:()=>M,integer:()=>N,intersection:()=>T,is:()=>f,lazy:()=>v,literal:()=>j,map:()=>L,mask:()=>p,max:()=>te,min:()=>re,never:()=>D,nonempty:()=>ne,nullable:()=>$,number:()=>B,object:()=>U,omit:()=>_,optional:()=>F,partial:()=>E,pattern:()=>ie,pick:()=>x,record:()=>z,refine:()=>se,regexp:()=>W,set:()=>H,size:()=>oe,string:()=>V,struct:()=>C,trimmed:()=>J,tuple:()=>q,type:()=>G,union:()=>Z,unknown:()=>K,validate:()=>g});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...o}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function i(e){return"object"==typeof e&&null!=e}function o(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:c,message:l=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:c,key:i[i.length-1],path:i,branch:o,...e,message:l}}function*c(e,t,r,n){var o;i(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const i of e){const e=a(i,t,r,n);e&&(yield e)}}function*l(e,t,r={}){const{path:n=[],branch:o=[e],coerce:s=!1,mask:a=!1}=r,c={path:n,branch:o};if(s&&(e=t.coercer(e,c),a&&"type"!==t.type&&i(t.schema)&&i(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let u="valid";for(const n of t.validator(e,c))n.explanation=r.message,u="not_valid",yield[n,void 0];for(let[h,d,p]of t.entries(e,c)){const t=l(d,p,{path:void 0===h?n:[...n,h],branch:void 0===h?o:[...o,d],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(u=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):s&&(d=r[1],void 0===h?e=d:e instanceof Map?e.set(h,d):e instanceof Set?e.add(d):i(e)&&(void 0!==d||h in e)&&(e[h]=d))}if("not_valid"!==u)for(const n of t.refiner(e,c))n.explanation=r.message,u="not_refined",yield[n,void 0];"valid"===u&&(yield[void 0,e])}class u{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:o=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(e,t)=>c(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>c(i(e,t),t,this,e):()=>[]}assert(e,t){return h(e,this,t)}create(e,t){return d(e,this,t)}is(e){return f(e,this)}mask(e,t){return p(e,this,t)}validate(e,t={}){return g(e,this,t)}}function h(e,t,r){const n=g(e,t,{message:r});if(n[0])throw n[0]}function d(e,t,r){const n=g(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function p(e,t,r){const n=g(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function f(e,t){return!g(e,t)[0]}function g(e,t,r={}){const i=l(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(i);return o[0]?[new n(o[0],(function*(){for(const e of i)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function m(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?G(n):U(n)}function y(e,t){return new u({type:e,schema:null,validator:t})}function w(e,t){return new u({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function b(e){return new u({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})}function v(e){let t;return new u({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function _(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?G(n):U(n)}function E(e){const t=e instanceof u?{...e.schema}:{...e};for(const e in t)t[e]=F(t[e]);return U(t)}function x(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return U(n)}function C(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),y(e,t)}function S(){return y("any",(()=>!0))}function A(e){return new u({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function I(){return y("bigint",(e=>"bigint"==typeof e))}function k(){return y("boolean",(e=>"boolean"==typeof e))}function P(){return y("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function O(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new u({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})}function R(){return y("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))}function M(e){return y("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function N(){return y("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function T(e){return new u({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function j(e){const t=s(e),r=typeof e;return new u({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function L(e,t){return new u({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,e],yield[n,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})}function D(){return y("never",(()=>!1))}function $(e){return new u({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function B(){return y("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function U(e){const t=e?Object.keys(e):[],r=D();return new u({type:"object",schema:e||null,*entries(n){if(e&&i(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>i(e)?{...e}:e})}function F(e){return new u({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function z(e,t){return new u({type:"record",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`})}function W(){return y("regexp",(e=>e instanceof RegExp))}function H(e){return new u({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})}function V(){return y("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function q(e){const t=D();return new u({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;iArray.isArray(e)||`Expected an array, but received: ${s(e)}`})}function G(e){const t=Object.keys(e);return new u({type:"type",schema:e,*entries(r){if(i(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>i(e)?{...e}:e})}function Z(e){const t=e.map((e=>e.type)).join(" | ");return new u({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=l(r,t,n),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})}function K(){return y("unknown",(()=>!0))}function Y(e,t,r){return new u({...e,coercer:(n,i)=>f(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}function Q(e,t,r={}){return Y(e,K(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&o(e)&&o(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function J(e){return Y(e,V(),(e=>e.trim()))}function X(e){return se(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return se(e,"max",(r=>n?rn?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function ie(e,t){return se(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function oe(e,t,r=t){const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return se(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:o}=e;return t<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}{const{length:o}=e;return t<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}}))}function se(e,t,r){return new u({...e,*refiner(n,i){yield*e.refiner(n,i);const o=c(r(n,i),i,e,n);for(const e of o)yield{...e,refinement:t}}})}},672:(e,t,r)=>{"use strict";r.d(t,{AV:()=>o,ConfigCtrl:()=>p,ExplorerCtrl:()=>j,OptionsCtrl:()=>h,ThemeCtrl:()=>H,ToastCtrl:()=>q,jb:()=>D,uA:()=>l,zv:()=>s});var n=r(6828);const i=(0,n.sj)({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),o={state:i,subscribe:e=>(0,n.Ld)(i,(()=>e(i))),push(e,t){e!==i.view&&(i.view=e,t&&(i.data=t),i.history.push(e))},reset(e){i.view=e,i.history=[e]},replace(e){i.history.length>1&&(i.history[i.history.length-1]=e,i.view=e)},goBack(){if(i.history.length>1){i.history.pop();const[e]=i.history.slice(-1);i.view=e}},setData(e){i.data=e}},s={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>s.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return s.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,r){if(s.isHttpUrl(e))return this.formatUniversalUrl(e,t,r);let n=e;return n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,r){if(!s.isHttpUrl(e))return this.formatNativeUrl(e,t,r);let n=e;return n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(s.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(s.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(s.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(s.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=o.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},a=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),c=(0,n.sj)({enabled:a,userSessionId:"",events:[],connectedWalletId:void 0}),l={state:c,subscribe:e=>(0,n.Ld)(c.events,(()=>e((0,n.CO)(c.events[c.events.length-1])))),initialize(){c.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(c.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){c.connectedWalletId=e},click(e){if(c.enabled){const t={type:"CLICK",name:e.name,userSessionId:c.userSessionId,timestamp:Date.now(),data:e};c.events.push(t)}},track(e){if(c.enabled){const t={type:"TRACK",name:e.name,userSessionId:c.userSessionId,timestamp:Date.now(),data:e};c.events.push(t)}},view(e){if(c.enabled){const t={type:"VIEW",name:e.name,userSessionId:c.userSessionId,timestamp:Date.now(),data:e};c.events.push(t)}}},u=(0,n.sj)({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),h={state:u,subscribe:e=>(0,n.Ld)(u,(()=>e(u))),setChains(e){u.chains=e},setWalletConnectUri(e){u.walletConnectUri=e},setIsCustomDesktop(e){u.isCustomDesktop=e},setIsCustomMobile(e){u.isCustomMobile=e},setIsDataLoaded(e){u.isDataLoaded=e},setIsUiLoaded(e){u.isUiLoaded=e},setIsAuth(e){u.isAuth=e}},d=(0,n.sj)({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),p={state:d,subscribe:e=>(0,n.Ld)(d,(()=>e(d))),setConfig(e){var t,r;l.initialize(),h.setChains(e.chains),h.setIsAuth(Boolean(e.enableAuthMode)),h.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),h.setIsCustomDesktop(Boolean(null==(r=e.desktopWallets)?void 0:r.length)),s.setModalVersionInStorage(),Object.assign(d,e)}};var f=Object.defineProperty,g=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,w=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const b="https://explorer-api.walletconnect.com",v="wcm",_="js-2.6.2";async function E(e,t){const r=((e,t)=>{for(var r in t||(t={}))m.call(t,r)&&w(e,r,t[r]);if(g)for(var r of g(t))y.call(t,r)&&w(e,r,t[r]);return e})({sdkType:v,sdkVersion:_},t),n=new URL(e,b);return n.searchParams.append("projectId",p.state.projectId),Object.entries(r).forEach((([e,t])=>{t&&n.searchParams.append(e,String(t))})),(await fetch(n)).json()}const x=async e=>E("/w3m/v1/getDesktopListings",e),C=async e=>E("/w3m/v1/getMobileListings",e),S=async e=>E("/w3m/v1/getAllListings",e),A=e=>`${b}/w3m/v1/getWalletImage/${e}?projectId=${p.state.projectId}&sdkType=${v}&sdkVersion=${_}`,I=e=>`${b}/w3m/v1/getAssetImage/${e}?projectId=${p.state.projectId}&sdkType=${v}&sdkVersion=${_}`;var k=Object.defineProperty,P=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,M=(e,t,r)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const N=s.isMobile(),T=(0,n.sj)({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),j={state:T,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=p.state;if("NONE"===e||"ALL"===t&&!e)return T.recomendedWallets;if(s.isArray(e)){const t={recommendedIds:e.join(",")},{listings:r}=await S(t),n=Object.values(r);n.sort(((t,r)=>e.indexOf(t.id)-e.indexOf(r.id))),T.recomendedWallets=n}else{const{chains:e,isAuth:r}=h.state,n=e?.join(","),i=s.isArray(t),o={page:1,sdks:r?"auth_v1":void 0,entries:s.RECOMMENDED_WALLET_AMOUNT,chains:n,version:2,excludedIds:i?t.join(","):void 0},{listings:a}=N?await C(o):await x(o);T.recomendedWallets=Object.values(a)}return T.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var r in t||(t={}))O.call(t,r)&&M(e,r,t[r]);if(P)for(var r of P(t))R.call(t,r)&&M(e,r,t[r]);return e})({},e),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:n}=p.state,{recomendedWallets:i}=T;if("ALL"===n)return T.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):s.isArray(r)&&(t.excludedIds=r.join(",")),s.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),h.state.isAuth&&(t.sdks="auth_v1");const{page:o,search:a}=e,{listings:c,total:l}=N?await C(t):await x(t),u=Object.values(c),d=a?"search":"wallets";return T[d]={listings:[...T[d].listings,...u],total:l,page:o??1},{listings:u,total:l}},getWalletImageUrl:e=>A(e),getAssetImageUrl:e=>I(e),resetSearch(){T.search={listings:[],total:0,page:1}}},L=(0,n.sj)({open:!1}),D={state:L,subscribe:e=>(0,n.Ld)(L,(()=>e(L))),open:async e=>new Promise((t=>{const{isUiLoaded:r,isDataLoaded:n}=h.state;if(s.removeWalletConnectDeepLink(),h.setWalletConnectUri(e?.uri),h.setChains(e?.chains),o.reset("ConnectWallet"),r&&n)L.open=!0,t();else{const e=setInterval((()=>{const r=h.state;r.isUiLoaded&&r.isDataLoaded&&(clearInterval(e),L.open=!0,t())}),200)}})),close(){L.open=!1}};var $=Object.defineProperty,B=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,z=(e,t,r)=>t in e?$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const W=(0,n.sj)({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),H={state:W,subscribe:e=>(0,n.Ld)(W,(()=>e(W))),setThemeConfig(e){const{themeMode:t,themeVariables:r}=e;t&&(W.themeMode=t),r&&(W.themeVariables=((e,t)=>{for(var r in t||(t={}))U.call(t,r)&&z(e,r,t[r]);if(B)for(var r of B(t))F.call(t,r)&&z(e,r,t[r]);return e})({},r))}},V=(0,n.sj)({open:!1,message:"",variant:"success"}),q={state:V,subscribe:e=>(0,n.Ld)(V,(()=>e(V))),openToast(e,t){V.open=!0,V.message=e,V.variant=t},closeToast(){V.open=!1}}},8870:(e,t,r)=>{"use strict";r.r(t),r.d(t,{WcmModal:()=>mn,WcmQrCode:()=>Er});const n=window,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&s.set(t,e))}return e}toString(){return this.cssText}}const c=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new a(r,e,o)},l=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new a("string"==typeof e?e:e+"",void 0,o))(t)})(e):e;var u;const h=window,d=h.trustedTypes,p=d?d.emptyScript:"",f=h.reactiveElementPolyfillSupport,g={toAttribute(e,t){switch(t){case Boolean:e=e?p:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},m=(e,t)=>t!==e&&(t==t||e==e),y={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:m},w="finalized";class b extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,r)=>{const n=this._$Ep(r,t);void 0!==n&&(this._$Ev.set(n,r),e.push(n))})),e}static createProperty(e,t=y){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r="symbol"==typeof e?Symbol():"__"+e,n=this.getPropertyDescriptor(e,r,t);void 0!==n&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||y}static finalize(){if(this.hasOwnProperty(w))return!1;this[w]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of t)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(l(e))}else void 0!==e&&t.push(l(e));return t}static _$Ep(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,r;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(r=e.hostConnected)||void 0===r||r.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{i?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const r=document.createElement("style"),i=n.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=t.cssText,e.appendChild(r)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=y){var n;const i=this.constructor._$Ep(e,r);if(void 0!==i&&!0===r.reflect){const o=(void 0!==(null===(n=r.converter)||void 0===n?void 0:n.toAttribute)?r.converter:g).toAttribute(t,r.type);this._$El=e,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var r;const n=this.constructor,i=n._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=n.getPropertyOptions(i),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(r=e.converter)||void 0===r?void 0:r.fromAttribute)?e.converter:g;this._$El=i,this[i]=o.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,r){let n=!0;void 0!==e&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||m)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(r)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}var v;b[w]=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:b}),(null!==(u=h.reactiveElementVersions)&&void 0!==u?u:h.reactiveElementVersions=[]).push("1.6.3");const _=window,E=_.trustedTypes,x=E?E.createPolicy("lit-html",{createHTML:e=>e}):void 0,C="$lit$",S=`lit$${(Math.random()+"").slice(9)}$`,A="?"+S,I=`<${A}>`,k=document,P=()=>k.createComment(""),O=e=>null===e||"object"!=typeof e&&"function"!=typeof e,R=Array.isArray,M="[ \t\n\f\r]",N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,j=/>/g,L=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,$=/"/g,B=/^(?:script|style|textarea|title)$/i,U=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),F=U(1),z=U(2),W=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),V=new WeakMap,q=k.createTreeWalker(k,129,null,!1);function G(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==x?x.createHTML(t):t}const Z=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"":"",s=N;for(let t=0;t"===c[0]?(s=null!=i?i:N,l=-1):void 0===c[1]?l=-2:(l=s.lastIndex-c[2].length,a=c[1],s=void 0===c[3]?L:'"'===c[3]?$:D):s===$||s===D?s=L:s===T||s===j?s=N:(s=L,i=void 0);const h=s===L&&e[t+1].startsWith("/>")?" ":"";o+=s===N?r+I:l>=0?(n.push(a),r.slice(0,l)+C+r.slice(l)+S+h):r+S+(-2===l?(n.push(void 0),t):h)}return[G(e,o+(e[r]||"")+(2===t?"":"")),n]};class K{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const s=e.length-1,a=this.parts,[c,l]=Z(e,t);if(this.el=K.createElement(c,r),q.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=q.nextNode())&&a.length0){n.textContent=E?E.emptyScript:"";for(let r=0;rR(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==H&&O(this._$AH)?this._$AA.nextSibling.data=e:this.$(k.createTextNode(e)),this._$AH=e}g(e){var t;const{values:r,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=K.createElement(G(n.h,n.h[0]),this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===i)this._$AH.v(r);else{const e=new Q(i,this),t=e.u(this.options);e.v(r),this.$(t),this._$AH=e}}_$AC(e){let t=V.get(e.strings);return void 0===t&&V.set(e.strings,t=new K(e)),t}T(e){R(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new J(this.k(P()),this.k(P()),this,this.options)):r=t[n],r._$AI(i),n++;n2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=Y(this,e,t,0),o=!O(e)||e!==this._$AH&&e!==W,o&&(this._$AH=e);else{const n=e;let s,a;for(e=i[0],s=0;s{var n,i;const o=null!==(n=null==r?void 0:r.renderBefore)&&void 0!==n?n:t;let s=o._$litPart$;if(void 0===s){const e=null!==(i=null==r?void 0:r.renderBefore)&&void 0!==i?i:null;o._$litPart$=s=new J(t.insertBefore(P(),e),e,void 0,null!=r?r:{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return W}}ce.finalized=!0,ce._$litElement$=!0,null===(se=globalThis.litElementHydrateSupport)||void 0===se||se.call(globalThis,{LitElement:ce});const le=globalThis.litElementPolyfillSupport;null==le||le({LitElement:ce}),(null!==(ae=globalThis.litElementVersions)&&void 0!==ae?ae:globalThis.litElementVersions=[]).push("3.3.3");const ue=e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(t){customElements.define(e,t)}}})(e,t),he=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(r){r.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}},de=(e,t,r)=>{t.constructor.createProperty(r,e)};function pe(e){return(t,r)=>void 0!==r?de(e,t,r):he(e,t)}function fe(e){return pe({...e,state:!0})}var ge;null===(ge=window.HTMLSlotElement)||void 0===ge||ge.prototype.assignedElements;class me{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const ye=(we=class extends me{constructor(e){var t;if(super(e),1!==e.type||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var r,n;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(e))&&this.it.add(e);return this.render(t)}const i=e.element.classList;this.it.forEach((e=>{e in t||(i.remove(e),this.it.delete(e))}));for(const e in t){const r=!!t[e];r===this.it.has(e)||(null===(n=this.nt)||void 0===n?void 0:n.has(e))||(r?(i.add(e),this.it.add(e)):(i.remove(e),this.it.delete(e)))}return W}},(...e)=>({_$litDirective$:we,values:e}));var we,be=r(672);const ve={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},_e=e=>1e3*e,Ee=e=>e/1e3,xe=()=>{},Ce=e=>e;function Se(e,t=!0){if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch(e){}}const Ae=e=>e(),Ie=(e,t,r=ve.duration)=>new Proxy({animations:e.map(Ae).filter(Boolean),duration:r,options:t},ke),ke={get:(e,t)=>{const r=e.animations[0];switch(t){case"duration":return e.duration;case"currentTime":return Ee((null==r?void 0:r[t])||0);case"playbackRate":case"playState":return null==r?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(Pe)).catch(xe)),e.finished;case"stop":return()=>{e.animations.forEach((e=>Se(e)))};case"forEachNative":return t=>{e.animations.forEach((r=>t(r,e)))};default:return void 0===(null==r?void 0:r[t])?void 0:()=>e.animations.forEach((e=>e[t]()))}},set:(e,t,r)=>{switch(t){case"currentTime":r=_e(r);case"playbackRate":for(let n=0;ne.finished,Oe=e=>"object"==typeof e&&Boolean(e.createAnimation),Re=e=>"number"==typeof e,Me=e=>Array.isArray(e)&&!Re(e[0]),Ne=(e,t,r)=>-r*e+r*t+e,Te=(e,t,r)=>t-e==0?1:(r-e)/(t-e);function je(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=Te(0,t,n);e.push(Ne(r,1,i))}}const Le=(e,t,r)=>Math.min(Math.max(r,e),t);const De=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,$e=1e-7,Be=12;function Ue(e,t,r,n){if(e===t&&r===n)return Ce;return i=>0===i||1===i?i:De(function(e,t,r,n,i){let o,s,a=0;do{s=t+(r-t)/2,o=De(s,n,i)-e,o>0?r=s:t=s}while(Math.abs(o)>$e&&++a"function"==typeof e,ze=e=>Array.isArray(e)&&Re(e[0]),We={ease:Ue(.25,.1,.25,1),"ease-in":Ue(.42,0,1,1),"ease-in-out":Ue(.42,0,.58,1),"ease-out":Ue(0,0,.58,1)},He=/\((.*?)\)/;function Ve(e){if(Fe(e))return e;if(ze(e))return Ue(...e);if(We[e])return We[e];if(e.startsWith("steps")){const t=He.exec(e);if(t){const e=t[1].split(",");return((e,t="end")=>r=>{const n=(r="end"===t?Math.min(r,.999):Math.max(r,.001))*e,i="end"===t?Math.floor(n):Math.ceil(n);return Le(0,1,i/e)})(parseFloat(e[0]),e[1].trim())}}return Ce}class qe{constructor(e,t=[0,1],{easing:r,duration:n=ve.duration,delay:i=ve.delay,endDelay:o=ve.endDelay,repeat:s=ve.repeat,offset:a,direction:c="normal",autoplay:l=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=Ce,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),r=r||ve.easing,Oe(r)){const e=r.createAnimation(t);r=e.easing,t=e.keyframes||t,n=e.duration||n}this.repeat=s,this.easing=Me(r)?Ce:Ve(r),this.updateDuration(n);const u=function(e,t=function(e){const t=[0];return je(t,e-1),t}(e.length),r=Ce){const n=e.length,i=n-t.length;return i>0&&je(t,i),i=>{let o=0;for(;o{const n=t-e;return((r-e)%n+n)%n+e})(0,e.length,t)]:e}(r,o);return s=a(s),Ne(e[o],e[o+1],s)}}(t,a,Me(r)?r.map(Ve):Ce);this.tick=t=>{var r;let n=0;n=void 0!==this.pauseTime?this.pauseTime:(t-this.startTime)*this.rate,this.t=n,n/=1e3,n=Math.max(n-i,0),"finished"===this.playState&&void 0===this.pauseTime&&(n=this.totalDuration);const s=n/this.duration;let a=Math.floor(s),l=s%1;!l&&s>=1&&(l=1),1===l&&a--;const h=a%2;("reverse"===c||"alternate"===c&&h||"alternate-reverse"===c&&!h)&&(l=1-l);const d=n>=this.totalDuration?1:Math.min(l,1),p=u(this.easing(d));e(p),void 0===this.pauseTime&&("finished"===this.playState||n>=this.totalDuration+o)?(this.playState="finished",null===(r=this.resolve)||void 0===r||r.call(this,p)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},l&&this.play()}play(){const e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class Ge{setAnimation(e){this.animation=e,null==e||e.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const Ze=new WeakMap;function Ke(e){return Ze.has(e)||Ze.set(e,{transforms:[],values:new Map}),Ze.get(e)}const Ye=["","X","Y","Z"],Qe={x:"translateX",y:"translateY",z:"translateZ"},Je={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},Xe={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Je,scale:{syntax:"",initialValue:1,toDefaultUnit:Ce},skew:Je},et=new Map,tt=e=>`--motion-${e}`,rt=["x","y","z"];["translate","scale","rotate","skew"].forEach((e=>{Ye.forEach((t=>{rt.push(e+t),et.set(tt(e+t),Xe[e])}))}));const nt=(e,t)=>rt.indexOf(e)-rt.indexOf(t),it=new Set(rt),ot=e=>it.has(e),st=e=>e.sort(nt).reduce(at,"").trim(),at=(e,t)=>`${e} ${t}(var(${tt(t)}))`,ct=e=>e.startsWith("--"),lt=new Set,ut=(e,t)=>document.createElement("div").animate(e,t),ht={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{ut({opacity:[1]})}catch(e){return!1}return!0},finished:()=>Boolean(ut({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{ut({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}},dt={},pt={};for(const e in ht)pt[e]=()=>(void 0===dt[e]&&(dt[e]=ht[e]()),dt[e]);const ft=(e,t)=>Fe(e)?pt.linearEasing()?`linear(${((e,t)=>{let r="";const n=Math.round(t/.015);for(let t=0;t`cubic-bezier(${e}, ${t}, ${r}, ${n})`;function mt(e){return Qe[e]&&(e=Qe[e]),ot(e)?tt(e):e}const yt=(e,t)=>{t=mt(t);let r=ct(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&0!==r){const e=et.get(t);e&&(r=e.initialValue)}return r},wt=(e,t,r)=>{t=mt(t),ct(t)?e.style.setProperty(t,r):e.style[t]=r};function bt(e,t,r,n={},i){const o=window.__MOTION_DEV_TOOLS_RECORD,s=!1!==n.record&&o;let a,{duration:c=ve.duration,delay:l=ve.delay,endDelay:u=ve.endDelay,repeat:h=ve.repeat,easing:d=ve.easing,persist:p=!1,direction:f,offset:g,allowWebkitAcceleration:m=!1,autoplay:y=!0}=n;const w=Ke(e),b=ot(t);let v=pt.waapi();b&&((e,t)=>{Qe[t]&&(t=Qe[t]);const{transforms:r}=Ke(e);var n,i;i=t,-1===(n=r).indexOf(i)&&n.push(i),e.style.transform=st(r)})(e,t);const _=mt(t),E=function(e,t){return e.has(t)||e.set(t,new Ge),e.get(t)}(w.values,_),x=et.get(_);return Se(E.animation,!(Oe(d)&&E.generator)&&!1!==n.record),()=>{const w=()=>{var t,r;return null!==(r=null!==(t=yt(e,_))&&void 0!==t?t:null==x?void 0:x.initialValue)&&void 0!==r?r:0};let C=function(e,t){for(let r=0;rArray.isArray(e)?e:[e])(r),w);const S=function(e,t){var r;let n=(null==t?void 0:t.toDefaultUnit)||Ce;const i=e[e.length-1];if("string"==typeof i){const e=(null===(r=i.match(/(-?[\d.]+)([a-z%]*)/))||void 0===r?void 0:r[2])||"";e&&(n=t=>t+e)}return n}(C,x);if(Oe(d)){const e=d.createAnimation(C,"opacity"!==t,w,_,E);d=e.easing,C=e.keyframes||C,c=e.duration||c}if(ct(_)&&(pt.cssRegisterProperty()?function(e){if(!lt.has(e)){lt.add(e);try{const{syntax:t,initialValue:r}=et.has(e)?et.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch(e){}}}(_):v=!1),b&&!pt.linearEasing()&&(Fe(d)||Me(d)&&d.some(Fe))&&(v=!1),v){x&&(C=C.map((e=>Re(e)?x.toDefaultUnit(e):e))),1!==C.length||pt.partialKeyframes()&&!s||C.unshift(w());const t={delay:_e(l),duration:_e(c),endDelay:_e(u),easing:Me(d)?void 0:ft(d,c),direction:f,iterations:h+1,fill:"both"};a=e.animate({[_]:C,offset:g,easing:Me(d)?d.map((e=>ft(e,c))):void 0},t),a.finished||(a.finished=new Promise(((e,t)=>{a.onfinish=e,a.oncancel=t})));const r=C[C.length-1];a.finished.then((()=>{p||(wt(e,_,r),a.cancel())})).catch(xe),m||(a.playbackRate=1.000001)}else if(i&&b)C=C.map((e=>"string"==typeof e?parseFloat(e):e)),1===C.length&&C.unshift(parseFloat(w())),a=new i((t=>{wt(e,_,S?S(t):t)}),C,Object.assign(Object.assign({},n),{duration:c,easing:d}));else{const t=C[C.length-1];wt(e,_,x&&Re(t)?x.toDefaultUnit(t):t)}return s&&o(e,t,C,{duration:c,delay:l,easing:d,repeat:h,offset:g},"motion-one"),E.setAnimation(a),a&&!y&&a.pause(),a}}const vt=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function _t(e,t,r){return Fe(e)?e(t,r):e}const Et=(xt=qe,function(e,t,r={}){const n=(e=function(e,t){return"string"==typeof e?e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}(e)).length;Boolean(n),Boolean(t);const i=[];for(let o=0;o{const r=new qe(e,[0,1],t);return r.finished.catch((()=>{})),r}],t,t.duration)}function St(e,t,r){return(Fe(e)?Ct:Et)(e,t,r)}const At=e=>null!=e?e:H;var It=r(2592),kt=Object.defineProperty,Pt=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Mt=(e,t,r)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nt=(e,t)=>{for(var r in t||(t={}))Ot.call(t,r)&&Mt(e,r,t[r]);if(Pt)for(var r of Pt(t))Rt.call(t,r)&&Mt(e,r,t[r]);return e};const Tt={getPreset:e=>({"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}[e]),setTheme(){const e=document.querySelector(":root"),{themeVariables:t}=be.ThemeCtrl.state;if(e){const r=Nt(Nt(Nt({},function(){var e;const t={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(e=be.ThemeCtrl.state.themeMode)?e:"dark"];return{"--wcm-color-fg-1":t.foreground[1],"--wcm-color-fg-2":t.foreground[2],"--wcm-color-fg-3":t.foreground[3],"--wcm-color-bg-1":t.background[1],"--wcm-color-bg-2":t.background[2],"--wcm-color-bg-3":t.background[3],"--wcm-color-overlay":t.overlay}}()),{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}),t);Object.entries(r).forEach((([t,r])=>e.style.setProperty(t,r)))}},globalCss:c`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},jt=c`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var Lt=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,$t=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Dt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Lt(t,r,o),o};let Bt=class extends ce{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const e={"wcm-icon-left":void 0!==this.iconLeft,"wcm-icon-right":void 0!==this.iconRight,"wcm-ghost":"ghost"===this.variant,"wcm-outline":"outline"===this.variant};let t="inverse";return"ghost"===this.variant&&(t="secondary"),"outline"===this.variant&&(t="accent"),F``}};Bt.styles=[Tt.globalCss,jt],$t([pe({type:Boolean})],Bt.prototype,"disabled",2),$t([pe()],Bt.prototype,"iconLeft",2),$t([pe()],Bt.prototype,"iconRight",2),$t([pe()],Bt.prototype,"onClick",2),$t([pe()],Bt.prototype,"variant",2),Bt=$t([ue("wcm-button")],Bt);const Ut=c`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var Ft=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,Wt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?zt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ft(t,r,o),o};let Ht=class extends ce{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const e={"wcm-secondary":"secondary"===this.variant};return F``}};Ht.styles=[Tt.globalCss,Ut],Wt([pe({type:Boolean})],Ht.prototype,"disabled",2),Wt([pe()],Ht.prototype,"variant",2),Ht=Wt([ue("wcm-button-big")],Ht);const Vt=c`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let qt=class extends ce{render(){return F`
`}};qt.styles=[Tt.globalCss,Vt],qt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-info-footer")],qt);const Gt={CROSS_ICON:z``,WALLET_CONNECT_LOGO:z``,WALLET_CONNECT_ICON:z``,WALLET_CONNECT_ICON_COLORED:z``,BACK_ICON:z``,COPY_ICON:z``,RETRY_ICON:z``,DESKTOP_ICON:z``,MOBILE_ICON:z``,ARROW_DOWN_ICON:z``,ARROW_UP_RIGHT_ICON:z``,ARROW_RIGHT_ICON:z``,QRCODE_ICON:z``,SCAN_ICON:z``,CHECKMARK_ICON:z``,SEARCH_ICON:z``,WALLET_PLACEHOLDER:z``,GLOBE_ICON:z``},Zt=c`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Kt=class extends ce{render(){return F`
${Gt.WALLET_CONNECT_LOGO}
`}};Kt.styles=[Tt.globalCss,Zt],Kt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-modal-backcard")],Kt);const Yt=c`main{padding:20px;padding-top:0;width:100%}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Qt=class extends ce{render(){return F`
`}};Qt.styles=[Tt.globalCss,Yt],Qt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-modal-content")],Qt);const Jt=c`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Xt=class extends ce{render(){return F`
`}};Xt.styles=[Tt.globalCss,Jt],Xt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-modal-footer")],Xt);const er=c`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var tr=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,nr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?rr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&tr(t,r,o),o};let ir=class extends ce{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return F``}actionBtnTemplate(){return F``}render(){const e={"wcm-border":this.border},t=be.AV.state.history.length>1,r=this.title?F`${this.title}`:F``;return F`
${t?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}
`}};ir.styles=[Tt.globalCss,er],nr([pe()],ir.prototype,"title",2),nr([pe()],ir.prototype,"onAction",2),nr([pe()],ir.prototype,"actionIcon",2),nr([pe({type:Boolean})],ir.prototype,"border",2),ir=nr([ue("wcm-modal-header")],ir);const or={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(e,t){const r=e.renderRoot.querySelector(t);if(!r)throw new Error(`${t} not found`);return r},getWalletIcon({id:e,image_id:t}){const{walletImages:r}=be.ConfigCtrl.state;return null!=r&&r[e]?r[e]:t?be.ExplorerCtrl.getWalletImageUrl(t):""},getWalletName:(e,t=!1)=>t&&e.length>8?`${e.substring(0,8)}..`:e,isMobileAnimation:()=>window.innerWidth<=or.MOBILE_BREAKPOINT,async preloadImage(e){const t=new Promise(((t,r)=>{const n=new Image;n.onload=t,n.onerror=r,n.crossOrigin="anonymous",n.src=e}));return Promise.race([t,be.zv.wait(3e3)])},getErrorMessage:e=>e instanceof Error?e.message:"Unknown Error",debounce(e,t=500){let r;return(...n)=>{r&&clearTimeout(r),r=setTimeout((function(){e(...n)}),t)}},handleMobileLinking(e){const{walletConnectUri:t}=be.OptionsCtrl.state,{mobile:r,name:n}=e,i=r?.native,o=r?.universal;or.setRecentWallet(e),t&&function(e){let t="";i?t=be.zv.formatUniversalUrl(i,e,n):o&&(t=be.zv.formatNativeUrl(o,e,n)),be.zv.openHref(t,"_self")}(t)},handleAndroidLinking(){const{walletConnectUri:e}=be.OptionsCtrl.state;e&&(be.zv.setWalletConnectAndroidDeepLink(e),be.zv.openHref(e,"_self"))},async handleUriCopy(){const{walletConnectUri:e}=be.OptionsCtrl.state;if(e)try{await navigator.clipboard.writeText(e),be.ToastCtrl.openToast("Link copied","success")}catch{be.ToastCtrl.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:e}=be.ConfigCtrl.state,t=Object.values(e??{});return Object.values(t)},truncate:(e,t=8)=>e.length<=t?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`,setRecentWallet(e){try{localStorage.setItem(or.WCM_RECENT_WALLET_DATA,JSON.stringify(e))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const e=localStorage.getItem(or.WCM_RECENT_WALLET_DATA);return e?JSON.parse(e):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes:(e,t)=>e.toUpperCase().includes(t.toUpperCase()),openWalletExplorerUrl(){be.zv.openHref(or.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:e,mobile:t}=be.zv.getWalletRouterData(),r=Boolean(e?.native),n=Boolean(e?.universal);return{isDesktop:r,isMobile:Boolean(t?.native)||Boolean(t?.universal),isWeb:n}},goToConnectingView(e){be.AV.setData({Wallet:e});const t=be.zv.isMobile(),{isDesktop:r,isWeb:n,isMobile:i}=or.getCachedRouterWalletPlatforms();t?i?be.AV.push("MobileConnecting"):n?be.AV.push("WebConnecting"):be.AV.push("InstallWallet"):r?be.AV.push("DesktopConnecting"):n?be.AV.push("WebConnecting"):i?be.AV.push("MobileQrcodeConnecting"):be.AV.push("InstallWallet")}},sr=c`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var ar=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,lr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?cr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ar(t,r,o),o};let ur=class extends ce{constructor(){super(),this.view=be.AV.state.view,this.prevView=be.AV.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=be.AV.subscribe((e=>{this.view!==e.view&&this.onChangeRoute()}))}firstUpdated(){this.resizeObserver=new ResizeObserver((([e])=>{const t=`${e.contentRect.height}px`;"0px"!==this.oldHeight&&St(this.routerEl,{height:[this.oldHeight,t]},{duration:.2}),this.oldHeight=t})),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,t;null==(e=this.unsubscribe)||e.call(this),null==(t=this.resizeObserver)||t.disconnect()}get routerEl(){return or.getShadowRootElement(this,".wcm-router")}get contentEl(){return or.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return F``;case"DesktopConnecting":return F``;case"MobileConnecting":return F``;case"WebConnecting":return F``;case"MobileQrcodeConnecting":return F``;case"WalletExplorer":return F``;case"Qrcode":return F``;case"InstallWallet":return F``;default:return F`
Not Found
`}}async onChangeRoute(){await St(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=be.AV.state.view,St(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return F`
${this.viewTemplate()}
`}};ur.styles=[Tt.globalCss,sr],lr([fe()],ur.prototype,"view",2),lr([fe()],ur.prototype,"prevView",2),ur=lr([ue("wcm-modal-router")],ur);const hr=c`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var dr=Object.defineProperty,pr=Object.getOwnPropertyDescriptor,fr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?pr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&dr(t,r,o),o};let gr=class extends ce{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=be.ToastCtrl.subscribe((e=>{e.open?(this.open=!0,this.timeout=setTimeout((()=>be.ToastCtrl.closeToast()),2200)):(this.open=!1,clearTimeout(this.timeout))}))}disconnectedCallback(){var e;null==(e=this.unsubscribe)||e.call(this),clearTimeout(this.timeout),be.ToastCtrl.closeToast()}render(){const{message:e,variant:t}=be.ToastCtrl.state,r={"wcm-success":"success"===t,"wcm-error":"error"===t};return this.open?F`
${"success"===t?Gt.CHECKMARK_ICON:null} ${"error"===t?Gt.CROSS_ICON:null}${e}
`:null}};function mr(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+.1}gr.styles=[Tt.globalCss,hr],fr([fe()],gr.prototype,"open",2),gr=fr([ue("wcm-modal-toast")],gr);const yr={generate(e,t,r){const n="#141414",i=[],o=function(e,t){const r=Array.prototype.slice.call(It.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),n=Math.sqrt(r.length);return r.reduce(((e,t,r)=>(r%n==0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e),s=t/o.length,a=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];a.forEach((({x:e,y:t})=>{const r=(o.length-7)*s*e,c=(o.length-7)*s*t;for(let e=0;e`)}}));const c=Math.floor((r+25)/s),l=o.length/2-c/2,u=o.length/2+c/2-1,h=[];o.forEach(((e,t)=>{e.forEach(((e,r)=>{if(o[t][r]&&!(t<7&&r<7||t>o.length-8&&r<7||t<7&&r>o.length-8)&&!(t>l&&tl&&r{d[e]?d[e].push(t):d[e]=[t]})),Object.entries(d).map((([e,t])=>{const r=t.filter((e=>t.every((t=>!mr(e,t,s)))));return[Number(e),r]})).forEach((([e,t])=>{t.forEach((t=>{i.push(z``)}))})),Object.entries(d).filter((([e,t])=>t.length>1)).map((([e,t])=>{const r=t.filter((e=>t.some((t=>mr(e,t,s)))));return[Number(e),r]})).map((([e,t])=>{t.sort(((e,t)=>et.some((t=>mr(e,t,s)))));t?t.push(e):r.push([e])}return[e,r.map((e=>[e[0],e[e.length-1]]))]})).forEach((([e,t])=>{t.forEach((([t,r])=>{i.push(z``)}))})),i}},wr=c`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var br=Object.defineProperty,vr=Object.getOwnPropertyDescriptor,_r=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?vr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&br(t,r,o),o};let Er=class extends ce{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const e="light"===be.ThemeCtrl.state.themeMode?this.size:this.size-36;return z`${yr.generate(this.uri,e,e/4)}`}render(){const e={"wcm-dark":"dark"===be.ThemeCtrl.state.themeMode};return F`
${this.walletId||this.imageUrl?F``:Gt.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`}};Er.styles=[Tt.globalCss,wr],_r([pe()],Er.prototype,"uri",2),_r([pe({type:Number})],Er.prototype,"size",2),_r([pe()],Er.prototype,"imageId",2),_r([pe()],Er.prototype,"walletId",2),_r([pe()],Er.prototype,"imageUrl",2),Er=_r([ue("wcm-qrcode")],Er);const xr=c`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var Cr=Object.defineProperty,Sr=Object.getOwnPropertyDescriptor,Ar=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Sr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Cr(t,r,o),o};let Ir=class extends ce{constructor(){super(...arguments),this.onChange=()=>null}render(){return F` ${Gt.SEARCH_ICON}`}};Ir.styles=[Tt.globalCss,xr],Ar([pe()],Ir.prototype,"onChange",2),Ir=Ar([ue("wcm-search-input")],Ir);const kr=c`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Pr=class extends ce{render(){return F``}};Pr.styles=[Tt.globalCss,kr],Pr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-spinner")],Pr);const Or=c`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Rr=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor,Nr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Mr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Rr(t,r,o),o};let Tr=class extends ce{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const e={"wcm-big-bold":"big-bold"===this.variant,"wcm-medium-regular":"medium-regular"===this.variant,"wcm-small-regular":"small-regular"===this.variant,"wcm-small-thin":"small-thin"===this.variant,"wcm-xsmall-regular":"xsmall-regular"===this.variant,"wcm-xsmall-bold":"xsmall-bold"===this.variant,"wcm-color-primary":"primary"===this.color,"wcm-color-secondary":"secondary"===this.color,"wcm-color-tertiary":"tertiary"===this.color,"wcm-color-inverse":"inverse"===this.color,"wcm-color-accnt":"accent"===this.color,"wcm-color-error":"error"===this.color};return F``}};Tr.styles=[Tt.globalCss,Or],Nr([pe()],Tr.prototype,"variant",2),Nr([pe()],Tr.prototype,"color",2),Tr=Nr([ue("wcm-text")],Tr);const jr=c`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var Lr=Object.defineProperty,Dr=Object.getOwnPropertyDescriptor,$r=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Dr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Lr(t,r,o),o};let Br=class extends ce{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?F`RECENT`:this.installed?F`INSTALLED`:null}handleClick(){be.uA.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var e;return F``}};Br.styles=[Tt.globalCss,jr],$r([pe()],Br.prototype,"onClick",2),$r([pe()],Br.prototype,"name",2),$r([pe()],Br.prototype,"walletId",2),$r([pe()],Br.prototype,"label",2),$r([pe()],Br.prototype,"imageId",2),$r([pe({type:Boolean})],Br.prototype,"installed",2),$r([pe({type:Boolean})],Br.prototype,"recent",2),Br=$r([ue("wcm-wallet-button")],Br);const Ur=c`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Fr=Object.defineProperty,zr=Object.getOwnPropertyDescriptor,Wr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?zr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Fr(t,r,o),o};let Hr=class extends ce{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var e;const t=null!=(e=this.imageUrl)&&e.length?this.imageUrl:or.getWalletIcon({id:this.walletId,image_id:this.imageId});return F`${t.length?F`
${this.id}
`:Gt.WALLET_PLACEHOLDER}`}};Hr.styles=[Tt.globalCss,Ur],Wr([pe()],Hr.prototype,"walletId",2),Wr([pe()],Hr.prototype,"imageId",2),Wr([pe()],Hr.prototype,"imageUrl",2),Hr=Wr([ue("wcm-wallet-image")],Hr);var Vr=Object.defineProperty,qr=Object.getOwnPropertyDescriptor,Gr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?qr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Vr(t,r,o),o};let Zr=class extends ce{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{null!=e&&e.length&&await Promise.all(e.map((async e=>or.preloadImage(e))))}catch{console.info("Unsuccessful attempt at preloading some images",e)}}async preloadListings(){if(be.ConfigCtrl.state.enableExplorer){await be.ExplorerCtrl.getRecomendedWallets(),be.OptionsCtrl.setIsDataLoaded(!0);const{recomendedWallets:e}=be.ExplorerCtrl.state,t=e.map((e=>or.getWalletIcon(e)));await this.loadImages(t)}else be.OptionsCtrl.setIsDataLoaded(!0)}async preloadCustomImages(){const e=or.getCustomImageUrls();await this.loadImages(e)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(e){console.error(e),be.ToastCtrl.openToast("Failed preloading","error")}}};Gr([fe()],Zr.prototype,"preload",2),Zr=Gr([ue("wcm-explorer-context")],Zr);Object.defineProperty,Object.getOwnPropertyDescriptor;let Kr=class extends ce{constructor(){super(),this.unsubscribeTheme=void 0,Tt.setTheme(),this.unsubscribeTheme=be.ThemeCtrl.subscribe(Tt.setTheme)}disconnectedCallback(){var e;null==(e=this.unsubscribeTheme)||e.call(this)}};Kr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-theme-context")],Kr);const Yr=c`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Qr=class extends ce{onGoToQrcode(){be.AV.push("Qrcode")}render(){const{recomendedWallets:e}=be.ExplorerCtrl.state,t=[...e,...e],r=2*be.zv.RECOMMENDED_WALLET_AMOUNT;return F`
${Gt.MOBILE_ICON}WalletConnect
${[...Array(r)].map(((e,r)=>{const n=t[r%t.length];return n?F``:Gt.WALLET_PLACEHOLDER}))}
Select Wallet
Choose WalletConnect to see supported apps on your device`}};Qr.styles=[Tt.globalCss,Yr],Qr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-android-wallet-selection")],Qr);const Jr=c`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var Xr=Object.defineProperty,en=Object.getOwnPropertyDescriptor,tn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?en(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Xr(t,r,o),o};let rn=class extends ce{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var e,t;const r=null!=(t=null==(e=be.ThemeCtrl.state.themeVariables)?void 0:e["--wcm-wallet-icon-large-border-radius"])?t:Tt.getPreset("--wcm-wallet-icon-large-border-radius");let n=0;return n=r.includes("%")?.88*parseInt(r,10):parseInt(r,10),n*=1.17,F``}render(){const e={"wcm-error":this.isError,"wcm-stale":this.isStale};return F`
${this.svgLoaderTemplate()}
${this.isError?"Connection declined":this.label}`}};rn.styles=[Tt.globalCss,Jr],tn([pe()],rn.prototype,"walletId",2),tn([pe()],rn.prototype,"imageId",2),tn([pe({type:Boolean})],rn.prototype,"isError",2),tn([pe({type:Boolean})],rn.prototype,"isStale",2),tn([pe()],rn.prototype,"label",2),rn=tn([ue("wcm-connector-waiting")],rn);const nn={manualWallets(){var e,t;const{mobileWallets:r,desktopWallets:n}=be.ConfigCtrl.state,i=null==(e=nn.recentWallet())?void 0:e.id,o=be.zv.isMobile()?r:n,s=o?.filter((e=>i!==e.id));return null!=(t=be.zv.isMobile()?s?.map((({id:e,name:t,links:r})=>({id:e,name:t,mobile:r,links:r}))):s?.map((({id:e,name:t,links:r})=>({id:e,name:t,desktop:r,links:r}))))?t:[]},recentWallet:()=>or.getRecentWallet(),recomendedWallets(e=!1){var t;const r=e||null==(t=nn.recentWallet())?void 0:t.id,{recomendedWallets:n}=be.ExplorerCtrl.state;return n.filter((e=>r!==e.id))}},on={onConnecting(e){or.goToConnectingView(e)},manualWalletsTemplate(){return nn.manualWallets().map((e=>F``))},recomendedWalletsTemplate(e=!1){return nn.recomendedWallets(e).map((e=>F``))},recentWalletTemplate(){const e=nn.recentWallet();if(e)return F``}},sn=c`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let an=class extends ce{render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=be.ConfigCtrl.state,r="ALL"!==e&&t,n=on.manualWalletsTemplate(),i=on.recomendedWalletsTemplate();let o=[on.recentWalletTemplate(),...n,...i];o=o.filter(Boolean);const s=o.length>4||r;let a=[];a=s?o.slice(0,3):o;const c=Boolean(a.length);return F`
${Gt.MOBILE_ICON}Mobile
${Gt.SCAN_ICON}Scan with your wallet
${c?F`
${Gt.DESKTOP_ICON}Desktop
${a} ${s?F``:null}
`:null}`}};an.styles=[Tt.globalCss,sn],an=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-desktop-wallet-selection")],an);const cn=c`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let ln=class extends ce{render(){const{termsOfServiceUrl:e,privacyPolicyUrl:t}=be.ConfigCtrl.state;return e??t?F`
By connecting your wallet to this app, you agree to the app's ${e?F`Terms of Service`:null} ${e&&t?"and":null} ${t?F`Privacy Policy`:null}
`:null}};ln.styles=[Tt.globalCss,cn],ln=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-legal-notice")],ln);const un=c`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let hn=class extends ce{onQrcode(){be.AV.push("Qrcode")}render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=be.ConfigCtrl.state,r="ALL"!==e&&t,n=on.manualWalletsTemplate(),i=on.recomendedWalletsTemplate();let o=[on.recentWalletTemplate(),...n,...i];o=o.filter(Boolean);const s=o.length>8||r;let a=[];a=s?o.slice(0,7):o;const c=Boolean(a.length);return F`${c?F`
${a} ${s?F``:null}
`:null}`}};hn.styles=[Tt.globalCss,un],hn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-mobile-wallet-selection")],hn);const dn=c`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var pn=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,gn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?fn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&pn(t,r,o),o};let mn=class extends ce{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=be.jb.subscribe((e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()}))}disconnectedCallback(){var e;null==(e=this.unsubscribeModal)||e.call(this)}get overlayEl(){return or.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return or.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(e){if(document.querySelector("body"))if(e){const e=document.getElementById("wcm-styles");e?.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(e){e.target===e.currentTarget&&be.jb.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout((async()=>{const e=or.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]};await Promise.all([St(this.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,St(this.containerEl,e,{delay:.1,duration:.2}).finished]),this.active=!0}),0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const e=or.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]};await Promise.all([St(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished,St(this.containerEl,e,{duration:.2}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",(e=>{var t;"Escape"===e.key?be.jb.close():"Tab"===e.key&&(null!=(t=e.target)&&t.tagName.includes("wcm-")||this.containerEl.focus())}),this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;null==(e=this.abortController)||e.abort(),this.abortController=void 0}render(){const e={"wcm-overlay":!0,"wcm-active":this.active};return F`
${this.open?F`
`:null}
`}};mn.styles=[Tt.globalCss,dn],gn([fe()],mn.prototype,"open",2),gn([fe()],mn.prototype,"active",2),mn=gn([ue("wcm-modal")],mn);const yn=c`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var wn=Object.defineProperty,bn=Object.getOwnPropertyDescriptor,vn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?bn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&wn(t,r,o),o};let _n=class extends ce{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){be.zv.isMobile()?be.AV.replace("MobileConnecting"):be.AV.replace("MobileQrcodeConnecting")}onDesktop(){be.AV.replace("DesktopConnecting")}onWeb(){be.AV.replace("WebConnecting")}render(){return F`
${this.isRetry?F``:null} ${this.isMobile?F`Mobile`:null} ${this.isDesktop?F`Desktop`:null} ${this.isWeb?F`Web`:null}
`}};_n.styles=[Tt.globalCss,yn],vn([pe({type:Boolean})],_n.prototype,"isMobile",2),vn([pe({type:Boolean})],_n.prototype,"isDesktop",2),vn([pe({type:Boolean})],_n.prototype,"isWeb",2),vn([pe({type:Boolean})],_n.prototype,"isRetry",2),_n=vn([ue("wcm-platform-selection")],_n);const En=c`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let xn=class extends ce{onClick(){be.AV.push("WalletExplorer")}render(){const{recomendedWallets:e}=be.ExplorerCtrl.state,t=[...e,...nn.manualWallets()].reverse().slice(0,4);return F``}};xn.styles=[Tt.globalCss,En],xn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-view-all-wallets-button")],xn);const Cn=c`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var Sn=Object.defineProperty,An=Object.getOwnPropertyDescriptor,In=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?An(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Sn(t,r,o),o};let kn=class extends ce{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout((()=>{const{walletConnectUri:e}=be.OptionsCtrl.state;this.uri=e}),0)}get overlayEl(){return or.getShadowRootElement(this,".wcm-qr-container")}render(){return F`
${this.uri?F``:F``}
`}};kn.styles=[Tt.globalCss,Cn],In([pe()],kn.prototype,"walletId",2),In([pe()],kn.prototype,"imageId",2),In([fe()],kn.prototype,"uri",2),kn=In([ue("wcm-walletconnect-qr")],kn);Object.defineProperty,Object.getOwnPropertyDescriptor;let Pn=class extends ce{viewTemplate(){return be.zv.isAndroid()?F``:be.zv.isMobile()?F``:F``}render(){return F`${this.viewTemplate()}`}};Pn.styles=[Tt.globalCss],Pn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-connect-wallet-view")],Pn);const On=c`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Rn=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,Nn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Mn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Rn(t,r,o),o};let Tn=class extends ce{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(e){const{desktop:t,name:r}=be.zv.getWalletRouterData(),n=t?.native;if(n){const t=be.zv.formatNativeUrl(n,e,r);be.zv.openHref(t,"_self")}}openDesktopApp(){const{walletConnectUri:e}=be.OptionsCtrl.state,t=be.zv.getWalletRouterData();or.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=be.zv.getWalletRouterData(),{isMobile:n,isWeb:i}=or.getCachedRouterWalletPlatforms();return F`${`Connection can continue loading if ${e} is not installed on your device`}Retry`}};Tn.styles=[Tt.globalCss,On],Nn([fe()],Tn.prototype,"isError",2),Tn=Nn([ue("wcm-desktop-connecting-view")],Tn);const jn=c`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Ln=class extends ce{onInstall(e){e&&be.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,homepage:n}=be.zv.getWalletRouterData();return F`${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}Download`}};Ln.styles=[Tt.globalCss,jn],Ln=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-install-wallet-view")],Ln);const Dn=c`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var $n=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,Un=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Bn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&$n(t,r,o),o};let Fn=class extends ce{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(e,t=!1){const{mobile:r,name:n}=be.zv.getWalletRouterData(),i=r?.native,o=r?.universal;if(i&&!t){const t=be.zv.formatNativeUrl(i,e,n);be.zv.openHref(t,"_self")}else if(o){const t=be.zv.formatUniversalUrl(o,e,n);be.zv.openHref(t,"_self")}}openMobileApp(e=!1){const{walletConnectUri:t}=be.OptionsCtrl.state,r=be.zv.getWalletRouterData();or.setRecentWallet(r),t&&this.onFormatAndRedirect(t,e)}onGoToAppStore(e){e&&be.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,app:n,mobile:i}=be.zv.getWalletRouterData(),{isWeb:o}=or.getCachedRouterWalletPlatforms(),s=n?.ios,a=i?.universal;return F`Retry${a?F`Still doesn't work? Try this alternate link`:null}
${`Get ${e}`}
App Store
`}};Fn.styles=[Tt.globalCss,Dn],Un([fe()],Fn.prototype,"isError",2),Fn=Un([ue("wcm-mobile-connecting-view")],Fn);const zn=c`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Wn=class extends ce{render(){const{name:e,id:t,image_id:r}=be.zv.getWalletRouterData(),{isDesktop:n,isWeb:i}=or.getCachedRouterWalletPlatforms();return F`${`Scan this QR Code with your phone's camera or inside ${e} app`}`}};Wn.styles=[Tt.globalCss,zn],Wn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-mobile-qr-connecting-view")],Wn);Object.defineProperty,Object.getOwnPropertyDescriptor;let Hn=class extends ce{render(){return F``}};Hn.styles=[Tt.globalCss],Hn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([ue("wcm-qrcode-view")],Hn);const Vn=c`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var qn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Zn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Gn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&qn(t,r,o),o};let Kn=class extends ce{constructor(){super(...arguments),this.loading=!be.ExplorerCtrl.state.wallets.listings.length,this.firstFetch=!be.ExplorerCtrl.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=or.debounce((e=>{e.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=e,be.ExplorerCtrl.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),be.ExplorerCtrl.resetSearch())}))}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;null==(e=this.intersectionObserver)||e.disconnect()}get placeholderEl(){return or.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver((([e])=>{e.isIntersecting&&(!this.search||!this.firstFetch)&&this.fetchWallets()})),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:e,search:t}=be.ExplorerCtrl.state,{listings:r,total:n}=this.search?t:e;return n<=40||r.length>=n}async fetchWallets(){var e;const{wallets:t,search:r}=be.ExplorerCtrl.state,{listings:n,total:i,page:o}=this.search?r:t;if(!this.endReached&&(this.firstFetch||i>40&&n.lengthor.getWalletIcon(e)));await Promise.all([...n.map((async e=>or.preloadImage(e))),be.zv.wait(300)]),this.endReached=this.isLastPage()}catch(e){console.error(e),be.ToastCtrl.openToast(or.getErrorMessage(e),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(e){be.zv.isAndroid()?or.handleMobileLinking(e):or.goToConnectingView(e)}onSearchChange(e){const{value:t}=e.target;this.searchDebounce(t)}render(){const{wallets:e,search:t}=be.ExplorerCtrl.state,{listings:r}=this.search?t:e,n=this.loading&&!r.length,i=this.search.length>=3;let o=on.manualWalletsTemplate(),s=on.recomendedWalletsTemplate(!0);i&&(o=o.filter((({values:e})=>or.caseSafeIncludes(e[0],this.search))),s=s.filter((({values:e})=>or.caseSafeIncludes(e[0],this.search))));const a=!this.loading&&!r.length&&!s.length,c={"wcm-loading":n,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":a};return F`
${n?null:o} ${n?null:s} ${n?null:r.map((e=>F`${e?F``:null}`))}
${a?F`No results found`:null} ${!a&&this.loading?F``:null}
`}};Kn.styles=[Tt.globalCss,Vn],Zn([fe()],Kn.prototype,"loading",2),Zn([fe()],Kn.prototype,"firstFetch",2),Zn([fe()],Kn.prototype,"search",2),Zn([fe()],Kn.prototype,"endReached",2),Kn=Zn([ue("wcm-wallet-explorer-view")],Kn);const Yn=c`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Qn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor,Xn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Jn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Qn(t,r,o),o};let ei=class extends ce{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(e){const{desktop:t,name:r}=be.zv.getWalletRouterData(),n=t?.universal;if(n){const t=be.zv.formatUniversalUrl(n,e,r);be.zv.openHref(t,"_blank")}}openWebWallet(){const{walletConnectUri:e}=be.OptionsCtrl.state,t=be.zv.getWalletRouterData();or.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=be.zv.getWalletRouterData(),{isMobile:n,isDesktop:i}=or.getCachedRouterWalletPlatforms(),o=be.zv.isMobile();return F`${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};ei.styles=[Tt.globalCss,Yn],Xn([fe()],ei.prototype,"isError",2),ei=Xn([ue("wcm-web-connecting-view")],ei)},9343:(e,t,r)=>{"use strict";r.d(t,{WalletConnectModal:()=>i});var n=r(672);class i{constructor(e){this.openModal=n.jb.open,this.closeModal=n.jb.close,this.subscribeModal=n.jb.subscribe,this.setTheme=n.ThemeCtrl.setThemeConfig,n.ThemeCtrl.setThemeConfig(e),n.ConfigCtrl.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(r.bind(r,8870));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),n.OptionsCtrl.setIsUiLoaded(!0)}}}},248:(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var n=r(7484),i=r(660),o=r(4110);n.extend(o),n.extend(i),n.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"%s sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}});const s={getYear:(e=(new Date).toISOString())=>n(e).year(),getRelativeDateFromNow:e=>n(e).fromNow(!0)}},6541:(e,t,r)=>{"use strict";r.r(t),r.d(t,{W3mModal:()=>u});var n=r(914),i=r(4145),o=r(242),s=r(3215);const a=o.iv` + :host { + z-index: var(--w3m-z-index); + display: block; + backface-visibility: hidden; + will-change: opacity; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + pointer-events: none; + opacity: 0; + background-color: var(--wui-cover); + } + + @keyframes zoom-in { + 0% { + transform: scale(0.95) translateY(0); + } + 100% { + transform: scale(1) translateY(0); + } + } + + @keyframes slide-in { + 0% { + transform: scale(1) translateY(50px); + } + 100% { + transform: scale(1) translateY(0); + } + } + + wui-card { + max-width: 360px; + width: 100%; + position: relative; + animation-delay: 0.3s; + animation-duration: 0.2s; + animation-name: zoom-in; + animation-fill-mode: backwards; + animation-timing-function: var(--wui-ease-out-power-2); + outline: none; + } + + wui-flex { + overflow-x: hidden; + overflow-y: auto; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + } + + @media (max-height: 700px) and (min-width: 431px) { + wui-flex { + align-items: flex-start; + } + + wui-card { + margin: var(--wui-spacing-xxl) 0px; + } + } + + @media (max-width: 430px) { + wui-flex { + align-items: flex-end; + } + + wui-card { + max-width: 100%; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom: none; + animation-name: slide-in; + } + } +`;var c=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};const l="scroll-lock";let u=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.open=n.IN.state.open,this.caipAddress=n.AccountController.state.address,this.isSiweEnabled=n.yD.state.isSiweEnabled,this.initializeTheming(),n.ApiController.prefetch(),this.unsubscribe.push(n.IN.subscribeKey("open",(e=>e?this.onOpen():this.onClose())),n.yD.subscribeKey("isSiweEnabled",(e=>{this.isSiweEnabled=e})),n.AccountController.subscribe((e=>this.onNewAccountState(e)))),n.Xs.sendEvent({type:"track",event:"MODAL_LOADED"})}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.onRemoveKeyboardListener()}render(){return this.open?o.dy` + + + + + + + + `:null}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){this.isSiweEnabled&&"success"!==n.yD.state.status&&await n.ConnectionController.disconnect(),n.IN.close()}initializeTheming(){const{themeVariables:e,themeMode:t}=n.ThemeController.state,r=i.UiHelperUtil.getColorTheme(t);(0,i.initializeTheming)(e,r)}async onClose(){this.onScrollUnlock(),await this.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished,n.SnackController.hide(),this.open=!1,this.onRemoveKeyboardListener()}async onOpen(){this.onScrollLock(),this.open=!0,await this.animate([{opacity:0},{opacity:1}],{duration:200,easing:"ease",fill:"forwards",delay:300}).finished,this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=l,e.textContent="\n html, body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n ",document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${l}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;const e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",(t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){const{tagName:r}=t.target;!r||r.includes("W3M-")||r.includes("WUI-")||e?.focus()}}),this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAccountState(e){const{isConnected:t,caipAddress:r}=e;if(this.isSiweEnabled){t&&!this.caipAddress&&(this.caipAddress=r),t&&r&&this.caipAddress!==r&&(await n.yD.signOut(),this.onSiweNavigation(),this.caipAddress=r);try{const e=await n.yD.getSession();e&&!t?await n.yD.signOut():t&&!e&&this.onSiweNavigation()}catch(e){t&&this.onSiweNavigation()}}}onSiweNavigation(){this.open?n.RouterController.push("ConnectingSiwe"):n.IN.open({view:"ConnectingSiwe"})}};u.styles=a,c([(0,s.SB)()],u.prototype,"open",void 0),c([(0,s.SB)()],u.prototype,"caipAddress",void 0),c([(0,s.SB)()],u.prototype,"isSiweEnabled",void 0),u=c([(0,i.customElement)("w3m-modal")],u)},914:(e,t,r)=>{"use strict";r.d(t,{AccountController:()=>l,ApiController:()=>k,fz:()=>K,Lr:()=>$,ConnectionController:()=>H,ConnectorController:()=>_,bq:()=>s,j1:()=>a,Xs:()=>M,IN:()=>L,NetworkController:()=>S,OptionsController:()=>b,Ie:()=>x,RouterController:()=>T,_4:()=>Y,yD:()=>q,SnackController:()=>U,MO:()=>g,ThemeController:()=>Z,sl:()=>z});var n=r(6828);function i(e,t,r,i){let o=e[t];return(0,n.Ld)(e,(()=>{const n=e[t];Object.is(o,n)||r(o=n)}),i)}Symbol();const o="https://secure.web3modal.com",s={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,ONE_SEC_MS:1e3,SECURE_SITE:o,SECURE_SITE_DASHBOARD:`${o}/dashboard`,SECURE_SITE_FAVICON:`${o}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet"}},a={isMobile:()=>"undefined"!=typeof window&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid(){const e=window.navigator.userAgent.toLowerCase();return a.isMobile()&&e.includes("android")},isIos(){const e=window.navigator.userAgent.toLowerCase();return a.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isClient:()=>"undefined"!=typeof window,isPairingExpired:e=>!e||e-Date.now()<=s.TEN_SEC_MS,isAllowedRetry:e=>Date.now()-e>=s.ONE_SEC_MS,copyToClopboard(e){navigator.clipboard.writeText(e)},getPairingExpiry:()=>Date.now()+s.FOUR_MINUTES_MS,getPlainAddress:e=>e.split(":")[2],wait:async e=>new Promise((t=>{setTimeout(t,e)})),debounce(e,t=500){let r;return(...n)=>{r&&clearTimeout(r),r=setTimeout((function(){e(...n)}),t)}},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),formatNativeUrl(e,t){if(a.isHttpUrl(e))return this.formatUniversalUrl(e,t);let r=e;return r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),{redirect:`${r}wc?uri=${encodeURIComponent(t)}`,href:r}},formatUniversalUrl(e,t){if(!a.isHttpUrl(e))return this.formatNativeUrl(e,t);let r=e;return r.endsWith("/")||(r=`${r}/`),{redirect:`${r}wc?uri=${encodeURIComponent(t)}`,href:r}},openHref(e,t){window.open(e,t,"noreferrer noopener")},async preloadImage(e){const t=new Promise(((t,r)=>{const n=new Image;n.onload=t,n.onerror=r,n.crossOrigin="anonymous",n.src=e}));return Promise.race([t,a.wait(2e3)])},formatBalance(e,t){let r;if("0"===e)r="0.000";else if("string"==typeof e){const t=Number(e);t&&(r=t.toString().match(/^-?\d+(?:\.\d{0,3})?/u)?.[0])}return r?`${r} ${t}`:`0.000 ${t}`},isRestrictedRegion(){try{const{timeZone:e}=(new Intl.DateTimeFormat).resolvedOptions(),t=e.toUpperCase();return s.RESTRICTED_TIMEZONES.includes(t)}catch{return!1}},getApiUrl:()=>a.isRestrictedRegion()?"https://api.web3modal.org":"https://api.web3modal.com",getBlockchainApiUrl:()=>a.isRestrictedRegion()?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com",getAnalyticsUrl:()=>a.isRestrictedRegion()?"https://pulse.walletconnect.org":"https://pulse.walletconnect.com",getUUID:()=>crypto?.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),parseError:e=>"string"==typeof e?e:"string"==typeof e?.issues?.[0]?.message?e.issues[0].message:e instanceof Error?e.message:"Unknown error"},c=(0,n.sj)({isConnected:!1}),l={state:c,subscribe:e=>(0,n.Ld)(c,(()=>e(c))),subscribeKey:(e,t)=>i(c,e,t),setIsConnected(e){c.isConnected=e},setCaipAddress(e){c.caipAddress=e,c.address=e?a.getPlainAddress(e):void 0},setBalance(e,t){c.balance=e,c.balanceSymbol=t},setProfileName(e){c.profileName=e},setProfileImage(e){c.profileImage=e},setAddressExplorerUrl(e){c.addressExplorerUrl=e},resetAccount(){c.isConnected=!1,c.caipAddress=void 0,c.address=void 0,c.balance=void 0,c.balanceSymbol=void 0,c.profileName=void 0,c.profileImage=void 0,c.addressExplorerUrl=void 0}};class u{constructor({baseUrl:e}){this.baseUrl=e}async get({headers:e,...t}){const r=this.createUrl(t);return(await fetch(r,{method:"GET",headers:e})).json()}async getBlob({headers:e,...t}){const r=this.createUrl(t);return(await fetch(r,{method:"GET",headers:e})).blob()}async post({body:e,headers:t,...r}){const n=this.createUrl(r);return(await fetch(n,{method:"POST",headers:t,body:e?JSON.stringify(e):void 0})).json()}async put({body:e,headers:t,...r}){const n=this.createUrl(r);return(await fetch(n,{method:"PUT",headers:t,body:e?JSON.stringify(e):void 0})).json()}async delete({body:e,headers:t,...r}){const n=this.createUrl(r);return(await fetch(n,{method:"DELETE",headers:t,body:e?JSON.stringify(e):void 0})).json()}createUrl({path:e,params:t}){const r=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach((([e,t])=>{t&&r.searchParams.append(e,t)})),r}}const h="WALLETCONNECT_DEEPLINK_CHOICE",d="@w3m/recent",p="@w3m/connected_wallet_image_url",f="@w3m/connected_connector",g={setWalletConnectDeepLink({href:e,name:t}){try{localStorage.setItem(h,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{const e=localStorage.getItem(h);if(e)return JSON.parse(e)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{localStorage.removeItem(h)}catch{console.info("Unable to delete WalletConnect deep link")}},setWeb3ModalRecent(e){try{const t=g.getRecentWallets();t.find((t=>t.id===e.id))||(t.unshift(e),t.length>2&&t.pop(),localStorage.setItem(d,JSON.stringify(t)))}catch{console.info("Unable to set Web3Modal recent")}},getRecentWallets(){try{const e=localStorage.getItem(d);return e?JSON.parse(e):[]}catch{console.info("Unable to get Web3Modal recent")}return[]},setConnectedWalletImageUrl(e){try{localStorage.setItem(p,e)}catch{console.info("Unable to set Connected Wallet Image Url")}},getConnectedWalletImageUrl(){try{return localStorage.getItem(p)}catch{console.info("Unable to set Connected Wallet Image Url")}},setConnectedConnector(e){try{localStorage.setItem(f,e)}catch{console.info("Unable to set Connected Connector")}},getConnectedConnector(){try{return localStorage.getItem(f)}catch{console.info("Unable to get Connected Connector")}}},m=(0,n.sj)({walletImages:{},networkImages:{},connectorImages:{},tokenImages:{}}),y={state:m,subscribeNetworkImages:e=>(0,n.Ld)(m.networkImages,(()=>e(m.networkImages))),subscribeKey:(e,t)=>i(m,e,t),setWalletImage(e,t){m.walletImages[e]=t},setNetworkImage(e,t){m.networkImages[e]=t},setConnectorImage(e,t){m.connectorImages[e]=t},setTokenImage(e,t){m.tokenImages[e]=t}},w=(0,n.sj)({projectId:"",sdkType:"w3m",sdkVersion:"html-wagmi-undefined"}),b={state:w,subscribeKey:(e,t)=>i(w,e,t),setProjectId(e){w.projectId=e},setIncludeWalletIds(e){w.includeWalletIds=e},setExcludeWalletIds(e){w.excludeWalletIds=e},setFeaturedWalletIds(e){w.featuredWalletIds=e},setTokens(e){w.tokens=e},setTermsConditionsUrl(e){w.termsConditionsUrl=e},setPrivacyPolicyUrl(e){w.privacyPolicyUrl=e},setCustomWallets(e){w.customWallets=e},setEnableAnalytics(e){w.enableAnalytics=e},setSdkVersion(e){w.sdkVersion=e},setMetadata(e){w.metadata=e}},v=(0,n.sj)({connectors:[]}),_={state:v,subscribeKey:(e,t)=>i(v,e,t),setConnectors(e){v.connectors=e.map((e=>(0,n.iH)(e)))},addConnector(e){if(v.connectors.push((0,n.iH)(e)),"w3mEmail"===e.id){const t=e,r=(0,n.CO)(b.state);t?.provider?.syncDappData?.({metadata:r.metadata,sdkVersion:r.sdkVersion,projectId:r.projectId})}},getEmailConnector:()=>v.connectors.find((e=>"EMAIL"===e.type)),getAnnouncedConnectorRdns:()=>v.connectors.filter((e=>"ANNOUNCED"===e.type)).map((e=>e.info?.rdns)),getConnectors:()=>v.connectors},E=(0,n.sj)({open:!1,selectedNetworkId:void 0}),x={state:E,subscribe:e=>(0,n.Ld)(E,(()=>e(E))),set(e){Object.assign(E,{...E,...e})}},C=(0,n.sj)({supportsAllNetworks:!0,isDefaultCaipNetwork:!1}),S={state:C,subscribeKey:(e,t)=>i(C,e,t),_getClient(){if(!C._client)throw new Error("NetworkController client not set");return C._client},setClient(e){C._client=(0,n.iH)(e)},setCaipNetwork(e){C.caipNetwork=e,x.set({selectedNetworkId:e?.id})},setDefaultCaipNetwork(e){C.caipNetwork=e,x.set({selectedNetworkId:e?.id}),C.isDefaultCaipNetwork=!0},setRequestedCaipNetworks(e){C.requestedCaipNetworks=e},async getApprovedCaipNetworksData(){const e=await this._getClient().getApprovedCaipNetworksData();C.supportsAllNetworks=e.supportsAllNetworks,C.approvedCaipNetworkIds=e.approvedCaipNetworkIds},async switchActiveNetwork(e){await this._getClient().switchCaipNetwork(e),C.caipNetwork=e},resetNetwork(){C.isDefaultCaipNetwork||(C.caipNetwork=void 0),C.approvedCaipNetworkIds=void 0,C.supportsAllNetworks=!0}},A=new u({baseUrl:a.getApiUrl()}),I=(0,n.sj)({page:1,count:0,featured:[],recommended:[],wallets:[],search:[]}),k={state:I,subscribeKey:(e,t)=>i(I,e,t),_getApiHeaders(){const{projectId:e,sdkType:t,sdkVersion:r}=b.state;return{"x-project-id":e,"x-sdk-type":t,"x-sdk-version":r}},async _fetchWalletImage(e){const t=`${A.baseUrl}/getWalletImage/${e}`,r=await A.getBlob({path:t,headers:k._getApiHeaders()});y.setWalletImage(e,URL.createObjectURL(r))},async _fetchNetworkImage(e){const t=`${A.baseUrl}/public/getAssetImage/${e}`,r=await A.getBlob({path:t,headers:k._getApiHeaders()});y.setNetworkImage(e,URL.createObjectURL(r))},async _fetchConnectorImage(e){const t=`${A.baseUrl}/public/getAssetImage/${e}`,r=await A.getBlob({path:t,headers:k._getApiHeaders()});y.setConnectorImage(e,URL.createObjectURL(r))},async fetchNetworkImages(){const{requestedCaipNetworks:e}=S.state,t=e?.map((({imageId:e})=>e)).filter(Boolean);t&&await Promise.allSettled(t.map((e=>k._fetchNetworkImage(e))))},async fetchConnectorImages(){const{connectors:e}=_.state,t=e.map((({imageId:e})=>e)).filter(Boolean);await Promise.allSettled(t.map((e=>k._fetchConnectorImage(e))))},async fetchFeaturedWallets(){const{featuredWalletIds:e}=b.state;if(e?.length){const{data:t}=await A.get({path:"/getWallets",headers:k._getApiHeaders(),params:{page:"1",entries:e?.length?String(e.length):"4",include:e?.join(",")}});t.sort(((t,r)=>e.indexOf(t.id)-e.indexOf(r.id)));const r=t.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled(r.map((e=>k._fetchWalletImage(e)))),I.featured=t}},async fetchRecommendedWallets(){const{includeWalletIds:e,excludeWalletIds:t,featuredWalletIds:r}=b.state,n=[...t??[],...r??[]].filter(Boolean),{data:i,count:o}=await A.get({path:"/getWallets",headers:k._getApiHeaders(),params:{page:"1",entries:"4",include:e?.join(","),exclude:n?.join(",")}}),s=g.getRecentWallets(),a=i.map((e=>e.image_id)).filter(Boolean),c=s.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...a,...c].map((e=>k._fetchWalletImage(e)))),I.recommended=i,I.count=o??0},async fetchWallets({page:e}){const{includeWalletIds:t,excludeWalletIds:r,featuredWalletIds:n}=b.state,i=[...I.recommended.map((({id:e})=>e)),...r??[],...n??[]].filter(Boolean),{data:o,count:s}=await A.get({path:"/getWallets",headers:k._getApiHeaders(),params:{page:String(e),entries:"40",include:t?.join(","),exclude:i.join(",")}}),c=o.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...c.map((e=>k._fetchWalletImage(e))),a.wait(300)]),I.wallets=[...I.wallets,...o],I.count=s>I.count?s:I.count,I.page=e},async searchWallet({search:e}){const{includeWalletIds:t,excludeWalletIds:r}=b.state;I.search=[];const{data:n}=await A.get({path:"/getWallets",headers:k._getApiHeaders(),params:{page:"1",entries:"100",search:e,include:t?.join(","),exclude:r?.join(",")}}),i=n.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...i.map((e=>k._fetchWalletImage(e))),a.wait(300)]),I.search=n},prefetch(){I.prefetchPromise=Promise.race([Promise.allSettled([k.fetchFeaturedWallets(),k.fetchRecommendedWallets(),k.fetchNetworkImages(),k.fetchConnectorImages()]),a.wait(3e3)])}},P=new u({baseUrl:a.getAnalyticsUrl()}),O=["MODAL_CREATED"],R=(0,n.sj)({timestamp:Date.now(),data:{type:"track",event:"MODAL_CREATED"}}),M={state:R,subscribe:e=>(0,n.Ld)(R,(()=>e(R))),_getApiHeaders(){const{projectId:e,sdkType:t,sdkVersion:r}=b.state;return{"x-project-id":e,"x-sdk-type":t,"x-sdk-version":r}},async _sendAnalyticsEvent(e){try{if(O.includes(e.data.event)||"undefined"==typeof window)return;await P.post({path:"/e",headers:M._getApiHeaders(),body:{eventId:a.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:e.timestamp,props:e.data}})}catch{}},sendEvent(e){R.timestamp=Date.now(),R.data=e,b.state.enableAnalytics&&M._sendAnalyticsEvent(R)}},N=(0,n.sj)({view:"Connect",history:["Connect"]}),T={state:N,subscribeKey:(e,t)=>i(N,e,t),push(e,t){e!==N.view&&(N.view=e,N.history.push(e),N.data=t)},reset(e){N.view=e,N.history=[e]},replace(e,t){N.history.length>1&&N.history.at(-1)!==e&&(N.view=e,N.history[N.history.length-1]=e,N.data=t)},goBack(){if(N.history.length>1){N.history.pop();const[e]=N.history.slice(-1);e&&(N.view=e)}},goBackToIndex(e){if(N.history.length>1){N.history=N.history.slice(0,e+1);const[t]=N.history.slice(-1);t&&(N.view=t)}}},j=(0,n.sj)({loading:!1,open:!1}),L={state:j,subscribe:e=>(0,n.Ld)(j,(()=>e(j))),subscribeKey:(e,t)=>i(j,e,t),async open(e){await k.state.prefetchPromise,e?.view?T.reset(e.view):l.state.isConnected?T.reset("Account"):T.reset("Connect"),j.open=!0,x.set({open:!0}),M.sendEvent({type:"track",event:"MODAL_OPEN"})},close(){j.open=!1,x.set({open:!1}),M.sendEvent({type:"track",event:"MODAL_CLOSE"})},setLoading(e){j.loading=e}},D=new u({baseUrl:a.getBlockchainApiUrl()}),$={fetchIdentity:({caipChainId:e,address:t})=>D.get({path:`/v1/identity/${t}`,params:{chainId:e,projectId:b.state.projectId}}),fetchTransactions({account:e,projectId:t,cursor:r}){const n=r?{cursor:r}:{};return D.get({path:`/v1/account/${e}/history?projectId=${t}`,params:n})}},B=(0,n.sj)({message:"",variant:"success",open:!1}),U={state:B,subscribeKey:(e,t)=>i(B,e,t),showSuccess(e){B.message=e,B.variant="success",B.open=!0},showError(e){const t=a.parseError(e);B.message=t,B.variant="error",B.open=!0},hide(){B.open=!1}},F=(0,n.sj)({transactions:[],transactionsByYear:{},loading:!1,empty:!1,next:void 0}),z={state:F,subscribe:e=>(0,n.Ld)(F,(()=>e(F))),async fetchTransactions(e){const{projectId:t}=b.state;if(!t||!e)throw new Error("Transactions can't be fetched without a projectId and an accountAddress");F.loading=!0;try{const r=await $.fetchTransactions({account:e,projectId:t,cursor:F.next}),n=this.filterSpamTransactions(r.data),i=[...F.transactions,...n];F.loading=!1,F.transactions=i,F.transactionsByYear=this.groupTransactionsByYear(F.transactionsByYear,n),F.empty=0===i.length,F.next=r.next?r.next:void 0}catch(r){M.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:e,projectId:t,cursor:F.next}}),U.showError("Failed to fetch transactions"),F.loading=!1,F.empty=!0}},groupTransactionsByYear(e={},t=[]){const r=e;return t.forEach((e=>{const t=new Date(e.metadata.minedAt).getFullYear();r[t]||(r[t]=[]),r[t]?.push(e)})),r},filterSpamTransactions:e=>e.filter((e=>!e.transfers.every((e=>!0===e.nft_info?.flags.is_spam)))),resetTransactions(){F.transactions=[],F.transactionsByYear={},F.loading=!1,F.empty=!1,F.next=void 0}},W=(0,n.sj)({wcError:!1,buffering:!1}),H={state:W,subscribeKey:(e,t)=>i(W,e,t),_getClient(){if(!W._client)throw new Error("ConnectionController client not set");return W._client},setClient(e){W._client=(0,n.iH)(e)},connectWalletConnect(){W.wcPromise=this._getClient().connectWalletConnect((e=>{W.wcUri=e,W.wcPairingExpiry=a.getPairingExpiry()}))},async connectExternal(e){await(this._getClient().connectExternal?.(e)),g.setConnectedConnector(e.type)},async signMessage(e){return this._getClient().signMessage(e)},checkInstalled(e){return this._getClient().checkInstalled?.(e)},resetWcConnection(){W.wcUri=void 0,W.wcPairingExpiry=void 0,W.wcPromise=void 0,W.wcLinking=void 0,W.recentWallet=void 0,z.resetTransactions(),g.deleteWalletConnectDeepLink()},setWcLinking(e){W.wcLinking=e},setWcError(e){W.wcError=e,W.buffering=!1},setRecentWallet(e){W.recentWallet=e},setBuffering(e){W.buffering=e},async disconnect(){await this._getClient().disconnect(),this.resetWcConnection()}},V=(0,n.sj)({status:"uninitialized",isSiweEnabled:!1}),q={state:V,subscribeKey:(e,t)=>i(V,e,t),subscribe:e=>(0,n.Ld)(V,(()=>e(V))),_getClient(){if(!V._client)throw new Error("SIWEController client not set");return V._client},async getNonce(){const e=this._getClient(),t=await e.getNonce();return this.setNonce(t),t},async getSession(){const e=this._getClient(),t=await e.getSession();return t&&(this.setSession(t),this.setStatus("success")),t},createMessage(e){const t=this._getClient().createMessage(e);return this.setMessage(t),t},async verifyMessage(e){const t=this._getClient();return await t.verifyMessage(e)},async signIn(){const e=this._getClient();return await e.signIn()},async signOut(){const e=this._getClient();await e.signOut(),this.setStatus("ready"),e.onSignOut?.()},onSignIn(e){const t=this._getClient();t.onSignIn?.(e)},onSignOut(){const e=this._getClient();e.onSignOut?.()},setSIWEClient(e){V._client=(0,n.iH)(e),V.status="ready",V.isSiweEnabled=e.options.enabled},setNonce(e){V.nonce=e},setStatus(e){V.status=e},setMessage(e){V.message=e},setSession(e){V.session=e}},G=(0,n.sj)({themeMode:"dark",themeVariables:{}}),Z={state:G,subscribe:e=>(0,n.Ld)(G,(()=>e(G))),setThemeMode(e){G.themeMode=e},setThemeVariables(e){G.themeVariables={...G.themeVariables,...e}},getSnapshot:()=>(0,n.CO)(G)},K={getWalletImage:e=>e?.image_url?e?.image_url:e?.image_id?y.state.walletImages[e.image_id]:void 0,getNetworkImage:e=>e?.imageUrl?e?.imageUrl:e?.imageId?y.state.networkImages[e.imageId]:void 0,getConnectorImage:e=>e?.imageUrl?e.imageUrl:e?.imageId?y.state.connectorImages[e.imageId]:void 0},Y={goBackOrCloseModal(){T.state.history.length>1?T.goBack():L.close()},navigateAfterNetworkSwitch(){const{history:e}=T.state,t=e.findIndex((e=>"Networks"===e));t>=1?T.goBackToIndex(t-1):L.close()}}},4145:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TransactionUtil:()=>Rn,UiHelperUtil:()=>st,WuiAccountButton:()=>wt,WuiAllWalletsImage:()=>Ct,WuiAvatar:()=>dt,WuiButton:()=>It,WuiCard:()=>m,WuiCardSelect:()=>$t,WuiCardSelectLoader:()=>Rt,WuiChip:()=>Ft,WuiConnectButton:()=>Ht,WuiCtaButton:()=>Gt,WuiEmailInput:()=>er,WuiFlex:()=>lt,WuiGrid:()=>Cn,WuiIcon:()=>_e,WuiIconBox:()=>gt,WuiIconLink:()=>nr,WuiImage:()=>Ce,WuiInputElement:()=>sr,WuiInputNumeric:()=>lr,WuiInputText:()=>Qt,WuiLink:()=>dr,WuiListAccordion:()=>gn,WuiListContent:()=>wn,WuiListItem:()=>gr,WuiListWallet:()=>Or,WuiListWalletTransaction:()=>_n,WuiLoadingHexagon:()=>Ae,WuiLoadingSpinner:()=>Pe,WuiLoadingThumbnail:()=>Me,WuiLogo:()=>Nr,WuiLogoSelect:()=>Lr,WuiNetworkButton:()=>Br,WuiNetworkImage:()=>jt,WuiNoticeCard:()=>dn,WuiOtp:()=>zr,WuiQrCode:()=>Zr,WuiSearchBar:()=>Yr,WuiSeparator:()=>In,WuiShimmer:()=>je,WuiSnackbar:()=>Xr,WuiTabs:()=>rn,WuiTag:()=>Ir,WuiText:()=>Fe,WuiTooltip:()=>sn,WuiTransactionListItem:()=>Er,WuiTransactionListItemLoader:()=>Cr,WuiTransactionVisual:()=>br,WuiVisual:()=>it,WuiVisualThumbnail:()=>ln,WuiWalletImage:()=>_t,customElement:()=>f,initializeTheming:()=>a,setColorTheme:()=>c,setThemeVariables:()=>l});var n=r(242);let i,o,s;function a(e,t){i=document.createElement("style"),o=document.createElement("style"),s=document.createElement("style"),i.textContent=u(e).core.cssText,o.textContent=u(e).dark.cssText,s.textContent=u(e).light.cssText,document.head.appendChild(i),document.head.appendChild(o),document.head.appendChild(s),c(t)}function c(e){o&&s&&("light"===e?(o.removeAttribute("media"),s.media="enabled"):(s.removeAttribute("media"),o.media="enabled"))}function l(e){i&&o&&s&&(i.textContent=u(e).core.cssText,o.textContent=u(e).dark.cssText,s.textContent=u(e).light.cssText)}function u(e){return{core:n.iv` + @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); + :root { + --w3m-color-mix-strength: ${(0,n.$m)(e?.["--w3m-color-mix-strength"]?`${e["--w3m-color-mix-strength"]}%`:"0%")}; + --w3m-font-family: ${(0,n.$m)(e?.["--w3m-font-family"]||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")}; + --w3m-font-size-master: ${(0,n.$m)(e?.["--w3m-font-size-master"]||"10px")}; + --w3m-border-radius-master: ${(0,n.$m)(e?.["--w3m-border-radius-master"]||"4px")}; + --w3m-z-index: ${(0,n.$m)(e?.["--w3m-z-index"]||100)}; + + --wui-font-family: var(--w3m-font-family); + + --wui-font-size-micro: var(--w3m-font-size-master); + --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2); + --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4); + --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6); + --wui-font-size-large: calc(var(--w3m-font-size-master) * 2); + + --wui-border-radius-5xs: var(--w3m-border-radius-master); + --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5); + --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2); + --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3); + --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4); + --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5); + --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7); + --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9); + --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20); + + --wui-font-weight-light: 400; + --wui-font-weight-regular: 500; + --wui-font-weight-medium: 600; + --wui-font-weight-bold: 700; + + --wui-letter-spacing-large: -0.8px; + --wui-letter-spacing-paragraph: -0.64px; + --wui-letter-spacing-small: -0.56px; + --wui-letter-spacing-tiny: -0.48px; + --wui-letter-spacing-micro: -0.2px; + + --wui-spacing-0: 0px; + --wui-spacing-4xs: 2px; + --wui-spacing-3xs: 4px; + --wui-spacing-xxs: 6px; + --wui-spacing-2xs: 7px; + --wui-spacing-xs: 8px; + --wui-spacing-1xs: 10px; + --wui-spacing-s: 12px; + --wui-spacing-m: 14px; + --wui-spacing-l: 16px; + --wui-spacing-2l: 18px; + --wui-spacing-xl: 20px; + --wui-spacing-xxl: 24px; + --wui-spacing-2xl: 32px; + --wui-spacing-3xl: 40px; + --wui-spacing-4xl: 90px; + + --wui-icon-box-size-xxs: 14px; + --wui-icon-box-size-xs: 20px; + --wui-icon-box-size-sm: 24px; + --wui-icon-box-size-md: 32px; + --wui-icon-box-size-lg: 40px; + --wui-icon-box-size-xl: 64px; + + --wui-icon-size-inherit: inherit; + --wui-icon-size-xxs: 10px; + --wui-icon-size-xs: 12px; + --wui-icon-size-sm: 14px; + --wui-icon-size-md: 16px; + --wui-icon-size-mdl: 18px; + --wui-icon-size-lg: 20px; + --wui-icon-size-xl: 24px; + + --wui-wallet-image-size-inherit: inherit; + --wui-wallet-image-size-sm: 40px; + --wui-wallet-image-size-md: 56px; + --wui-wallet-image-size-lg: 80px; + + --wui-box-size-md: 100px; + --wui-box-size-lg: 120px; + + --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1); + --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1); + + --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1); + --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1); + --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1); + + --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1); + + --wui-duration-lg: 200ms; + --wui-duration-md: 125ms; + --wui-duration-sm: 75ms; + + --wui-path-network: path( + 'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z' + ); + + --wui-path-network-lg: path( + 'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z' + ); + + --wui-color-inherit: inherit; + + --wui-color-inverse-100: #fff; + --wui-color-inverse-000: #000; + + --wui-cover: rgba(20, 20, 20, 0.8); + + --wui-color-modal-bg: var(--wui-color-modal-bg-base); + + --wui-color-blue-100: var(--wui-color-blue-base-100); + + --wui-color-accent-100: var(--wui-color-accent-base-100); + --wui-color-accent-090: var(--wui-color-accent-base-090); + --wui-color-accent-080: var(--wui-color-accent-base-080); + + --wui-accent-glass-090: var(--wui-accent-glass-base-090); + --wui-accent-glass-080: var(--wui-accent-glass-base-080); + --wui-accent-glass-020: var(--wui-accent-glass-base-020); + --wui-accent-glass-015: var(--wui-accent-glass-base-015); + --wui-accent-glass-010: var(--wui-accent-glass-base-010); + --wui-accent-glass-005: var(--wui-accent-glass-base-005); + --wui-accent-glass-002: var(--wui-accent-glass-base-002); + + --wui-color-fg-100: var(--wui-color-fg-base-100); + --wui-color-fg-125: var(--wui-color-fg-base-125); + --wui-color-fg-150: var(--wui-color-fg-base-150); + --wui-color-fg-175: var(--wui-color-fg-base-175); + --wui-color-fg-200: var(--wui-color-fg-base-200); + --wui-color-fg-225: var(--wui-color-fg-base-225); + --wui-color-fg-250: var(--wui-color-fg-base-250); + --wui-color-fg-275: var(--wui-color-fg-base-275); + --wui-color-fg-300: var(--wui-color-fg-base-300); + + --wui-color-bg-100: var(--wui-color-bg-base-100); + --wui-color-bg-125: var(--wui-color-bg-base-125); + --wui-color-bg-150: var(--wui-color-bg-base-150); + --wui-color-bg-175: var(--wui-color-bg-base-175); + --wui-color-bg-200: var(--wui-color-bg-base-200); + --wui-color-bg-225: var(--wui-color-bg-base-225); + --wui-color-bg-250: var(--wui-color-bg-base-250); + --wui-color-bg-275: var(--wui-color-bg-base-275); + --wui-color-bg-300: var(--wui-color-bg-base-300); + + --wui-color-success-100: var(--wui-color-success-base-100); + --wui-color-error-100: var(--wui-color-error-base-100); + + --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100); + --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100); + --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100); + --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100); + + --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-base-100); + + --wui-avatar-border: var(--wui-avatar-border-base); + + --wui-thumbnail-border: var(--wui-thumbnail-border-base); + + --wui-box-shadow-blue: rgba(71, 161, 255, 0.16); + } + + @supports (background: color-mix(in srgb, white 50%, black)) { + :root { + --wui-color-modal-bg: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-modal-bg-base) + ); + + --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 16%, transparent); + + --wui-color-accent-090: color-mix( + in srgb, + var(--wui-color-accent-base-100) 90%, + var(--w3m-default) + ); + --wui-color-accent-080: color-mix( + in srgb, + var(--wui-color-accent-base-100) 80%, + var(--w3m-default) + ); + + --wui-color-accent-090: color-mix( + in srgb, + var(--wui-color-accent-base-100) 90%, + transparent + ); + --wui-color-accent-080: color-mix( + in srgb, + var(--wui-color-accent-base-100) 80%, + transparent + ); + + --wui-accent-glass-090: color-mix( + in srgb, + var(--wui-color-accent-base-100) 90%, + transparent + ); + --wui-accent-glass-080: color-mix( + in srgb, + var(--wui-color-accent-base-100) 80%, + transparent + ); + --wui-accent-glass-020: color-mix( + in srgb, + var(--wui-color-accent-base-100) 20%, + transparent + ); + --wui-accent-glass-015: color-mix( + in srgb, + var(--wui-color-accent-base-100) 15%, + transparent + ); + --wui-accent-glass-010: color-mix( + in srgb, + var(--wui-color-accent-base-100) 10%, + transparent + ); + --wui-accent-glass-005: color-mix( + in srgb, + var(--wui-color-accent-base-100) 5%, + transparent + ); + --wui-color-accent-002: color-mix( + in srgb, + var(--wui-color-accent-base-100) 2%, + transparent + ); + + --wui-color-fg-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-base-100) + ); + --wui-color-fg-125: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-base-125) + ); + --wui-color-fg-150: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-base-150) + ); + --wui-color-fg-175: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-base-175) + ); + --wui-color-fg-200: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-base-200) + ); + --wui-color-fg-225: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-base-225) + ); + --wui-color-fg-250: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-base-250) + ); + --wui-color-fg-275: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-base-275) + ); + --wui-color-fg-300: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-base-300) + ); + + --wui-color-bg-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-base-100) + ); + --wui-color-bg-125: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-base-125) + ); + --wui-color-bg-150: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-base-150) + ); + --wui-color-bg-175: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-base-175) + ); + --wui-color-bg-200: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-base-200) + ); + --wui-color-bg-225: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-base-225) + ); + --wui-color-bg-250: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-base-250) + ); + --wui-color-bg-275: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-base-275) + ); + --wui-color-bg-300: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-base-300) + ); + + --wui-color-success-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-success-base-100) + ); + --wui-color-error-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-error-base-100) + ); + + --wui-icon-box-bg-error-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-icon-box-bg-error-base-100) + ); + --wui-icon-box-bg-accent-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-icon-box-bg-blue-base-100) + ); + --wui-icon-box-bg-success-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-icon-box-bg-success-base-100) + ); + --wui-icon-box-bg-inverse-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-icon-box-bg-inverse-base-100) + ); + + --wui-all-wallets-bg-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-all-wallets-bg-base-100) + ); + + --wui-avatar-border: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-avatar-border-base) + ); + + --wui-thumbnail-border: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-thumbnail-border-base) + ); + } + } + `,light:n.iv` + :root { + --w3m-color-mix: ${(0,n.$m)(e?.["--w3m-color-mix"]||"#fff")}; + --w3m-accent: ${(0,n.$m)(e?.["--w3m-accent"]||"#47a1ff")}; + --w3m-default: #fff; + + --wui-color-modal-bg-base: #191a1a; + + --wui-color-blue-base-100: #47a1ff; + + --wui-color-accent-base-100: var(--w3m-accent); + --wui-color-accent-base-090: #59aaff; + --wui-color-accent-base-080: #6cb4ff; + + --wui-accent-glass-base-090: rgba(71, 161, 255, 0.9); + --wui-accent-glass-base-080: rgba(71, 161, 255, 0.8); + --wui-accent-glass-base-020: rgba(71, 161, 255, 0.2); + --wui-accent-glass-base-015: rgba(71, 161, 255, 0.15); + --wui-accent-glass-base-010: rgba(71, 161, 255, 0.1); + --wui-accent-glass-base-005: rgba(71, 161, 255, 0.05); + --wui-accent-glass-base-002: rgba(71, 161, 255, 0.02); + + --wui-color-fg-base-100: #e4e7e7; + --wui-color-fg-base-125: #d0d5d5; + --wui-color-fg-base-150: #a8b1b1; + --wui-color-fg-base-175: #a8b0b0; + --wui-color-fg-base-200: #949e9e; + --wui-color-fg-base-225: #868f8f; + --wui-color-fg-base-250: #788080; + --wui-color-fg-base-275: #788181; + --wui-color-fg-base-300: #6e7777; + + --wui-color-bg-base-100: #141414; + --wui-color-bg-base-125: #191a1a; + --wui-color-bg-base-150: #1e1f1f; + --wui-color-bg-base-175: #222525; + --wui-color-bg-base-200: #272a2a; + --wui-color-bg-base-225: #2c3030; + --wui-color-bg-base-250: #313535; + --wui-color-bg-base-275: #363b3b; + --wui-color-bg-base-300: #3b4040; + + --wui-color-success-base-100: #26d962; + --wui-color-error-base-100: #f25a67; + + --wui-success-glass-001: rgba(38, 217, 98, 0.01); + --wui-success-glass-002: rgba(38, 217, 98, 0.02); + --wui-success-glass-005: rgba(38, 217, 98, 0.05); + --wui-success-glass-010: rgba(38, 217, 98, 0.1); + --wui-success-glass-015: rgba(38, 217, 98, 0.15); + --wui-success-glass-020: rgba(38, 217, 98, 0.2); + --wui-success-glass-025: rgba(38, 217, 98, 0.25); + --wui-success-glass-030: rgba(38, 217, 98, 0.3); + --wui-success-glass-060: rgba(38, 217, 98, 0.6); + --wui-success-glass-080: rgba(38, 217, 98, 0.8); + + --wui-icon-box-bg-error-base-100: #3c2426; + --wui-icon-box-bg-blue-base-100: #20303f; + --wui-icon-box-bg-success-base-100: #1f3a28; + --wui-icon-box-bg-inverse-base-100: #243240; + + --wui-all-wallets-bg-base-100: #222b35; + + --wui-avatar-border-base: #252525; + + --wui-thumbnail-border-base: #252525; + + --wui-gray-glass-001: rgba(255, 255, 255, 0.01); + --wui-gray-glass-002: rgba(255, 255, 255, 0.02); + --wui-gray-glass-005: rgba(255, 255, 255, 0.05); + --wui-gray-glass-010: rgba(255, 255, 255, 0.1); + --wui-gray-glass-015: rgba(255, 255, 255, 0.15); + --wui-gray-glass-020: rgba(255, 255, 255, 0.2); + --wui-gray-glass-025: rgba(255, 255, 255, 0.25); + --wui-gray-glass-030: rgba(255, 255, 255, 0.3); + --wui-gray-glass-060: rgba(255, 255, 255, 0.6); + --wui-gray-glass-080: rgba(255, 255, 255, 0.8); + } + `,dark:n.iv` + :root { + --w3m-color-mix: ${(0,n.$m)(e?.["--w3m-color-mix"]||"#000")}; + --w3m-accent: ${(0,n.$m)(e?.["--w3m-accent"]||"#3396ff")}; + --w3m-default: #000; + + --wui-color-modal-bg-base: #fff; + + --wui-color-blue-base-100: #3396ff; + + --wui-color-accent-base-100: var(--w3m-accent); + --wui-color-accent-base-090: #2d7dd2; + --wui-color-accent-base-080: #2978cc; + + --wui-accent-glass-base-090: rgba(51, 150, 255, 0.9); + --wui-accent-glass-base-080: rgba(51, 150, 255, 0.8); + --wui-accent-glass-base-020: rgba(51, 150, 255, 0.2); + --wui-accent-glass-base-015: rgba(51, 150, 255, 0.15); + --wui-accent-glass-base-010: rgba(51, 150, 255, 0.1); + --wui-accent-glass-base-005: rgba(51, 150, 255, 0.05); + --wui-accent-glass-base-002: rgba(51, 150, 255, 0.02); + + --wui-color-fg-base-100: #141414; + --wui-color-fg-base-125: #2d3131; + --wui-color-fg-base-150: #474d4d; + --wui-color-fg-base-175: #636d6d; + --wui-color-fg-base-200: #798686; + --wui-color-fg-base-225: #828f8f; + --wui-color-fg-base-250: #8b9797; + --wui-color-fg-base-275: #95a0a0; + --wui-color-fg-base-300: #9ea9a9; + + --wui-color-bg-base-100: #ffffff; + --wui-color-bg-base-125: #f5fafa; + --wui-color-bg-base-150: #f3f8f8; + --wui-color-bg-base-175: #eef4f4; + --wui-color-bg-base-200: #eaf1f1; + --wui-color-bg-base-225: #e5eded; + --wui-color-bg-base-250: #e1e9e9; + --wui-color-bg-base-275: #dce7e7; + --wui-color-bg-base-300: #d8e3e3; + + --wui-color-success-base-100: #26b562; + --wui-color-error-base-100: #f05142; + + --wui-success-glass-001: rgba(38, 181, 98, 0.01); + --wui-success-glass-002: rgba(38, 181, 98, 0.02); + --wui-success-glass-005: rgba(38, 181, 98, 0.05); + --wui-success-glass-010: rgba(38, 181, 98, 0.1); + --wui-success-glass-015: rgba(38, 181, 98, 0.15); + --wui-success-glass-020: rgba(38, 181, 98, 0.2); + --wui-success-glass-025: rgba(38, 181, 98, 0.25); + --wui-success-glass-030: rgba(38, 181, 98, 0.3); + --wui-success-glass-060: rgba(38, 181, 98, 0.6); + --wui-success-glass-080: rgba(38, 181, 98, 0.8); + + --wui-icon-box-bg-error-base-100: #f4dfdd; + --wui-icon-box-bg-blue-base-100: #d9ecfb; + --wui-icon-box-bg-success-base-100: #daf0e4; + --wui-icon-box-bg-inverse-base-100: #dcecfc; + + --wui-all-wallets-bg-base-100: #e8f1fa; + + --wui-avatar-border-base: #f3f4f4; + + --wui-thumbnail-border-base: #eaefef; + + --wui-gray-glass-001: rgba(0, 0, 0, 0.01); + --wui-gray-glass-002: rgba(0, 0, 0, 0.02); + --wui-gray-glass-005: rgba(0, 0, 0, 0.05); + --wui-gray-glass-010: rgba(0, 0, 0, 0.1); + --wui-gray-glass-015: rgba(0, 0, 0, 0.15); + --wui-gray-glass-020: rgba(0, 0, 0, 0.2); + --wui-gray-glass-025: rgba(0, 0, 0, 0.25); + --wui-gray-glass-030: rgba(0, 0, 0, 0.3); + --wui-gray-glass-060: rgba(0, 0, 0, 0.6); + --wui-gray-glass-080: rgba(0, 0, 0, 0.8); + } + `}}const h=n.iv` + *, + *::after, + *::before, + :host { + margin: 0; + padding: 0; + box-sizing: border-box; + font-style: normal; + text-rendering: optimizeSpeed; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: transparent; + font-family: var(--wui-font-family); + backface-visibility: hidden; + } +`,d=n.iv` + button, + a { + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + position: relative; + transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); + outline: none; + border: 1px solid transparent; + column-gap: var(--wui-spacing-3xs); + background-color: transparent; + text-decoration: none; + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-gray-glass-005); + } + + button:active:enabled { + transition: all var(--wui-ease-out-power-2) var(--wui-duration-sm); + background-color: var(--wui-gray-glass-010); + } + + button[data-variant='fill']:hover:enabled { + background-color: var(--wui-color-accent-090); + } + + button[data-variant='accentBg']:hover:enabled { + background: var(--wui-accent-glass-015); + } + + button[data-variant='accentBg']:active:enabled { + background: var(--wui-accent-glass-020); + } + } + + button:disabled { + cursor: not-allowed; + background-color: var(--wui-gray-glass-005); + } + + button[data-variant='shade']:disabled, + button[data-variant='accent']:disabled, + button[data-variant='accentBg']:disabled { + background-color: var(--wui-gray-glass-010); + color: var(--wui-gray-glass-015); + filter: grayscale(1); + } + + button:disabled > wui-wallet-image, + button:disabled > wui-all-wallets-image, + button:disabled > wui-network-image, + button:disabled > wui-image, + button:disabled > wui-icon-box, + button:disabled > wui-transaction-visual, + button:disabled > wui-logo { + filter: grayscale(1); + } + + button:focus-visible, + a:focus-visible { + border: 1px solid var(--wui-color-accent-100); + background-color: var(--wui-gray-glass-005); + -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + } + + button[data-variant='fill']:focus-visible { + background-color: var(--wui-color-accent-090); + } + + button[data-variant='fill'] { + color: var(--wui-color-inverse-100); + background-color: var(--wui-color-accent-100); + } + + button[data-variant='fill']:disabled { + color: var(--wui-gray-glass-015); + background-color: var(--wui-gray-glass-015); + } + + button[data-variant='fill']:disabled > wui-icon { + color: var(--wui-gray-glass-015); + } + + button[data-variant='shade'] { + color: var(--wui-color-fg-200); + } + + button[data-variant='accent'], + button[data-variant='accentBg'] { + color: var(--wui-color-accent-100); + } + + button[data-variant='accentBg'] { + background: var(--wui-accent-glass-010); + border: 1px solid var(--wui-accent-glass-010); + } + + button[data-variant='fullWidth'] { + width: 100%; + border-radius: var(--wui-border-radius-xs); + height: 56px; + border: none; + background-color: var(--wui-gray-glass-002); + color: var(--wui-color-fg-200); + gap: var(--wui-spacing-xs); + } + + button:active:enabled { + background-color: var(--wui-gray-glass-010); + } + + button[data-variant='fill']:active:enabled { + background-color: var(--wui-color-accent-080); + border: 1px solid var(--wui-gray-glass-010); + } + + input { + border: none; + outline: none; + appearance: none; + } +`,p=n.iv` + .wui-color-inherit { + color: var(--wui-color-inherit); + } + + .wui-color-accent-100 { + color: var(--wui-color-accent-100); + } + + .wui-color-error-100 { + color: var(--wui-color-error-100); + } + + .wui-color-success-100 { + color: var(--wui-color-success-100); + } + + .wui-color-inverse-100 { + color: var(--wui-color-inverse-100); + } + + .wui-color-inverse-000 { + color: var(--wui-color-inverse-000); + } + + .wui-color-fg-100 { + color: var(--wui-color-fg-100); + } + + .wui-color-fg-200 { + color: var(--wui-color-fg-200); + } + + .wui-color-fg-300 { + color: var(--wui-color-fg-300); + } + + .wui-bg-color-inherit { + background-color: var(--wui-color-inherit); + } + + .wui-bg-color-blue-100 { + background-color: var(--wui-color-accent-100); + } + + .wui-bg-color-error-100 { + background-color: var(--wui-color-error-100); + } + + .wui-bg-color-success-100 { + background-color: var(--wui-color-success-100); + } + + .wui-bg-color-inverse-100 { + background-color: var(--wui-color-inverse-100); + } + + .wui-bg-color-inverse-000 { + background-color: var(--wui-color-inverse-000); + } + + .wui-bg-color-fg-100 { + background-color: var(--wui-color-fg-100); + } + + .wui-bg-color-fg-200 { + background-color: var(--wui-color-fg-200); + } + + .wui-bg-color-fg-300 { + background-color: var(--wui-color-fg-300); + } +`;function f(e){return function(t){return"function"==typeof t?function(e,t){return customElements.get(e)||customElements.define(e,t),t}(e,t):function(e,t){const{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(t){customElements.get(e)||customElements.define(e,t)}}}(e,t)}}const g=n.iv` + :host { + display: block; + border-radius: clamp(0px, var(--wui-border-radius-l), 44px); + border: 1px solid var(--wui-gray-glass-005); + background-color: var(--wui-color-modal-bg); + overflow: hidden; + } +`;let m=class extends n.oi{render(){return n.dy``}};m.styles=[h,g],m=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([f("wui-card")],m);var y=r(3215);const w=n.iv` + :host { + display: flex; + aspect-ratio: 1 / 1; + color: var(--local-color); + width: var(--local-width); + } + + svg { + width: inherit; + height: inherit; + object-fit: contain; + object-position: center; + } +`,b=n.YP` + +`,v=n.YP` + + + + + + + + + +`,_=n.YP` + + + + + + + + + + + + + +`,E=n.YP` + +`,x=n.YP` + +`,C=n.YP` + +`,S=n.YP` + +`,A=n.YP` + + +`,I=n.YP` + +`,k=n.YP` + +`,P=n.YP` + +`,O=n.YP` + +`,R=n.YP` + +`,M=n.YP` + + + + + + + + + + + + + + + + + + + + + +`,N=n.YP` + +`,T=n.YP` + +`,j=n.YP` + +`,L=n.YP` + +`,D=n.YP` + +`,$=n.YP` + +`,B=n.YP` + + +`,U=n.YP` + +`,F=n.YP` + + + + + + + + + + +`,z=n.YP` + +`,W=n.YP` + +`,H=n.YP` + +`,V=n.YP` + + + + + + + + + + + + + + + +`,q=n.YP` + +`,G=n.YP` + + + + + + + + + + + + + +`,Z=n.YP` + + + + + + + + + + + + + + + + +`,K=n.YP` + + +`,Y=n.YP` + + +`,Q=n.YP` + +`,J=n.YP` + + +`,X=n.YP` + + +`,ee=n.YP` + +`,te=n.YP` + +`,re=n.YP` + + + + + + +`,ne=n.YP` + +`,ie=n.YP` + +`,oe=n.YP` + +`,se=n.YP` + +`,ae=n.YP` + +`,ce=n.YP` + +`,le=n.YP` + + + + + + + + + + + `,ue=n.YP` + + + + + + + + + + + + + +`,he=n.YP` + + + + + + + + + + +`,de=n.YP` + +`,pe=n.YP` + +`,fe=n.YP` + +`,ge=n.YP` + + + + +`,me=n.YP` + +`,ye=n.YP` + + +`,we=n.YP` + + +`;var be=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};const ve={allWallets:b,alpha:n.YP` + +`,appStore:v,chromeStore:M,apple:_,arrowBottom:E,arrowLeft:x,arrowRight:C,arrowTop:S,browser:A,checkmark:I,chevronBottom:k,chevronLeft:P,chevronRight:O,chevronTop:R,clock:N,close:T,compass:L,coinPlaceholder:j,copy:D,cursor:$,desktop:B,disconnect:U,discord:F,etherscan:z,extension:W,externalLink:H,facebook:V,filters:q,github:G,google:Z,helpCircle:K,infoCircle:Y,mail:Q,mobile:J,networkPlaceholder:X,nftPlaceholder:ee,off:te,playStore:re,qrCode:ne,refresh:ie,search:oe,swapHorizontal:se,swapHorizontalBold:ae,swapVertical:ce,telegram:le,twitch:ue,twitter:he,twitterIcon:de,verify:pe,verifyFilled:fe,wallet:me,walletConnect:ye,walletPlaceholder:ge,warningCircle:we};let _e=class extends n.oi{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300"}render(){return this.style.cssText=`\n --local-color: var(--wui-color-${this.color});\n --local-width: var(--wui-icon-size-${this.size});\n `,n.dy`${ve[this.name]}`}};_e.styles=[h,p,w],be([(0,y.Cb)()],_e.prototype,"size",void 0),be([(0,y.Cb)()],_e.prototype,"name",void 0),be([(0,y.Cb)()],_e.prototype,"color",void 0),_e=be([f("wui-icon")],_e);const Ee=n.iv` + :host { + display: block; + width: 100%; + height: 100%; + } + + img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; + object-position: center center; + border-radius: inherit; + } +`;var xe=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Ce=class extends n.oi{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image"}render(){return n.dy`${this.alt}`}};Ce.styles=[h,p,Ee],xe([(0,y.Cb)()],Ce.prototype,"src",void 0),xe([(0,y.Cb)()],Ce.prototype,"alt",void 0),Ce=xe([f("wui-image")],Ce);const Se=n.iv` + :host { + display: block; + width: var(--wui-box-size-lg); + height: var(--wui-box-size-lg); + } + + svg { + width: var(--wui-box-size-lg); + height: var(--wui-box-size-lg); + fill: none; + stroke: transparent; + stroke-linecap: round; + transition: all var(--wui-ease-in-power-3) var(--wui-duration-lg); + } + + use { + stroke: var(--wui-color-accent-100); + stroke-width: 2px; + stroke-dasharray: 54, 118; + stroke-dashoffset: 172; + animation: dash 1s linear infinite; + } + + @keyframes dash { + to { + stroke-dashoffset: 0px; + } + } +`;let Ae=class extends n.oi{render(){return n.dy` + + + + + `}};Ae.styles=[h,Se],Ae=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([f("wui-loading-hexagon")],Ae);const Ie=n.iv` + :host { + display: flex; + } + + :host([data-size='sm']) > svg { + width: 12px; + height: 12px; + } + + :host([data-size='md']) > svg { + width: 16px; + height: 16px; + } + + :host([data-size='lg']) > svg { + width: 24px; + height: 24px; + } + + :host([data-size='xl']) > svg { + width: 32px; + height: 32px; + } + + svg { + animation: rotate 2s linear infinite; + transition: all var(--wui-ease-in-power-3) var(--wui-duration-lg); + } + + circle { + fill: none; + stroke: var(--local-color); + stroke-width: 4px; + stroke-dasharray: 1, 124; + stroke-dashoffset: 0; + stroke-linecap: round; + animation: dash 1.5s ease-in-out infinite; + } + + :host([data-size='md']) > svg > circle { + stroke-width: 6px; + } + + :host([data-size='sm']) > svg > circle { + stroke-width: 8px; + } + + @keyframes rotate { + 100% { + transform: rotate(360deg); + } + } + + @keyframes dash { + 0% { + stroke-dasharray: 1, 124; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 90, 124; + stroke-dashoffset: -35; + } + + 100% { + stroke-dashoffset: -125; + } + } +`;var ke=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Pe=class extends n.oi{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText=`--local-color: var(--wui-color-${this.color});`,this.dataset.size=this.size,n.dy` + + `}};Pe.styles=[h,Ie],ke([(0,y.Cb)()],Pe.prototype,"color",void 0),ke([(0,y.Cb)()],Pe.prototype,"size",void 0),Pe=ke([f("wui-loading-spinner")],Pe);const Oe=n.iv` + :host { + display: block; + width: var(--wui-box-size-md); + height: var(--wui-box-size-md); + } + + svg { + width: var(--wui-box-size-md); + height: var(--wui-box-size-md); + transition: all var(--wui-ease-in-power-3) var(--wui-duration-lg); + } + + rect { + fill: none; + stroke: var(--wui-color-accent-100); + stroke-width: 4px; + stroke-linecap: round; + animation: dash 1s linear infinite; + } + + @keyframes dash { + to { + stroke-dashoffset: 0px; + } + } +`;var Re=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Me=class extends n.oi{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,t=36-e,r=116+t,i=245+t,o=360+1.75*t;return n.dy` + + + + `}};Me.styles=[h,Oe],Re([(0,y.Cb)({type:Number})],Me.prototype,"radius",void 0),Me=Re([f("wui-loading-thumbnail")],Me);const Ne=n.iv` + :host { + display: block; + box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005); + background: linear-gradient( + 120deg, + var(--wui-color-bg-200) 5%, + var(--wui-color-bg-200) 48%, + var(--wui-color-bg-300) 55%, + var(--wui-color-bg-300) 60%, + var(--wui-color-bg-300) calc(60% + 10px), + var(--wui-color-bg-200) calc(60% + 12px), + var(--wui-color-bg-200) 100% + ); + background-size: 250%; + animation: shimmer 3s linear infinite reverse; + } + + @keyframes shimmer { + from { + background-position: -250% 0; + } + to { + background-position: 250% 0; + } + } +`;var Te=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let je=class extends n.oi{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m"}render(){return this.style.cssText=`\n width: ${this.width};\n height: ${this.height};\n border-radius: clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px);\n `,n.dy``}};je.styles=[Ne],Te([(0,y.Cb)()],je.prototype,"width",void 0),Te([(0,y.Cb)()],je.prototype,"height",void 0),Te([(0,y.Cb)()],je.prototype,"borderRadius",void 0),je=Te([f("wui-shimmer")],je);var Le=r(9699),De=r(8476);const $e=(0,De.XM)(class extends De.Xe{constructor(e){if(super(e),e.type!==De.pX.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.st?.has(e)&&this.it.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.it)e in t||(r.remove(e),this.it.delete(e));for(const e in t){const n=!!t[e];n===this.it.has(e)||this.st?.has(e)||(n?(r.add(e),this.it.add(e)):(r.remove(e),this.it.delete(e)))}return Le.Jb}}),Be=n.iv` + :host { + display: flex !important; + } + + slot { + display: inline-block; + font-style: normal; + font-family: var(--wui-font-family); + font-feature-settings: + 'tnum' on, + 'lnum' on, + 'case' on; + line-height: 130%; + font-weight: var(--wui-font-weight-regular); + overflow: inherit; + text-overflow: inherit; + text-align: var(--local-align); + color: var(--local-color); + } + + .wui-font-large-500, + .wui-font-large-600, + .wui-font-large-700 { + font-size: var(--wui-font-size-large); + letter-spacing: var(--wui-letter-spacing-large); + } + + .wui-font-paragraph-500, + .wui-font-paragraph-600, + .wui-font-paragraph-700 { + font-size: var(--wui-font-size-paragraph); + letter-spacing: var(--wui-letter-spacing-paragraph); + } + + .wui-font-small-400, + .wui-font-small-500, + .wui-font-small-600 { + font-size: var(--wui-font-size-small); + letter-spacing: var(--wui-letter-spacing-small); + } + + .wui-font-tiny-500, + .wui-font-tiny-600 { + font-size: var(--wui-font-size-tiny); + letter-spacing: var(--wui-letter-spacing-tiny); + } + + .wui-font-micro-700, + .wui-font-micro-600 { + font-size: var(--wui-font-size-micro); + letter-spacing: var(--wui-letter-spacing-micro); + text-transform: uppercase; + } + + .wui-font-small-400, + .wui-font-paragraph-400 { + font-weight: var(--wui-font-weight-light); + } + + .wui-font-large-700, + .wui-font-paragraph-700, + .wui-font-micro-700 { + font-weight: var(--wui-font-weight-bold); + } + + .wui-font-large-600, + .wui-font-paragraph-600, + .wui-font-small-600, + .wui-font-tiny-600, + .wui-font-micro-600 { + font-weight: var(--wui-font-weight-medium); + } +`;var Ue=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Fe=class extends n.oi{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left"}render(){const e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0};return this.style.cssText=`\n --local-align: ${this.align};\n --local-color: var(--wui-color-${this.color});\n `,n.dy``}};Fe.styles=[h,Be],Ue([(0,y.Cb)()],Fe.prototype,"variant",void 0),Ue([(0,y.Cb)()],Fe.prototype,"color",void 0),Ue([(0,y.Cb)()],Fe.prototype,"align",void 0),Fe=Ue([f("wui-text")],Fe);const ze=n.YP` + + + + + + + + `,We=n.YP` + + + + + + + + + + + + + + + + `,He=n.YP` + + + + + + + + + + + + +`,Ve=n.YP` + + + + + + + + + + + + + `,qe=n.YP` + + + + + + + + + + + + + + + `,Ge=n.YP` + + + + + +`,Ze=n.YP` + + + + + +`,Ke=n.YP` + + + + + + + + + + `,Ye=n.YP` + + + + + + + + + + + + + + + +`,Qe=n.YP` + + + + + + + + + + `,Je=n.YP` + + + + + + + + +`,Xe=n.YP` + + + + + + + + + + + + + + + `,et=n.YP` + + + + + + + + + + + + + + `,tt=n.iv` + :host { + display: block; + width: 55px; + height: 55px; + } +`;var rt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};const nt={browser:ze,dao:We,defi:He,defiAlt:Ve,eth:qe,layers:Ge,lock:Ze,login:Ke,network:Ye,nft:Qe,noun:Je,profile:Xe,system:et};let it=class extends n.oi{constructor(){super(...arguments),this.name="browser"}render(){return n.dy`${nt[this.name]}`}};it.styles=[h,tt],rt([(0,y.Cb)()],it.prototype,"name",void 0),it=rt([f("wui-visual")],it);var ot=r(5118);const st={getSpacingStyles:(e,t)=>Array.isArray(e)?e[t]?`var(--wui-spacing-${e[t]})`:void 0:"string"==typeof e?`var(--wui-spacing-${e})`:void 0,getFormattedDate:e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(e),getHostName:e=>new URL(e).hostname,getTruncateString:({string:e,charsStart:t,charsEnd:r,truncate:n})=>e.length<=t+r?e:"end"===n?`${e.substring(0,t)}...`:"start"===n?`...${e.substring(e.length-r)}`:`${e.substring(0,Math.floor(t))}...${e.substring(e.length-Math.floor(r))}`,generateAvatarColors(e){const t=e.toLowerCase().replace(/^0x/iu,"").substring(0,6),r=this.hexToRgb(t),n=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),i=100-3*Number(n?.replace("px","")),o=`${i}% ${i}% at 65% 40%`,s=[];for(let e=0;e<5;e+=1){const t=this.tintColor(r,.15*e);s.push(`rgb(${t[0]}, ${t[1]}, ${t[2]})`)}return`\n --local-color-1: ${s[0]};\n --local-color-2: ${s[1]};\n --local-color-3: ${s[2]};\n --local-color-4: ${s[3]};\n --local-color-5: ${s[4]};\n --local-radial-circle: ${o}\n `},hexToRgb(e){const t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t]},tintColor(e,t){const[r,n,i]=e;return[Math.round(r+(255-r)*t),Math.round(n+(255-n)*t),Math.round(i+(255-i)*t)]},isNumber:e=>/^[0-9]+$/u.test(e),getColorTheme:e=>e||("undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark")},at=n.iv` + :host { + display: flex; + width: inherit; + height: inherit; + } +`;var ct=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let lt=class extends n.oi{render(){return this.style.cssText=`\n flex-direction: ${this.flexDirection};\n flex-wrap: ${this.flexWrap};\n flex-basis: ${this.flexBasis};\n flex-grow: ${this.flexGrow};\n flex-shrink: ${this.flexShrink};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding&&st.getSpacingStyles(this.padding,0)};\n padding-right: ${this.padding&&st.getSpacingStyles(this.padding,1)};\n padding-bottom: ${this.padding&&st.getSpacingStyles(this.padding,2)};\n padding-left: ${this.padding&&st.getSpacingStyles(this.padding,3)};\n margin-top: ${this.margin&&st.getSpacingStyles(this.margin,0)};\n margin-right: ${this.margin&&st.getSpacingStyles(this.margin,1)};\n margin-bottom: ${this.margin&&st.getSpacingStyles(this.margin,2)};\n margin-left: ${this.margin&&st.getSpacingStyles(this.margin,3)};\n `,n.dy``}};lt.styles=[h,at],ct([(0,y.Cb)()],lt.prototype,"flexDirection",void 0),ct([(0,y.Cb)()],lt.prototype,"flexWrap",void 0),ct([(0,y.Cb)()],lt.prototype,"flexBasis",void 0),ct([(0,y.Cb)()],lt.prototype,"flexGrow",void 0),ct([(0,y.Cb)()],lt.prototype,"flexShrink",void 0),ct([(0,y.Cb)()],lt.prototype,"alignItems",void 0),ct([(0,y.Cb)()],lt.prototype,"justifyContent",void 0),ct([(0,y.Cb)()],lt.prototype,"columnGap",void 0),ct([(0,y.Cb)()],lt.prototype,"rowGap",void 0),ct([(0,y.Cb)()],lt.prototype,"gap",void 0),ct([(0,y.Cb)()],lt.prototype,"padding",void 0),ct([(0,y.Cb)()],lt.prototype,"margin",void 0),lt=ct([f("wui-flex")],lt);const ut=n.iv` + :host { + display: block; + width: var(--wui-icon-box-size-xl); + height: var(--wui-icon-box-size-xl); + border-radius: var(--wui-border-radius-3xl); + box-shadow: 0 0 0 8px var(--wui-gray-glass-005); + overflow: hidden; + position: relative; + } + + :host([data-variant='generated']) { + --mixed-local-color-1: var(--local-color-1); + --mixed-local-color-2: var(--local-color-2); + --mixed-local-color-3: var(--local-color-3); + --mixed-local-color-4: var(--local-color-4); + --mixed-local-color-5: var(--local-color-5); + } + + @supports (background: color-mix(in srgb, white 50%, black)) { + :host([data-variant='generated']) { + --mixed-local-color-1: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-1) + ); + --mixed-local-color-2: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-2) + ); + --mixed-local-color-3: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-3) + ); + --mixed-local-color-4: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-4) + ); + --mixed-local-color-5: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-5) + ); + } + } + + :host([data-variant='generated']) { + box-shadow: 0 0 0 8px var(--wui-gray-glass-005); + background: radial-gradient( + var(--local-radial-circle), + #fff 0.52%, + var(--mixed-local-color-5) 31.25%, + var(--mixed-local-color-3) 51.56%, + var(--mixed-local-color-2) 65.63%, + var(--mixed-local-color-1) 82.29%, + var(--mixed-local-color-4) 100% + ); + } + + :host([data-variant='default']) { + box-shadow: 0 0 0 8px var(--wui-gray-glass-005); + background: radial-gradient( + 75.29% 75.29% at 64.96% 24.36%, + #fff 0.52%, + #f5ccfc 31.25%, + #dba4f5 51.56%, + #9a8ee8 65.63%, + #6493da 82.29%, + #6ebdea 100% + ); + } +`;var ht=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let dt=class extends n.oi{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0}render(){return n.dy`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",n.dy``;if(this.address){this.dataset.variant="generated";const e=st.generateAvatarColors(this.address);return this.style.cssText=e,null}return this.dataset.variant="default",null}};dt.styles=[h,ut],ht([(0,y.Cb)()],dt.prototype,"imageSrc",void 0),ht([(0,y.Cb)()],dt.prototype,"alt",void 0),ht([(0,y.Cb)()],dt.prototype,"address",void 0),dt=ht([f("wui-avatar")],dt);const pt=n.iv` + :host { + display: inline-flex; + justify-content: center; + align-items: center; + position: relative; + overflow: hidden; + background-color: var(--wui-gray-glass-020); + border-radius: var(--local-border-radius); + box-shadow: 0 0 0 1px var(--local-border); + width: var(--local-size); + height: var(--local-size); + min-height: var(--local-size); + min-width: var(--local-size); + } + + @supports (background: color-mix(in srgb, white 50%, black)) { + :host { + background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent); + } + } +`;var ft=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let gt=class extends n.oi{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,t="lg"===this.size,r="xl"===this.size,i=t?"12%":"16%",o=t?"xxs":r?"s":"3xl",s="gray"===this.background,a="opaque"===this.background,c="accent-100"===this.backgroundColor&&a||"success-100"===this.backgroundColor&&a||"error-100"===this.backgroundColor&&a||"inverse-100"===this.backgroundColor&&a;let l=`var(--wui-color-${this.backgroundColor})`;return c?l=`var(--wui-icon-box-bg-${this.backgroundColor})`:s&&(l=`var(--wui-gray-${this.backgroundColor})`),this.style.cssText=`\n --local-bg-value: ${l};\n --local-bg-mix: ${c||s?"100%":i};\n --local-border-radius: var(--wui-border-radius-${o});\n --local-size: var(--wui-icon-box-size-${this.size});\n --local-border: ${"wui-color-bg-125"===this.borderColor?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"}\n `,n.dy` `}};gt.styles=[h,d,pt],ft([(0,y.Cb)()],gt.prototype,"size",void 0),ft([(0,y.Cb)()],gt.prototype,"backgroundColor",void 0),ft([(0,y.Cb)()],gt.prototype,"iconColor",void 0),ft([(0,y.Cb)()],gt.prototype,"iconSize",void 0),ft([(0,y.Cb)()],gt.prototype,"background",void 0),ft([(0,y.Cb)({type:Boolean})],gt.prototype,"border",void 0),ft([(0,y.Cb)()],gt.prototype,"borderColor",void 0),ft([(0,y.Cb)()],gt.prototype,"icon",void 0),gt=ft([f("wui-icon-box")],gt);const mt=n.iv` + :host { + display: block; + } + + button { + border-radius: var(--wui-border-radius-3xl); + background: var(--wui-gray-glass-002); + display: flex; + gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs) + var(--wui-spacing-xs); + border: 1px solid var(--wui-gray-glass-005); + } + + button:disabled { + background: var(--wui-gray-glass-015); + } + + button:disabled > wui-text { + color: var(--wui-gray-glass-015); + } + + button:disabled > wui-flex > wui-text { + color: var(--wui-gray-glass-015); + } + + button:disabled > wui-image, + button:disabled > wui-icon-box, + button:disabled > wui-flex > wui-avatar { + filter: grayscale(1); + } + + button:has(wui-image) { + padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs) + var(--wui-spacing-xs); + } + + wui-text { + color: var(--wui-color-fg-100); + } + + wui-flex > wui-text { + color: var(--wui-color-fg-200); + transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); + } + + wui-image, + wui-icon-box { + border-radius: var(--wui-border-radius-3xl); + width: 24px; + height: 24px; + box-shadow: 0 0 0 2px var(--wui-gray-glass-005); + } + + wui-flex { + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-gray-glass-005); + background: var(--wui-gray-glass-005); + padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs); + } + + button.local-no-balance { + border-radius: 0px; + border: none; + background: transparent; + } + + wui-avatar { + width: 20px; + height: 20px; + box-shadow: 0 0 0 2px var(--wui-accent-glass-010); + } + + @media (max-width: 500px) { + button { + gap: 0px; + padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important; + height: 32px; + } + wui-image, + wui-icon-box, + button > wui-text { + visibility: hidden; + width: 0px; + height: 0px; + } + button { + border-radius: 0px; + border: none; + background: transparent; + padding: 0px; + } + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled > wui-flex > wui-text { + color: var(--wui-color-fg-175); + } + + button:active:enabled > wui-flex > wui-text { + color: var(--wui-color-fg-175); + } + } +`;var yt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let wt=class extends n.oi{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.disabled=!1,this.isProfileName=!1,this.address="",this.charsStart=4,this.charsEnd=6}render(){return n.dy` + + `}balanceTemplate(){if(this.balance){const e=this.networkSrc?n.dy``:n.dy` + + `;return n.dy` + ${e} + ${this.balance} + `}return null}};wt.styles=[h,d,mt],yt([(0,y.Cb)()],wt.prototype,"networkSrc",void 0),yt([(0,y.Cb)()],wt.prototype,"avatarSrc",void 0),yt([(0,y.Cb)()],wt.prototype,"balance",void 0),yt([(0,y.Cb)({type:Boolean})],wt.prototype,"disabled",void 0),yt([(0,y.Cb)({type:Boolean})],wt.prototype,"isProfileName",void 0),yt([(0,y.Cb)()],wt.prototype,"address",void 0),yt([(0,y.Cb)()],wt.prototype,"charsStart",void 0),yt([(0,y.Cb)()],wt.prototype,"charsEnd",void 0),wt=yt([f("wui-account-button")],wt);const bt=n.iv` + :host { + position: relative; + background-color: var(--wui-gray-glass-002); + display: flex; + justify-content: center; + align-items: center; + width: var(--local-size); + height: var(--local-size); + border-radius: inherit; + border-radius: var(--local-border-radius); + } + + :host > wui-flex { + overflow: hidden; + border-radius: inherit; + border-radius: var(--local-border-radius); + } + + :host::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + border-radius: inherit; + border: 1px solid var(--wui-gray-glass-010); + pointer-events: none; + } + + :host([name='Extension'])::after { + border: 1px solid var(--wui-accent-glass-010); + } + + :host([data-wallet-icon='allWallets']) { + background-color: var(--wui-all-wallets-bg-100); + } + + :host([data-wallet-icon='allWallets'])::after { + border: 1px solid var(--wui-accent-glass-010); + } + + wui-icon[data-parent-size='inherit'] { + width: 75%; + height: 75%; + align-items: center; + } + + wui-icon[data-parent-size='sm'] { + width: 18px; + height: 18px; + } + + wui-icon[data-parent-size='md'] { + width: 24px; + height: 24px; + } + + wui-icon[data-parent-size='lg'] { + width: 42px; + height: 42px; + } + + wui-icon[data-parent-size='full'] { + width: 100%; + height: 100%; + } + + :host > wui-icon-box { + position: absolute; + overflow: hidden; + right: -1px; + bottom: -2px; + z-index: 1; + border: 2px solid var(--wui-color-bg-base-150, #1e1f1f); + padding: 1px; + } +`;var vt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let _t=class extends n.oi{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return e="lg"===this.size?"m":"md"===this.size?"xs":"xxs",this.style.cssText=`\n --local-border-radius: var(--wui-border-radius-${e});\n --local-size: var(--wui-wallet-image-size-${this.size});\n `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),n.dy` + ${this.templateVisual()} + `}templateVisual(){return this.imageSrc?n.dy``:this.walletIcon?n.dy``:n.dy``}};_t.styles=[h,bt],vt([(0,y.Cb)()],_t.prototype,"size",void 0),vt([(0,y.Cb)()],_t.prototype,"name",void 0),vt([(0,y.Cb)()],_t.prototype,"imageSrc",void 0),vt([(0,y.Cb)()],_t.prototype,"walletIcon",void 0),vt([(0,y.Cb)({type:Boolean})],_t.prototype,"installed",void 0),vt([(0,y.Cb)()],_t.prototype,"badgeSize",void 0),_t=vt([f("wui-wallet-image")],_t);const Et=n.iv` + :host { + position: relative; + border-radius: var(--wui-border-radius-xxs); + width: 40px; + height: 40px; + overflow: hidden; + background: var(--wui-gray-glass-002); + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + gap: var(--wui-spacing-4xs); + padding: 3.75px !important; + } + + :host::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + border-radius: inherit; + border: 1px solid var(--wui-gray-glass-010); + pointer-events: none; + } + + :host > wui-wallet-image { + width: 14px; + height: 14px; + border-radius: var(--wui-border-radius-5xs); + } + + :host > wui-flex { + padding: 2px; + position: fixed; + overflow: hidden; + left: 34px; + bottom: 8px; + background: var(--dark-background-150, #1e1f1f); + border-radius: 50%; + z-index: 2; + display: flex; + } +`;var xt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Ct=class extends n.oi{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.length<4;return n.dy`${this.walletImages.slice(0,4).map((({src:e,walletName:t})=>n.dy` + + `))} + ${e?[...Array(4-this.walletImages.length)].map((()=>n.dy` `)):null} + + + `}};Ct.styles=[h,Et],xt([(0,y.Cb)({type:Array})],Ct.prototype,"walletImages",void 0),Ct=xt([f("wui-all-wallets-image")],Ct);const St=n.iv` + :host { + width: var(--local-width); + position: relative; + } + + button { + border: 1px solid var(--wui-gray-glass-010); + border-radius: var(--wui-border-radius-m); + width: var(--local-width); + } + + button:disabled { + border: 1px solid var(--wui-gray-glass-010); + } + + button[data-size='sm'] { + padding: var(--wui-spacing-xxs) var(--wui-spacing-s); + } + + button[data-size='sm'][data-icon-left='true'] { + padding: var(--wui-spacing-xxs) var(--wui-spacing-s) var(--wui-spacing-xxs) + var(--wui-spacing-xs); + } + + button[data-size='sm'][data-icon-right='true'] { + padding: var(--wui-spacing-xxs) var(--wui-spacing-xs) var(--wui-spacing-xxs) + var(--wui-spacing-s); + } + + ::slotted(*) { + transition: opacity 200ms ease-in-out; + opacity: var(--local-opacity-100); + } + + button > wui-text { + transition: opacity 200ms ease-in-out; + opacity: var(--local-opacity-100); + } + + button[data-size='md'] { + padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l); + } + + button[data-size='md'][data-icon-left='true'] { + padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s); + } + + button[data-size='md'][data-icon-right='true'] { + padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l); + } + + wui-loading-spinner { + position: absolute; + left: 50%; + top: 50%; + transition: all 200ms ease-in-out; + transform: translate(-50%, -50%); + opacity: var(--local-opacity-000); + } +`;var At=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let It=class extends n.oi{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="fill",this.hasIconLeft=!1,this.hasIconRight=!1}render(){this.style.cssText=`\n --local-width: ${this.fullWidth?"100%":"auto"};\n --local-opacity-100: ${this.loading?0:1};\n --local-opacity-000: ${this.loading?1:0};`;const e="md"===this.size?"paragraph-600":"small-600";return n.dy` + + `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){return this.loading?n.dy``:n.dy``}};It.styles=[h,d,St],At([(0,y.Cb)()],It.prototype,"size",void 0),At([(0,y.Cb)({type:Boolean})],It.prototype,"disabled",void 0),At([(0,y.Cb)({type:Boolean})],It.prototype,"fullWidth",void 0),At([(0,y.Cb)({type:Boolean})],It.prototype,"loading",void 0),At([(0,y.Cb)()],It.prototype,"variant",void 0),At([(0,y.Cb)({type:Boolean})],It.prototype,"hasIconLeft",void 0),At([(0,y.Cb)({type:Boolean})],It.prototype,"hasIconRight",void 0),It=At([f("wui-button")],It);const kt=n.YP` + +`,Pt=n.iv` + :host { + display: flex; + flex-direction: column; + align-items: center; + width: 76px; + row-gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-xs) 10px; + background-color: var(--wui-gray-glass-002); + border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); + position: relative; + } + + wui-shimmer[data-type='network'] { + border: none; + -webkit-clip-path: var(--wui-path-network); + clip-path: var(--wui-path-network); + } + + svg { + position: absolute; + width: 48px; + height: 54px; + z-index: 1; + } + + svg > path { + stroke: var(--wui-gray-glass-010); + stroke-width: 1px; + } +`;var Ot=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Rt=class extends n.oi{constructor(){super(...arguments),this.type="wallet"}render(){return n.dy` + ${this.shimmerTemplate()} + + `}shimmerTemplate(){return"network"===this.type?n.dy` + ${kt}`:n.dy``}};Rt.styles=[h,d,Pt],Ot([(0,y.Cb)()],Rt.prototype,"type",void 0),Rt=Ot([f("wui-card-select-loader")],Rt);const Mt=n.YP` + +`,Nt=n.iv` + :host { + position: relative; + border-radius: inherit; + display: flex; + justify-content: center; + align-items: center; + width: var(--local-width); + height: var(--local-height); + } + + svg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; + fill: var(--wui-gray-glass-002); + } + + svg > path { + stroke: var(--local-stroke); + transition: stroke var(--wui-ease-out-power-1) var(--wui-duration-lg); + } + + wui-image { + width: 100%; + height: 100%; + -webkit-clip-path: var(--local-path); + clip-path: var(--local-path); + background: var(--wui-gray-glass-002); + } + + wui-icon { + transform: translateY(-5%); + width: var(--local-icon-size); + height: var(--local-icon-size); + } +`;var Tt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let jt=class extends n.oi{constructor(){super(...arguments),this.size="md",this.name="uknown",this.selected=!1}render(){const e="lg"===this.size;return this.style.cssText=`\n --local-stroke: ${this.selected?"var(--wui-color-accent-100)":"var(--wui-gray-glass-010)"};\n --local-path: ${e?"var(--wui-path-network-lg)":"var(--wui-path-network)"};\n --local-width: ${e?"86px":"48px"};\n --local-height: ${e?"96px":"54px"};\n --local-icon-size: ${e?"42px":"24px"};\n `,n.dy`${this.templateVisual()} ${e?Mt:kt}`}templateVisual(){return this.imageSrc?n.dy``:n.dy``}};jt.styles=[h,Nt],Tt([(0,y.Cb)()],jt.prototype,"size",void 0),Tt([(0,y.Cb)()],jt.prototype,"name",void 0),Tt([(0,y.Cb)()],jt.prototype,"imageSrc",void 0),Tt([(0,y.Cb)({type:Boolean})],jt.prototype,"selected",void 0),jt=Tt([f("wui-network-image")],jt);const Lt=n.iv` + button { + flex-direction: column; + width: 76px; + row-gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-xs) var(--wui-spacing-0); + background-color: var(--wui-gray-glass-002); + border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); + } + + button > wui-text { + color: var(--wui-color-fg-100); + max-width: var(--wui-icon-box-size-xl); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + justify-content: center; + } + + button:disabled > wui-text { + color: var(--wui-gray-glass-015); + } + + [data-selected='true'] { + background-color: var(--wui-accent-glass-020); + } + + @media (hover: hover) and (pointer: fine) { + [data-selected='true']:hover:enabled { + background-color: var(--wui-accent-glass-015); + } + } + + [data-selected='true']:active:enabled { + background-color: var(--wui-accent-glass-010); + } +`;var Dt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let $t=class extends n.oi{constructor(){super(...arguments),this.name="Unknown",this.type="wallet",this.imageSrc=void 0,this.disabled=!1,this.selected=!1,this.installed=!1}render(){return n.dy` + + `}imageTemplate(){return"network"===this.type?n.dy` + + + `:n.dy` + + + `}};$t.styles=[h,d,Lt],Dt([(0,y.Cb)()],$t.prototype,"name",void 0),Dt([(0,y.Cb)()],$t.prototype,"type",void 0),Dt([(0,y.Cb)()],$t.prototype,"imageSrc",void 0),Dt([(0,y.Cb)({type:Boolean})],$t.prototype,"disabled",void 0),Dt([(0,y.Cb)({type:Boolean})],$t.prototype,"selected",void 0),Dt([(0,y.Cb)({type:Boolean})],$t.prototype,"installed",void 0),$t=Dt([f("wui-card-select")],$t);const Bt=n.iv` + a { + border: 1px solid var(--wui-gray-glass-010); + border-radius: var(--wui-border-radius-3xl); + } + + wui-image { + border-radius: var(--wui-border-radius-3xl); + overflow: hidden; + } + + a.disabled > wui-icon, + a.disabled > wui-image { + filter: grayscale(1); + } + + a[data-variant='fill'] { + color: var(--wui-color-inverse-100); + background-color: var(--wui-color-accent-100); + } + + a[data-variant='shade'], + a[data-variant='shadeSmall'] { + background-color: transparent; + background-color: var(--wui-gray-glass-010); + color: var(--wui-color-fg-200); + } + + a[data-variant='success'] { + column-gap: var(--wui-spacing-xxs); + border: 1px solid var(--wui-success-glass-010); + background-color: var(--wui-success-glass-010); + color: var(--wui-color-success-100); + } + + a[data-variant='transparent'] { + column-gap: var(--wui-spacing-xxs); + background-color: transparent; + color: var(--wui-color-fg-150); + } + + a[data-variant='transparent'], + a[data-variant='success'], + a[data-variant='shadeSmall'] { + padding: 7px var(--wui-spacing-s) 7px 10px; + } + + a[data-variant='transparent']:has(wui-text:first-child), + a[data-variant='success']:has(wui-text:first-child), + a[data-variant='shadeSmall']:has(wui-text:first-child) { + padding: 7px var(--wui-spacing-s); + } + + a[data-variant='fill'], + a[data-variant='shade'] { + column-gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs) + var(--wui-spacing-xs); + } + + a[data-variant='fill']:has(wui-text:first-child), + a[data-variant='shade']:has(wui-text:first-child) { + padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m); + } + + a[data-variant='fill'] > wui-image, + a[data-variant='shade'] > wui-image { + width: 24px; + height: 24px; + } + + a[data-variant='fill'] > wui-image { + box-shadow: inset 0 0 0 1px var(--wui-color-accent-090); + } + + a[data-variant='shade'] > wui-image, + a[data-variant='shadeSmall'] > wui-image { + box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010); + } + + a[data-variant='fill'] > wui-icon, + a[data-variant='shade'] > wui-icon { + width: 14px; + height: 14px; + } + + a[data-variant='transparent'] > wui-image, + a[data-variant='success'] > wui-image, + a[data-variant='shadeSmall'] > wui-image { + width: 14px; + height: 14px; + } + + a[data-variant='transparent'] > wui-icon, + a[data-variant='success'] > wui-icon, + a[data-variant='shadeSmall'] > wui-icon { + width: 12px; + height: 12px; + } + + a[data-variant='fill']:focus-visible { + background-color: var(--wui-color-accent-090); + } + + a[data-variant='shade']:focus-visible, + a[data-variant='shadeSmall']:focus-visible { + background-color: var(--wui-gray-glass-015); + } + + a[data-variant='transparent']:focus-visible { + background-color: var(--wui-gray-glass-005); + } + + a[data-variant='success']:focus-visible { + background-color: var(--wui-success-glass-015); + } + + a.disabled { + color: var(--wui-gray-glass-015); + background-color: var(--wui-gray-glass-015); + pointer-events: none; + } + + @media (hover: hover) and (pointer: fine) { + a[data-variant='fill']:hover { + background-color: var(--wui-color-accent-090); + } + + a[data-variant='shade']:hover, + a[data-variant='shadeSmall']:hover { + background-color: var(--wui-gray-glass-015); + } + + a[data-variant='transparent']:hover { + background-color: var(--wui-gray-glass-005); + } + + a[data-variant='success']:hover { + background-color: var(--wui-success-glass-015); + } + } + + a[data-variant='fill']:active { + background-color: var(--wui-color-accent-080); + } + + a[data-variant='shade']:active, + a[data-variant='shadeSmall']:active { + background-color: var(--wui-gray-glass-020); + } + + a[data-variant='transparent']:active { + background-color: var(--wui-gray-glass-010); + } + + a[data-variant='success']:active { + background-color: var(--wui-success-glass-020); + } +`;var Ut=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Ft=class extends n.oi{constructor(){super(...arguments),this.variant="fill",this.imageSrc=void 0,this.disabled=!1,this.icon="externalLink",this.href="",this.text=void 0}render(){const e="success"===this.variant||"transparent"===this.variant||"shadeSmall"===this.variant?"small-600":"paragraph-600";return n.dy` + + ${this.imageTemplate()} + + ${this.title?this.title:st.getHostName(this.href)} + + + + `}imageTemplate(){return this.imageSrc?n.dy``:null}};Ft.styles=[h,d,Bt],Ut([(0,y.Cb)()],Ft.prototype,"variant",void 0),Ut([(0,y.Cb)()],Ft.prototype,"imageSrc",void 0),Ut([(0,y.Cb)({type:Boolean})],Ft.prototype,"disabled",void 0),Ut([(0,y.Cb)()],Ft.prototype,"icon",void 0),Ut([(0,y.Cb)()],Ft.prototype,"href",void 0),Ut([(0,y.Cb)()],Ft.prototype,"text",void 0),Ft=Ut([f("wui-chip")],Ft);const zt=n.iv` + :host { + position: relative; + display: block; + } + + button { + background: var(--wui-color-accent-100); + border: 1px solid var(--wui-gray-glass-010); + border-radius: var(--wui-border-radius-m); + gap: var(--wui-spacing-xs); + } + + button.loading { + background: var(--wui-gray-glass-010); + border: 1px solid var(--wui-gray-glass-010); + pointer-events: none; + } + + button:disabled { + background-color: var(--wui-gray-glass-015); + border: 1px solid var(--wui-gray-glass-010); + } + + button:disabled > wui-text { + color: var(--wui-gray-glass-015); + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-color-accent-090); + } + + button:active:enabled { + background-color: var(--wui-color-accent-080); + } + } + + button:focus-visible { + border: 1px solid var(--wui-gray-glass-010); + background-color: var(--wui-color-accent-090); + -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + } + + button[data-size='sm'] { + padding: 6.75px 10px 7.25px; + } + + ::slotted(*) { + transition: opacity 200ms ease-in-out; + opacity: var(--local-opacity-100); + } + + button > wui-text { + transition: opacity 200ms ease-in-out; + opacity: var(--local-opacity-100); + color: var(--wui-color-inverse-100); + } + + button[data-size='md'] { + padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l); + } + + button[data-size='md'] + wui-text { + padding-left: var(--wui-spacing-3xs); + } + + @media (max-width: 500px) { + button[data-size='md'] { + height: 32px; + padding: 5px 12px; + } + + button[data-size='md'] > wui-text > slot { + font-size: 14px !important; + } + } + + wui-loading-spinner { + width: 14px; + height: 14px; + } + + wui-loading-spinner::slotted(svg) { + width: 10px !important; + height: 10px !important; + } + + button[data-size='sm'] > wui-loading-spinner { + width: 12px; + height: 12px; + } +`;var Wt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Ht=class extends n.oi{constructor(){super(...arguments),this.size="md",this.loading=!1}render(){const e="md"===this.size?"paragraph-600":"small-600";return n.dy` + + `}loadingTemplate(){return this.loading?n.dy``:null}};Ht.styles=[h,d,zt],Wt([(0,y.Cb)()],Ht.prototype,"size",void 0),Wt([(0,y.Cb)({type:Boolean})],Ht.prototype,"loading",void 0),Ht=Wt([f("wui-connect-button")],Ht);const Vt=n.iv` + wui-flex { + width: 100%; + background-color: var(--wui-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + } +`;var qt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Gt=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return n.dy` + + ${this.label} + + ${this.buttonLabel} + + + + `}};Gt.styles=[h,d,Vt],qt([(0,y.Cb)({type:Boolean})],Gt.prototype,"disabled",void 0),qt([(0,y.Cb)()],Gt.prototype,"label",void 0),qt([(0,y.Cb)()],Gt.prototype,"buttonLabel",void 0),Gt=qt([f("wui-cta-button")],Gt);var Zt=r(5756);const Kt=n.iv` + :host { + position: relative; + width: 100%; + display: inline-block; + color: var(--wui-color-fg-275); + } + + input { + width: 100%; + border-radius: var(--wui-border-radius-xs); + border: 1px solid var(--wui-gray-glass-005); + background: var(--wui-gray-glass-005); + font-size: var(--wui-font-size-paragraph); + font-weight: var(--wui-font-weight-light); + letter-spacing: var(--wui-letter-spacing-paragraph); + color: var(--wui-color-fg-100); + transition: all var(--wui-ease-inout-power-1) var(--wui-duration-lg); + caret-color: var(--wui-color-accent-100); + } + + input:disabled { + cursor: not-allowed; + border: 1px solid var(--wui-gray-glass-010); + background: var(--wui-gray-glass-015); + } + + input:disabled::placeholder, + input:disabled + wui-icon { + color: var(--wui-color-fg-300); + } + + input::placeholder { + color: var(--wui-color-fg-275); + } + + input:focus:enabled { + transition: all var(--wui-ease-out-power-2) var(--wui-duration-sm); + background-color: var(--wui-gray-glass-010); + border: 1px solid var(--wui-color-accent-100); + -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + } + + input:hover:enabled { + background-color: var(--wui-gray-glass-010); + } + + wui-icon { + position: absolute; + top: 50%; + transform: translateY(-50%); + pointer-events: none; + } + + .wui-size-sm { + padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s); + } + + wui-icon + .wui-size-sm { + padding: 9px var(--wui-spacing-m) 10px 36px; + } + + wui-icon[data-input='sm'] { + left: var(--wui-spacing-s); + } + + .wui-size-md { + padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m); + } + + wui-icon + .wui-size-md { + padding: 10.5px var(--wui-spacing-l) 10.5px 44px; + } + + wui-icon[data-input='md'] { + left: var(--wui-spacing-l); + } + + input:placeholder-shown ~ ::slotted(wui-input-element), + input:placeholder-shown ~ ::slotted(wui-icon) { + opacity: 0; + pointer-events: none; + } + + ::slotted(wui-input-element), + ::slotted(wui-icon) { + position: absolute; + top: 50%; + transform: translateY(-50%); + transition: all var(--wui-ease-in-power-2) var(--wui-duration-md); + } + + ::slotted(wui-input-element) { + right: var(--wui-spacing-m); + } + + ::slotted(wui-icon) { + right: 0px; + } +`;var Yt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Qt=class extends n.oi{constructor(){super(...arguments),this.inputElementRef=(0,Zt.V)(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text"}render(){const e=`wui-size-${this.size}`;return n.dy` ${this.templateIcon()} + + `}templateIcon(){return this.icon?n.dy``:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};Qt.styles=[h,d,Kt],Yt([(0,y.Cb)()],Qt.prototype,"size",void 0),Yt([(0,y.Cb)()],Qt.prototype,"icon",void 0),Yt([(0,y.Cb)({type:Boolean})],Qt.prototype,"disabled",void 0),Yt([(0,y.Cb)()],Qt.prototype,"placeholder",void 0),Yt([(0,y.Cb)()],Qt.prototype,"type",void 0),Yt([(0,y.Cb)()],Qt.prototype,"keyHint",void 0),Yt([(0,y.Cb)()],Qt.prototype,"value",void 0),Qt=Yt([f("wui-input-text")],Qt);const Jt=n.iv` + :host { + position: relative; + display: inline-block; + } + + wui-text { + margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m); + } +`;var Xt=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let er=class extends n.oi{constructor(){super(...arguments),this.disabled=!1}render(){return n.dy` + + ${this.templateError()} + `}templateError(){return this.errorMessage?n.dy`${this.errorMessage}`:null}};er.styles=[h,Jt],Xt([(0,y.Cb)()],er.prototype,"errorMessage",void 0),Xt([(0,y.Cb)({type:Boolean})],er.prototype,"disabled",void 0),Xt([(0,y.Cb)()],er.prototype,"value",void 0),er=Xt([f("wui-email-input")],er);const tr=n.iv` + button { + border-radius: var(--wui-border-radius-xxs); + color: var(--wui-color-fg-100); + padding: var(--wui-spacing-2xs); + } + + @media (max-width: 700px) { + button { + padding: var(--wui-spacing-s); + } + } + + button > wui-icon { + pointer-events: none; + } + + button:disabled > wui-icon { + color: var(--wui-color-bg-300) !important; + } + + button:disabled { + background-color: transparent; + } +`;var rr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let nr=class extends n.oi{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){return n.dy` + + `}};nr.styles=[h,d,p,tr],rr([(0,y.Cb)()],nr.prototype,"size",void 0),rr([(0,y.Cb)({type:Boolean})],nr.prototype,"disabled",void 0),rr([(0,y.Cb)()],nr.prototype,"icon",void 0),rr([(0,y.Cb)()],nr.prototype,"iconColor",void 0),nr=rr([f("wui-icon-link")],nr);const ir=n.iv` + button { + background-color: var(--wui-color-fg-300); + border-radius: var(--wui-border-radius-4xs); + width: 16px; + height: 16px; + } + + button:disabled { + background-color: var(--wui-color-bg-300); + } + + wui-icon { + color: var(--wui-color-bg-200) !important; + } + + button:focus-visible { + background-color: var(--wui-color-fg-250); + border: 1px solid var(--wui-color-accent-100); + } + + button:active:enabled { + background-color: var(--wui-color-fg-225); + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-color-fg-250); + } + } +`;var or=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let sr=class extends n.oi{constructor(){super(...arguments),this.icon="copy"}render(){return n.dy` + + `}};sr.styles=[h,d,ir],or([(0,y.Cb)()],sr.prototype,"icon",void 0),sr=or([f("wui-input-element")],sr);const ar=n.iv` + :host { + position: relative; + display: inline-block; + } + + input { + width: 50px; + height: 50px; + background: var(--wui-gray-glass-005); + border-radius: var(--wui-border-radius-xs); + border: 1px solid var(--wui-gray-glass-005); + font-family: var(--wui-font-family); + font-size: var(--wui-font-size-large); + font-weight: var(--wui-font-weight-regular); + letter-spacing: var(--wui-letter-spacing-large); + text-align: center; + color: var(--wui-color-fg-100); + caret-color: var(--wui-color-accent-100); + transition: all var(--wui-ease-inout-power-1) var(--wui-duration-lg); + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: 0px; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input[type='number'] { + -moz-appearance: textfield; + } + + input:disabled { + cursor: not-allowed; + border: 1px solid var(--wui-gray-glass-010); + background: var(--wui-gray-glass-015); + } + + input:focus:enabled { + transition: all var(--wui-ease-out-power-2) var(--wui-duration-sm); + background-color: var(--wui-gray-glass-010); + border: 1px solid var(--wui-color-accent-100); + -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + } + @media (hover: hover) and (pointer: fine) { + input:hover:enabled { + background-color: var(--wui-gray-glass-010); + } + } +`;var cr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let lr=class extends n.oi{constructor(){super(...arguments),this.disabled=!1}render(){return n.dy` `}};lr.styles=[h,d,ar],cr([(0,y.Cb)({type:Boolean})],lr.prototype,"disabled",void 0),lr=cr([f("wui-input-numeric")],lr);const ur=n.iv` + button { + padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); + border-radius: var(--wui-border-radius-3xs); + background-color: transparent; + color: var(--wui-color-accent-100); + } + + button:disabled { + background-color: transparent; + color: var(--wui-gray-glass-015); + } +`;var hr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let dr=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.color="inherit"}render(){return n.dy` + + `}};dr.styles=[h,d,ur],hr([(0,y.Cb)({type:Boolean})],dr.prototype,"disabled",void 0),hr([(0,y.Cb)()],dr.prototype,"color",void 0),dr=hr([f("wui-link")],dr);const pr=n.iv` + button { + column-gap: var(--wui-spacing-s); + padding: 11px 18px 11px var(--wui-spacing-s); + width: 100%; + background-color: var(--wui-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-250); + } + + button[data-iconvariant='square'], + button[data-iconvariant='square-blue'] { + padding: 6px 18px 6px 9px; + } + + button > wui-flex { + flex: 1; + } + + button > wui-image { + width: 32px; + height: 32px; + box-shadow: 0 0 0 2px var(--wui-gray-glass-005); + border-radius: var(--wui-border-radius-3xl); + } + + button > wui-icon { + width: 36px; + height: 36px; + } + + button > wui-icon-box[data-variant='blue'] { + box-shadow: 0 0 0 2px var(--wui-accent-glass-005); + } + + button > wui-icon-box[data-variant='overlay'] { + box-shadow: 0 0 0 2px var(--wui-gray-glass-005); + } + + button > wui-icon-box[data-variant='square-blue'] { + border-radius: var(--wui-border-radius-3xs); + position: relative; + border: none; + width: 36px; + height: 36px; + } + + button > wui-icon-box[data-variant='square-blue']::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + border-radius: inherit; + border: 1px solid var(--wui-accent-glass-010); + pointer-events: none; + } + + button > wui-icon:last-child { + width: 14px; + height: 14px; + } + + button:disabled { + background-color: var(--wui-gray-glass-015); + color: var(--wui-gray-glass-015); + } + + button[data-loading='true'] > wui-icon { + transition: opacity 200ms ease-in-out; + opacity: 0; + } + + wui-loading-spinner { + position: absolute; + right: 18px; + top: 50%; + transform: translateY(-50%); + } +`;var fr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let gr=class extends n.oi{constructor(){super(...arguments),this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return n.dy` + + `}visualTemplate(){if("image"===this.variant&&this.imageSrc)return n.dy``;if("square"===this.iconVariant&&this.icon&&"icon"===this.variant)return n.dy``;if("icon"===this.variant&&this.icon&&this.iconVariant){const e=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",t="square-blue"===this.iconVariant?"mdl":"md",r=this.iconSize?this.iconSize:t;return n.dy` + + `}return null}loadingTemplate(){return this.loading?n.dy``:n.dy``}chevronTemplate(){return this.chevron?n.dy``:null}};var mr;gr.styles=[h,d,pr],fr([(0,y.Cb)()],gr.prototype,"icon",void 0),fr([(0,y.Cb)()],gr.prototype,"iconSize",void 0),fr([(0,y.Cb)()],gr.prototype,"variant",void 0),fr([(0,y.Cb)()],gr.prototype,"iconVariant",void 0),fr([(0,y.Cb)({type:Boolean})],gr.prototype,"disabled",void 0),fr([(0,y.Cb)()],gr.prototype,"imageSrc",void 0),fr([(0,y.Cb)()],gr.prototype,"alt",void 0),fr([(0,y.Cb)({type:Boolean})],gr.prototype,"chevron",void 0),fr([(0,y.Cb)({type:Boolean})],gr.prototype,"loading",void 0),gr=fr([f("wui-list-item")],gr),function(e){e.approve="approved",e.bought="bought",e.borrow="borrowed",e.burn="burnt",e.cancel="canceled",e.claim="claimed",e.deploy="deployed",e.deposit="deposited",e.execute="executed",e.mint="minted",e.receive="received",e.repay="repaid",e.send="sent",e.sell="sold",e.stake="staked",e.trade="swapped",e.unstake="unstaked",e.withdraw="withdrawn"}(mr||(mr={}));const yr=n.iv` + :host > wui-flex { + display: flex; + justify-content: center; + align-items: center; + position: relative; + width: 40px; + height: 40px; + box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005); + background-color: var(--wui-gray-glass-005); + } + + :host > wui-flex wui-image { + display: block; + z-index: -1; + } + + :host > wui-flex, + :host > wui-flex wui-image, + .swap-images-container, + .swap-images-container.nft, + wui-image.nft { + border-top-left-radius: var(--local-left-border-radius); + border-top-right-radius: var(--local-right-border-radius); + border-bottom-left-radius: var(--local-left-border-radius); + border-bottom-right-radius: var(--local-right-border-radius); + } + + wui-icon { + width: 20px; + height: 20px; + } + + wui-icon-box { + position: absolute; + right: 0; + bottom: 0; + transform: translate(20%, 20%); + } + + .swap-images-container { + position: relative; + width: 40px; + height: 40px; + overflow: hidden; + } + + .swap-images-container wui-image:first-child { + position: absolute; + width: 40px; + height: 40px; + top: 0; + left: 0%; + clip-path: inset(0px calc(50% + 2px) 0px 0%); + } + + .swap-images-container wui-image:last-child { + clip-path: inset(0px 0px 0px calc(50% + 2px)); + } +`;var wr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let br=class extends n.oi{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""}}render(){const[e,t]=this.images,r="NFT"===e?.type,i=r?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)",o=(t?.url?"NFT"===t.type:r)?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)";return this.style.cssText=`\n --local-left-border-radius: ${i};\n --local-right-border-radius: ${o};\n `,n.dy` ${this.templateVisual()} ${this.templateIcon()} `}templateVisual(){const[e,t]=this.images,r=e?.type;return 2===this.images.length&&(e?.url||t?.url)?n.dy`
+ ${e?.url?n.dy``:null} + ${t?.url?n.dy``:null} +
`:e?.url?n.dy``:"NFT"===r?n.dy``:n.dy``}templateIcon(){let e,t="accent-100";return e=this.getIcon(),this.status&&(t=this.getStatusColor()),e?n.dy` + + `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():"trade"===this.type?"swapHorizontalBold":"approve"===this.type?"checkmark":"cancel"===this.type?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success-100";case"failed":return"error-100";case"pending":return"inverse-100";default:return"accent-100"}}};br.styles=[yr],wr([(0,y.Cb)()],br.prototype,"type",void 0),wr([(0,y.Cb)()],br.prototype,"status",void 0),wr([(0,y.Cb)()],br.prototype,"direction",void 0),wr([(0,y.Cb)({type:Boolean})],br.prototype,"onlyDirectionIcon",void 0),wr([(0,y.Cb)({type:Array})],br.prototype,"images",void 0),wr([(0,y.Cb)({type:Object})],br.prototype,"secondImage",void 0),br=wr([f("wui-transaction-visual")],br);const vr=n.iv` + :host > wui-flex:first-child { + align-items: center; + column-gap: var(--wui-spacing-s); + padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs); + width: 100%; + } + + :host > wui-flex:first-child wui-text:nth-child(1) { + text-transform: capitalize; + } + + wui-transaction-visual { + width: 40px; + height: 40px; + } + + wui-flex { + flex: 1; + } + + :host wui-flex wui-flex { + overflow: hidden; + } + + :host .description-container wui-text span { + word-break: break-all; + } + + :host .description-container wui-text { + overflow: hidden; + } + + :host .description-separator-icon { + margin: 0px 6px; + } + + :host wui-text > span { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + } +`;var _r=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Er=class extends n.oi{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[]}render(){return n.dy` + + + + + ${mr[this.type]} + + + ${this.templateDescription()} ${this.templateSecondDescription()} + + + ${this.date} + + `}templateDescription(){const e=this.descriptions?.[0];return e?n.dy` + + ${e} + + `:null}templateSecondDescription(){const e=this.descriptions?.[1];return e?n.dy` + + + ${e} + + `:null}};Er.styles=[h,vr],_r([(0,y.Cb)()],Er.prototype,"type",void 0),_r([(0,y.Cb)({type:Array})],Er.prototype,"descriptions",void 0),_r([(0,y.Cb)()],Er.prototype,"date",void 0),_r([(0,y.Cb)({type:Boolean})],Er.prototype,"onlyDirectionIcon",void 0),_r([(0,y.Cb)()],Er.prototype,"status",void 0),_r([(0,y.Cb)()],Er.prototype,"direction",void 0),_r([(0,y.Cb)({type:Array})],Er.prototype,"images",void 0),Er=_r([f("wui-transaction-list-item")],Er);const xr=n.iv` + :host > wui-flex:first-child { + column-gap: var(--wui-spacing-s); + padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); + width: 100%; + } + + wui-flex { + display: flex; + flex: 1; + } +`;let Cr=class extends n.oi{render(){return n.dy` + + + + + + + + + `}};Cr.styles=[h,xr],Cr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([f("wui-transaction-list-item-loader")],Cr);const Sr=n.iv` + :host { + display: block; + padding: 3.5px 5px !important; + border-radius: var(--wui-border-radius-5xs); + } + + :host([data-variant='main']) { + background-color: var(--wui-accent-glass-015); + color: var(--wui-color-accent-100); + } + + :host([data-variant='shade']) { + background-color: var(--wui-gray-glass-010); + color: var(--wui-color-fg-200); + } + + :host([data-variant='success']) { + background-color: var(--wui-icon-box-bg-success-100); + color: var(--wui-color-success-100); + } + + :host([data-variant='error']) { + background-color: var(--wui-icon-box-bg-error-100); + color: var(--wui-color-error-100); + } +`;var Ar=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Ir=class extends n.oi{constructor(){super(...arguments),this.variant="main"}render(){return this.dataset.variant=this.variant,n.dy` + + + + `}};Ir.styles=[h,Sr],Ar([(0,y.Cb)()],Ir.prototype,"variant",void 0),Ir=Ar([f("wui-tag")],Ir);const kr=n.iv` + button { + column-gap: var(--wui-spacing-s); + padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); + width: 100%; + background-color: var(--wui-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-100); + } + + button > wui-text:nth-child(2) { + display: flex; + flex: 1; + } + + wui-icon { + color: var(--wui-color-fg-200) !important; + } + + button:disabled { + background-color: var(--wui-gray-glass-015); + color: var(--wui-gray-glass-015); + } + + button:disabled > wui-tag { + background-color: var(--wui-gray-glass-010); + color: var(--wui-color-fg-300); + } +`;var Pr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Or=class extends n.oi{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.installed=!1,this.disabled=!1,this.showAllWallets=!1}render(){return n.dy` + + `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?n.dy` `:this.showAllWallets&&this.walletIcon?n.dy` `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?n.dy``:this.showAllWallets||this.imageSrc?null:n.dy``}templateStatus(){return this.tagLabel&&this.tagVariant?n.dy`${this.tagLabel}`:this.icon?n.dy``:null}};Or.styles=[h,d,kr],Pr([(0,y.Cb)({type:Array})],Or.prototype,"walletImages",void 0),Pr([(0,y.Cb)()],Or.prototype,"imageSrc",void 0),Pr([(0,y.Cb)()],Or.prototype,"name",void 0),Pr([(0,y.Cb)()],Or.prototype,"tagLabel",void 0),Pr([(0,y.Cb)()],Or.prototype,"tagVariant",void 0),Pr([(0,y.Cb)()],Or.prototype,"icon",void 0),Pr([(0,y.Cb)()],Or.prototype,"walletIcon",void 0),Pr([(0,y.Cb)({type:Boolean})],Or.prototype,"installed",void 0),Pr([(0,y.Cb)({type:Boolean})],Or.prototype,"disabled",void 0),Pr([(0,y.Cb)({type:Boolean})],Or.prototype,"showAllWallets",void 0),Or=Pr([f("wui-list-wallet")],Or);const Rr=n.iv` + :host { + display: block; + width: 40px; + height: 40px; + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-gray-glass-010); + overflow: hidden; + } + + wui-icon { + width: 100%; + height: 100%; + } +`;var Mr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Nr=class extends n.oi{constructor(){super(...arguments),this.logo="google"}render(){return n.dy` `}};Nr.styles=[h,Rr],Mr([(0,y.Cb)()],Nr.prototype,"logo",void 0),Nr=Mr([f("wui-logo")],Nr);const Tr=n.iv` + :host { + display: block; + } + + button { + width: 50px; + height: 50px; + background: var(--wui-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + } +`;var jr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Lr=class extends n.oi{constructor(){super(...arguments),this.logo="google",this.disabled=!1}render(){return n.dy` + + `}};Lr.styles=[h,d,Tr],jr([(0,y.Cb)()],Lr.prototype,"logo",void 0),jr([(0,y.Cb)({type:Boolean})],Lr.prototype,"disabled",void 0),Lr=jr([f("wui-logo-select")],Lr);const Dr=n.iv` + :host { + display: block; + } + + button { + border-radius: var(--wui-border-radius-3xl); + display: flex; + gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs) + var(--wui-spacing-xs); + border: 1px solid var(--wui-gray-glass-010); + background-color: var(--wui-gray-glass-005); + color: var(--wui-color-fg-100); + } + + button:disabled { + border: 1px solid var(--wui-gray-glass-005); + background-color: var(--wui-gray-glass-015); + color: var(--wui-gray-glass-015); + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-gray-glass-010); + } + + button:active:enabled { + background-color: var(--wui-gray-glass-015); + } + } + + wui-image, + wui-icon-box { + border-radius: var(--wui-border-radius-3xl); + width: 24px; + height: 24px; + box-shadow: 0 0 0 2px var(--wui-gray-glass-005); + } +`;var $r=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Br=class extends n.oi{constructor(){super(...arguments),this.imageSrc=void 0,this.disabled=!1}render(){return n.dy` + + `}visualTemplate(){return this.imageSrc?n.dy``:n.dy` + + `}};Br.styles=[h,d,Dr],$r([(0,y.Cb)()],Br.prototype,"imageSrc",void 0),$r([(0,y.Cb)({type:Boolean})],Br.prototype,"disabled",void 0),Br=$r([f("wui-network-button")],Br);const Ur=n.iv` + :host { + position: relative; + display: block; + } +`;var Fr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let zr=class extends n.oi{constructor(){super(...arguments),this.length=6,this.valueArr=Array.from({length:this.length}).map((()=>"")),this.numerics=[],this.shouldInputBeEnabled=e=>this.valueArr.slice(0,e).every((e=>""!==e)),this.handleKeyDown=(e,t)=>{const r=e.target,n=this.getInputElement(r);if(!n)return;["ArrowLeft","ArrowRight","Shift","Delete"].includes(e.key)&&e.preventDefault();const i=n.selectionStart;switch(e.key){case"ArrowLeft":i&&n.setSelectionRange(i+1,i+1),this.focusInputField("prev",t);break;case"ArrowRight":case"Shift":this.focusInputField("next",t);break;case"Delete":case"Backspace":""===n.value?this.focusInputField("prev",t):this.updateInput(n,t,"")}},this.focusInputField=(e,t)=>{if("next"===e){const e=t+1;if(!this.shouldInputBeEnabled(e))return;const r=this.numerics[e-1?e:t],n=r?this.getInputElement(r):void 0;n&&n.focus()}}}firstUpdated(){const e=this.shadowRoot?.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),this.numerics[0]?.focus()}render(){return n.dy` + + ${Array.from({length:this.length}).map(((e,t)=>n.dy` + this.handleInput(e,t)} + @keydown=${e=>this.handleKeyDown(e,t)} + .disabled=${!this.shouldInputBeEnabled(t)} + > + + `))} + + `}updateInput(e,t,r){const n=this.numerics[t],i=e||(n?this.getInputElement(n):void 0);i&&(i.value=r,this.valueArr=this.valueArr.map(((e,n)=>n===t?r:e)))}handleInput(e,t){const r=e.target,n=this.getInputElement(r);if(n){const r=n.value;"insertFromPaste"===e.inputType?this.handlePaste(n,r,t):st.isNumber(r)&&e.data?(this.updateInput(n,t,e.data),this.focusInputField("next",t)):this.updateInput(n,t,"")}this.dispatchInputChangeEvent()}handlePaste(e,t,r){const n=t[0];if(n&&st.isNumber(n)){this.updateInput(e,r,n);const i=t.substring(1);if(r+1(r%n==0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e),a=t/s.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach((({x:e,y:t})=>{const r=(s.length-7)*a*e,l=(s.length-7)*a*t,u=.45;for(let e=0;e + `)}}));const l=Math.floor((r+25)/a),u=s.length/2-l/2,h=s.length/2+l/2-1,d=[];s.forEach(((e,t)=>{e.forEach(((e,r)=>{if(s[t][r]&&!(t<7&&r<7||t>s.length-8&&r<7||t<7&&r>s.length-8||t>u&&tu&&r{p[e]?p[e]?.push(t):p[e]=[t]})),Object.entries(p).map((([e,t])=>{const r=t.filter((e=>t.every((t=>!Hr(e,t,a)))));return[Number(e),r]})).forEach((([e,t])=>{t.forEach((t=>{o.push(n.YP``)}))})),Object.entries(p).filter((([e,t])=>t.length>1)).map((([e,t])=>{const r=t.filter((e=>t.some((t=>Hr(e,t,a)))));return[Number(e),r]})).map((([e,t])=>{t.sort(((e,t)=>et.some((t=>Hr(e,t,a)))));t?t.push(e):r.push([e])}return[e,r.map((e=>[e[0],e[e.length-1]]))]})).forEach((([e,t])=>{t.forEach((([t,r])=>{o.push(n.YP` + + `)}))})),o}},qr=n.iv` + :host { + position: relative; + user-select: none; + display: block; + overflow: hidden; + aspect-ratio: 1 / 1; + width: var(--local-size); + } + + :host([data-theme='dark']) { + border-radius: clamp(0px, var(--wui-border-radius-l), 40px); + background-color: var(--wui-color-inverse-100); + padding: var(--wui-spacing-l); + } + + :host([data-theme='light']) { + box-shadow: 0 0 0 1px var(--wui-color-bg-125); + background-color: var(--wui-color-bg-125); + } + + svg:first-child, + wui-image, + wui-icon { + position: absolute; + top: 50%; + left: 50%; + transform: translateY(-50%) translateX(-50%); + } + + wui-image { + width: 25%; + height: 25%; + border-radius: var(--wui-border-radius-xs); + } + + wui-icon { + width: 100%; + height: 100%; + color: #3396ff !important; + transform: translateY(-50%) translateX(-50%) scale(0.25); + } +`;var Gr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Zr=class extends n.oi{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0}render(){return this.dataset.theme=this.theme,this.style.cssText=`--local-size: ${this.size}px`,n.dy`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e="light"===this.theme?this.size:this.size-32;return n.YP` + + ${Vr.generate(this.uri,e,e/4)} + + `}templateVisual(){return this.imageSrc?n.dy``:n.dy``}};Zr.styles=[h,qr],Gr([(0,y.Cb)()],Zr.prototype,"uri",void 0),Gr([(0,y.Cb)({type:Number})],Zr.prototype,"size",void 0),Gr([(0,y.Cb)()],Zr.prototype,"theme",void 0),Gr([(0,y.Cb)()],Zr.prototype,"imageSrc",void 0),Gr([(0,y.Cb)()],Zr.prototype,"alt",void 0),Zr=Gr([f("wui-qr-code")],Zr);const Kr=n.iv` + :host { + position: relative; + display: inline-block; + width: 100%; + } +`;let Yr=class extends n.oi{constructor(){super(...arguments),this.inputComponentRef=(0,Zt.V)()}render(){return n.dy` + + + + `}clearValue(){const e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",t.focus(),t.dispatchEvent(new Event("input")))}};Yr.styles=[h,Kr],Yr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([f("wui-search-bar")],Yr);const Qr=n.iv` + :host { + display: flex; + column-gap: var(--wui-spacing-xs); + align-items: center; + padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-gray-glass-005); + background-color: var(--wui-color-bg-175); + box-shadow: + 0px 14px 64px -4px rgba(0, 0, 0, 0.15), + 0px 8px 22px -6px rgba(0, 0, 0, 0.15); + } +`;var Jr=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Xr=class extends n.oi{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message=""}render(){return n.dy` + + ${this.message} + `}};Xr.styles=[h,Qr],Jr([(0,y.Cb)()],Xr.prototype,"backgroundColor",void 0),Jr([(0,y.Cb)()],Xr.prototype,"iconColor",void 0),Jr([(0,y.Cb)()],Xr.prototype,"icon",void 0),Jr([(0,y.Cb)()],Xr.prototype,"message",void 0),Xr=Jr([f("wui-snackbar")],Xr);const en=n.iv` + :host { + display: inline-flex; + background-color: var(--wui-gray-glass-002); + border-radius: var(--wui-border-radius-3xl); + padding: var(--wui-spacing-3xs); + position: relative; + height: 36px; + overflow: hidden; + } + + :host::before { + content: ''; + position: absolute; + pointer-events: none; + top: 4px; + left: 4px; + display: block; + width: var(--local-tab-width); + height: 28px; + border-radius: var(--wui-border-radius-3xl); + background-color: var(--wui-gray-glass-002); + box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002); + transform: translateX(calc(var(--local-tab) * var(--local-tab-width))); + transition: transform var(--wui-ease-out-power-2) var(--wui-duration-lg); + } + + :host([data-type='flex'])::before { + left: 3px; + transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px))); + } + + :host([data-type='flex']) { + display: flex; + padding: 0px 0px 0px 12px; + gap: 4px; + } + + :host([data-type='flex']) > button > wui-text { + position: absolute; + left: 18px; + opacity: 0; + } + + button[data-active='true'] > wui-icon, + button[data-active='true'] > wui-text { + color: var(--wui-color-fg-100); + } + + button[data-active='false'] > wui-icon, + button[data-active='false'] > wui-text { + color: var(--wui-color-fg-200); + } + + button[data-active='true']:disabled, + button[data-active='false']:disabled { + background-color: transparent; + opacity: 0.5; + cursor: not-allowed; + } + + button[data-active='true']:disabled > wui-text { + color: var(--wui-color-fg-200); + } + + button[data-active='false']:disabled > wui-text { + color: var(--wui-color-fg-300); + } + + button > wui-icon, + button > wui-text { + pointer-events: none; + transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg); + } + + button { + width: var(--local-tab-width); + } + + :host([data-type='flex']) > button { + width: 34px; + position: relative; + display: flex; + justify-content: flex-start; + } + + button:hover:enabled, + button:active:enabled { + background-color: transparent !important; + } + + button:hover:enabled > wui-icon, + button:active:enabled > wui-icon { + color: var(--wui-color-fg-125); + } + + button:hover:enabled > wui-text, + button:active:enabled > wui-text { + color: var(--wui-color-fg-125); + } + + button { + border-radius: var(--wui-border-radius-3xl); + } +`;var tn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rn=class extends n.oi{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.activeTab=0,this.localTabWidth="100px",this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`\n --local-tab: ${this.activeTab};\n --local-tab-width: ${this.localTabWidth};\n `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map(((e,t)=>{const r=t===this.activeTab;return n.dy` + + `}))}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout((()=>{this.animateTabs(0,!0)}),0))}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,t){const r=this.buttons[this.activeTab],n=this.buttons[e],i=r?.querySelector("wui-text"),o=n?.querySelector("wui-text"),s=n?.getBoundingClientRect(),a=o?.getBoundingClientRect();r&&i&&!t&&e!==this.activeTab&&(i.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),r.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),n&&s&&a&&o&&(e!==this.activeTab||t)&&(this.localTabWidth=`${Math.round(s.width+a.width)+6}px`,n.animate([{width:`${s.width+a.width}px`}],{duration:t?0:500,fill:"forwards",easing:"ease"}),o.animate([{opacity:1}],{duration:t?0:125,delay:t?0:200,fill:"forwards",easing:"ease"}))}};rn.styles=[h,d,en],tn([(0,y.Cb)({type:Array})],rn.prototype,"tabs",void 0),tn([(0,y.Cb)()],rn.prototype,"onTabChange",void 0),tn([(0,y.Cb)({type:Array})],rn.prototype,"buttons",void 0),tn([(0,y.Cb)({type:Boolean})],rn.prototype,"disabled",void 0),tn([(0,y.SB)()],rn.prototype,"activeTab",void 0),tn([(0,y.SB)()],rn.prototype,"localTabWidth",void 0),tn([(0,y.SB)()],rn.prototype,"isDense",void 0),rn=tn([f("wui-tabs")],rn);const nn=n.iv` + :host { + display: block; + padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); + border-radius: var(--wui-border-radius-xxs); + background-color: var(--wui-color-fg-100); + color: var(--wui-color-bg-100); + position: relative; + } + + wui-icon { + position: absolute; + width: 12px !important; + height: 4px !important; + } + + wui-icon[data-placement='top'] { + bottom: 0; + left: 50%; + transform: translate(-50%, 95%); + } + + wui-icon[data-placement='bottom'] { + top: 0; + left: 50%; + transform: translate(-50%, -95%) rotate(180deg); + } + + wui-icon[data-placement='right'] { + top: 50%; + left: 0; + transform: translate(-65%, -50%) rotate(90deg); + } + + wui-icon[data-placement='left'] { + top: 50%; + right: 0%; + transform: translate(65%, -50%) rotate(270deg); + } +`;var on=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let sn=class extends n.oi{constructor(){super(...arguments),this.placement="top",this.message=""}render(){return n.dy` + ${this.message}`}};sn.styles=[h,d,nn],on([(0,y.Cb)()],sn.prototype,"placement",void 0),on([(0,y.Cb)()],sn.prototype,"message",void 0),sn=on([f("wui-tooltip")],sn);const an=n.iv` + :host { + display: flex; + justify-content: center; + align-items: center; + width: var(--wui-icon-box-size-xl); + height: var(--wui-icon-box-size-xl); + box-shadow: 0 0 0 8px var(--wui-thumbnail-border); + border-radius: var(--local-border-radius); + overflow: hidden; + } + + wui-icon { + width: 32px; + height: 32px; + } +`;var cn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ln=class extends n.oi{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"};`,n.dy`${this.templateVisual()}`}templateVisual(){return this.imageSrc?n.dy``:n.dy``}};ln.styles=[h,an],cn([(0,y.Cb)()],ln.prototype,"imageSrc",void 0),cn([(0,y.Cb)()],ln.prototype,"alt",void 0),cn([(0,y.Cb)({type:Boolean})],ln.prototype,"borderRadiusFull",void 0),ln=cn([f("wui-visual-thumbnail")],ln);const un=n.iv` + :host { + display: block; + } + + button { + width: 100%; + display: block; + padding-top: var(--wui-spacing-l); + padding-bottom: var(--wui-spacing-l); + padding-left: var(--wui-spacing-s); + padding-right: var(--wui-spacing-2l); + border-radius: var(--wui-border-radius-s); + background-color: var(--wui-accent-glass-015); + } + + button:hover { + background-color: var(--wui-accent-glass-010) !important; + } + + button:active { + background-color: var(--wui-accent-glass-020) !important; + } +`;var hn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let dn=class extends n.oi{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return n.dy` + + `}};dn.styles=[h,d,un],hn([(0,y.Cb)()],dn.prototype,"label",void 0),hn([(0,y.Cb)()],dn.prototype,"description",void 0),hn([(0,y.Cb)()],dn.prototype,"icon",void 0),dn=hn([f("wui-notice-card")],dn);const pn=n.iv` + button { + height: auto; + position: relative; + flex-direction: column; + gap: var(--wui-spacing-s); + padding: 17px 18px 17px var(--wui-spacing-m); + width: 100%; + background-color: var(--wui-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-250); + } + + .overflowedContent { + width: 100%; + overflow: hidden; + } + + .overflowedContent[data-active='false']:after { + content: ''; + position: absolute; + top: 50%; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(to top, var(--wui-color-bg-200), transparent); + border-bottom-left-radius: var(--wui-border-radius-xs); + border-bottom-right-radius: var(--wui-border-radius-xs); + } + + .heightContent { + max-height: 100px; + } + + pre { + text-align: left; + white-space: pre-wrap; + height: auto; + overflow-x: auto; + overflow-wrap: anywhere; + } +`;var fn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let gn=class extends n.oi{constructor(){super(...arguments),this.textTitle="",this.overflowedContent="",this.toggled=!1,this.enableAccordion=!1,this.scrollElement=void 0,this.scrollHeightElement=0}firstUpdated(){setTimeout((()=>{const e=this.shadowRoot?.querySelector(".heightContent");if(e){this.scrollElement=e;const t=e?.scrollHeight;t&&t>100&&(this.enableAccordion=!0,this.scrollHeightElement=t,this.requestUpdate())}}),0)}render(){return n.dy` + + `}onClick(){const e=this.shadowRoot?.querySelector("wui-icon");this.enableAccordion&&(this.toggled=!this.toggled,this.requestUpdate(),this.scrollElement&&this.scrollElement.animate([{maxHeight:this.toggled?"100px":`${this.scrollHeightElement}px`},{maxHeight:this.toggled?`${this.scrollHeightElement}px`:"100px"}],{duration:300,fill:"forwards",easing:"ease"}),e&&e.animate([{transform:this.toggled?"rotate(0deg)":"rotate(180deg)"},{transform:this.toggled?"rotate(180deg)":"rotate(0deg)"}],{duration:300,fill:"forwards",easing:"ease"}))}chevronTemplate(){return this.enableAccordion?n.dy` `:null}};gn.styles=[h,d,pn],fn([(0,y.Cb)()],gn.prototype,"textTitle",void 0),fn([(0,y.Cb)()],gn.prototype,"overflowedContent",void 0),gn=fn([f("wui-list-accordion")],gn);const mn=n.iv` + :host { + display: flex; + column-gap: var(--wui-spacing-s); + padding: 17px 18px 17px var(--wui-spacing-m); + width: 100%; + background-color: var(--wui-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-250); + } + + wui-image { + width: var(--wui-icon-size-lg); + height: var(--wui-icon-size-lg); + border-radius: var(--wui-border-radius-3xl); + } + + wui-icon { + width: var(--wui-icon-size-lg); + height: var(--wui-icon-size-lg); + } +`;var yn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let wn=class extends n.oi{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return n.dy` + + + ${this.textTitle} + + ${this.templateContent()} + + `}templateContent(){return this.imageSrc?n.dy``:this.textValue?n.dy` ${this.textValue} `:n.dy``}};wn.styles=[h,d,mn],yn([(0,y.Cb)()],wn.prototype,"imageSrc",void 0),yn([(0,y.Cb)()],wn.prototype,"textTitle",void 0),yn([(0,y.Cb)()],wn.prototype,"textValue",void 0),wn=yn([f("wui-list-content")],wn);const bn=n.iv` + :host { + display: flex; + flex-direction: column; + gap: var(--wui-spacing-l); + padding: 17px 18px 17px var(--wui-spacing-m); + width: 100%; + background-color: var(--wui-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-250); + } + + wui-image { + width: var(--wui-icon-size-lg); + height: var(--wui-icon-size-lg); + border-radius: var(--wui-border-radius-3xl); + } + + wui-icon { + width: var(--wui-icon-size-lg); + height: var(--wui-icon-size-lg); + } +`;var vn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let _n=class extends n.oi{constructor(){super(...arguments),this.amount="",this.networkCurreny="",this.networkImageUrl="",this.receiverAddress=""}render(){return n.dy` + + Sending + + + ${this.amount} ${this.networkCurreny} + + ${this.templateNetworkVisual()} + + + + To + + + `}templateNetworkVisual(){return this.networkImageUrl?n.dy``:n.dy``}};_n.styles=[h,d,bn],vn([(0,y.Cb)()],_n.prototype,"amount",void 0),vn([(0,y.Cb)()],_n.prototype,"networkCurreny",void 0),vn([(0,y.Cb)()],_n.prototype,"networkImageUrl",void 0),vn([(0,y.Cb)()],_n.prototype,"receiverAddress",void 0),_n=vn([f("wui-list-wallet-transaction")],_n);const En=n.iv` + :host { + display: grid; + width: inherit; + height: inherit; + } +`;var xn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Cn=class extends n.oi{render(){return this.style.cssText=`\n grid-template-rows: ${this.gridTemplateRows};\n grid-template-columns: ${this.gridTemplateColumns};\n justify-items: ${this.justifyItems};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n align-content: ${this.alignContent};\n column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding&&st.getSpacingStyles(this.padding,0)};\n padding-right: ${this.padding&&st.getSpacingStyles(this.padding,1)};\n padding-bottom: ${this.padding&&st.getSpacingStyles(this.padding,2)};\n padding-left: ${this.padding&&st.getSpacingStyles(this.padding,3)};\n margin-top: ${this.margin&&st.getSpacingStyles(this.margin,0)};\n margin-right: ${this.margin&&st.getSpacingStyles(this.margin,1)};\n margin-bottom: ${this.margin&&st.getSpacingStyles(this.margin,2)};\n margin-left: ${this.margin&&st.getSpacingStyles(this.margin,3)};\n `,n.dy``}};Cn.styles=[h,En],xn([(0,y.Cb)()],Cn.prototype,"gridTemplateRows",void 0),xn([(0,y.Cb)()],Cn.prototype,"gridTemplateColumns",void 0),xn([(0,y.Cb)()],Cn.prototype,"justifyItems",void 0),xn([(0,y.Cb)()],Cn.prototype,"alignItems",void 0),xn([(0,y.Cb)()],Cn.prototype,"justifyContent",void 0),xn([(0,y.Cb)()],Cn.prototype,"alignContent",void 0),xn([(0,y.Cb)()],Cn.prototype,"columnGap",void 0),xn([(0,y.Cb)()],Cn.prototype,"rowGap",void 0),xn([(0,y.Cb)()],Cn.prototype,"gap",void 0),xn([(0,y.Cb)()],Cn.prototype,"padding",void 0),xn([(0,y.Cb)()],Cn.prototype,"margin",void 0),Cn=xn([f("wui-grid")],Cn);const Sn=n.iv` + :host { + position: relative; + display: flex; + width: 100%; + height: 1px; + background-color: var(--wui-gray-glass-005); + justify-content: center; + align-items: center; + } + + :host > wui-text { + position: absolute; + padding: 0px 10px; + background-color: var(--wui-color-modal-bg); + } +`;var An=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let In=class extends n.oi{constructor(){super(...arguments),this.text=""}render(){return n.dy`${this.template()}`}template(){return this.text?n.dy`${this.text}`:null}};In.styles=[h,Sn],An([(0,y.Cb)()],In.prototype,"text",void 0),In=An([f("wui-separator")],In);var kn=r(248);const Pn=["receive","deposit","borrow","claim"],On=["withdraw","repay","burn"],Rn={getTransactionGroupTitle:e=>e===kn.E.getYear()?"This Year":e,getTransactionImages(e){const[t,r]=e,n=Boolean(t)&&e?.every((e=>Boolean(e.nft_info))),i=e?.length>1;return 2!==e?.length||n?i?e.map((e=>this.getTransactionImage(e))):[this.getTransactionImage(t)]:[this.getTransactionImage(t),this.getTransactionImage(r)]},getTransactionImage:e=>({type:Rn.getTransactionTransferTokenType(e),url:Rn.getTransactionImageURL(e)}),getTransactionImageURL(e){let t=null;const r=Boolean(e?.nft_info),n=Boolean(e?.fungible_info);return e&&r?t=e?.nft_info?.content?.preview?.url:e&&n&&(t=e?.fungible_info?.icon?.url),t},getTransactionTransferTokenType:e=>e?.fungible_info?"FUNGIBLE":e?.nft_info?"NFT":null,getTransactionDescriptions(e){const t=e.metadata?.operationType,r=e.transfers,n=e.transfers?.length>0,i=e.transfers?.length>1,o=n&&r?.every((e=>Boolean(e.fungible_info))),[s,a]=r;let c=this.getTransferDescription(s),l=this.getTransferDescription(a);if(!n)return"send"!==t&&"receive"!==t||!o?[e.metadata.status]:(c=st.getTruncateString({string:e.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),l=st.getTruncateString({string:e.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[c,l]);if(i)return r.map((e=>this.getTransferDescription(e)));let u="";return Pn.includes(t)?u="+":On.includes(t)&&(u="-"),c=u.concat(c),[c]},getTransferDescription(e){let t="";return e?(e?.nft_info?t=e?.nft_info?.name||"-":e?.fungible_info&&(t=this.getFungibleTransferDescription(e)||"-"),t):t},getFungibleTransferDescription(e){return e?[this.getQuantityFixedValue(e?.quantity.numeric),e?.fungible_info?.symbol].join(" ").trim():null},getQuantityFixedValue:e=>e?parseFloat(e).toFixed(3):null}},3649:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__addDisposableResource:()=>T,__assign:()=>o,__asyncDelegator:()=>S,__asyncGenerator:()=>C,__asyncValues:()=>A,__await:()=>x,__awaiter:()=>f,__classPrivateFieldGet:()=>R,__classPrivateFieldIn:()=>N,__classPrivateFieldSet:()=>M,__createBinding:()=>m,__decorate:()=>a,__disposeResources:()=>L,__esDecorate:()=>l,__exportStar:()=>y,__extends:()=>i,__generator:()=>g,__importDefault:()=>O,__importStar:()=>P,__makeTemplateObject:()=>I,__metadata:()=>p,__param:()=>c,__propKey:()=>h,__read:()=>b,__rest:()=>s,__runInitializers:()=>u,__setFunctionName:()=>d,__spread:()=>v,__spreadArray:()=>E,__spreadArrays:()=>_,__values:()=>w,default:()=>D});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?n.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),d=!1,p=r.length-1;p>=0;p--){var f={};for(var g in n)f[g]="access"===g?{}:n[g];for(var g in n.access)f.access[g]=n.access[g];f.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var m=(0,r[p])("accessor"===c?{get:h.get,set:h.set}:h[l],f);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(a=s(m.get))&&(h.get=a),(a=s(m.set))&&(h.set=a),(a=s(m.init))&&i.unshift(a)}else(a=s(m))&&("field"===c?i.unshift(a):h[l]=a)}u&&Object.defineProperty(u,n.name,h),d=!0}function u(e,t,r){for(var n=arguments.length>2,i=0;i0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function v(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof x?Promise.resolve(r.value.v).then(c,l):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:x(e[n](t)),done:!1}:i?i(t):t}:i}}function A(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=w(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function P(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return k(t,e),t}function O(e){return e&&e.__esModule?e:{default:e}}function R(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function M(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function T(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var j="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function L(e){function t(t){e.error=e.hasError?new j(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const D={__extends:i,__assign:o,__rest:s,__decorate:a,__param:c,__metadata:p,__awaiter:f,__generator:g,__createBinding:m,__exportStar:y,__values:w,__read:b,__spread:v,__spreadArrays:_,__spreadArray:E,__await:x,__asyncGenerator:C,__asyncDelegator:S,__asyncValues:A,__makeTemplateObject:I,__importStar:P,__importDefault:O,__classPrivateFieldGet:R,__classPrivateFieldSet:M,__classPrivateFieldIn:N,__addDisposableResource:T,__disposeResources:L}},3215:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>s,SB:()=>a});var n=r(2202);const i={attribute:!0,type:String,converter:n.Ts,reflect:!1,hasChanged:n.Qu},o=(e=i,t,r)=>{const{kind:n,metadata:o}=r;let s=globalThis.litPropertyMetadata.get(o);if(void 0===s&&globalThis.litPropertyMetadata.set(o,s=new Map),s.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const i=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,i,e)},init(t){return void 0!==t&&this.C(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];t.call(this,r),this.requestUpdate(n,i,e)}}throw Error("Unsupported decorator location: "+n)};function s(e){return(t,r)=>"object"==typeof r?o(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function a(e){return s({...e,state:!0,attribute:!1})}},5118:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(9699);const i=e=>e??n.Ld},5756:(e,t,r)=>{"use strict";r.d(t,{V:()=>p,i:()=>m});var n=r(9699);const{D:i}=n._$LH;var o=r(8476);const s=(e,t)=>{const r=e._$AN;if(void 0===r)return!1;for(const e of r)e._$AO?.(t,!1),s(e,t);return!0},a=e=>{let t,r;do{if(void 0===(t=e._$AM))break;r=t._$AN,r.delete(e),e=t}while(0===r?.size)},c=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(void 0===r)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),h(t)}};function l(e){void 0!==this._$AN?(a(this),this._$AM=e,c(this)):this._$AM=e}function u(e,t=!1,r=0){const n=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(t)if(Array.isArray(n))for(let e=r;e{e.type==o.pX.CHILD&&(e._$AP??=u,e._$AQ??=l)};class d extends o.Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),c(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(s(this,e),a(this))}setValue(e){if((e=>void 0===this._$Ct.strings)())this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const p=()=>new f;class f{}const g=new WeakMap,m=(0,o.XM)(class extends d{render(e){return n.Ld}update(e,[t]){const r=t!==this.G;return r&&void 0!==this.G&&this.ot(void 0),(r||this.rt!==this.lt)&&(this.G=t,this.ct=e.options?.host,this.ot(this.lt=e.element)),n.Ld}ot(e){if("function"==typeof this.G){const t=this.ct??globalThis;let r=g.get(t);void 0===r&&(r=new WeakMap,g.set(t,r)),void 0!==r.get(this.G)&&this.G.call(this.ct,void 0),r.set(this.G,e),void 0!==e&&this.G.call(this.ct,e)}else this.G.value=e}get rt(){return"function"==typeof this.G?g.get(this.ct??globalThis)?.get(this.G):this.G?.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}})},242:(e,t,r)=>{"use strict";r.d(t,{oi:()=>he,iv:()=>l,dy:()=>G,YP:()=>Z,$m:()=>c}),r(2202),r(9699);const n=globalThis,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&s.set(t,e))}return e}toString(){return this.cssText}}const c=e=>new a("string"==typeof e?e:e+"",void 0,o),l=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new a(r,e,o)},u=(e,t)=>{if(i)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),i=n.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=r.cssText,e.appendChild(t)}},h=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return c(t)})(e):e,{is:d,defineProperty:p,getOwnPropertyDescriptor:f,getOwnPropertyNames:g,getOwnPropertySymbols:m,getPrototypeOf:y}=Object,w=globalThis,b=w.trustedTypes,v=b?b.emptyScript:"",_=w.reactiveElementPolyfillSupport,E=(e,t)=>e,x={toAttribute(e,t){switch(t){case Boolean:e=e?v:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},C=(e,t)=>!d(e,t),S={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:C};Symbol.metadata??=Symbol("metadata"),w.litPropertyMetadata??=new WeakMap;class A extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=S){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&p(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=f(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);i.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??S}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const e=this.properties,t=[...g(e),...m(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(h(e))}else void 0!==e&&t.push(h(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$E_??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$E_?.delete(e)}_$ES(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return u(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$E_?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:x).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:x;this._$Em=n,this[n]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??C)(this[e],t))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$ET??=new Set).add(e)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.C(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$E_?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$Ej()}catch(t){throw e=!1,this._$Ej(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$E_?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ej(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(e){return!0}update(e){this._$ET&&=this._$ET.forEach((e=>this._$EO(e,this[e]))),this._$Ej()}updated(e){}firstUpdated(e){}}A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[E("elementProperties")]=new Map,A[E("finalized")]=new Map,_?.({ReactiveElement:A}),(w.reactiveElementVersions??=[]).push("2.0.3");const I=globalThis,k=I.trustedTypes,P=k?k.createPolicy("lit-html",{createHTML:e=>e}):void 0,O="$lit$",R=`lit$${(Math.random()+"").slice(9)}$`,M="?"+R,N=`<${M}>`,T=document,j=()=>T.createComment(""),L=e=>null===e||"object"!=typeof e&&"function"!=typeof e,D=Array.isArray,$="[ \t\n\f\r]",B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,U=/-->/g,F=/>/g,z=RegExp(`>|${$}(?:([^\\s"'>=/]+)(${$}*=${$}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),W=/'/g,H=/"/g,V=/^(?:script|style|textarea|title)$/i,q=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),G=q(1),Z=q(2),K=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),Q=new WeakMap,J=T.createTreeWalker(T,129);function X(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==P?P.createHTML(t):t}const ee=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"":"",s=B;for(let t=0;t"===c[0]?(s=i??B,l=-1):void 0===c[1]?l=-2:(l=s.lastIndex-c[2].length,a=c[1],s=void 0===c[3]?z:'"'===c[3]?H:W):s===H||s===W?s=z:s===U||s===F?s=B:(s=z,i=void 0);const h=s===z&&e[t+1].startsWith("/>")?" ":"";o+=s===B?r+N:l>=0?(n.push(a),r.slice(0,l)+O+r.slice(l)+R+h):r+R+(-2===l?t:h)}return[X(e,o+(e[r]||"")+(2===t?"":"")),n]};class te{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const s=e.length-1,a=this.parts,[c,l]=ee(e,t);if(this.el=te.createElement(c,r),J.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=J.nextNode())&&a.length0){n.textContent=k?k.emptyScript:"";for(let r=0;rD(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==Y&&L(this._$AH)?this._$AA.nextSibling.data=e:this.$(T.createTextNode(e)),this._$AH=e}g(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=te.createElement(X(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new ne(n,this),r=e.u(this.options);e.p(t),this.$(r),this._$AH=e}}_$AC(e){let t=Q.get(e.strings);return void 0===t&&Q.set(e.strings,t=new te(e)),t}T(e){D(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new ie(this.k(j()),this.k(j()),this,this.options)):r=t[n],r._$AI(i),n++;n2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Y}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=re(this,e,t,0),o=!L(e)||e!==this._$AH&&e!==K,o&&(this._$AH=e);else{const n=e;let s,a;for(e=i[0],s=0;s{const n=r?.renderBefore??t;let i=n._$litPart$;if(void 0===i){const e=r?.renderBefore??null;n._$litPart$=i=new ie(t.insertBefore(j(),e),e,void 0,r??{})}return i._$AI(e),i})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return K}}he._$litElement$=!0,he.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:he});const de=globalThis.litElementPolyfillSupport;de?.({LitElement:he}),(globalThis.litElementVersions??=[]).push("4.0.3")},2202:(e,t,r)=>{"use strict";r.d(t,{Ts:()=>_,Qu:()=>E});const n=globalThis,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&s.set(t,e))}return e}toString(){return this.cssText}}const c=(e,t)=>{if(i)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),i=n.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=r.cssText,e.appendChild(t)}},l=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new a("string"==typeof e?e:e+"",void 0,o))(t)})(e):e,{is:u,defineProperty:h,getOwnPropertyDescriptor:d,getOwnPropertyNames:p,getOwnPropertySymbols:f,getPrototypeOf:g}=Object,m=globalThis,y=m.trustedTypes,w=y?y.emptyScript:"",b=m.reactiveElementPolyfillSupport,v=(e,t)=>e,_={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},E=(e,t)=>!u(e,t),x={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:E};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=x){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&h(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);i.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??x}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const e=g(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const e=this.properties,t=[...p(e),...f(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(l(e))}else void 0!==e&&t.push(l(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$E_??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$E_?.delete(e)}_$ES(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$E_?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:_).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:_;this._$Em=n,this[n]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??E)(this[e],t))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$ET??=new Set).add(e)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.C(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$E_?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$Ej()}catch(t){throw e=!1,this._$Ej(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$E_?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ej(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(e){return!0}update(e){this._$ET&&=this._$ET.forEach((e=>this._$EO(e,this[e]))),this._$Ej()}updated(e){}firstUpdated(e){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[v("elementProperties")]=new Map,C[v("finalized")]=new Map,b?.({ReactiveElement:C}),(m.reactiveElementVersions??=[]).push("2.0.3")},8476:(e,t,r)=>{"use strict";r.d(t,{XM:()=>i,Xe:()=>o,pX:()=>n});const n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},i=e=>(...t)=>({_$litDirective$:e,values:t});class o{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},9699:(e,t,r)=>{"use strict";r.d(t,{Jb:()=>C,Ld:()=>S,_$LH:()=>B});const n=globalThis,i=n.trustedTypes,o=i?i.createPolicy("lit-html",{createHTML:e=>e}):void 0,s="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,c="?"+a,l=`<${c}>`,u=document,h=()=>u.createComment(""),d=e=>null===e||"object"!=typeof e&&"function"!=typeof e,p=Array.isArray,f=e=>p(e)||"function"==typeof e?.[Symbol.iterator],g="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,w=/>/g,b=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,_=/"/g,E=/^(?:script|style|textarea|title)$/i,x=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),C=(x(1),x(2),Symbol.for("lit-noChange")),S=Symbol.for("lit-nothing"),A=new WeakMap,I=u.createTreeWalker(u,129);function k(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(t):t}const P=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"":"",c=m;for(let t=0;t"===h[0]?(c=i??m,d=-1):void 0===h[1]?d=-2:(d=c.lastIndex-h[2].length,u=h[1],c=void 0===h[3]?b:'"'===h[3]?_:v):c===_||c===v?c=b:c===y||c===w?c=m:(c=b,i=void 0);const f=c===b&&e[t+1].startsWith("/>")?" ":"";o+=c===m?r+l:d>=0?(n.push(u),r.slice(0,d)+s+r.slice(d)+a+f):r+a+(-2===d?t:f)}return[k(e,o+(e[r]||"")+(2===t?"":"")),n]};class O{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let o=0,l=0;const u=e.length-1,d=this.parts,[p,f]=P(e,t);if(this.el=O.createElement(p,r),I.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=I.nextNode())&&d.length0){n.textContent=i?i.emptyScript:"";for(let r=0;r2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=S}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=R(this,e,t,0),o=!d(e)||e!==this._$AH&&e!==C,o&&(this._$AH=e);else{const n=e;let s,a;for(e=i[0],s=0;s{"use strict";r.d(t,{E:()=>i});var n=r(6867);function i(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?(0,n.P)(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}},605:(e,t,r)=>{"use strict";r.d(t,{z:()=>o});var n=r(3160),i=r(6867);function o(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const r=(0,n.E)(t);let o=0;for(const t of e)r.set(t,o),o+=t.length;return(0,i.P)(r)}},2217:(e,t,r)=>{"use strict";r.d(t,{m:()=>o});var n=r(5114),i=r(6867);function o(e,t="utf8"){const r=n.Z[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):(0,i.P)(globalThis.Buffer.from(e,"utf-8"))}},7466:(e,t,r)=>{"use strict";r.d(t,{BB:()=>o.B,mL:()=>i.m,zo:()=>n.z});var n=r(605),i=r(2217),o=r(2263)},2263:(e,t,r)=>{"use strict";r.d(t,{B:()=>i});var n=r(5114);function i(e,t="utf8"){const r=n.Z[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}},6867:(e,t,r)=>{"use strict";function n(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}r.d(t,{P:()=>n})},5114:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Ue});var n={};r.r(n),r.d(n,{identity:()=>I});var i={};r.r(i),r.d(i,{base2:()=>k});var o={};r.r(o),r.d(o,{base8:()=>P});var s={};r.r(s),r.d(s,{base10:()=>O});var a={};r.r(a),r.d(a,{base16:()=>R,base16upper:()=>M});var c={};r.r(c),r.d(c,{base32:()=>N,base32hex:()=>D,base32hexpad:()=>B,base32hexpadupper:()=>U,base32hexupper:()=>$,base32pad:()=>j,base32padupper:()=>L,base32upper:()=>T,base32z:()=>F});var l={};r.r(l),r.d(l,{base36:()=>z,base36upper:()=>W});var u={};r.r(u),r.d(u,{base58btc:()=>H,base58flickr:()=>V});var h={};r.r(h),r.d(h,{base64:()=>q,base64pad:()=>G,base64url:()=>Z,base64urlpad:()=>K});var d={};r.r(d),r.d(d,{base256emoji:()=>X});var p={};r.r(p),r.d(p,{sha256:()=>_e,sha512:()=>Ee});var f={};r.r(f),r.d(f,{identity:()=>Ce});var g={};r.r(g),r.d(g,{code:()=>Ae,decode:()=>ke,encode:()=>Ie,name:()=>Se});var m={};r.r(m),r.d(m,{code:()=>Me,decode:()=>Te,encode:()=>Ne,name:()=>Re});const y=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,d=o-1;(0!==u||h>>0,s[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var p=o-i;p!==o&&0===s[p];)p++;for(var f=new Uint8Array(n+(o-p)),g=n;p!==o;)f[g++]=s[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*u+1>>>0,l=new Uint8Array(s);i!==o;){for(var h=t[i],d=0,p=s-1;(0!==h||d>>0,l[p]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var f=s-n;f!==s&&0===l[f];)f++;for(var g=c.repeat(r);f{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class b{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class v{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return E(this,e)}}class _{constructor(e){this.decoders=e}or(e){return E(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const E=(e,t)=>new _({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class x{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new b(e,t,r),this.decoder=new v(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const C=({name:e,prefix:t,encode:r,decode:n})=>new x(e,t,r,n),S=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=y(r,t);return C({prefix:e,name:t,encode:n,decode:e=>w(i(e))})},A=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>C({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<((e,t,r,n)=>{const i={};for(let e=0;e=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,n,r,e)}),I=C({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),k=A({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),P=A({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),O=S({prefix:"9",name:"base10",alphabet:"0123456789"}),R=A({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),M=A({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),N=A({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),T=A({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),j=A({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),L=A({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),D=A({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),$=A({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),B=A({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),U=A({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),F=A({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),z=S({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),W=S({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),H=S({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),V=S({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),q=A({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),G=A({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Z=A({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),K=A({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Y=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Q=Y.reduce(((e,t,r)=>(e[r]=t,e)),[]),J=Y.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]),X=C({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+Q[t]),"")},decode:function(e){const t=[];for(const r of e){const e=J[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var ee=128,te=-128,re=Math.pow(2,31),ne=Math.pow(2,7),ie=Math.pow(2,14),oe=Math.pow(2,21),se=Math.pow(2,28),ae=Math.pow(2,35),ce=Math.pow(2,42),le=Math.pow(2,49),ue=Math.pow(2,56),he=Math.pow(2,63);const de=function e(t,r,n){r=r||[];for(var i=n=n||0;t>=re;)r[n++]=255&t|ee,t/=128;for(;t&te;)r[n++]=255&t|ee,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},pe=function(e){return e(de(e,t,r),t),ge=e=>pe(e),me=(e,t)=>{const r=t.byteLength,n=ge(e),i=n+ge(r),o=new Uint8Array(i+r);return fe(e,o,0),fe(r,o,n),o.set(t,i),new ye(e,r,t,o)};class ye{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const we=({name:e,code:t,encode:r})=>new be(e,t,r);class be{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?me(this.code,t):t.then((e=>me(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ve=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),_e=we({name:"sha2-256",code:18,encode:ve("SHA-256")}),Ee=we({name:"sha2-512",code:19,encode:ve("SHA-512")}),xe=w,Ce={code:0,name:"identity",encode:xe,digest:e=>me(0,xe(e))},Se="raw",Ae=85,Ie=e=>w(e),ke=e=>w(e),Pe=new TextEncoder,Oe=new TextDecoder,Re="json",Me=512,Ne=e=>Pe.encode(JSON.stringify(e)),Te=e=>JSON.parse(Oe.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom"),Symbol.for("@ipld/js-cid/CID");const je={...n,...i,...o,...s,...a,...c,...l,...u,...h,...d};var Le=r(3160);function De(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const $e=De("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Be=De("ascii","a",(e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=(0,Le.E)(e.length);for(let r=0;r{"use strict";r.d(t,{sj:()=>h,iH:()=>f,CO:()=>p,Ld:()=>d}),Symbol();const n=Symbol(),i=Object.getPrototypeOf,o=new WeakMap,s=(e,t=!0)=>{o.set(e,t)},a=e=>"object"==typeof e&&null!==e,c=new WeakMap,l=new WeakSet,[u]=((e=Object.is,t=((e,t)=>new Proxy(e,t)),r=(e=>a(e)&&!l.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),u=(e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),h=new WeakMap,d=((e,t,r=u)=>{const n=h.get(e);if((null==n?void 0:n[0])===t)return n[1];const i=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return s(i,!0),h.set(e,[t,i]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(i,t))return;const n=Reflect.get(e,t),o={value:n,enumerable:!0,configurable:!0};if(l.has(n))s(n,!1);else if(n instanceof Promise)delete o.value,o.get=()=>r(n);else if(c.has(n)){const[e,t]=c.get(n);o.value=d(e,t(),r)}Object.defineProperty(i,t,o)})),Object.preventExtensions(i)}),p=new WeakMap,f=[1,1],g=(s=>{if(!a(s))throw new Error("object required");const u=p.get(s);if(u)return u;let h=f[0];const m=new Set,y=(e,t=++f[0])=>{h!==t&&(h=t,m.forEach((r=>r(e,t))))};let w=f[1];const b=e=>(t,r)=>{const n=[...t];n[1]=[e,...n[1]],y(n,r)},v=new Map,_=e=>{var t;const r=v.get(e);r&&(v.delete(e),null==(t=r[1])||t.call(r))},E=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),x=t(E,{deleteProperty(e,t){const r=Reflect.get(e,t);_(t);const n=Reflect.deleteProperty(e,t);return n&&y(["delete",[t],r]),n},set(t,s,u,h){const d=Reflect.has(t,s),f=Reflect.get(t,s,h);if(d&&(e(f,u)||p.has(u)&&e(f,p.get(u))))return!0;var w;_(s),a(u)&&(u=(e=>e&&(o.has(e)?o.get(e):i(e)===Object.prototype||i(e)===Array.prototype))(w=u)&&w[n]||null||u);let E=u;if(u instanceof Promise)u.then((e=>{u.status="fulfilled",u.value=e,y(["resolve",[s],e])})).catch((e=>{u.status="rejected",u.reason=e,y(["reject",[s],e])}));else{!c.has(u)&&r(u)&&(E=g(u));const e=!l.has(E)&&c.get(E);e&&((e,t)=>{if(v.has(e))throw new Error("prop listener already exists");if(m.size){const r=t[3](b(e));v.set(e,[t,r])}else v.set(e,[t])})(s,e)}return Reflect.set(t,s,E,h),y(["set",[s],u,f]),!0}});p.set(s,x);const C=[E,(e=++f[1])=>(w===e||m.size||(w=e,v.forEach((([t])=>{const r=t[1](e);r>h&&(h=r)}))),h),d,e=>(m.add(e),1===m.size&&v.forEach((([e,t],r)=>{if(t)throw new Error("remove already exists");const n=e[3](b(r));v.set(r,[e,n])})),()=>{m.delete(e),0===m.size&&v.forEach((([e,t],r)=>{t&&(t(),v.set(r,[e]))}))})];return c.set(x,C),Reflect.ownKeys(s).forEach((e=>{const t=Object.getOwnPropertyDescriptor(s,e);"value"in t&&(x[e]=s[e],delete t.value,delete t.writable),Object.defineProperty(E,e,t)})),x}))=>[g,c,l,e,t,r,u,h,d,p,f])();function h(e={}){return u(e)}function d(e,t,r){const n=c.get(e);let i;n||console.warn("Please use proxy object");const o=[],s=n[3];let a=!1;const l=s((e=>{o.push(e),r?t(o.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,a&&t(o.splice(0))})))}));return a=!0,()=>{a=!1,l()}}function p(e,t){const r=c.get(e);r||console.warn("Please use proxy object");const[n,i,o]=r;return o(n,i(),t)}function f(e){return l.add(e),e}},4503:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}r.d(t,{T:()=>n})},84:(e,t,r)=>{"use strict";r.d(t,{R:()=>b});var n=r(4503),i=r(6693);const o="0x82ad56cb";var s=r(2027),a=r(377),c=r(5980),l=r(7210),u=r(7799),h=r(7864),d=r(2106),p=r(6445),f=r(7469),g=r(1163),m=r(4688),y=r(2357),w=r(7531);async function b(e,t){const{account:b=e.account,batch:v=Boolean(e.batch?.multicall),blockNumber:_,blockTag:E="latest",accessList:x,data:C,gas:S,gasPrice:A,maxFeePerGas:I,maxPriorityFeePerGas:k,nonce:P,to:O,value:R,...M}=t,N=b?(0,n.T)(b):void 0;try{(0,w.F)(t);const r=(_?(0,d.eC)(_):void 0)||E,n=e.chain?.formatters?.transactionRequest?.format,s=(n||m.tG)({...(0,g.K)(M,{format:n}),from:N?.address,accessList:x,data:C,gas:S,gasPrice:A,maxFeePerGas:I,maxPriorityFeePerGas:k,nonce:P,to:O,value:R});if(v&&function({request:e}){const{data:t,to:r,...n}=e;return!(!t||t.startsWith(o)||!r||Object.values(n).filter((e=>void 0!==e)).length>0)}({request:s}))try{return await async function(e,t){const{batchSize:r=1024,wait:n=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:o,blockTag:s="latest",data:p,multicallAddress:f,to:g}=t;let m=f;if(!m){if(!e.chain)throw new a.pZ;m=(0,h.L)({blockNumber:o,chain:e.chain,contract:"multicall3"})}const w=(o?(0,d.eC)(o):void 0)||s,{schedule:b}=(0,y.S)({id:`${e.uid}.${w}`,wait:n,shouldSplitBatch(e){const t=e.reduce(((e,{data:t})=>e+(t.length-2)),0);return t>2*r},fn:async t=>{const r=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),n=(0,u.R)({abi:i.F8,args:[r],functionName:"aggregate3"}),o=await e.request({method:"eth_call",params:[{data:n,to:m},w]});return(0,l.k)({abi:i.F8,args:[r],functionName:"aggregate3",data:o||"0x"})}}),[{returnData:v,success:_}]=await b({data:p,to:g});if(!_)throw new c.VQ({data:v});return"0x"===v?{data:void 0}:{data:v}}(e,{...s,blockNumber:_,blockTag:E})}catch(e){if(!(e instanceof a.pZ||e instanceof a.mm))throw e}const p=await e.request({method:"eth_call",params:r?[s,r]:[s]});return"0x"===p?{data:void 0}:{data:p}}catch(n){const i=function(e){if(!(e instanceof s.G))return;const t=e.walk();return"object"==typeof t.data?t.data.data:t.data}(n),{offchainLookup:o,offchainLookupSignature:a}=await Promise.resolve().then(r.bind(r,9770));if(i?.slice(0,10)===a&&O)return{data:await o(e,{data:i,to:O})};throw function(e,{docsPath:t,...r}){const n=(()=>{const t=(0,f.k)(e,r);return t instanceof p.cj?e:t})();return new c.cg(n,{docsPath:t,...r})}(n,{...t,account:N,chain:e.chain})}}},6693:(e,t,r)=>{"use strict";r.d(t,{$o:()=>l,F8:()=>n,X$:()=>c,du:()=>s,k3:()=>o,nZ:()=>a});const n=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],i=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],o=[...i,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],s=[...i,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],a=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],l=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},1746:(e,t,r)=>{"use strict";r.d(t,{$:()=>n,Up:()=>i,hZ:()=>o});const n={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},o={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},4192:(e,t,r)=>{"use strict";r.d(t,{Bd:()=>o,Zn:()=>i,ez:()=>n});const n={gwei:9,wei:18},i={ether:-9,wei:9},o={ether:-18,gwei:-9}},4849:(e,t,r)=>{"use strict";r.d(t,{normalize:()=>ye});var n="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const i=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),o=4;function s(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e>--c&1}const h=2**31,d=h>>>1,p=h-1;let f=0;for(let e=0;e<31;e++)f=f<<1|u();let g=[],m=0,y=h;for(;;){let e=Math.floor(((f-m+1)*i-1)/y),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|u(),s=s<<1^d,a=(a^d)<<1|d|1;m=s,y=1+a-s}let w=n-4;return g.map((t=>{switch(t-w){case 3:return w+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return w+256+(e[a++]<<8|e[a++]);case 1:return w+e[a++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,r)=>t[e.charCodeAt(0)]=r));let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,s=0,a=0;i=8&&(n[o++]=a>>(s-=8));return n}(e)))}function a(e){return 1&e?~e>>1:e>>1}function c(e,t){let r=Array(e);for(let n=0,i=0;n{let t=l(e);if(t.length)return t}))}function h(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(f(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(g(r,e))}return t.flat()}function d(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function p(e,t,r){let n=Array(e).fill().map((()=>[]));for(let i=0;in[t].push(e)));return n}function f(e,t){let r=1+t(),n=t(),i=d(t);return p(i.length,1+e,t).flatMap(((e,t)=>{let[o,...s]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*n;return[o+t*r,s.map((e=>e+i))]}))}))}function g(e,t){return p(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}function m(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function y(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let r=[];for(let n=0;n>24&255}function R(e){return 16777215&e}let M,N,T,j;function L(e){return e>=v&&e=_&&e=E&&tx&&te.map((e=>[e,t+1<<24]))))),N=new Set(l(e)),T=new Map,j=new Map;for(let[t,r]of h(e)){if(!N.has(t)&&2==r.length){let[e,n]=r,i=j.get(e);i||(i=new Map,j.set(e,i)),i.set(n,t)}T.set(t,r.reverse())}}();let t=[],r=[],n=!1;function i(e){let r=M.get(e);r&&(n=!0,e|=r),t.push(e)}for(let n of e)for(;;){if(n<128)t.push(n);else if(L(n)){let e=n-v,t=e%S/C|0,r=e%C;i(_+(e/S|0)),i(E+t),r>0&&i(x+r)}else{let e=T.get(n);e?r.push(...e):i(n)}if(!r.length)break;n=r.pop()}if(n&&t.length>1){let e=O(t[0]);for(let r=1;r0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=s):r.push(s),i=e;else{let o=D(n,s);o>=0?n=o:0==i&&0==e?(t.push(n),n=s):(r.push(s),i=e)}}return n>=0&&t.push(n,...r),t}($(e))}const F=45,z=".",W=65039,H=1,V=e=>Array.from(e);function q(e,t){return e.P.has(t)||e.Q.has(t)}class G extends Array{get is_emoji(){return!0}}let Z,K,Y,Q,J,X,ee,te,re,ne,ie,oe;function se(){if(Z)return;let e=s(n);const t=()=>l(e),r=()=>new Set(t());Z=new Map(h(e)),K=r(),Y=t(),Q=new Set(t().map((e=>Y[e]))),Y=new Set(Y),J=r(),X=r();let i=u(e),o=e();const a=()=>new Set(t().flatMap((e=>i[e])).concat(t()));ee=d((t=>{let r=d(e).map((e=>e+96));if(r.length){let n=t>=o;return r[0]-=32,r=y(r),n&&(r=`Restricted[${r}]`),{N:r,P:a(),Q:a(),M:!e(),R:n}}})),te=r(),re=new Map;let c=t().concat(V(te)).sort(((e,t)=>e-t));c.forEach(((t,r)=>{let n=e(),i=c[r]=n?c[r-n]:{V:[],M:new Map};i.V.push(t),te.has(t)||re.set(t,i)}));for(let{V:e,M:t}of new Set(re.values())){let r=[];for(let t of e){let e=ee.filter((e=>q(e,t))),n=r.find((({G:t})=>e.some((e=>t.has(e)))));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),e.forEach((e=>n.G.add(e)))}let n=r.flatMap((e=>V(e.G)));for(let{G:e,V:i}of r){let r=new Set(n.filter((t=>!e.has(t))));for(let e of i)t.set(e,r)}}let p=new Set,f=new Set;const g=e=>p.has(e)?f.add(e):p.add(e);for(let e of ee){for(let t of e.P)g(t);for(let t of e.Q)g(t)}for(let e of p)re.has(e)||f.has(e)||re.set(e,H);ne=new Set(V(p).concat(V(B(p)))),ie=function(e){let t=[],r=l(e);return function e({S:r,B:n},i,o){if(!(4&r&&o===i[i.length-1])){2&r&&(o=i[i.length-1]),1&r&&t.push(i);for(let t of n)for(let r of t.Q)e(t,[...i,r],o)}}(function t(n){return{S:e(),B:d((()=>{let n=l(e).map((e=>r[e]));if(n.length)return t(n)})),Q:n}}([]),[]),t}(e).map((e=>G.from(e))).sort(w),oe=new Map;for(let e of ie){let t=[oe];for(let r of e){let e=t.map((e=>{let t=e.get(r);return t||(t=new Map,e.set(r,t)),t}));r===W?t.push(...e):t=e}for(let r of t)r.V=e}}function ae(e){return(ue(e)?"":`${ce(le([e]))} `)+m(e)}function ce(e){return`"${e}"‎`}function le(e,t=m){let r=[];var n;n=e[0],se(),Y.has(n)&&r.push("◌");let i=0,o=e.length;for(let n=0;n{let s=function(e){let t=[];for(let r=0,n=e.length;r0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}(l),!(a.emoji=c>1||n[0].is_emoji)&&l.every((e=>e<128)))!function(e){if(e.length>=4&&e[2]==F&&e[3]==F)throw new Error(`invalid label extension: "${y(e.slice(0,4))}"`)}(l),e="ASCII";else{let t=n.flatMap((e=>e.is_emoji?[]:e));if(t.length){if(Y.has(l[0]))throw fe("leading combining mark");for(let e=1;eq(e,r)));if(!e.length)throw ee.some((e=>q(e,r)))?pe(t[0],r):de(r);if(t=e,1==e.length)break}return t}(r);!function(e,t){for(let r of t)if(!q(e,r))throw pe(e,r);if(e.M){let e=B(t);for(let t=1,r=e.length;to)throw new Error(`excessive non-spacing marks: ${ce(le(e.slice(t-1,n)))} (${n-t}/${o})`);t=n}}}(s,t),function(e,t){let r,n=[];for(let e of t){let t=re.get(e);if(t===H)return;if(t){let n=t.M.get(e);if(r=r?r.filter((e=>n.has(e))):V(n),!r.length)return}else n.push(e)}if(r)for(let t of r)if(n.every((e=>q(t,e))))throw new Error(`whole-script confusable: ${e.N}/${t.N}`)}(s,r),e=s.N}else e="Emoji"}a.type=e}catch(e){a.error=e}return a}))}function de(e){return new Error(`disallowed character: ${ae(e)}`)}function pe(e,t){let r=ae(t),n=ee.find((e=>e.P.has(t)));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function fe(e){return new Error(`illegal placement: ${e}`)}function ge(e){return e.filter((e=>e!=W))}function me(e,t){let r,n=oe,i=e.length;for(;i&&(n=n.get(e[--i]),n);){let{V:o}=n;o&&(r=o,t&&t.push(...e.slice(i).reverse()),e.length=i)}return r}function ye(e){return function(e){return function(e){return e.map((({input:t,error:r,output:n})=>{if(r){let n=r.message;throw new Error(1==e.length?n:`Invalid label ${ce(le(t))}: ${n}`)}return y(n)})).join(z)}(he(e,U,ge))}(e)}},7412:(e,t,r)=>{"use strict";r.d(t,{CI:()=>C,FM:()=>f,Gy:()=>E,KY:()=>v,M4:()=>h,MX:()=>w,S4:()=>b,SM:()=>_,cO:()=>a,dh:()=>x,fM:()=>s,fs:()=>d,gr:()=>u,hn:()=>S,lC:()=>g,mv:()=>m,wM:()=>A,wb:()=>l,xB:()=>c,xL:()=>y,yP:()=>p});var n=r(522),i=r(9135),o=r(2027);class s extends o.G{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class a extends o.G{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class c extends o.G{constructor({data:e,params:t,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.h)(t,{includeName:!0})})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}class l extends o.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class u extends o.G{constructor({expectedLength:e,givenLength:t,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class h extends o.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.d)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class d extends o.G{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class p extends o.G{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class f extends o.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class g extends o.G{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class m extends o.G{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class y extends o.G{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class w extends o.G{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class b extends o.G{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,n.t)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.t)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}}class v extends o.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class _ extends o.G{constructor({abiItem:e,data:t,params:r,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.h)(r,{includeName:!0})})`,`Data: ${t} (${i} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=r,this.size=i}}class E extends o.G{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.t)(e,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class x extends o.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class C extends o.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class S extends o.G{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class A extends o.G{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}},6087:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var n=r(2027);class i extends n.G{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},2027:(e,t,r)=>{"use strict";r.d(t,{G:()=>i});var n=r(9008);class i extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,n.bo)()});const r=t.cause instanceof i?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof i&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: https://viem.sh${o}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=o,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return o(this,e)}}function o(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e?o(e.cause,t):t?null:e}},377:(e,t,r)=>{"use strict";r.d(t,{Bk:()=>s,Yl:()=>o,hJ:()=>c,mm:()=>i,pZ:()=>a});var n=r(2027);class i extends n.G{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class o extends n.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class s extends n.G{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class a extends n.G{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}class c extends n.G{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}},5980:(e,t,r)=>{"use strict";r.d(t,{cg:()=>m,uq:()=>y,Lu:()=>w,Dk:()=>b,VQ:()=>v});var n=r(4503),i=r(1746),o=r(6899),s=r(522),a=r(6070);function c({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map(((e,r)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,a.P)(t[r]):t[r]}`)).join(", ")})`}var l=r(840),u=r(9625),h=r(7795),d=r(7412),p=r(2027),f=r(3639),g=r(9008);class m extends p.G{constructor(e,{account:t,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:p,value:g}){const m=t?(0,n.T)(t):void 0,y=(0,f.xr)({from:m?.address,to:p,value:void 0!==g&&`${(0,u.d)(g)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:s,gasPrice:void 0!==a&&`${(0,h.o)(a)} gwei`,maxFeePerGas:void 0!==c&&`${(0,h.o)(c)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,h.o)(l)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",y].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class y extends p.G{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:o,sender:a}){const u=(0,l.mE)({abi:t,args:r,name:o}),h=u?c({abiItem:u,args:r,includeFunctionName:!1,includeName:!1}):void 0,d=u?(0,s.t)(u,{includeName:!0}):void 0,p=(0,f.xr)({address:n&&(0,g.CR)(n),function:d,args:h&&"()"!==h&&`${[...Array(o?.length??0).keys()].map((()=>" ")).join("")}${h}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",p].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=o,this.sender=a}}class w extends p.G{constructor({abi:e,data:t,functionName:r,message:n}){let a,l,u,h,p;if(t&&"0x"!==t)try{l=(0,o.p)({abi:e,data:t});const{abiItem:r,errorName:n,args:a}=l;if("Error"===n)h=a[0];else if("Panic"===n){const[e]=a;h=i.$[e]}else{const e=r?(0,s.t)(r,{includeName:!0}):void 0,t=r&&a?c({abiItem:r,args:a,includeFunctionName:!1,includeName:!1}):void 0;u=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(n?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(e){a=e}else n&&(h=n);a instanceof d.yP&&(p=a.signature,u=[`Unable to decode signature "${p}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${p}.`]),super(h&&"execution reverted"!==h||p?[`The contract function "${r}" reverted with the following ${p?"signature":"reason"}:`,h||p].join("\n"):`The contract function "${r}" reverted.`,{cause:a,metaMessages:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=l,this.reason=h,this.signature=p}}class b extends p.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class v extends p.G{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},9760:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,m:()=>i});var n=r(2027);class i extends n.G{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class o extends n.G{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}},7788:(e,t,r)=>{"use strict";r.d(t,{Cd:()=>o,J5:()=>i,M6:()=>s});var n=r(2027);class i extends n.G{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class o extends n.G{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class s extends n.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},6445:(e,t,r)=>{"use strict";r.d(t,{C_:()=>h,G$:()=>a,Hh:()=>s,M_:()=>o,WF:()=>d,ZI:()=>c,cj:()=>m,cs:()=>g,dR:()=>p,pZ:()=>f,se:()=>u,vU:()=>l});var n=r(7795),i=r(2027);class o extends i.G{constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class s extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class a extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class l extends i.G{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class h extends i.G{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class d extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class p extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class g extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.o)(r)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(g,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class m extends i.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}},8863:(e,t,r)=>{"use strict";r.d(t,{Gg:()=>s,W5:()=>l,bs:()=>c,c9:()=>a});var n=r(6070),i=r(2027),o=r(9008);class s extends i.G{constructor({body:e,details:t,headers:r,status:i,url:s}){super("HTTP request failed.",{details:t,metaMessages:[i&&`Status: ${i}`,`URL: ${(0,o.Gr)(s)}`,e&&`Request body: ${(0,n.P)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=r,this.status=i,this.url=s}}class a extends i.G{constructor({body:e,details:t,url:r}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,o.Gr)(r)}`,`Request body: ${(0,n.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class c extends i.G{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,o.Gr)(r)}`,`Request body: ${(0,n.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class l extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,o.Gr)(t)}`,`Request body: ${(0,n.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}},3639:(e,t,r)=>{"use strict";r.d(t,{Bh:()=>d,JC:()=>u,Yb:()=>p,j3:()=>l,mc:()=>f,mk:()=>h,vl:()=>c,xY:()=>a,xr:()=>s});var n=r(9625),i=r(7795),o=r(2027);function s(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),r=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`)).join("\n")}class a extends o.G{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class c extends o.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class l extends o.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",s(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class u extends o.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}class h extends o.G{constructor(e,{account:t,docsPath:r,chain:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:h,nonce:d,to:p,value:f}){const g=s({chain:o&&`${o?.name} (id: ${o?.id})`,from:t?.address,to:p,value:void 0!==f&&`${(0,n.d)(f)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:c,gasPrice:void 0!==l&&`${(0,i.o)(l)} gwei`,maxFeePerGas:void 0!==u&&`${(0,i.o)(u)} gwei`,maxPriorityFeePerGas:void 0!==h&&`${(0,i.o)(h)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",g].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class d extends o.G{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:i}){let o="Transaction";r&&void 0!==i&&(o=`Transaction at block time "${r}" at index "${i}"`),e&&void 0!==i&&(o=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(o=`Transaction at block number "${t}" at index "${i}"`),n&&(o=`Transaction with hash "${n}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class p extends o.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class f extends o.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}},9008:(e,t,r)=>{"use strict";r.d(t,{CR:()=>i,Gr:()=>o,bo:()=>s});var n=r(1242);const i=e=>e,o=e=>e,s=()=>`viem@${n.i}`},1242:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="1.21.3"},4450:(e,t,r)=>{"use strict";r.d(t,{r:()=>u});var n=r(7412),i=r(5775),o=r(9135),s=r(3972),a=r(1836),c=r(5946),l=r(5444);function u(e,t){if("0x"===t&&e.length>0)throw new n.wb;if((0,o.d)(t)&&(0,o.d)(t)<32)throw new n.xB({data:t,params:e,size:(0,o.d)(t)});return function({data:e,params:t}){const r=[];let i=0;for(let s=0;s=(0,o.d)(e))throw new n.xB({data:e,params:t,size:(0,o.d)(e)});const a=t[s],{consumed:c,value:l}=h({data:e,param:a,position:i});r.push(l),i+=c}return r}({data:t,params:e})}function h({data:e,param:t,position:r}){const o=(0,l.S)(t.type);if(o){const[n,i]=o;return function(e,{param:t,length:r,position:n}){if(!r){const r=(0,c.ly)((0,s.tP)(e,n,n+32,{strict:!0})),i=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0}));let o=0;const a=[];for(let n=0;n!e)),i=n?[]:{};let o=0;if(d(t)){const a=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0}));for(let r=0;r48?(0,c.y_)(e,{signed:r}):(0,c.ly)(e,{signed:r})}}(u,{param:t});if("address"===t.type)return function(e){return{consumed:32,value:(0,i.x)((0,s.tP)(e,-20))}}(u);if("bool"===t.type)return function(e){return{consumed:32,value:(0,c.XA)(e)}}(u);throw new n.CI(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function d(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(d);const r=(0,l.S)(e.type);return!(!r||!d({...e,type:r[1]}))}},6899:(e,t,r)=>{"use strict";r.d(t,{p:()=>l});var n=r(1746),i=r(7412),o=r(3972),s=r(552),a=r(4450),c=r(522);function l({abi:e,data:t}){const r=(0,o.tP)(t,0,4);if("0x"===r)throw new i.wb;const l=[...e||[],n.Up,n.hZ].find((e=>"error"===e.type&&r===(0,s.o)((0,c.t)(e))));if(!l)throw new i.yP(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,a.r)(l.inputs,(0,o.tP)(t,4)):void 0,errorName:l.name}}},7210:(e,t,r)=>{"use strict";r.d(t,{k:()=>a});var n=r(7412),i=r(4450),o=r(840);const s="/docs/contract/decodeFunctionResult";function a({abi:e,args:t,functionName:r,data:a}){let c=e[0];if(r&&(c=(0,o.mE)({abi:e,args:t,name:r}),!c))throw new n.xL(r,{docsPath:s});if("function"!==c.type)throw new n.xL(void 0,{docsPath:s});if(!c.outputs)throw new n.MX(c.name,{docsPath:s});const l=(0,i.r)(c.outputs,a);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},5444:(e,t,r)=>{"use strict";r.d(t,{E:()=>h,S:()=>f});var n=r(7412),i=r(6087),o=r(9321),s=r(7040),a=r(1769),c=r(9135),l=r(3972),u=r(2106);function h(e,t){if(e.length!==t.length)throw new n.fs({expectedLength:e.length,givenLength:t.length});const r=function({params:e,values:t}){const r=[];for(let n=0;n0?(0,s.zo)([t,e]):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,s.zo)(a.map((({encoded:e})=>e)))}}(t,{length:i,param:{...e,type:o}})}if("tuple"===e.type)return function(e,{param:t}){let r=!1;const n=[];for(let i=0;ie)))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,o.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,a.gc)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,a.gc)((0,u.C4)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int"))return function(e,{signed:t}){return{dynamic:!1,encoded:(0,u.eC)(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")});if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,r]=t.type.split("bytes"),i=(0,c.d)(e);if(!r){let t=e;return i%32!=0&&(t=(0,a.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,s.zo)([(0,a.gc)((0,u.eC)(i,{size:32})),t])}}if(i!==parseInt(r))throw new n.M4({expectedSize:parseInt(r),value:e});return{dynamic:!1,encoded:(0,a.gc)(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=(0,u.$G)(e),r=Math.ceil((0,c.d)(t)/32),n=[];for(let e=0;e{"use strict";r.d(t,{R:()=>l});var n=r(7412),i=r(7040),o=r(552),s=r(5444),a=r(522),c=r(840);function l({abi:e,args:t,functionName:r}){let l=e[0];if(r&&(l=(0,c.mE)({abi:e,args:t,name:r}),!l))throw new n.xL(r,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==l.type)throw new n.xL(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const u=(0,a.t)(l),h=(0,o.o)(u),d="inputs"in l&&l.inputs?(0,s.E)(l.inputs,t??[]):void 0;return(0,i.SM)([h,d??"0x"])}},522:(e,t,r)=>{"use strict";r.d(t,{h:()=>o,t:()=>i});var n=r(7412);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.wM(e.type);return`${e.name}(${o(e.inputs,{includeName:t})})`}function o(e,{includeName:t=!1}={}){return e?e.map((e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${o(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}},840:(e,t,r)=>{"use strict";r.d(t,{mE:()=>c});var n=r(7412),i=r(5102),o=r(4092),s=r(552),a=r(9321);function c({abi:e,args:t=[],name:r}){const a=(0,i.v)(r,{strict:!1}),c=e.filter((e=>a?"function"===e.type?(0,s.o)(e)===r:"event"===e.type&&(0,o.e)(e)===r:"name"in e&&e.name===r));if(0===c.length)return;if(1===c.length)return c[0];let h;for(const e of c)if("inputs"in e)if(t&&0!==t.length){if(e.inputs&&0!==e.inputs.length&&e.inputs.length===t.length&&t.every(((t,r)=>{const n="inputs"in e&&e.inputs[r];return!!n&&l(t,n)}))){if(h&&"inputs"in h&&h.inputs){const r=u(e.inputs,h.inputs,t);if(r)throw new n.S4({abiItem:e,type:r[0]},{abiItem:h,type:r[1]})}h=e}}else if(!e.inputs||0===e.inputs.length)return e;return h||c[0]}function l(e,t){const r=typeof e,n=t.type;switch(n){case"address":return(0,a.U)(e);case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:return"tuple"===n&&"components"in t?Object.values(t.components).every(((t,r)=>l(Object.values(e)[r],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?"number"===r||"bigint"===r:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?"string"===r||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)&&Array.isArray(e)&&e.every((e=>l(e,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})))}}function u(e,t,r){for(const n in e){const i=e[n],o=t[n];if("tuple"===i.type&&"tuple"===o.type&&"components"in i&&"components"in o)return u(i.components,o.components,r[n]);const s=[i.type,o.type];if(s.includes("address")&&s.includes("bytes20")||(s.includes("address")&&s.includes("string")||s.includes("address")&&s.includes("bytes"))&&(0,a.U)(r[n]))return s}}},5775:(e,t,r)=>{"use strict";r.d(t,{K:()=>c,x:()=>a});var n=r(6087),i=r(1187),o=r(3199),s=r(9321);function a(e,t){const r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,o.w)((0,i.qX)(r),"bytes"),s=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(15&n[e>>1])>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());return`0x${s.join("")}`}function c(e,t){if(!(0,s.U)(e))throw new n.b({address:e});return a(e,t)}},9321:(e,t,r)=>{"use strict";r.d(t,{U:()=>i});const n=/^0x[a-fA-F0-9]{40}$/;function i(e){return n.test(e)}},9770:(e,t,r)=>{"use strict";r.d(t,{offchainLookup:()=>b,offchainLookupSignature:()=>y});var n=r(84),i=r(6070),o=r(2027),s=r(9008);class a extends o.G{constructor({callbackSelector:e,cause:t,data:r,extraData:n,sender:i,urls:o}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",o&&[" Gateway URL(s):",...o.map((e=>` ${(0,s.Gr)(e)}`))],` Sender: ${i}`,` Data: ${r}`,` Callback selector: ${e}`,` Extra data: ${n}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class c extends o.G{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,s.Gr)(t)}`,`Response: ${(0,i.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class l extends o.G{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}var u=r(8863),h=r(6899),d=r(5444),p=r(6087),f=r(9321),g=r(7040),m=r(5102);const y="0x556f1830",w={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function b(e,{blockNumber:t,blockTag:r,data:o,to:s}){const{args:y}=(0,h.p)({data:o,abi:[w]}),[b,v,_,E,x]=y;try{if(!function(e,t){if(!(0,f.U)(e))throw new p.b({address:e});if(!(0,f.U)(t))throw new p.b({address:t});return e.toLowerCase()===t.toLowerCase()}(s,b))throw new l({sender:b,to:s});const o=await async function({data:e,sender:t,urls:r}){let n=new Error("An unknown error occurred.");for(let o=0;o{"use strict";r.d(t,{L:()=>i});var n=r(377);function i({blockNumber:e,chain:t,contract:r}){const i=t?.contracts?.[r];if(!i)throw new n.mm({chain:t,contract:{name:r}});if(e&&i.blockCreated&&i.blockCreated>e)throw new n.mm({blockNumber:e,chain:t,contract:{name:r,blockCreated:i.blockCreated}});return i.address}},7040:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(const r of e)t+=r.length;const r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}(e)}function i(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}r.d(t,{SM:()=>i,zo:()=>n})},5102:(e,t,r)=>{"use strict";function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}r.d(t,{v:()=>n})},1769:(e,t,r)=>{"use strict";r.d(t,{gc:()=>o,vk:()=>i});var n=r(9760);function i(e,{dir:t,size:r=32}={}){return"string"==typeof e?o(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.$({size:e.length,targetSize:r,type:"bytes"});const i=new Uint8Array(r);for(let n=0;n2*r)throw new n.$({size:Math.ceil(i.length/2),targetSize:r,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`}},9135:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(5102);function i(e){return(0,n.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},3972:(e,t,r)=>{"use strict";r.d(t,{tP:()=>s});var n=r(9760),i=r(5102),o=r(9135);function s(e,t,r,{strict:n}={}){return(0,i.v)(e,{strict:!1})?function(e,t,r,{strict:n}={}){a(e,t);const i=`0x${e.replace("0x","").slice(2*(t??0),2*(r??e.length))}`;return n&&c(i,t,r),i}(e,t,r,{strict:n}):function(e,t,r,{strict:n}={}){a(e,t);const i=e.slice(t,r);return n&&c(i,t,r),i}(e,t,r,{strict:n})}function a(e,t){if("number"==typeof t&&t>0&&t>(0,o.d)(e)-1)throw new n.m({offset:t,position:"start",size:(0,o.d)(e)})}function c(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,o.d)(e)!==r-t)throw new n.m({offset:r,position:"end",size:(0,o.d)(e)})}},1836:(e,t,r)=>{"use strict";function n(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;en})},5946:(e,t,r)=>{"use strict";r.d(t,{XA:()=>l,Yf:()=>a,ly:()=>u,rR:()=>h,y_:()=>c});var n=r(7788),i=r(9135),o=r(1836),s=r(1187);function a(e,{size:t}){if((0,i.d)(e)>t)throw new n.M6({givenSize:(0,i.d)(e),maxSize:t})}function c(e,t={}){const{signed:r}=t;t.size&&a(e,{size:t.size});const n=BigInt(e);if(!r)return n;const i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function l(e,t={}){let r=e;if(t.size&&(a(r,{size:t.size}),r=(0,o.f)(r)),"0x00"===(0,o.f)(r))return!1;if("0x01"===(0,o.f)(r))return!0;throw new n.Cd(r)}function u(e,t={}){return Number(c(e,t))}function h(e,t={}){let r=(0,s.nr)(e);return t.size&&(a(r,{size:t.size}),r=(0,o.f)(r,{dir:"right"})),(new TextDecoder).decode(r)}},1187:(e,t,r)=>{"use strict";r.d(t,{O0:()=>l,nr:()=>d,qX:()=>p});var n=r(2027),i=r(5102),o=r(1769),s=r(5946),a=r(2106);const c=new TextEncoder;function l(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){return d((0,a.eC)(e,t))}(e,t):"boolean"==typeof e?function(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),"number"==typeof t.size?((0,s.Yf)(r,{size:t.size}),(0,o.vk)(r,{size:t.size})):r}(e,t):(0,i.v)(e)?d(e,t):p(e,t)}const u={zero:48,nine:57,A:65,F:70,a:97,f:102};function h(e){return e>=u.zero&&e<=u.nine?e-u.zero:e>=u.A&&e<=u.F?e-(u.A-10):e>=u.a&&e<=u.f?e-(u.a-10):void 0}function d(e,t={}){let r=e;t.size&&((0,s.Yf)(r,{size:t.size}),r=(0,o.vk)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);const a=i.length/2,c=new Uint8Array(a);for(let e=0,t=0;e{"use strict";r.d(t,{$G:()=>d,C4:()=>c,NC:()=>a,ci:()=>l,eC:()=>u});var n=r(7788),i=r(1769),o=r(5946);const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e,t={}){return"number"==typeof e||"bigint"==typeof e?u(e,t):"string"==typeof e?d(e,t):"boolean"==typeof e?c(e,t):l(e,t)}function c(e,t={}){const r=`0x${Number(e)}`;return"number"==typeof t.size?((0,o.Yf)(r,{size:t.size}),(0,i.vk)(r,{size:t.size})):r}function l(e,t={}){let r="";for(let t=0;ta||s{"use strict";r.d(t,{k:()=>o});var n=r(2027),i=r(6445);function o(e,t){const r=(e.details||"").toLowerCase(),o=e.walk((e=>e.code===i.M_.code));return o instanceof n.G?new i.M_({cause:e,message:o.details}):i.M_.nodeMessage.test(r)?new i.M_({cause:e,message:e.details}):i.Hh.nodeMessage.test(r)?new i.Hh({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.G$.nodeMessage.test(r)?new i.G$({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.ZI.nodeMessage.test(r)?new i.ZI({cause:e,nonce:t?.nonce}):i.vU.nodeMessage.test(r)?new i.vU({cause:e,nonce:t?.nonce}):i.se.nodeMessage.test(r)?new i.se({cause:e,nonce:t?.nonce}):i.C_.nodeMessage.test(r)?new i.C_({cause:e}):i.WF.nodeMessage.test(r)?new i.WF({cause:e,gas:t?.gas}):i.dR.nodeMessage.test(r)?new i.dR({cause:e,gas:t?.gas}):i.pZ.nodeMessage.test(r)?new i.pZ({cause:e}):i.cs.nodeMessage.test(r)?new i.cs({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.cj({cause:e})}},1163:(e,t,r)=>{"use strict";function n(e,{format:t}){if(!t)return{};const r={};return function t(n){const i=Object.keys(n);for(const o of i)o in e&&(r[o]=e[o]),n[o]&&"object"==typeof n[o]&&!Array.isArray(n[o])&&t(n[o])}(t(e||{})),r}r.d(t,{K:()=>n})},1366:(e,t,r)=>{"use strict";function n(e,t){return({exclude:r,format:n})=>({exclude:r,format:e=>{const i=t(e);if(r)for(const e of r)delete i[e];return{...i,...n(e)}},type:e})}r.d(t,{$:()=>n})},4688:(e,t,r)=>{"use strict";r.d(t,{iy:()=>a,tG:()=>s});var n=r(2106),i=r(1366);const o={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function s(e){return{...e,gas:void 0!==e.gas?(0,n.eC)(e.gas):void 0,gasPrice:void 0!==e.gasPrice?(0,n.eC)(e.gasPrice):void 0,maxFeePerGas:void 0!==e.maxFeePerGas?(0,n.eC)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:void 0!==e.maxPriorityFeePerGas?(0,n.eC)(e.maxPriorityFeePerGas):void 0,nonce:void 0!==e.nonce?(0,n.eC)(e.nonce):void 0,type:void 0!==e.type?o[e.type]:void 0,value:void 0!==e.value?(0,n.eC)(e.value):void 0}}const a=(0,i.$)("transactionRequest",s)},4092:(e,t,r)=>{"use strict";r.d(t,{e:()=>s});var n=r(1187),i=r(9574),o=r(3199);const s=e=>{return t=(e=>(0,i.r)(e))(e),(0,o.w)((0,n.O0)(t));var t}},552:(e,t,r)=>{"use strict";r.d(t,{o:()=>a});var n=r(3972),i=r(1187),o=r(9574),s=r(3199);const a=e=>{return(0,n.tP)((t=(0,o.r)(e),(0,s.w)((0,i.O0)(t))),0,4);var t}},9574:(e,t,r)=>{"use strict";r.d(t,{r:()=>a});const n=/^tuple(?(\[(\d*)\])*)$/;function i(e){let t=e.type;if(n.test(e.type)&&"components"in e){t="(";const r=e.components.length;for(let n=0;n{var t;return function(e){let t=!0,r="",n=0,i="",o=!1;for(let s=0;s{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}r.d(t,{w:()=>O});const s=BigInt(2**32-1),a=BigInt(32);function c(e,t=!1){return t?{h:Number(e&s),l:Number(e>>a&s)}:{h:0|Number(e>>a&s),l:0|Number(e&s)}}function l(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i>w)*v)%b,t&y&&(i^=m<<(m<r>32?((e,t,r)=>t<>>64-r)(e,t,r):((e,t,r)=>e<>>32-r)(e,t,r),C=(e,t,r)=>r>32?((e,t,r)=>e<>>64-r)(e,t,r):((e,t,r)=>t<>>32-r)(e,t,r);class S extends h{constructor(e,t,r,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=x(o,s,1)^r[n],c=C(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=p[r],o=x(t,i,n),s=C(t,i,n),a=d[r];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=_[n],e[1]^=E[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){o(this);const{blockLen:t,state:r}=this,n=(e=u(e)).length;for(let i=0;i=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return n(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(function(e,t){i(e);const r=t.outputLen;if(e.lengthfunction(e){const t=t=>e().update(u(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}((()=>new S(t,e,r))))(1,136,32);var I=r(5102),k=r(1187),P=r(2106);function O(e,t){const r=t||"hex",n=A((0,I.v)(e,{strict:!1})?(0,k.O0)(e):e);return"bytes"===r?n:(0,P.NC)(n)}},2357:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});const n=new Map;function i({fn:e,id:t,shouldSplitBatch:r,wait:i=0,sort:o}){const s=async()=>{const t=c();a();const r=t.map((({args:e})=>e));0!==r.length&&e(r).then((e=>{o&&Array.isArray(e)&&e.sort(o);for(let r=0;r{for(let r=0;rn.delete(t),c=()=>n.get(t)||[],l=e=>n.set(t,[...c(),e]);return{flush:a,async schedule(e){const t={},n=new Promise(((e,r)=>{t.resolve=e,t.reject=r})),o=r?.([...c().map((({args:e})=>e)),e]);return o&&s(),c().length>0?(l({args:e,pendingPromise:t}),n):(l({args:e,pendingPromise:t}),setTimeout(s,i),n)}}}},6070:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});const n=(e,t,r)=>JSON.stringify(e,((e,r)=>{const n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n}),r)},7531:(e,t,r)=>{"use strict";r.d(t,{F:()=>c});var n=r(4503),i=r(6087),o=r(6445),s=r(3639),a=r(9321);function c(e){const{account:t,gasPrice:r,maxFeePerGas:c,maxPriorityFeePerGas:l,to:u}=e,h=t?(0,n.T)(t):void 0;if(h&&!(0,a.U)(h.address))throw new i.b({address:h.address});if(u&&!(0,a.U)(u))throw new i.b({address:u});if(void 0!==r&&(void 0!==c||void 0!==l))throw new s.xY;if(c&&c>2n**256n-1n)throw new o.Hh({maxFeePerGas:c});if(l&&c&&l>c)throw new o.cs({maxFeePerGas:c,maxPriorityFeePerGas:l})}},9625:(e,t,r)=>{"use strict";r.d(t,{d:()=>o});var n=r(4192),i=r(5229);function o(e,t="wei"){return(0,i.b)(e,n.ez[t])}},7795:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var n=r(4192),i=r(5229);function o(e,t="wei"){return(0,i.b)(e,n.Zn[t])}},5229:(e,t,r)=>{"use strict";function n(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[i,o]=[r.slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}r.d(t,{b:()=>n})}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var o=Object.create(null);i.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>r[e]));return s.default=()=>r,i.d(o,s),o},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured for connector "${t}".`),this.name="ChainNotConfiguredForConnectorError"}},t=class extends Error{constructor(){super(...arguments),this.name="ConnectorNotFoundError",this.message="Connector not found"}};function r(e){return"string"==typeof e?Number.parseInt(e,"0x"===e.trim().substring(0,2)?16:10):"bigint"==typeof e?Number(e):e}var n=i(6729);function o(e,t={}){const{fees:r=e.fees,formatters:n=e.formatters,serializers:i=e.serializers}=t;return{...e,fees:r,formatters:n,serializers:i}}const s=o({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),a=o({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0});var c=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},l=(e,t,r)=>(c(e,t,"read from private field"),r?r.call(e):t.get(e)),u=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},h=(e,t,r,n)=>(c(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),d=(e,t,r)=>(c(e,t,"access private method"),r),p=class extends n{constructor({chains:e=[s,a],options:t}){super(),this.chains=e,this.options=t}getBlockExplorerUrls(e){const{default:t,...r}=e.blockExplorers??{};if(t)return[t.url,...Object.values(r).map((e=>e.url))]}isChainUnsupported(e){return!this.chains.some((t=>t.id===e))}setStorage(e){this.storage=e}},f=i(5775),g=i(2027),m=i(8863);class y extends g.G{constructor(e,{code:t,docsPath:r,metaMessages:n,shortMessage:i}){super(i,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof m.bs?e.code:t??-1}}class w extends y{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class b extends y{constructor(e){super(e,{code:b.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class v extends y{constructor(e){super(e,{code:v.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class _ extends y{constructor(e){super(e,{code:_.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class E extends y{constructor(e){super(e,{code:E.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class x extends y{constructor(e){super(e,{code:x.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class C extends y{constructor(e){super(e,{code:C.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class S extends y{constructor(e){super(e,{code:S.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class A extends y{constructor(e){super(e,{code:A.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class I extends y{constructor(e){super(e,{code:I.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class k extends y{constructor(e){super(e,{code:k.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class P extends y{constructor(e){super(e,{code:P.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class O extends y{constructor(e){super(e,{code:O.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class R extends w{constructor(e){super(e,{code:R.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class M extends w{constructor(e){super(e,{code:M.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(M,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class N extends w{constructor(e){super(e,{code:N.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(N,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class T extends w{constructor(e){super(e,{code:T.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class j extends w{constructor(e){super(e,{code:j.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class L extends w{constructor(e){super(e,{code:L.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(L,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class D extends y{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}var $=i(4503);const B=256;let U,F=B;function z(e=11){if(!U||F+e>2*B){U="",F=0;for(let e=0;e{const n=r(t);for(const e in d)delete n[e];const i={...t,...n};return Object.assign(i,{extend:e(i)})}}(d)})}var H=i(5946);async function V(e){const t=await e.request({method:"eth_chainId"});return(0,H.ly)(t)}var q=i(2106),G=i(7412),Z=i(7040),K=i(5444);const Y="/docs/contract/encodeDeployData";function Q({abi:e,args:t,bytecode:r}){if(!t||0===t.length)return r;const n=e.find((e=>"type"in e&&"constructor"===e.type));if(!n)throw new G.fM({docsPath:Y});if(!("inputs"in n))throw new G.cO({docsPath:Y});if(!n.inputs||0===n.inputs.length)throw new G.cO({docsPath:Y});const i=(0,K.E)(n.inputs,t);return(0,Z.SM)([r,i])}class J extends g.G{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n"),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}var X=i(377);function ee({chain:e,currentChainId:t}){if(!e)throw new X.Bk;if(t!==e.id)throw new X.Yl({chain:e,currentChainId:t})}var te=i(6445),re=i(3639),ne=i(7469),ie=i(1163),oe=i(4688);function se(e,t,r){return n=>e[t.name||r]?.(n)??t(e,n)}var ae=i(7531),ce=i(7795);class le extends g.G{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class ue extends g.G{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class he extends g.G{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,ce.o)(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class de extends g.G{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}var pe=i(1366);const fe={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function ge(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,H.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,H.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?fe[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}const me=(0,pe.$)("transaction",ge);function ye(e){const t=e.transactions?.map((e=>"string"==typeof e?e:ge(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const we=(0,pe.$)("block",ye);async function be(e,{blockHash:t,blockNumber:r,blockTag:n,includeTransactions:i}={}){const o=n??"latest",s=i??!1,a=void 0!==r?(0,q.eC)(r):void 0;let c=null;if(c=t?await e.request({method:"eth_getBlockByHash",params:[t,s]}):await e.request({method:"eth_getBlockByNumber",params:[a||o,s]}),!c)throw new de({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||ye)(c)}async function ve(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function _e(e,t){const{block:r,chain:n=e.chain,request:i}=t||{};if("function"==typeof n?.fees?.defaultPriorityFee){const t=r||await se(e,be,"getBlock")({});return n.fees.defaultPriorityFee({block:t,client:e,request:i})}if(void 0!==n?.fees?.defaultPriorityFee)return n?.fees?.defaultPriorityFee;try{const t=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,H.y_)(t)}catch{const[t,n]=await Promise.all([r?Promise.resolve(r):se(e,be,"getBlock")({}),se(e,ve,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new ue;const i=n-t.baseFeePerGas;return i<0n?0n:i}}async function Ee(e,t){const{block:r,chain:n=e.chain,request:i,type:o="eip1559"}=t||{},s=await(async()=>"function"==typeof n?.fees?.baseFeeMultiplier?n.fees.baseFeeMultiplier({block:r,client:e,request:i}):n?.fees?.baseFeeMultiplier??1.2)();if(s<1)throw new le;const a=10**(s.toString().split(".")[1]?.length??0),c=e=>e*BigInt(Math.ceil(s*a))/BigInt(a),l=r||await se(e,be,"getBlock")({});if("function"==typeof n?.fees?.estimateFeesPerGas)return n.fees.estimateFeesPerGas({block:r,client:e,multiply:c,request:i,type:o});if("eip1559"===o){if("bigint"!=typeof l.baseFeePerGas)throw new ue;const t=i?.maxPriorityFeePerGas?i.maxPriorityFeePerGas:await _e(e,{block:l,chain:n,request:i}),r=c(l.baseFeePerGas);return{maxFeePerGas:i?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:i?.gasPrice??c(await se(e,ve,"getGasPrice")({}))}}var xe=i(9625);class Ce extends g.G{constructor(e,{account:t,docsPath:r,chain:n,data:i,gas:o,gasPrice:s,maxFeePerGas:a,maxPriorityFeePerGas:c,nonce:l,to:u,value:h}){const d=(0,re.xr)({from:t?.address,to:u,value:void 0!==h&&`${(0,xe.d)(h)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:o,gasPrice:void 0!==s&&`${(0,ce.o)(s)} gwei`,maxFeePerGas:void 0!==a&&`${(0,ce.o)(a)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,ce.o)(c)} gwei`,nonce:l});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",d].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}async function Se(e,t){const r=t.account??e.account;if(!r)throw new J({docsPath:"/docs/actions/public/estimateGas"});const n=(0,$.T)(r);try{const{accessList:r,blockNumber:i,blockTag:o,data:s,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:h,to:d,value:p,...f}="local"===n.type?await ke(e,t):t,g=(i?(0,q.eC)(i):void 0)||o;(0,ae.F)(t);const m=e.chain?.formatters?.transactionRequest?.format,y=(m||oe.tG)({...(0,ie.K)(f,{format:m}),from:n.address,accessList:r,data:s,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:h,to:d,value:p}),w=await e.request({method:"eth_estimateGas",params:g?[y,g]:[y]});return BigInt(w)}catch(r){throw function(e,{docsPath:t,...r}){const n=(()=>{const t=(0,ne.k)(e,r);return t instanceof te.cj?e:t})();return new Ce(n,{docsPath:t,...r})}(r,{...t,account:n,chain:e.chain})}}async function Ae(e,{address:t,blockTag:r="latest",blockNumber:n}){const i=await e.request({method:"eth_getTransactionCount",params:[t,n?(0,q.eC)(n):r]});return(0,H.ly)(i)}function Ie(e){if(e.type)return e.type;if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new re.j3({transaction:e})}async function ke(e,t){const{account:r=e.account,chain:n,gas:i,nonce:o,type:s}=t;if(!r)throw new J;const a=(0,$.T)(r),c=await se(e,be,"getBlock")({blockTag:"latest"}),l={...t,from:a.address};if(void 0===o&&(l.nonce=await se(e,Ae,"getTransactionCount")({address:a.address,blockTag:"pending"})),void 0===s)try{l.type=Ie(l)}catch{l.type="bigint"==typeof c.baseFeePerGas?"eip1559":"legacy"}if("eip1559"===l.type){const{maxFeePerGas:r,maxPriorityFeePerGas:i}=await Ee(e,{block:c,chain:n,request:l});if(void 0===t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas{const t=(0,ne.k)(e,r);return t instanceof te.cj?e:t})();return new re.mk(n,{docsPath:t,...r})}(e,{...t,account:f,chain:t.chain||void 0})}}var Re=i(5102),Me=i(6070),Ne=i(6087),Te=i(9321),je=i(9135);const Le=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,De=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function $e({domain:e,message:t,primaryType:r,types:n}){const i=n,o=(e,t)=>{for(const r of e){const{name:e,type:n}=r,s=n,a=t[e],c=s.match(De);if(c&&("number"==typeof a||"bigint"==typeof a)){const[e,t,r]=c;(0,q.eC)(a,{signed:"int"===t,size:parseInt(r)/8})}if("address"===s&&"string"==typeof a&&!(0,Te.U)(a))throw new Ne.b({address:a});const l=s.match(Le);if(l){const[e,t]=l;if(t&&(0,je.d)(a)!==parseInt(t))throw new G.KY({expectedSize:parseInt(t),givenSize:(0,je.d)(a)})}const u=i[s];u&&o(u,a)}};if(i.EIP712Domain&&e&&o(i.EIP712Domain,e),"EIP712Domain"!==r){const e=i[r];o(e,t)}}function Be({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},"number"==typeof e?.chainId&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}var Ue=i(7799);function Fe(e){return{addChain:t=>async function(e,{chain:t}){const{id:r,name:n,nativeCurrency:i,rpcUrls:o,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,q.eC)(r),chainName:n,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:s?Object.values(s).map((({url:e})=>e)):void 0}]})}(e,t),deployContract:t=>function(e,{abi:t,args:r,bytecode:n,...i}){return Oe(e,{...i,data:Q({abi:t,args:r,bytecode:n})})}(e,t),getAddresses:()=>async function(e){return"local"===e.account?.type?[e.account.address]:(await e.request({method:"eth_accounts"})).map((e=>(0,f.x)(e)))}(e),getChainId:()=>V(e),getPermissions:()=>async function(e){return await e.request({method:"wallet_getPermissions"})}(e),prepareTransactionRequest:t=>ke(e,t),requestAddresses:()=>async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,f.K)(e)))}(e),requestPermissions:t=>async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}(e,t),sendRawTransaction:t=>Pe(e,t),sendTransaction:t=>Oe(e,t),signMessage:t=>async function(e,{account:t=e.account,message:r}){if(!t)throw new J({docsPath:"/docs/actions/wallet/signMessage"});const n=(0,$.T)(t);if("local"===n.type)return n.signMessage({message:r});const i="string"==typeof r?(0,q.$G)(r):r.raw instanceof Uint8Array?(0,q.NC)(r.raw):r.raw;return e.request({method:"personal_sign",params:[i,n.address]})}(e,t),signTransaction:t=>async function(e,t){const{account:r=e.account,chain:n=e.chain,...i}=t;if(!r)throw new J({docsPath:"/docs/actions/wallet/signTransaction"});const o=(0,$.T)(r);(0,ae.F)({account:o,...t});const s=await se(e,V,"getChainId")({});null!==n&&ee({currentChainId:s,chain:n});const a=n?.formatters||e.chain?.formatters,c=a?.transactionRequest?.format||oe.tG;return"local"===o.type?o.signTransaction({...i,chainId:s},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...c(i),chainId:(0,q.eC)(s),from:o.address}]})}(e,t),signTypedData:t=>async function(e,{account:t=e.account,domain:r,message:n,primaryType:i,types:o}){if(!t)throw new J({docsPath:"/docs/actions/wallet/signTypedData"});const s=(0,$.T)(t),a={EIP712Domain:Be({domain:r}),...o};if($e({domain:r,message:n,primaryType:i,types:a}),"local"===s.type)return s.signTypedData({domain:r,primaryType:i,types:a,message:n});const c=(0,Me.P)({domain:r??{},primaryType:i,types:a,message:n},((e,t)=>(0,Re.v)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[s.address,c]})}(e,t),switchChain:t=>async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,q.eC)(t)}]})}(e,t),watchAsset:t=>async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}(e,t),writeContract:t=>async function(e,{abi:t,address:r,args:n,dataSuffix:i,functionName:o,...s}){const a=(0,Ue.R)({abi:t,args:n,functionName:o});return await se(e,Oe,"sendTransaction")({data:`${a}${i?i.replace("0x",""):""}`,to:r,...s})}(e,t)}}function ze(e){const{key:t="wallet",name:r="Wallet Client",transport:n}=e;return W({...e,key:t,name:r,transport:e=>n({...e,retryCount:0}),type:"walletClient"}).extend(Fe)}async function We(e){return new Promise((t=>setTimeout(t,e)))}function He(e,{delay:t=100,retryCount:r=2,shouldRetry:n=(()=>!0)}={}){return new Promise(((i,o)=>{const s=async({count:a=0}={})=>{try{const t=await e();i(t)}catch(e){if(a{const r="function"==typeof t?t({count:a,error:e}):t;r&&await We(r),s({count:a+1})})({error:e});o(e)}};s()}))}const Ve=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof m.Gg&&e.status)&&403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status;function qe(e,{retryDelay:t=150,retryCount:r=3}={}){return async n=>He((async()=>{try{return await e(n)}catch(e){const t=e;switch(t.code){case b.code:throw new b(t);case v.code:throw new v(t);case _.code:throw new _(t);case E.code:throw new E(t);case x.code:throw new x(t);case C.code:throw new C(t);case S.code:throw new S(t);case A.code:throw new A(t);case I.code:throw new I(t);case k.code:throw new k(t);case P.code:throw new P(t);case O.code:throw new O(t);case R.code:throw new R(t);case M.code:throw new M(t);case N.code:throw new N(t);case T.code:throw new T(t);case j.code:throw new j(t);case L.code:throw new L(t);case 5e3:throw new R(t);default:if(e instanceof g.G)throw e;throw new D(t)}}}),{delay:({count:e,error:r})=>{if(r&&r instanceof m.Gg){const e=r?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<!Ve(e)})}function Ge({key:e,name:t,request:r,retryCount:n=3,retryDelay:i=150,timeout:o,type:s},a){return{config:{key:e,name:t,request:r,retryCount:n,retryDelay:i,timeout:o,type:s},request:qe(r,{retryCount:n,retryDelay:i}),value:a}}function Ze(e,t={}){const{key:r="custom",name:n="Custom Provider",retryDelay:i}=t;return({retryCount:o})=>Ge({key:r,name:n,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:i,type:"custom"})}var Ke,Ye=class extends p{constructor({chains:e,options:t}={}){const n={shimDisconnect:!0,getProvider(){if("undefined"==typeof window)return;const e=window.ethereum;return e?.providers&&e.providers.length>0?e.providers[0]:e},...t};super({chains:e,options:n}),this.id="injected",u(this,Ke,void 0),this.shimDisconnectKey=`${this.id}.shimDisconnect`,this.onAccountsChanged=e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,f.K)(e[0])})},this.onChainChanged=e=>{const t=r(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})},this.onDisconnect=async e=>{1013===e.code&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))};const i=n.getProvider();if("string"==typeof n.name)this.name=n.name;else if(i){const e=function(e){if(!e)return"Injected";const t=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOktoWallet?"Okto Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0;if(e.providers?.length){const r=new Set;let n=1;for(const i of e.providers){let e=t(i);e||(e=`Unknown Wallet #${n}`,n+=1),r.add(e)}const i=[...r];return i.length?i:i[0]??"Injected"}return t(e)??"Injected"}(i);n.name?this.name=n.name(e):this.name="string"==typeof e?e:e[0]}else this.name="Injected";this.ready=!!i}async connect({chainId:e}={}){try{const r=await this.getProvider();if(!r)throw new t;r.on&&(r.on("accountsChanged",this.onAccountsChanged),r.on("chainChanged",this.onChainChanged),r.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const n=await r.request({method:"eth_requestAccounts"}),i=(0,f.K)(n[0]);let o=await this.getChainId(),s=this.isChainUnsupported(o);return e&&o!==e&&(o=(await this.switchChain(e)).id,s=this.isChainUnsupported(o)),this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:i,chain:{id:o,unsupported:s}}}catch(e){if(this.isUserRejectedRequestError(e))throw new R(e);if(-32002===e.code)throw new A(e);throw e}}async disconnect(){const e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){const e=await this.getProvider();if(!e)throw new t;const r=await e.request({method:"eth_accounts"});return(0,f.K)(r[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new t;return e.request({method:"eth_chainId"}).then(r)}async getProvider(){const e=this.options.getProvider();return e&&h(this,Ke,e),l(this,Ke)}async getWalletClient({chainId:e}={}){const[t,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return ze({account:r,chain:n,transport:Ze(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;if(!await this.getProvider())throw new t;return!!await this.getAccount()}catch{return!1}}async switchChain(r){const n=await this.getProvider();if(!n)throw new t;const i=(0,q.eC)(r);try{return await Promise.all([n.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]}),new Promise((e=>this.on("change",(({chain:t})=>{t?.id===r&&e()}))))]),this.chains.find((e=>e.id===r))??{id:r,name:`Chain ${i}`,network:`${i}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(t){const o=this.chains.find((e=>e.id===r));if(!o)throw new e({chainId:r,connectorId:this.id});if(4902===t.code||4902===t?.data?.originalError?.code)try{if(await n.request({method:"wallet_addEthereumChain",params:[{chainId:i,chainName:o.name,nativeCurrency:o.nativeCurrency,rpcUrls:[o.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(o)}]}),await this.getChainId()!==r)throw new R(new Error("User rejected switch after adding network."));return o}catch(e){throw new R(e)}if(this.isUserRejectedRequestError(t))throw new R(t);throw new L(t)}}async watchAsset({address:e,decimals:r=18,image:n,symbol:i}){const o=await this.getProvider();if(!o)throw new t;return o.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:r,image:n,symbol:i}}})}isUserRejectedRequestError(e){return 4001===e.code}};Ke=new WeakMap;var Qe=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Je=(e,t,r)=>(Qe(e,t,"read from private field"),r?r.call(e):t.get(e)),Xe=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},et=(e,t,r,n)=>(Qe(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),tt=i(6693),rt=i(7210),nt=i(7864),it=i(1836),ot=i(1746),st=i(5980);function at(e,t){if(!(e instanceof g.G))return!1;const r=e.walk((e=>e instanceof st.Lu));return r instanceof st.Lu&&("ResolverNotFound"===r.data?.errorName||"ResolverWildcardNotSupported"===r.data?.errorName||!!r.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===t&&r.reason===ot.$[50])}var ct=i(1187),lt=i(3199);function ut(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,Re.v)(t)?t:null}function ht(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,q.ci)(t);const r=e.split(".");for(let e=r.length-1;e>=0;e-=1){const n=ut(r[e]),i=n?(0,ct.O0)(n):(0,lt.w)((0,ct.qX)(r[e]),"bytes");t=(0,lt.w)((0,Z.zo)([t,i]),"bytes")}return(0,q.ci)(t)}function dt(e){const t=new Uint8Array(32).fill(0);return e?ut(e)||(0,lt.w)((0,ct.qX)(e)):(0,q.ci)(t)}function pt(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const r=new Uint8Array((0,ct.qX)(t).byteLength+2);let n=0;const i=t.split(".");for(let e=0;e255&&(t=(0,ct.qX)(`[${dt(i[e]).slice(2)}]`)),r[n]=t.length,r.set(t,n+1),n+=t.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}const ft=3;function gt(e,{abi:t,address:r,args:n,docsPath:i,functionName:o,sender:s}){const{code:a,data:c,message:l,shortMessage:u}=e instanceof st.VQ?e:e instanceof g.G?e.walk((e=>"data"in e))||e.walk():{},h=e instanceof G.wb?new st.Dk({functionName:o}):[ft,x.code].includes(a)&&(c||l||u)?new st.Lu({abi:t,data:"object"==typeof c?c.data:c,functionName:o,message:u??l}):e;return new st.uq(h,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:o,sender:s})}var mt=i(84);async function yt(e,{abi:t,address:r,args:n,functionName:i,...o}){const s=(0,Ue.R)({abi:t,args:n,functionName:i});try{const{data:a}=await se(e,mt.R,"call")({data:s,to:r,...o});return(0,rt.k)({abi:t,args:n,functionName:i,data:a||"0x"})}catch(e){throw gt(e,{abi:t,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}class wt extends g.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class bt extends g.G{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class vt extends g.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class _t extends g.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const Et=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,xt=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,Ct=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,St=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;function At(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function It({uri:e,gatewayUrls:t}){const r=Ct.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=At(t?.ipfs,"https://ipfs.io"),i=At(t?.arweave,"https://arweave.net"),o=e.match(Et),{protocol:s,subpath:a,target:c,subtarget:l=""}=o?.groups||{},u="ipns:/"===s||"ipns/"===a,h="ipfs:/"===s||"ipfs/"===a||xt.test(e);if(e.startsWith("http")&&!u&&!h){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((u||h)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if("ar:/"===s&&c)return{uri:`${i}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=e.replace(St,"");if(d.startsWith("{const r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e}))}}(r);if(i)return r;throw new vt({uri:t})}async function Ot(e,{blockNumber:t,blockTag:r,name:n,key:i,universalResolverAddress:o}){let s=o;if(!s){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=(0,nt.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const o=await se(e,yt,"readContract")({address:s,abi:tt.k3,functionName:"resolve",args:[(0,q.NC)(pt(n)),(0,Ue.R)({abi:tt.nZ,functionName:"text",args:[ht(n),i]})],blockNumber:t,blockTag:r});if("0x"===o[0])return null;const a=(0,rt.k)({abi:tt.nZ,functionName:"text",data:o[0]});return""===a?null:a}catch(e){if(at(e,"resolve"))return null;throw e}}function Rt(e,{method:t}){const r={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:n,status:i,transport:o})=>{"success"===i&&t===e&&(r[n]=o.request)})),t=>r[t]||e.request}class Mt extends g.G{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}var Nt=i(4092),Tt=i(522),jt=i(840);function Lt({abi:e,eventName:t,args:r}){let n=e[0];if(t&&(n=(0,jt.mE)({abi:e,args:r,name:t}),!n))throw new G.mv(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==n.type)throw new G.mv(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const i=(0,Tt.t)(n),o=(0,Nt.e)(i);let s=[];if(r&&"inputs"in n){const e=n.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(r)?r:Object.values(r).length>0?e?.map((e=>r[e.name]))??[]:[];t.length>0&&(s=e?.map(((e,r)=>Array.isArray(t[r])?t[r].map(((n,i)=>Dt({param:e,value:t[r][i]}))):t[r]?Dt({param:e,value:t[r]}):null))??[])}return[o,...s]}function Dt({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,lt.w)((0,ct.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new Mt(e.type);return(0,K.E)([e],[t])}async function $t(e,{address:t,abi:r,args:n,eventName:i,fromBlock:o,strict:s,toBlock:a}){const c=Rt(e,{method:"eth_newFilter"}),l=i?Lt({abi:r,args:n,eventName:i}):void 0,u=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof o?(0,q.eC)(o):o,toBlock:"bigint"==typeof a?(0,q.eC)(a):a,topics:l}]});return{abi:r,args:n,eventName:i,id:u,request:c(u),strict:s,type:"event"}}async function Bt(e,{address:t,args:r,event:n,events:i,fromBlock:o,strict:s,toBlock:a}={}){const c=i??(n?[n]:void 0),l=Rt(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap((e=>Lt({abi:[e],eventName:e.name,args:r})))],n&&(u=u[0]));const h=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof o?(0,q.eC)(o):o,toBlock:"bigint"==typeof a?(0,q.eC)(a):a,...u.length?{topics:u}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:o,id:h,request:l(h),strict:s,toBlock:a,type:"event"}}async function Ut(e){const t=Rt(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}const Ft=new Map,zt=new Map;const Wt=e=>`blockNumber.${e}`;async function Ht(e,{cacheTime:t=e.cacheTime,maxAge:r}={}){const n=await async function(e,{cacheKey:t,cacheTime:r=1/0}){const n=function(e){const t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),r=t(e,Ft),n=t(e,zt);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}(t),i=n.response.get();if(i&&r>0&&(new Date).getTime()-i.created.getTime()e.request({method:"eth_blockNumber"})),{cacheKey:Wt(e.uid),cacheTime:r??t});return BigInt(n)}var Vt=i(4450);const qt="/docs/contract/decodeEventLog";function Gt({abi:e,data:t,strict:r,topics:n}){const i=r??!0,[o,...s]=n;if(!o)throw new G.FM({docsPath:qt});const a=e.find((e=>"event"===e.type&&o===(0,Nt.e)((0,Tt.t)(e))));if(!a||!("name"in a)||"event"!==a.type)throw new G.lC(o,{docsPath:qt});const{name:c,inputs:l}=a,u=l?.some((e=>!("name"in e&&e.name)));let h=u?[]:{};const d=l.filter((e=>"indexed"in e&&e.indexed));for(let e=0;e!("indexed"in e&&e.indexed)));if(p.length>0)if(t&&"0x"!==t)try{const e=(0,Vt.r)(p,t);if(e)if(u)h=[...h,...e];else for(let t=0;t0?h:void 0}}function Zt({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,Vt.r)([e],t)||[])[0]}function Kt(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}async function Yt(e,{address:t,blockHash:r,fromBlock:n,toBlock:i,event:o,events:s,args:a,strict:c}={}){const l=c??!1,u=s??(o?[o]:void 0);let h,d=[];return u&&(d=[u.flatMap((e=>Lt({abi:[e],eventName:e.name,args:a})))],o&&(d=d[0])),h=r?await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:"bigint"==typeof n?(0,q.eC)(n):n,toBlock:"bigint"==typeof i?(0,q.eC)(i):i}]}),h.map((e=>{try{const{eventName:t,args:r}=u?Gt({abi:u,data:e.data,topics:e.topics,strict:l}):{eventName:void 0,args:void 0};return Kt(e,{args:r,eventName:t})}catch(t){let r,n;if(t instanceof G.SM||t instanceof G.Gy){if(l)return;r=t.abiItem.name,n=t.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return Kt(e,{args:n?[]:{},eventName:r})}})).filter(Boolean)}async function Qt(e,{abi:t,address:r,args:n,blockHash:i,eventName:o,fromBlock:s,toBlock:a,strict:c}){const l=o?(0,jt.mE)({abi:t,name:o}):void 0,u=l?void 0:t.filter((e=>"event"===e.type));return se(e,Yt,"getLogs")({address:r,args:n,blockHash:i,event:l,events:u,fromBlock:s,toBlock:a,strict:c})}async function Jt(e,{filter:t}){const r="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map((e=>{if("string"==typeof e)return e;try{const{eventName:n,args:i}="abi"in t&&t.abi?Gt({abi:t.abi,data:e.data,topics:e.topics,strict:r}):{eventName:void 0,args:void 0};return Kt(e,{args:i,eventName:n})}catch(r){let n,i;if(r instanceof G.SM||r instanceof G.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,i=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return Kt(e,{args:i?[]:{},eventName:n})}})).filter(Boolean)}async function Xt(e,{blockHash:t,blockNumber:r,blockTag:n,hash:i,index:o}){const s=n||"latest",a=void 0!==r?(0,q.eC)(r):void 0;let c=null;if(i?c=await e.request({method:"eth_getTransactionByHash",params:[i]}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,q.eC)(o)]}):(a||s)&&(c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||s,(0,q.eC)(o)]})),!c)throw new re.Bh({blockHash:t,blockNumber:r,blockTag:s,hash:i,index:o});return(e.chain?.formatters?.transaction?.format||ge)(c)}const er={"0x0":"reverted","0x1":"success"};function tr(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>Kt(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,H.ly)(e.transactionIndex):null,status:e.status?er[e.status]:null,type:e.type?fe[e.type]||e.type:null}}const rr=(0,pe.$)("transactionReceipt",tr);async function nr(e,{hash:t}){const r=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!r)throw new re.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||tr)(r)}async function ir(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}const or="Ethereum Signed Message:\n",sr="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";async function ar(e,{address:t,hash:r,signature:n,...i}){const o=(0,Re.v)(n)?n:(0,q.NC)(n);try{const{data:n}=await se(e,mt.R,"call")({data:Q({abi:tt.$o,args:[t,r,o],bytecode:sr}),...i});return s=n??"0x0",a="0x1",function(e,t){if(e.length!==t.length)return!1;for(let r=0;r`${t} ${e}`)).join(",")})`;return r}({primaryType:e,types:t}));return(0,lt.w)(r)}function dr({primaryType:e,types:t},r=new Set){const n=e.match(/^\w*/u),i=n?.[0];if(r.has(i)||void 0===t[i])return r;r.add(i);for(const e of t[i])dr({primaryType:e.type,types:t},r);return r}function pr({types:e,name:t,type:r,value:n}){if(void 0!==e[r])return[{type:"bytes32"},(0,lt.w)(ur({data:n,primaryType:r,types:e}))];if("bytes"===r)return n="0x"+((n.length%2?"0":"")+n.slice(2)),[{type:"bytes32"},(0,lt.w)(n)];if("string"===r)return[{type:"bytes32"},(0,lt.w)((0,q.NC)(n))];if(r.lastIndexOf("]")===r.length-1){const i=r.slice(0,r.lastIndexOf("[")),o=n.map((r=>pr({name:t,type:i,types:e,value:r})));return[{type:"bytes32"},(0,lt.w)((0,K.E)(o.map((([e])=>e)),o.map((([,e])=>e))))]}return[{type:r},n]}BigInt(0),BigInt(1),BigInt(2);const fr=new Map,gr=new Map;let mr=0;function yr(e,t,r){const n=++mr,i=()=>fr.get(e)||[],o=()=>{const t=gr.get(e);1===i().length&&t&&t(),(()=>{const t=i();fr.set(e,t.filter((e=>e.id!==n)))})()},s=i();if(fr.set(e,[...s,{id:n,fns:t}]),s&&s.length>0)return o;const a={};for(const e in t)a[e]=(...t)=>{const r=i();if(0!==r.length)for(const n of r)n.fns[e]?.(...t)};const c=r(a);return"function"==typeof c&&gr.set(e,c),o}function wr(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let i=!0;const o=()=>i=!1;return(async()=>{let s;t&&(s=await e({unpoll:o}));const a=await(r?.(s))??n;await We(a);const c=async()=>{i&&(await e({unpoll:o}),await We(n),c())};c()})(),o}function br(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:o,pollingInterval:s=e.pollingInterval}){let a;return(void 0!==o?o:"webSocket"!==e.transport.type)?yr((0,Me.P)(["watchBlockNumber",e.uid,t,r,s]),{onBlockNumber:n,onError:i},(n=>wr((async()=>{try{const t=await se(e,Ht,"getBlockNumber")({cacheTime:0});if(a){if(t===a)return;if(t-a>1&&r)for(let e=a+1n;ea)&&(n.onBlockNumber(t,a),a=t)}catch(e){n.onError?.(e)}}),{emitOnBegin:t,interval:s}))):(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!t)return;const r=(0,H.y_)(e.result?.number);n(r,a),a=r},onError(e){i?.(e)}});r=o,t||r()}catch(e){i?.(e)}})(),r})()}function vr(e){return{call:t=>(0,mt.R)(e,t),createBlockFilter:()=>async function(e){const t=Rt(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}(e),createContractEventFilter:t=>$t(e,t),createEventFilter:t=>Bt(e,t),createPendingTransactionFilter:()=>Ut(e),estimateContractGas:t=>async function(e,{abi:t,address:r,args:n,functionName:i,...o}){const s=(0,Ue.R)({abi:t,args:n,functionName:i});try{return await se(e,Se,"estimateGas")({data:s,to:r,...o})}catch(e){const s=o.account?(0,$.T)(o.account):void 0;throw gt(e,{abi:t,address:r,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:s?.address})}}(e,t),estimateGas:t=>Se(e,t),getBalance:t=>async function(e,{address:t,blockNumber:r,blockTag:n="latest"}){const i=r?(0,q.eC)(r):void 0,o=await e.request({method:"eth_getBalance",params:[t,i||n]});return BigInt(o)}(e,t),getBlock:t=>be(e,t),getBlockNumber:t=>Ht(e,t),getBlockTransactionCount:t=>async function(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){const i=void 0!==r?(0,q.eC)(r):void 0;let o;return o=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[i||n]}),(0,H.ly)(o)}(e,t),getBytecode:t=>async function(e,{address:t,blockNumber:r,blockTag:n="latest"}){const i=void 0!==r?(0,q.eC)(r):void 0,o=await e.request({method:"eth_getCode",params:[t,i||n]});if("0x"!==o)return o}(e,t),getChainId:()=>V(e),getContractEvents:t=>Qt(e,t),getEnsAddress:t=>async function(e,{blockNumber:t,blockTag:r,coinType:n,name:i,universalResolverAddress:o}){let s=o;if(!s){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=(0,nt.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const o=(0,Ue.R)({abi:tt.X$,functionName:"addr",...null!=n?{args:[ht(i),BigInt(n)]}:{args:[ht(i)]}}),a=await se(e,yt,"readContract")({address:s,abi:tt.k3,functionName:"resolve",args:[(0,q.NC)(pt(i)),o],blockNumber:t,blockTag:r});if("0x"===a[0])return null;const c=(0,rt.k)({abi:tt.X$,args:null!=n?[ht(i),BigInt(n)]:void 0,functionName:"addr",data:a[0]});return"0x"===c||"0x00"===(0,it.f)(c)?null:c}catch(e){if(at(e,"resolve"))return null;throw e}}(e,t),getEnsAvatar:t=>async function(e,{blockNumber:t,blockTag:r,gatewayUrls:n,name:i,universalResolverAddress:o}){const s=await se(e,Ot,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:i,universalResolverAddress:o});if(!s)return null;try{return await async function(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?async function(e,{gatewayUrls:t,record:r}){const n=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[r,n,i]=t.split("/"),[o,s]=r.split(":"),[a,c]=n.split(":");if(!o||"eip155"!==o.toLowerCase())throw new bt({reason:"Only EIP-155 supported"});if(!s)throw new bt({reason:"Chain ID not found"});if(!c)throw new bt({reason:"Contract address not found"});if(!i)throw new bt({reason:"Token ID not found"});if(!a)throw new bt({reason:"ERC namespace not found"});return{chainID:parseInt(s),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}(r),i=await async function(e,{nft:t}){if("erc721"===t.namespace)return yt(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return yt(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new _t({namespace:t.namespace})}(e,{nft:n}),{uri:o,isOnChain:s,isEncoded:a}=It({uri:i,gatewayUrls:t});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){const e=a?atob(o.replace("data:application/json;base64,","")):o;return Pt({uri:kt(JSON.parse(e)),gatewayUrls:t})}let c=n.tokenID;return"erc1155"===n.namespace&&(c=c.replace("0x","").padStart(64,"0")),async function({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then((e=>e.json()));return await Pt({gatewayUrls:e,uri:kt(r)})}catch{throw new vt({uri:t})}}({gatewayUrls:t,uri:o.replace(/(?:0x)?{id}/,c)})}(e,{gatewayUrls:t,record:r}):Pt({uri:r,gatewayUrls:t})}(e,{record:s,gatewayUrls:n})}catch{return null}}(e,t),getEnsName:t=>async function(e,{address:t,blockNumber:r,blockTag:n,universalResolverAddress:i}){let o=i;if(!o){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=(0,nt.L)({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}const s=`${t.toLowerCase().substring(2)}.addr.reverse`;try{const[i,a]=await se(e,yt,"readContract")({address:o,abi:tt.du,functionName:"reverse",args:[(0,q.NC)(pt(s))],blockNumber:r,blockTag:n});return t.toLowerCase()!==a.toLowerCase()?null:i}catch(e){if(at(e,"reverse"))return null;throw e}}(e,t),getEnsResolver:t=>async function(e,{blockNumber:t,blockTag:r,name:n,universalResolverAddress:i}){let o=i;if(!o){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=(0,nt.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[s]=await se(e,yt,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,q.NC)(pt(n))],blockNumber:t,blockTag:r});return s}(e,t),getEnsText:t=>Ot(e,t),getFeeHistory:t=>async function(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){const o=r?(0,q.eC)(r):void 0;return{baseFeePerGas:(s=await e.request({method:"eth_feeHistory",params:[(0,q.eC)(t),o||n,i]})).baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:s.gasUsedRatio,oldestBlock:BigInt(s.oldestBlock),reward:s.reward?.map((e=>e.map((e=>BigInt(e)))))};var s}(e,t),estimateFeesPerGas:t=>async function(e,t){return Ee(e,t)}(e,t),getFilterChanges:e=>Jt(0,e),getFilterLogs:e=>async function(e,{filter:t}){const r=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map((e=>{try{const{eventName:n,args:i}="abi"in t&&t.abi?Gt({abi:t.abi,data:e.data,topics:e.topics,strict:r}):{eventName:void 0,args:void 0};return Kt(e,{args:i,eventName:n})}catch(r){let n,i;if(r instanceof G.SM||r instanceof G.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,i=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return Kt(e,{args:i?[]:{},eventName:n})}})).filter(Boolean)}(0,e),getGasPrice:()=>ve(e),getLogs:t=>Yt(e,t),getProof:t=>async function(e,{address:t,blockNumber:r,blockTag:n,storageKeys:i}){const o=n??"latest",s=void 0!==r?(0,q.eC)(r):void 0;return a=await e.request({method:"eth_getProof",params:[t,i,s||o]}),{...a,balance:a.balance?BigInt(a.balance):void 0,nonce:a.nonce?(0,H.ly)(a.nonce):void 0,storageProof:a.storageProof?(c=a.storageProof,c.map((e=>({...e,value:BigInt(e.value)})))):void 0};var a,c}(e,t),estimateMaxPriorityFeePerGas:t=>async function(e,t){return _e(e,t)}(e,t),getStorageAt:t=>async function(e,{address:t,blockNumber:r,blockTag:n="latest",slot:i}){const o=void 0!==r?(0,q.eC)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,o||n]})}(e,t),getTransaction:t=>Xt(e,t),getTransactionConfirmations:t=>async function(e,{hash:t,transactionReceipt:r}){const[n,i]=await Promise.all([se(e,Ht,"getBlockNumber")({}),t?se(e,Xt,"getBlockNumber")({hash:t}):void 0]),o=r?.blockNumber||i?.blockNumber;return o?n-o+1n:0n}(e,t),getTransactionCount:t=>Ae(e,t),getTransactionReceipt:t=>nr(e,t),multicall:t=>async function(e,t){const{allowFailure:r=!0,batchSize:n,blockNumber:i,blockTag:o,contracts:s,multicallAddress:a}=t,c=n??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024);let l=a;if(!l){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");l=(0,nt.L)({blockNumber:i,chain:e.chain,contract:"multicall3"})}const u=[[]];let h=0,d=0;for(let e=0;e0&&d>c&&u[h].length>0&&(h++,d=(e.length-2)/2,u[h]=[]),u[h]=[...u[h],{allowFailure:!0,callData:e,target:n}]}catch(e){const s=gt(e,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:o});if(!r)throw s;u[h]=[...u[h],{allowFailure:!0,callData:"0x",target:n}]}}const p=await Promise.allSettled(u.map((t=>se(e,yt,"readContract")({abi:tt.F8,address:l,args:[t],blockNumber:i,blockTag:o,functionName:"aggregate3"})))),f=[];for(let e=0;eke(e,t),readContract:t=>yt(e,t),sendRawTransaction:t=>Pe(e,t),simulateContract:t=>async function(e,{abi:t,address:r,args:n,dataSuffix:i,functionName:o,...s}){const a=s.account?(0,$.T)(s.account):void 0,c=(0,Ue.R)({abi:t,args:n,functionName:o});try{const{data:a}=await se(e,mt.R,"call")({batch:!1,data:`${c}${i?i.replace("0x",""):""}`,to:r,...s});return{result:(0,rt.k)({abi:t,args:n,functionName:o,data:a||"0x"}),request:{abi:t,address:r,args:n,dataSuffix:i,functionName:o,...s}}}catch(e){throw gt(e,{abi:t,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:o,sender:a?.address})}}(e,t),verifyMessage:t=>async function(e,{address:t,message:r,signature:n,...i}){const o=function(e,t){const r="string"==typeof e?(0,ct.qX)(e):e.raw instanceof Uint8Array?e.raw:(0,ct.O0)(e.raw),n=(0,ct.qX)(`${or}${r.length}`);return(0,lt.w)((0,Z.zo)([n,r]),void 0)}(r);return ar(e,{address:t,hash:o,signature:n,...i})}(e,t),verifyTypedData:t=>async function(e,{address:t,signature:r,message:n,primaryType:i,types:o,domain:s,...a}){return ar(e,{address:t,hash:cr({message:n,primaryType:i,types:o,domain:s}),signature:r,...a})}(e,t),uninstallFilter:e=>ir(0,e),waitForTransactionReceipt:t=>async function(e,{confirmations:t=1,hash:r,onReplaced:n,pollingInterval:i=e.pollingInterval,timeout:o}){const s=(0,Me.P)(["waitForTransactionReceipt",e.uid,r]);let a,c,l,u=!1;return new Promise(((h,d)=>{o&&setTimeout((()=>d(new re.mc({hash:r}))),o);const p=yr(s,{onReplaced:n,resolve:h,reject:d},(n=>{const o=se(e,br,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(i){if(u)return;let s=i;const h=e=>{o(),e(),p()};try{if(l){if(t>1&&(!l.blockNumber||s-l.blockNumber+1nn.resolve(l)))}if(a||(u=!0,await He((async()=>{a=await se(e,Xt,"getTransaction")({hash:r}),a.blockNumber&&(s=a.blockNumber)}),{delay:({count:e})=>200*~~(1<1&&(!l.blockNumber||s-l.blockNumber+1nn.resolve(l)))}catch(r){if(a&&(r instanceof re.Bh||r instanceof re.Yb))try{c=a,u=!0;const r=await He((()=>se(e,be,"getBlock")({blockNumber:s,includeTransactions:!0})),{delay:({count:e})=>200*~~(1<e instanceof de});u=!1;const i=r.transactions.find((({from:e,nonce:t})=>e===c.from&&t===c.nonce));if(!i)return;if(l=await se(e,nr,"getTransactionReceipt")({hash:i.hash}),t>1&&(!l.blockNumber||s-l.blockNumber+1n{n.onReplaced?.({reason:o,replacedTransaction:c,transaction:i,transactionReceipt:l}),n.resolve(l)}))}catch(e){h((()=>n.reject(e)))}else h((()=>n.reject(r)))}}})}))}))}(e,t),watchBlocks:t=>function(e,{blockTag:t="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:o,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){const l=void 0!==a?a:"webSocket"!==e.transport.type,u=s??!1;let h;return l?yr((0,Me.P)(["watchBlocks",e.uid,r,n,u,c]),{onBlock:i,onError:o},(i=>wr((async()=>{try{const n=await se(e,be,"getBlock")({blockTag:t,includeTransactions:u});if(n.number&&h?.number){if(n.number===h.number)return;if(n.number-h.number>1&&r)for(let t=h?.number+1n;th.number)&&(i.onBlock(n,h),h=n)}catch(e){i.onError?.(e)}}),{emitOnBegin:n,interval:c}))):(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{const{unsubscribe:n}=await e.transport.subscribe({params:["newHeads"],onData(r){if(!t)return;const n=(e.chain?.formatters?.block?.format||ye)(r.result);i(n,h),h=n},onError(e){o?.(e)}});r=n,t||r()}catch(e){o?.(e)}})(),r})()}(e,t),watchBlockNumber:t=>br(e,t),watchContractEvent:t=>function(e,{abi:t,address:r,args:n,batch:i=!0,eventName:o,onError:s,onLogs:a,poll:c,pollingInterval:l=e.pollingInterval,strict:u}){return(void 0!==c?c:"webSocket"!==e.transport.type)?(()=>{const c=(0,Me.P)(["watchContractEvent",r,n,i,e.uid,o,l]),h=u??!1;return yr(c,{onLogs:a,onError:s},(s=>{let a,c,u=!1;const d=wr((async()=>{if(u)try{let l;if(c)l=await se(e,Jt,"getFilterChanges")({filter:c});else{const i=await se(e,Ht,"getBlockNumber")({});l=a&&a!==i?await se(e,Qt,"getContractEvents")({abi:t,address:r,args:n,eventName:o,fromBlock:a+1n,toBlock:i,strict:h}):[],a=i}if(0===l.length)return;if(i)s.onLogs(l);else for(const e of l)s.onLogs([e])}catch(e){c&&e instanceof C&&(u=!1),s.onError?.(e)}else{try{c=await se(e,$t,"createContractEventFilter")({abi:t,address:r,args:n,eventName:o,strict:h})}catch{}u=!0}}),{emitOnBegin:!0,interval:l});return async()=>{c&&await se(e,ir,"uninstallFilter")({filter:c}),d()}}))})():(()=>{let i=!0,c=()=>i=!1;return(async()=>{try{const l=o?Lt({abi:t,eventName:o,args:n}):[],{unsubscribe:h}=await e.transport.subscribe({params:["logs",{address:r,topics:l}],onData(e){if(!i)return;const r=e.result;try{const{eventName:e,args:n}=Gt({abi:t,data:r.data,topics:r.topics,strict:u}),i=Kt(r,{args:n,eventName:e});a([i])}catch(e){let t,n;if(e instanceof G.SM||e instanceof G.Gy){if(u)return;t=e.abiItem.name,n=e.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const i=Kt(r,{args:n?[]:{},eventName:t});a([i])}},onError(e){s?.(e)}});c=h,i||c()}catch(e){s?.(e)}})(),c})()}(e,t),watchEvent:t=>function(e,{address:t,args:r,batch:n=!0,event:i,events:o,onError:s,onLogs:a,poll:c,pollingInterval:l=e.pollingInterval,strict:u}){const h=void 0!==c?c:"webSocket"!==e.transport.type,d=u??!1;return h?yr((0,Me.P)(["watchEvent",t,r,n,e.uid,i,l]),{onLogs:a,onError:s},(s=>{let a,c,u=!1;const h=wr((async()=>{if(u)try{let l;if(c)l=await se(e,Jt,"getFilterChanges")({filter:c});else{const n=await se(e,Ht,"getBlockNumber")({});l=a&&a!==n?await se(e,Yt,"getLogs")({address:t,args:r,event:i,events:o,fromBlock:a+1n,toBlock:n}):[],a=n}if(0===l.length)return;if(n)s.onLogs(l);else for(const e of l)s.onLogs([e])}catch(e){c&&e instanceof C&&(u=!1),s.onError?.(e)}else{try{c=await se(e,Bt,"createEventFilter")({address:t,args:r,event:i,events:o,strict:d})}catch{}u=!0}}),{emitOnBegin:!0,interval:l});return async()=>{c&&await se(e,ir,"uninstallFilter")({filter:c}),h()}})):(()=>{let n=!0,c=()=>n=!1;return(async()=>{try{const l=o??(i?[i]:void 0);let h=[];l&&(h=[l.flatMap((e=>Lt({abi:[e],eventName:e.name,args:r})))],i&&(h=h[0]));const{unsubscribe:p}=await e.transport.subscribe({params:["logs",{address:t,topics:h}],onData(e){if(!n)return;const t=e.result;try{const{eventName:e,args:r}=Gt({abi:l,data:t.data,topics:t.topics,strict:d}),n=Kt(t,{args:r,eventName:e});a([n])}catch(e){let r,n;if(e instanceof G.SM||e instanceof G.Gy){if(u)return;r=e.abiItem.name,n=e.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}const i=Kt(t,{args:n?[]:{},eventName:r});a([i])}},onError(e){s?.(e)}});c=p,n||c()}catch(e){s?.(e)}})(),c})()}(e,t),watchPendingTransactions:t=>function(e,{batch:t=!0,onError:r,onTransactions:n,poll:i,pollingInterval:o=e.pollingInterval}){return(void 0!==i?i:"webSocket"!==e.transport.type)?yr((0,Me.P)(["watchPendingTransactions",e.uid,t,o]),{onTransactions:n,onError:r},(r=>{let n;const i=wr((async()=>{try{if(!n)try{return void(n=await se(e,Ut,"createPendingTransactionFilter")({}))}catch(e){throw i(),e}const o=await se(e,Jt,"getFilterChanges")({filter:n});if(0===o.length)return;if(t)r.onTransactions(o);else for(const e of o)r.onTransactions([e])}catch(e){r.onError?.(e)}}),{emitOnBegin:!0,interval:o});return async()=>{n&&await se(e,ir,"uninstallFilter")({filter:n}),i()}})):(()=>{let t=!0,i=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const r=e.result;n([r])},onError(e){r?.(e)}});i=o,t||i()}catch(e){r?.(e)}})(),i})()}(e,t)}}function _r(e){const{key:t="public",name:r="Public Client"}=e;return W({...e,key:t,name:r,type:"publicClient"}).extend(vr)}function Er(e,t={}){const{key:r="fallback",name:n="Fallback",rank:i=!1,retryCount:o,retryDelay:s}=t;return({chain:t,pollingInterval:a=4e3,timeout:c})=>{let l=e,u=()=>{};const h=Ge({key:r,name:n,async request({method:e,params:r}){const n=async(i=0)=>{const o=l[i]({chain:t,retryCount:0,timeout:c});try{const t=await o.request({method:e,params:r});return u({method:e,params:r,response:t,transport:o,status:"success"}),t}catch(t){if(u({error:t,method:e,params:r,transport:o,status:"error"}),Ve(t))throw t;if(i===l.length-1)throw t;return n(i+1)}};return n()},retryCount:o,retryDelay:s,type:"fallback"},{onResponse:e=>u=e,transports:l.map((e=>e({chain:t,retryCount:0})))});if(i){const e="object"==typeof i?i:{};!function({chain:e,interval:t=4e3,onTransports:r,sampleCount:n=10,timeout:i=1e3,transports:o,weights:s={}}){const{stability:a=.7,latency:c=.3}=s,l=[],u=async()=>{const s=await Promise.all(o.map((async t=>{const r=t({chain:e,retryCount:0,timeout:i}),n=Date.now();let o,s;try{await r.request({method:"net_listening"}),s=1}catch{s=0}finally{o=Date.now()}return{latency:o-n,success:s}})));l.push(s),l.length>n&&l.shift();const h=Math.max(...l.map((e=>Math.max(...e.map((({latency:e})=>e)))))),d=o.map(((e,t)=>{const r=l.map((e=>e[t].latency)),n=1-r.reduce(((e,t)=>e+t),0)/r.length/h,i=l.map((e=>e[t].success)),o=i.reduce(((e,t)=>e+t),0)/i.length;return 0===o?[0,t]:[c*n+a*o,t]})).sort(((e,t)=>t[0]-e[0]));r(d.map((([,e])=>o[e]))),await We(t),u()};u()}({chain:t,interval:e.interval??a,onTransports:e=>l=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:l,weights:e.weights})}return h}}class xr extends g.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var Cr=i(2357);const Sr=function(){if("undefined"!=typeof WebSocket)return WebSocket;if(void 0!==global.WebSocket)return global.WebSocket;if(void 0!==window.WebSocket)return window.WebSocket;if(void 0!==self.WebSocket)return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}();function Ar(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:n}){return new Promise(((i,o)=>{(async()=>{let s;try{const a=new AbortController;r>0&&(s=setTimeout((()=>{n?a.abort():o(t)}),r)),i(await e({signal:a?.signal}))}catch(e){"AbortError"===e.name&&o(t),o(e)}finally{clearTimeout(s)}})()}))}let Ir=0;const kr=new Map;async function Pr(e){let t=kr.get(e);if(t)return t;const{schedule:r}=(0,Cr.S)({id:e,fn:async()=>{const r=new Sr(e),n=new Map,i=new Map,o=({data:e})=>{const t=JSON.parse(e),r="eth_subscription"===t.method,o=r?t.params.subscription:t.id,s=r?i:n,a=s.get(o);a&&a({data:e}),r||s.delete(o)},s=()=>{kr.delete(e),r.removeEventListener("close",s),r.removeEventListener("message",o)};return r.addEventListener("close",s),r.addEventListener("message",o),r.readyState===Sr.CONNECTING&&await new Promise(((e,t)=>{r&&(r.onopen=e,r.onerror=t)})),t=Object.assign(r,{requests:n,subscriptions:i}),kr.set(e,t),[t]}}),[n,[i]]=await r();return i}const Or={http:async function(e,{body:t,fetchOptions:r={},timeout:n=1e4}){const{headers:i,method:o,signal:s}=r;try{const a=await Ar((async({signal:a})=>await fetch(e,{...r,body:Array.isArray(t)?(0,Me.P)(t.map((e=>({jsonrpc:"2.0",id:e.id??Ir++,...e})))):(0,Me.P)({jsonrpc:"2.0",id:t.id??Ir++,...t}),headers:{...i,"Content-Type":"application/json"},method:o||"POST",signal:s||(n>0?a:void 0)})),{errorInstance:new m.W5({body:t,url:e}),timeout:n,signal:!0});let c;if(c=a.headers.get("Content-Type")?.startsWith("application/json")?await a.json():await a.text(),!a.ok)throw new m.Gg({body:t,details:(0,Me.P)(c.error)||a.statusText,headers:a.headers,status:a.status,url:e});return c}catch(r){if(r instanceof m.Gg)throw r;if(r instanceof m.W5)throw r;throw new m.Gg({body:t,details:r.message,url:e})}},webSocket:function(e,{body:t,onResponse:r}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new m.c9({body:t,url:e.url,details:"Socket is closed."});const n=Ir++,i=({data:o})=>{const s=JSON.parse(o);"number"==typeof s.id&&n!==s.id||(r?.(s),"eth_subscribe"===t.method&&"string"==typeof s.result&&e.subscriptions.set(s.result,i),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(n,i),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:n})),e},webSocketAsync:async function(e,{body:t,timeout:r=1e4}){return Ar((()=>new Promise((r=>Or.webSocket(e,{body:t,onResponse:r})))),{errorInstance:new m.W5({body:t,url:e.url}),timeout:r})}};var Rr=i(4192);function Mr(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;const i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(n=r.getItem(e))?n:null;return o instanceof Promise?o.then(i):i(o)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}const Nr=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then:e=>Nr(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>Nr(t)(e)}}},Tr=e=>{let t;const r=new Set,n=(e,n)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach((r=>r(t,e)))}},i=()=>t,o={setState:n,getState:i,getInitialState:()=>s,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},s=t=e(n,i,o);return o};var jr=i(5229);function Lr(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,n]of e)if(!Object.is(n,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;ne&&t(e)?r(e):"object"!=typeof e?e:Array.isArray(e)?e.map((e=>zr(e,{find:t,replace:r}))):e instanceof Object?Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:zr(i,{find:t,replace:r})})),{}):e;function Wr(e){const t=JSON.parse(e),r=zr(t,{find:e=>"string"==typeof e&&e.startsWith("#bigint."),replace:e=>BigInt(e.replace("#bigint.",""))});return r}function Hr(e){return"number"==typeof e?e:"wei"===e?0:Math.abs(Rr.Bd[e])}function Vr(e,t){return e.slice(0,t).join(".")||"."}function qr(e,t){const{length:r}=e;for(let n=0;n{const n="bigint"==typeof r?`#bigint.${r.toString()}`:r;return t?.(e,n)||n}),n),r??void 0)}var Zr={getItem:e=>"",setItem:(e,t)=>null,removeItem:e=>null};function Kr({deserialize:e=Wr,key:t="wagmi",serialize:r=Gr,storage:n}){return{...n,getItem:(r,i=null)=>{const o=n.getItem(`${t}.${r}`);try{return o?e(o):i}catch(e){return console.warn(e),i}},setItem:(e,i)=>{if(null===i)n.removeItem(`${t}.${e}`);else try{n.setItem(`${t}.${e}`,r(i))}catch(e){console.error(e)}},removeItem:e=>n.removeItem(`${t}.${e}`)}}var Yr,Qr,Jr,Xr,en,tn="store",rn=class{constructor({autoConnect:e=!1,connectors:t=[new Ye],publicClient:r,storage:n=Kr({storage:"undefined"!=typeof window?window.localStorage:Zr}),logger:i={warn:console.warn},webSocketPublicClient:o}){Xe(this,Jr),this.publicClients=new Map,this.webSocketPublicClients=new Map,Xe(this,Yr,void 0),Xe(this,Qr,void 0),this.args={autoConnect:e,connectors:t,logger:i,publicClient:r,storage:n,webSocketPublicClient:o};let s,a="disconnected";if(e)try{const e=n.getItem(tn),t=e?.state?.data;a=t?.account?"reconnecting":"connecting",s=t?.chain?.id}catch(e){}const c="function"==typeof t?t():t;var l,u,h,d;c.forEach((e=>e.setStorage(n))),this.store=(d=((e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((e,t)=>(r,n,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,c=new Set;let l;try{l=o.getStorage()}catch(e){}if(!l)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)}),n,i);const u=Nr(o.serialize),h=()=>{const e=o.partialize({...n()});let t;const r=u({state:e,version:o.version}).then((e=>l.setItem(o.name,e))).catch((e=>{t=e}));if(t)throw t;return r},d=i.setState;i.setState=(e,t)=>{d(e,t),h()};const p=e(((...e)=>{r(...e),h()}),n,i);let f;const g=()=>{var e;if(!l)return;s=!1,a.forEach((e=>e(n())));const t=(null==(e=o.onRehydrateStorage)?void 0:e.call(o,n()))||void 0;return Nr(l.getItem.bind(l))(o.name).then((e=>{if(e)return o.deserialize(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return e.state;if(o.migrate)return o.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return f=o.merge(e,null!=(t=n())?t:p),r(f,!0),h()})).then((()=>{null==t||t(f,void 0),s=!0,c.forEach((e=>e(f)))})).catch((e=>{null==t||t(void 0,e)}))};return i.persist={setOptions:e=>{o={...o,...e},e.getStorage&&(l=e.getStorage())},clearStorage:()=>{null==l||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>g(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},g(),f||p})(e,t)):((e,t)=>(r,n,i)=>{let o={storage:Mr((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,c=new Set;let l=o.storage;if(!l)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)}),n,i);const u=()=>{const e=o.partialize({...n()});return l.setItem(o.name,{state:e,version:o.version})},h=i.setState;i.setState=(e,t)=>{h(e,t),u()};const d=e(((...e)=>{r(...e),u()}),n,i);let p;i.getInitialState=()=>d;const f=()=>{var e,t;if(!l)return;s=!1,a.forEach((e=>{var t;return e(null!=(t=n())?t:d)}));const i=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=n())?e:d))||void 0;return Nr(l.getItem.bind(l))(o.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return e.state;if(o.migrate)return o.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return p=o.merge(e,null!=(t=n())?t:d),r(p,!0),u()})).then((()=>{null==i||i(p,void 0),p=n(),s=!0,c.forEach((e=>e(p)))})).catch((e=>{null==i||i(void 0,e)}))};return i.persist={setOptions:e=>{o={...o,...e},e.storage&&(l=e.storage)},clearStorage:()=>{null==l||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>f(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},o.skipHydration||f(),p||d})(e,t))((()=>({connectors:c,publicClient:this.getPublicClient({chainId:s}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:s})})),{name:tn,storage:n,partialize:t=>({...e&&{data:{account:t?.data?.account,chain:t?.data?.chain}},chains:t?.chains}),version:2}),(h=(e,t,r)=>{const n=r.subscribe;return r.subscribe=(e,t,i)=>{let o=e;if(t){const n=(null==i?void 0:i.equalityFn)||Object.is;let s=e(r.getState());o=r=>{const i=e(r);if(!n(s,i)){const e=s;t(s=i,e)}},(null==i?void 0:i.fireImmediately)&&t(s,s)}return n(o)},d(e,t,r)})?Tr(h):Tr),this.storage=n,et(this,Qr,n?.getItem("wallet")),(this,l=Jr,u=Xr,Qe(this,l,"access private method"),u).call(this),e&&"undefined"!=typeof window&&setTimeout((async()=>await this.autoConnect()),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){return this.data?.chain?.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const t="function"==typeof e?e(this.store.getState()):e;this.store.setState(t,!0)}clearState(){this.setState((e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"})))}async destroy(){this.connector&&await(this.connector.disconnect?.()),et(this,Yr,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(Je(this,Yr))return;et(this,Yr,!0),this.setState((e=>({...e,status:e.data?.account?"reconnecting":"connecting"})));const e=Je(this,Qr)?[...this.connectors].sort((e=>e.id===Je(this,Qr)?-1:1)):this.connectors;let t=!1;for(const r of e){if(!r.ready||!r.isAuthorized)continue;if(!await r.isAuthorized())continue;const e=await r.connect();this.setState((t=>({...t,connector:r,chains:r?.chains,data:e,status:"connected"}))),t=!0;break}return t||this.setState((e=>({...e,data:void 0,status:"disconnected"}))),et(this,Yr,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const t="function"==typeof e?e():e;t.forEach((e=>e.setStorage(this.args.storage))),this.setState((e=>({...e,connectors:t})))}getPublicClient({chainId:e}={}){let t=this.publicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.publicClients.get(e??-1),t)return t;const{publicClient:r}=this.args;return t="function"==typeof r?r({chainId:e}):r,this.publicClients.set(e??-1,t),t}setPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState((e=>({...e,publicClient:this.getPublicClient({chainId:t})})))}getWebSocketPublicClient({chainId:e}={}){let t=this.webSocketPublicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.webSocketPublicClients.get(e??-1),t)return t;const{webSocketPublicClient:r}=this.args;return t="function"==typeof r?r({chainId:e}):r,t&&this.webSocketPublicClients.set(e??-1,t),t}setWebSocketPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState((e=>({...e,webSocketPublicClient:this.getWebSocketPublicClient({chainId:t})})))}setLastUsedConnector(e=null){this.storage?.setItem("wallet",e)}};function nn(){if(!en)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return en}async function on({chainId:e,connector:t}){const r=nn(),n=r.connector;if(n&&t.id===n.id)throw new Br;try{r.setState((e=>({...e,status:"connecting"})));const n=await t.connect({chainId:e});return r.setLastUsedConnector(t.id),r.setState((e=>({...e,connector:t,chains:t?.chains,data:n,status:"connected"}))),r.storage.setItem("connected",!0),{...n,connector:t}}catch(e){throw r.setState((e=>({...e,status:e.connector?"connected":"disconnected"}))),e}}Yr=new WeakMap,Qr=new WeakMap,Jr=new WeakSet,Xr=function(){const e=e=>{this.setState((t=>({...t,data:{...t.data,...e}})))},t=()=>{this.clearState()},r=e=>{this.setState((t=>({...t,error:e})))};this.store.subscribe((({connector:e})=>e),((n,i)=>{i?.off?.("change",e),i?.off?.("disconnect",t),i?.off?.("error",r),n&&(n.on?.("change",e),n.on?.("disconnect",t),n.on?.("error",r))}));const{publicClient:n,webSocketPublicClient:i}=this.args;("function"==typeof n||"function"==typeof i)&&this.store.subscribe((({data:e})=>e?.chain?.id),(e=>{this.setState((t=>({...t,publicClient:this.getPublicClient({chainId:e}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:e})})))}))};var sn=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],an=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function cn({chainId:e}={}){const t=nn();return e&&t.getPublicClient({chainId:e})||t.publicClient}async function ln({chainId:e}={}){const t=nn();return await(t.connector?.getWalletClient?.({chainId:e}))||null}async function un({address:e,account:t,chainId:r,abi:n,args:i,functionName:o,blockNumber:s,blockTag:a}){return cn({chainId:r}).readContract({abi:n,address:e,account:t,functionName:o,args:i,blockNumber:s,blockTag:a})}async function hn({contracts:e,blockNumber:t,blockTag:r,...n}){const{allowFailure:i=!0}=n;try{const n=cn(),o=e.reduce(((e,t,r)=>{const i=t.chainId??n.chain.id;return{...e,[i]:[...e[i]||[],{contract:t,index:r}]}}),{}),s=()=>Object.entries(o).map((([e,n])=>async function({chainId:e,contracts:t,blockNumber:r,blockTag:n,...i}){const o=cn({chainId:e});if(!o.chains)throw new Ur;if(e&&o.chain.id!==e)throw new $r({chainId:e});return o.multicall({allowFailure:i.allowFailure??!0,blockNumber:r,blockTag:n,contracts:t})}({allowFailure:i,chainId:parseInt(e),contracts:n.map((({contract:e})=>e)),blockNumber:t,blockTag:r}))),a=(await Promise.all(s())).flat(),c=Object.values(o).flatMap((e=>e.map((({index:e})=>e))));return a.reduce(((e,t,r)=>(e&&(e[c[r]]=t),e)),[])}catch(n){if(n instanceof st.uq)throw n;const o=()=>e.map((e=>un({...e,blockNumber:t,blockTag:r})));return i?(await Promise.allSettled(o())).map((e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"})):await Promise.all(o())}}function dn(){const{data:e,connector:t,status:r}=nn();switch(r){case"connected":return{address:e?.account,connector:t,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:r};case"reconnecting":return{address:e?.account,connector:t,isConnected:!!e?.account,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:r};case"connecting":return{address:e?.account,connector:t,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:r};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:r}}}function pn(){const e=nn(),t=e.data?.chain?.id,r=e.chains??[],n=[...e.publicClient?.chains||[],...r].find((e=>e.id===t))??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:t?{...n,...e.data?.chain,id:t}:void 0,chains:r}}async function fn({domain:e,message:r,primaryType:n,types:i}){const o=await ln();if(!o)throw new t;const{chainId:s}=e;return s&&wn({chainId:s}),o.signTypedData({message:r,primaryType:n,types:i,domain:e})}async function gn({chainId:e}){const{connector:r}=nn();if(!r)throw new t;if(!r.switchChain)throw new Fr({connector:r});return r.switchChain(e)}function mn(e,{selector:t=(e=>e)}={}){const r=nn().subscribe((({data:e,connector:r,status:n})=>t({address:e?.account,connector:r,status:n})),(()=>e(dn())),{equalityFn:Lr});return r}function yn(e,{selector:t=(e=>e)}={}){const r=nn().subscribe((({data:e,chains:r})=>t({chainId:e?.chain?.id,chains:r})),(()=>e(pn())),{equalityFn:Lr});return r}function wn({chainId:e}){const{chain:t,chains:r}=pn(),n=t?.id;if(n&&e!==n)throw new Dr({activeChain:r.find((e=>e.id===n))?.name??`Chain ${n}`,targetChain:r.find((t=>t.id===e))?.name??`Chain ${e}`})}i(7294);let bn=null;var vn=i(914),_n=i(4145),En=i(242),xn=i(3215),Cn=i(5118),Sn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let An=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.address=vn.AccountController.state.address,this.balanceVal=vn.AccountController.state.balance,this.balanceSymbol=vn.AccountController.state.balanceSymbol,this.profileName=vn.AccountController.state.profileName,this.profileImage=vn.AccountController.state.profileImage,this.network=vn.NetworkController.state.caipNetwork,this.unsubscribe.push(vn.AccountController.subscribe((e=>{e.isConnected?(this.address=e.address,this.balanceVal=e.balance,this.profileName=e.profileName,this.profileImage=e.profileImage,this.balanceSymbol=e.balanceSymbol):(this.address="",this.balanceVal="",this.profileName="",this.profileImage="",this.balanceSymbol="")})),vn.NetworkController.subscribeKey("caipNetwork",(e=>this.network=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=vn.fz.getNetworkImage(this.network),t="show"===this.balance;return En.dy` + + + `}onClick(){vn.IN.open()}};Sn([(0,xn.Cb)({type:Boolean})],An.prototype,"disabled",void 0),Sn([(0,xn.Cb)()],An.prototype,"balance",void 0),Sn([(0,xn.Cb)()],An.prototype,"charsStart",void 0),Sn([(0,xn.Cb)()],An.prototype,"charsEnd",void 0),Sn([(0,xn.SB)()],An.prototype,"address",void 0),Sn([(0,xn.SB)()],An.prototype,"balanceVal",void 0),Sn([(0,xn.SB)()],An.prototype,"balanceSymbol",void 0),Sn([(0,xn.SB)()],An.prototype,"profileName",void 0),Sn([(0,xn.SB)()],An.prototype,"profileImage",void 0),Sn([(0,xn.SB)()],An.prototype,"network",void 0),An=Sn([(0,_n.customElement)("w3m-account-button")],An);const In=En.iv` + :host { + display: block; + width: max-content; + } +`;var kn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Pn=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.isAccount=vn.AccountController.state.isConnected,this.unsubscribe.push(vn.AccountController.subscribeKey("isConnected",(e=>{this.isAccount=e})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return this.isAccount?En.dy` + + + `:En.dy` + + `}};Pn.styles=In,kn([(0,xn.Cb)({type:Boolean})],Pn.prototype,"disabled",void 0),kn([(0,xn.Cb)()],Pn.prototype,"balance",void 0),kn([(0,xn.Cb)()],Pn.prototype,"size",void 0),kn([(0,xn.Cb)()],Pn.prototype,"label",void 0),kn([(0,xn.Cb)()],Pn.prototype,"loadingLabel",void 0),kn([(0,xn.Cb)()],Pn.prototype,"charsStart",void 0),kn([(0,xn.Cb)()],Pn.prototype,"charsEnd",void 0),kn([(0,xn.SB)()],Pn.prototype,"isAccount",void 0),Pn=kn([(0,_n.customElement)("w3m-button")],Pn);var On=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Rn=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=vn.IN.state.open,this.loading=vn.IN.state.loading,this.unsubscribe.push(vn.IN.subscribe((e=>{this.open=e.open,this.loading=e.loading})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.loading||this.open;return En.dy` + + ${e?this.loadingLabel:this.label} + + `}onClick(){this.open?vn.IN.close():this.loading||vn.IN.open()}};On([(0,xn.Cb)()],Rn.prototype,"size",void 0),On([(0,xn.Cb)()],Rn.prototype,"label",void 0),On([(0,xn.Cb)()],Rn.prototype,"loadingLabel",void 0),On([(0,xn.SB)()],Rn.prototype,"open",void 0),On([(0,xn.SB)()],Rn.prototype,"loading",void 0),Rn=On([(0,_n.customElement)("w3m-connect-button")],Rn),i(6541);const Mn=En.iv` + :host { + display: block; + width: max-content; + } +`;var Nn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Tn=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=vn.NetworkController.state.caipNetwork,this.connected=vn.AccountController.state.isConnected,this.loading=vn.IN.state.loading,this.unsubscribe.push(vn.NetworkController.subscribeKey("caipNetwork",(e=>this.network=e)),vn.AccountController.subscribeKey("isConnected",(e=>this.connected=e)),vn.IN.subscribeKey("loading",(e=>this.loading=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return En.dy` + + ${this.network?.name??(this.connected?"Unknown Network":"Select Network")} + + `}onClick(){this.loading||vn.IN.open({view:"Networks"})}};Tn.styles=Mn,Nn([(0,xn.Cb)({type:Boolean})],Tn.prototype,"disabled",void 0),Nn([(0,xn.SB)()],Tn.prototype,"network",void 0),Nn([(0,xn.SB)()],Tn.prototype,"connected",void 0),Nn([(0,xn.SB)()],Tn.prototype,"loading",void 0),Tn=Nn([(0,_n.customElement)("w3m-network-button")],Tn);const jn=En.iv` + :host { + display: block; + will-change: transform, opacity; + } +`;var Ln=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Dn=class extends En.oi{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=vn.RouterController.state.view,this.unsubscribe.push(vn.RouterController.subscribeKey("view",(e=>this.onViewChange(e))))}firstUpdated(){this.resizeObserver=new ResizeObserver((async([e])=>{const t=`${e?.contentRect.height}px`;"0px"!==this.prevHeight&&(await this.animate([{height:this.prevHeight},{height:t}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.style.height="auto"),this.prevHeight=t})),this.resizeObserver.observe(this.getWrapper())}disconnectedCallback(){this.resizeObserver?.unobserve(this.getWrapper()),this.unsubscribe.forEach((e=>e()))}render(){return En.dy`
${this.viewTemplate()}
`}viewTemplate(){switch(this.view){case"Connect":default:return En.dy``;case"ConnectingWalletConnect":return En.dy``;case"ConnectingExternal":return En.dy``;case"ConnectingSiwe":return En.dy``;case"AllWallets":return En.dy``;case"Networks":return En.dy``;case"SwitchNetwork":return En.dy``;case"Account":return En.dy``;case"WhatIsAWallet":return En.dy``;case"WhatIsANetwork":return En.dy``;case"GetWallet":return En.dy``;case"Downloads":return En.dy``;case"EmailVerifyOtp":return En.dy``;case"EmailVerifyDevice":return En.dy``;case"ApproveTransaction":return En.dy``;case"Transactions":return En.dy``;case"UpgradeEmailWallet":return En.dy``;case"UpdateEmailWallet":return En.dy``;case"UpdateEmailWalletWaiting":return En.dy``}}async onViewChange(e){const{history:t}=vn.RouterController.state;let r=-10,n=10;t.length wui-flex:first-child { + transform: translateY(calc(var(--wui-spacing-xxs) * -1)); + } + + wui-icon-link { + margin-right: calc(var(--wui-icon-box-size-md) * -1); + } + + wui-notice-card { + margin-bottom: var(--wui-spacing-3xs); + } +`;var Bn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Un=class extends En.oi{constructor(){super(),this.usubscribe=[],this.address=vn.AccountController.state.address,this.profileImage=vn.AccountController.state.profileImage,this.profileName=vn.AccountController.state.profileName,this.balance=vn.AccountController.state.balance,this.balanceSymbol=vn.AccountController.state.balanceSymbol,this.network=vn.NetworkController.state.caipNetwork,this.disconecting=!1,this.usubscribe.push(vn.AccountController.subscribe((e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.balance=e.balance,this.balanceSymbol=e.balanceSymbol):vn.IN.close()})),vn.NetworkController.subscribeKey("caipNetwork",(e=>{e?.id&&(this.network=e)})))}disconnectedCallback(){this.usubscribe.forEach((e=>e()))}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");const e=vn.fz.getNetworkImage(this.network);return En.dy` + + + + + + + ${this.profileName?_n.UiHelperUtil.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):_n.UiHelperUtil.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} + + + + + + ${vn.j1.formatBalance(this.balance,this.balanceSymbol)} + + + ${this.explorerBtnTemplate()} + + + + + + ${this.emailCardTemplate()} ${this.emailBtnTemplate()} + + + + ${this.network?.name??"Unknown"} + + + + Activity + + + Disconnect + + + `}emailCardTemplate(){const e=vn.MO.getConnectedConnector(),t=vn.ConnectorController.getEmailConnector(),{origin:r}=location;return!t||"EMAIL"!==e||r.includes(vn.bq.SECURE_SITE)?null:En.dy` + + `}emailBtnTemplate(){const e=vn.MO.getConnectedConnector(),t=vn.ConnectorController.getEmailConnector();if(!t||"EMAIL"!==e)return null;const r=t.provider.getEmail()??"";return En.dy` + this.onGoToUpdateEmail(r)} + > + ${r} + + `}explorerBtnTemplate(){const{addressExplorerUrl:e}=vn.AccountController.state;return e?En.dy` + + + Block Explorer + + + `:null}isAllowedNetworkSwitch(){const{requestedCaipNetworks:e}=vn.NetworkController.state,t=!!e&&e.length>1,r=e?.find((({id:e})=>e===this.network?.id));return t||!r}onCopyAddress(){try{this.address&&(vn.j1.copyToClopboard(this.address),vn.SnackController.showSuccess("Address copied"))}catch{vn.SnackController.showError("Failed to copy")}}onNetworks(){this.isAllowedNetworkSwitch()&&vn.RouterController.push("Networks")}onTransactions(){vn.Xs.sendEvent({type:"track",event:"CLICK_TRANSACTIONS"}),vn.RouterController.push("Transactions")}async onDisconnect(){try{this.disconecting=!0,await vn.ConnectionController.disconnect(),vn.Xs.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),vn.IN.close()}catch{vn.Xs.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),vn.SnackController.showError("Failed to disconnect")}finally{this.disconecting=!1}}onExplorer(){const{addressExplorerUrl:e}=vn.AccountController.state;e&&vn.j1.openHref(e,"_blank")}onGoToUpgradeView(){vn.Xs.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),vn.RouterController.push("UpgradeEmailWallet")}onGoToUpdateEmail(e){vn.RouterController.push("UpdateEmailWallet",{email:e})}};Un.styles=$n,Bn([(0,xn.SB)()],Un.prototype,"address",void 0),Bn([(0,xn.SB)()],Un.prototype,"profileImage",void 0),Bn([(0,xn.SB)()],Un.prototype,"profileName",void 0),Bn([(0,xn.SB)()],Un.prototype,"balance",void 0),Bn([(0,xn.SB)()],Un.prototype,"balanceSymbol",void 0),Bn([(0,xn.SB)()],Un.prototype,"network",void 0),Bn([(0,xn.SB)()],Un.prototype,"disconecting",void 0),Un=Bn([(0,_n.customElement)("w3m-account-view")],Un);var Fn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let zn=class extends En.oi{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=vn.j1.debounce((e=>{this.search=e}))}render(){const e=this.search.length>=2;return En.dy` + + + ${this.qrButtonTemplate()} + + ${e?En.dy``:En.dy``} + `}onInputChange(e){this.onDebouncedSearch(e.detail)}qrButtonTemplate(){return vn.j1.isMobile()?En.dy` + + `:null}onWalletConnectQr(){vn.RouterController.push("ConnectingWalletConnect")}};Fn([(0,xn.SB)()],zn.prototype,"search",void 0),zn=Fn([(0,_n.customElement)("w3m-all-wallets-view")],zn);const Wn=En.iv` + wui-flex { + max-height: clamp(360px, 540px, 80vh); + overflow: scroll; + scrollbar-width: none; + } + + wui-flex::-webkit-scrollbar { + display: none; + } +`;var Hn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Vn=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.connectors=vn.ConnectorController.state.connectors,this.unsubscribe.push(vn.ConnectorController.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return En.dy` + + + + ${this.walletConnectConnectorTemplate()} ${this.recentTemplate()} + ${this.announcedTemplate()} ${this.injectedTemplate()} ${this.featuredTemplate()} + ${this.customTemplate()} ${this.recommendedTemplate()} ${this.externalTemplate()} + ${this.allWalletsTemplate()} + + + `}walletConnectConnectorTemplate(){if(vn.j1.isMobile())return null;const e=this.connectors.find((e=>"WALLET_CONNECT"===e.type));return e?En.dy` + this.onConnector(e)} + tagLabel="qr code" + tagVariant="main" + data-testid="wallet-selector-walletconnect" + > + + `:null}customTemplate(){const{customWallets:e}=vn.OptionsController.state;return e?.length?this.filterOutDuplicateWallets(e).map((e=>En.dy` + this.onConnectWallet(e)} + > + + `)):null}featuredTemplate(){if(!this.connectors.find((e=>"WALLET_CONNECT"===e.type)))return null;const{featured:e}=vn.ApiController.state;return e.length?this.filterOutDuplicateWallets(e).map((e=>En.dy` + this.onConnectWallet(e)} + > + + `)):null}recentTemplate(){return vn.MO.getRecentWallets().map((e=>En.dy` + this.onConnectWallet(e)} + tagLabel="recent" + tagVariant="shade" + > + + `))}announcedTemplate(){return this.connectors.map((e=>"ANNOUNCED"!==e.type?null:En.dy` + this.onConnector(e)} + tagVariant="success" + .installed=${!0} + > + + `))}injectedTemplate(){return this.connectors.map((e=>"INJECTED"!==e.type?null:vn.ConnectionController.checkInstalled()?En.dy` + this.onConnector(e)} + > + + `:null))}externalTemplate(){const e=vn.ConnectorController.getAnnouncedConnectorRdns();return this.connectors.map((t=>["WALLET_CONNECT","INJECTED","ANNOUNCED","EMAIL"].includes(t.type)||e.includes(vn.bq.CONNECTOR_RDNS_MAP[t.id])?null:En.dy` + this.onConnector(t)} + > + + `))}allWalletsTemplate(){if(!this.connectors.find((e=>"WALLET_CONNECT"===e.type)))return null;const e=vn.ApiController.state.count+vn.ApiController.state.featured.length,t=e<10?e:10*Math.floor(e/10),r=t + `}recommendedTemplate(){if(!this.connectors.find((e=>"WALLET_CONNECT"===e.type)))return null;const{recommended:e}=vn.ApiController.state,{customWallets:t,featuredWalletIds:r}=vn.OptionsController.state,{connectors:n}=vn.ConnectorController.state,i=vn.MO.getRecentWallets(),o=n.filter((e=>"INJECTED"===e.type)),s=n.filter((e=>"ANNOUNCED"===e.type));if(r||t||!e.length)return null;const a=(s.length||Math.max(0,o.length-1))+i.length,c=Math.max(0,2-a);return this.filterOutDuplicateWallets(e).slice(0,c).map((e=>En.dy` + this.onConnectWallet(e)} + > + + `))}onConnector(e){"WALLET_CONNECT"===e.type?vn.j1.isMobile()?vn.RouterController.push("AllWallets"):vn.RouterController.push("ConnectingWalletConnect"):vn.RouterController.push("ConnectingExternal",{connector:e})}filterOutDuplicateWallets(e){const{connectors:t}=vn.ConnectorController.state,r=vn.MO.getRecentWallets().map((e=>e.id));return e.filter((e=>!r.includes(e.id)&&!t.find((t=>t.id===e.rdns||t?.info?.rdns===e.rdns))))}onAllWallets(){vn.Xs.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),vn.RouterController.push("AllWallets")}onConnectWallet(e){vn.RouterController.push("ConnectingWalletConnect",{wallet:e})}};Vn.styles=Wn,Hn([(0,xn.SB)()],Vn.prototype,"connectors",void 0),Vn=Hn([(0,_n.customElement)("w3m-connect-view")],Vn);const qn=En.iv` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-thumbnail { + position: absolute; + } + + wui-icon-box { + position: absolute; + right: calc(var(--wui-spacing-3xs) * -1); + bottom: calc(var(--wui-spacing-3xs) * -1); + opacity: 0; + transform: scale(0.5); + transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg); + } + + wui-text[align='center'] { + width: 100%; + padding: 0px var(--wui-spacing-l); + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; + } + + [data-retry='false'] wui-link { + display: none; + } + + [data-retry='true'] wui-link { + display: block; + opacity: 1; + } +`;var Gn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};class Zn extends En.oi{constructor(){super(),this.wallet=vn.RouterController.state.data?.wallet,this.connector=vn.RouterController.state.data?.connector,this.timeout=void 0,this.secondaryBtnLabel="Try again",this.secondaryBtnIcon="refresh",this.secondaryLabel="Accept connection request in the wallet",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=vn.fz.getWalletImage(this.wallet)??vn.fz.getConnectorImage(this.connector),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=vn.ConnectionController.state.wcUri,this.error=vn.ConnectionController.state.wcError,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(vn.ConnectionController.subscribeKey("wcUri",(e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())})),vn.ConnectionController.subscribeKey("wcError",(e=>this.error=e)),vn.ConnectionController.subscribeKey("buffering",(e=>this.buffering=e)))}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let t=`Continue in ${this.name}`;return this.buffering&&(t="Connecting..."),this.error&&(t="Connection declined"),En.dy` + + + + + ${this.error?null:this.loaderTemplate()} + + + + + + + ${t} + + ${e} + + + + + ${this.secondaryBtnLabel} + + + + ${this.isWalletConnect?En.dy` + + + + Copy link + + + `:null} + + + `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;const e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){this.buffering||(vn.ConnectionController.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.())}loaderTemplate(){const e=vn.ThemeController.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return En.dy``}onCopyUri(){try{this.uri&&(vn.j1.copyToClopboard(this.uri),vn.SnackController.showSuccess("Link copied"))}catch{vn.SnackController.showError("Failed to copy")}}}Zn.styles=qn,Gn([(0,xn.SB)()],Zn.prototype,"uri",void 0),Gn([(0,xn.SB)()],Zn.prototype,"error",void 0),Gn([(0,xn.SB)()],Zn.prototype,"ready",void 0),Gn([(0,xn.SB)()],Zn.prototype,"showRetry",void 0),Gn([(0,xn.SB)()],Zn.prototype,"buffering",void 0),Gn([(0,xn.Cb)({type:Boolean})],Zn.prototype,"isMobile",void 0),Gn([(0,xn.Cb)()],Zn.prototype,"onRetry",void 0);const Kn={INJECTED:"browser",ANNOUNCED:"browser"};let Yn=class extends Zn{constructor(){if(super(),!this.connector)throw new Error("w3m-connecting-view: No connector provided");vn.Xs.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:Kn[this.connector.type]??"external"}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1}async onConnectProxy(){try{this.error=!1,this.connector&&(this.connector.imageUrl&&vn.MO.setConnectedWalletImageUrl(this.connector.imageUrl),await vn.ConnectionController.connectExternal(this.connector),vn.yD.state.isSiweEnabled?vn.RouterController.push("ConnectingSiwe"):vn.IN.close(),vn.Xs.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"external"}}))}catch(e){vn.Xs.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};Yn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-connecting-external-view")],Yn);var Qn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Jn=class extends En.oi{constructor(){super(...arguments),this.dappName=vn.OptionsController.state.metadata?.name,this.isSigning=!1}render(){return En.dy` + + + + + ${this.dappName??"Dapp"} needs to connect to your wallet + + + Sign this message to prove you own this wallet and proceed. Canceling will disconnect + you. + + + + Cancel + + + ${this.isSigning?"Signing...":"Sign"} + + + `}async onSign(){this.isSigning=!0,vn.Xs.sendEvent({event:"CLICK_SIGN_SIWE_MESSAGE",type:"track"});try{vn.yD.setStatus("loading");const e=await vn.yD.signIn();return vn.yD.setStatus("success"),vn.Xs.sendEvent({event:"SIWE_AUTH_SUCCESS",type:"track"}),e}catch(e){return vn.SnackController.showError("Signature declined"),vn.yD.setStatus("error"),vn.Xs.sendEvent({event:"SIWE_AUTH_ERROR",type:"track"})}finally{this.isSigning=!1}}async onCancel(){const{isConnected:e}=vn.AccountController.state;e?(await vn.ConnectionController.disconnect(),vn.IN.close()):vn.RouterController.push("Connect"),vn.Xs.sendEvent({event:"CLICK_CANCEL_SIWE",type:"track"})}};Qn([(0,xn.SB)()],Jn.prototype,"isSigning",void 0),Jn=Qn([(0,_n.customElement)("w3m-connecting-siwe-view")],Jn);var Xn=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ei=class extends En.oi{constructor(){super(),this.interval=void 0,this.lastRetry=Date.now(),this.wallet=vn.RouterController.state.data?.wallet,this.platform=void 0,this.platforms=[],this.initializeConnection(),this.interval=setInterval(this.initializeConnection.bind(this),vn.bq.TEN_SEC_MS)}disconnectedCallback(){clearTimeout(this.interval)}render(){return this.wallet?(this.determinePlatforms(),En.dy` + ${this.headerTemplate()} +
${this.platformTemplate()}
+ `):En.dy``}async initializeConnection(e=!1){try{const{wcPairingExpiry:t}=vn.ConnectionController.state;if(e||vn.j1.isPairingExpired(t)){if(vn.ConnectionController.connectWalletConnect(),this.wallet){const e=vn.fz.getWalletImage(this.wallet);e&&vn.MO.setConnectedWalletImageUrl(e)}else{const e=vn.ConnectorController.state.connectors.find((e=>"WALLET_CONNECT"===e.type)),t=vn.fz.getConnectorImage(e);t&&vn.MO.setConnectedWalletImageUrl(t)}await vn.ConnectionController.state.wcPromise,this.finalizeConnection(),vn.yD.state.isSiweEnabled?vn.RouterController.push("ConnectingSiwe"):vn.IN.close()}}catch(e){vn.Xs.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),vn.ConnectionController.setWcError(!0),vn.j1.isAllowedRetry(this.lastRetry)&&(vn.SnackController.showError("Declined"),this.lastRetry=Date.now(),this.initializeConnection(!0))}}finalizeConnection(){const{wcLinking:e,recentWallet:t}=vn.ConnectionController.state;e&&vn.MO.setWalletConnectDeepLink(e),t&&vn.MO.setWeb3ModalRecent(t),vn.Xs.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:e?"mobile":"qrcode"}})}determinePlatforms(){if(!this.wallet)throw new Error("w3m-connecting-wc-view:determinePlatforms No wallet");if(this.platform)return;const{mobile_link:e,desktop_link:t,webapp_link:r,injected:n,rdns:i}=this.wallet,o=n?.map((({injected_id:e})=>e)).filter(Boolean),s=i?[i]:o??[],a=s.length,c=e,l=r,u=vn.ConnectionController.checkInstalled(s),h=a&&u,d=t&&!vn.j1.isMobile();h&&this.platforms.push("browser"),c&&this.platforms.push(vn.j1.isMobile()?"mobile":"qrcode"),l&&this.platforms.push("web"),d&&this.platforms.push("desktop"),!h&&a&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return En.dy``;case"desktop":return En.dy` + this.initializeConnection(!0)}> + + `;case"web":return En.dy` + this.initializeConnection(!0)}> + + `;case"mobile":return En.dy` + this.initializeConnection(!0)}> + + `;case"qrcode":return En.dy``;default:return En.dy``}}headerTemplate(){return this.platforms.length>1?En.dy` + + + `:null}async onSelectPlatform(e){const t=this.shadowRoot?.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};Xn([(0,xn.SB)()],ei.prototype,"platform",void 0),Xn([(0,xn.SB)()],ei.prototype,"platforms",void 0),ei=Xn([(0,_n.customElement)("w3m-connecting-wc-view")],ei);let ti=class extends En.oi{constructor(){super(...arguments),this.wallet=vn.RouterController.state.data?.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return En.dy` + + ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} + ${this.homepageTemplate()} + + `}chromeTemplate(){return this.wallet?.chrome_store?En.dy` + Chrome Extension + `:null}iosTemplate(){return this.wallet?.app_store?En.dy` + iOS App + `:null}androidTemplate(){return this.wallet?.play_store?En.dy` + Android App + `:null}homepageTemplate(){return this.wallet?.homepage?En.dy` + + Website + + `:null}onChromeStore(){this.wallet?.chrome_store&&vn.j1.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){this.wallet?.app_store&&vn.j1.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&vn.j1.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&vn.j1.openHref(this.wallet.homepage,"_blank")}};ti=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-downloads-view")],ti);let ri=class extends En.oi{render(){return En.dy` + + ${this.recommendedWalletsTemplate()} + {vn.j1.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}} + > + + `}recommendedWalletsTemplate(){const{recommended:e,featured:t}=vn.ApiController.state,{customWallets:r}=vn.OptionsController.state;return[...t,...r??[],...e].slice(0,4).map((e=>En.dy` + {vn.j1.openHref(e.homepage??"https://walletconnect.com/explorer","_blank")}} + > + `))}};ri=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-get-wallet-view")],ri);const ni=En.iv` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-hexagon { + position: absolute; + } + + wui-icon-box { + position: absolute; + right: 4px; + bottom: 0; + opacity: 0; + transform: scale(0.5); + z-index: 1; + transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg); + } + + wui-button { + display: none; + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; + } + + wui-button[data-retry='true'] { + display: block; + opacity: 1; + } +`;var ii=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let oi=class extends En.oi{constructor(){super(),this.network=vn.RouterController.state.data?.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw new Error("w3m-network-switch-view: No network provided");this.onShowRetry();const e=this.error?"Switch declined":"Approve in wallet",t=this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet";return En.dy` + + + + + ${this.error?null:En.dy``} + + + + + + ${e} + ${t} + + + + + Try again + + + `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;const e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}async onSwitchNetwork(){try{this.error=!1,this.network&&(await vn.NetworkController.switchActiveNetwork(this.network),vn.yD.state.isSiweEnabled||vn._4.navigateAfterNetworkSwitch())}catch{this.error=!0}}};oi.styles=ni,ii([(0,xn.SB)()],oi.prototype,"showRetry",void 0),ii([(0,xn.SB)()],oi.prototype,"error",void 0),oi=ii([(0,_n.customElement)("w3m-network-switch-view")],oi);const si=En.iv` + :host > wui-grid { + max-height: 360px; + overflow: auto; + } + + wui-grid::-webkit-scrollbar { + display: none; + } +`;var ai=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ci=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.caipNetwork=vn.NetworkController.state.caipNetwork,this.unsubscribe.push(vn.NetworkController.subscribeKey("caipNetwork",(e=>this.caipNetwork=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return En.dy` + + ${this.networksTemplate()} + + + + + + + Your connected wallet may not support some of the networks available for this dApp + + + + What is a network + + + `}onNetworkHelp(){vn.Xs.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),vn.RouterController.push("WhatIsANetwork")}networksTemplate(){const{approvedCaipNetworkIds:e,requestedCaipNetworks:t,supportsAllNetworks:r}=vn.NetworkController.state,n=e,i=t,o={};return i&&n&&(n.forEach(((e,t)=>{o[e]=t})),i.sort(((e,t)=>{const r=o[e.id],n=o[t.id];return void 0!==r&&void 0!==n?r-n:void 0!==r?-1:void 0!==n?1:0}))),i?.map((e=>En.dy` + this.onSwitchNetwork(e)} + .disabled=${!r&&!n?.includes(e.id)} + data-testid=${`w3m-network-switch-${e.name??e.id}`} + > + `))}async onSwitchNetwork(e){const{isConnected:t}=vn.AccountController.state,{approvedCaipNetworkIds:r,supportsAllNetworks:n,caipNetwork:i}=vn.NetworkController.state,{data:o}=vn.RouterController.state;t&&i?.id!==e.id?r?.includes(e.id)?(await vn.NetworkController.switchActiveNetwork(e),vn._4.navigateAfterNetworkSwitch()):n&&vn.RouterController.push("SwitchNetwork",{...o,network:e}):t||(vn.NetworkController.setCaipNetwork(e),vn.RouterController.push("Connect"))}};ci.styles=si,ai([(0,xn.SB)()],ci.prototype,"caipNetwork",void 0),ci=ai([(0,_n.customElement)("w3m-networks-view")],ci);var li=i(248);const ui=En.iv` + :host > wui-flex:first-child { + height: 500px; + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + } +`;var hi=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};const di="last-transaction";let pi=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.address=vn.AccountController.state.address,this.transactions=vn.sl.state.transactions,this.transactionsByYear=vn.sl.state.transactionsByYear,this.loading=vn.sl.state.loading,this.empty=vn.sl.state.empty,this.next=vn.sl.state.next,this.unsubscribe.push(vn.AccountController.subscribe((e=>{e.isConnected&&this.address!==e.address&&(this.address=e.address,vn.sl.resetTransactions(),vn.sl.fetchTransactions(e.address))})),vn.sl.subscribe((e=>{this.transactions=e.transactions,this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next})))}firstUpdated(){0===this.transactions.length&&vn.sl.fetchTransactions(this.address),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return En.dy` + + ${this.empty?null:this.templateTransactionsByYear()} + ${this.loading?this.templateLoading():null} + ${!this.loading&&this.empty?this.templateEmpty():null} + + `}templateTransactionsByYear(){const e=Object.keys(this.transactionsByYear).sort().reverse();return e.map(((t,r)=>{const n=r===e.length-1,i=parseInt(t,10),o=_n.TransactionUtil.getTransactionGroupTitle(i),s=this.transactionsByYear[i];return s?En.dy` + + + ${o} + + + ${this.templateTransactions(s,n)} + + + `:null}))}templateRenderTransaction(e,t){const{date:r,descriptions:n,direction:i,isAllNFT:o,images:s,status:a,transfers:c,type:l}=this.getTransactionListItemProps(e),u=c?.length>1;return 2!==c?.length||o?u?c.map(((e,n)=>{const i=_n.TransactionUtil.getTransferDescription(e),o=t&&n===c.length-1;return En.dy` `})):En.dy` + + `:En.dy` + + `}templateTransactions(e,t){return e.map(((r,n)=>{const i=t&&n===e.length-1;return En.dy`${this.templateRenderTransaction(r,i)}`}))}templateEmpty(){return En.dy` + + + + No Transactions yet + Start trading on dApps
+ to grow your wallet!
+
+
+ `}templateLoading(){return Array(7).fill(En.dy` `).map((e=>e))}createPaginationObserver(){const{projectId:e}=vn.OptionsController.state;this.paginationObserver=new IntersectionObserver((([t])=>{t?.isIntersecting&&!this.loading&&(vn.sl.fetchTransactions(this.address),vn.Xs.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:this.address,projectId:e,cursor:this.next}}))}),{}),this.setPaginationObserver()}setPaginationObserver(){this.paginationObserver?.disconnect();const e=this.shadowRoot?.querySelector(`#${di}`);e&&this.paginationObserver?.observe(e)}getTransactionListItemProps(e){const t=li.E.getRelativeDateFromNow(e?.metadata?.minedAt),r=_n.TransactionUtil.getTransactionDescriptions(e),n=e?.transfers,i=e?.transfers?.[0],o=Boolean(i)&&e?.transfers?.every((e=>Boolean(e.nft_info))),s=_n.TransactionUtil.getTransactionImages(n);return{date:t,direction:i?.direction,descriptions:r,isAllNFT:o,images:s,status:e.metadata?.status,transfers:n,type:e.metadata?.operationType}}};pi.styles=ui,hi([(0,xn.SB)()],pi.prototype,"address",void 0),hi([(0,xn.SB)()],pi.prototype,"transactions",void 0),hi([(0,xn.SB)()],pi.prototype,"transactionsByYear",void 0),hi([(0,xn.SB)()],pi.prototype,"loading",void 0),hi([(0,xn.SB)()],pi.prototype,"empty",void 0),hi([(0,xn.SB)()],pi.prototype,"next",void 0),pi=hi([(0,_n.customElement)("w3m-transactions-view")],pi);const fi=[{images:["network","layers","system"],title:"The system’s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}];let gi=class extends En.oi{render(){return En.dy` + + + {vn.j1.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}} + > + Learn more + + + + `}};gi=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-what-is-a-network-view")],gi);const mi=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}];let yi=class extends En.oi{render(){return En.dy` + + + + + Get a wallet + + + `}onGetWallet(){vn.Xs.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),vn.RouterController.push("GetWallet")}};yi=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-what-is-a-wallet-view")],yi);const wi=En.iv` + wui-loading-spinner { + margin: 9px auto; + } +`,bi={SECURE_SITE_SDK:"https://secure.web3modal.com/sdk",APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@w3m-storage/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_AWAIT_UPDATE_EMAIL_SUCCESS:"@w3m-frame/AWAIT_UPDATE_EMAIL_SUCCESS",FRAME_AWAIT_UPDATE_EMAIL_ERROR:"@w3m-frame/AWAIT_UPDATE_EMAIL_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR"};var vi,_i;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(const r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(vi||(vi={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(_i||(_i={}));const Ei=vi.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xi=e=>{switch(typeof e){case"undefined":return Ei.undefined;case"string":return Ei.string;case"number":return isNaN(e)?Ei.nan:Ei.number;case"boolean":return Ei.boolean;case"function":return Ei.function;case"bigint":return Ei.bigint;case"symbol":return Ei.symbol;case"object":return Array.isArray(e)?Ei.array:null===e?Ei.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Ei.promise:"undefined"!=typeof Map&&e instanceof Map?Ei.map:"undefined"!=typeof Set&&e instanceof Set?Ei.set:"undefined"!=typeof Date&&e instanceof Date?Ei.date:Ei.object;default:return Ei.unknown}},Ci=vi.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Si extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(const i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;ne.message)){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}Si.create=e=>new Si(e);const Ai=(e,t)=>{let r;switch(e.code){case Ci.invalid_type:r=e.received===Ei.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Ci.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,vi.jsonStringifyReplacer)}`;break;case Ci.unrecognized_keys:r=`Unrecognized key(s) in object: ${vi.joinValues(e.keys,", ")}`;break;case Ci.invalid_union:r="Invalid input";break;case Ci.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${vi.joinValues(e.options)}`;break;case Ci.invalid_enum_value:r=`Invalid enum value. Expected ${vi.joinValues(e.options)}, received '${e.received}'`;break;case Ci.invalid_arguments:r="Invalid function arguments";break;case Ci.invalid_return_type:r="Invalid function return type";break;case Ci.invalid_date:r="Invalid date";break;case Ci.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:vi.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Ci.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Ci.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Ci.custom:r="Invalid input";break;case Ci.invalid_intersection_types:r="Intersection results could not be merged";break;case Ci.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ci.not_finite:r="Number must be finite";break;default:r=t.defaultError,vi.assertNever(e)}return{message:r}};let Ii=Ai;function ki(){return Ii}const Pi=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],s={...i,path:o};let a="";const c=n.filter((e=>!!e)).slice().reverse();for(const e of c)a=e(s,{data:t,defaultError:a}).message;return{...i,path:o,message:i.message||a}};function Oi(e,t){const r=Pi({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,ki(),Ai].filter((e=>!!e))});e.common.issues.push(r)}class Ri{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if("aborted"===n.status)return Mi;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const e of t)r.push({key:await e.key,value:await e.value});return Ri.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:t,value:i}=n;if("aborted"===t.status)return Mi;if("aborted"===i.status)return Mi;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"===t.value||void 0===i.value&&!n.alwaysSet||(r[t.value]=i.value)}return{status:e.value,value:r}}}const Mi=Object.freeze({status:"aborted"}),Ni=e=>({status:"dirty",value:e}),Ti=e=>({status:"valid",value:e}),ji=e=>"aborted"===e.status,Li=e=>"dirty"===e.status,Di=e=>"valid"===e.status,$i=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Bi;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(Bi||(Bi={}));class Ui{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Fi=(e,t)=>{if(Di(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Si(e.common.issues);return this._error=t,this._error}}};function zi(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=r?r:t.defaultError},description:i}}class Wi{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return xi(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:xi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ri,ctx:{common:e.parent.common,data:e.data,parsedType:xi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if($i(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;const n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xi(e)},i=this._parseSync({data:e,path:n.path,parent:n});return Fi(n,i)}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xi(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await($i(n)?n:Promise.resolve(n));return Fi(r,i)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const i=e(t),o=()=>n.addIssue({code:Ci.custom,...r(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then((e=>!!e||(o(),!1))):!!i||(o(),!1)}))}refinement(e,t){return this._refinement(((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1)))}_refinement(e){return new Ro({schema:this,typeName:Wo.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Mo.create(this,this._def)}nullable(){return No.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ho.create(this,this._def)}promise(){return Oo.create(this,this._def)}or(e){return go.create([this,e],this._def)}and(e){return bo.create(this,e,this._def)}transform(e){return new Ro({...zi(this._def),schema:this,typeName:Wo.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new To({...zi(this._def),innerType:this,defaultValue:t,typeName:Wo.ZodDefault})}brand(){return new $o({typeName:Wo.ZodBranded,type:this,...zi(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new jo({...zi(this._def),innerType:this,catchValue:t,typeName:Wo.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Bo.create(this,e)}readonly(){return Uo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hi=/^c[^\s-]{8,}$/i,Vi=/^[a-z][a-z0-9]*$/,qi=/^[0-9A-HJKMNP-TV-Z]{26}$/,Gi=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Zi=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Ki;const Yi=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Qi=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class Ji extends Wi{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ei.string){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.string,received:t.parsedType}),Mi}const t=new Ri;let r;for(const s of this._def.checks)if("min"===s.kind)e.data.lengths.value&&(r=this._getOrReturnCtx(e,r),Oi(r,{code:Ci.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const n=e.data.length>s.value,i=e.data.lengthe.test(t)),{validation:t,code:Ci.invalid_string,...Bi.errToObj(r)})}_addCheck(e){return new Ji({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Bi.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Bi.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Bi.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Bi.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Bi.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Bi.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Bi.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Bi.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...Bi.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Bi.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...Bi.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Bi.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Bi.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Bi.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Bi.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Bi.errToObj(t)})}nonempty(e){return this.min(1,Bi.errToObj(e))}trim(){return new Ji({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ji({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ji({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.valuen?r:n;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}Ji.create=e=>{var t;return new Ji({checks:[],typeName:Wo.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...zi(e)})};class eo extends Wi{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ei.number){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.number,received:t.parsedType}),Mi}let t;const r=new Ri;for(const n of this._def.checks)"int"===n.kind?vi.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Oi(t,{code:Ci.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.datan.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),Oi(t,{code:Ci.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==Xi(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),Oi(t,{code:Ci.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Oi(t,{code:Ci.not_finite,message:n.message}),r.dirty()):vi.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Bi.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Bi.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Bi.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Bi.toString(t))}setLimit(e,t,r,n){return new eo({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:Bi.toString(n)}]})}_addCheck(e){return new eo({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Bi.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Bi.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Bi.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Bi.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Bi.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Bi.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Bi.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Bi.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Bi.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value"int"===e.kind||"multipleOf"===e.kind&&vi.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.valuenew eo({checks:[],typeName:Wo.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...zi(e)});class to extends Wi{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Ei.bigint){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.bigint,received:t.parsedType}),Mi}let t;const r=new Ri;for(const n of this._def.checks)"min"===n.kind?(n.inclusive?e.datan.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),Oi(t,{code:Ci.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Oi(t,{code:Ci.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):vi.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Bi.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Bi.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Bi.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Bi.toString(t))}setLimit(e,t,r,n){return new to({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:Bi.toString(n)}]})}_addCheck(e){return new to({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Bi.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Bi.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Bi.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Bi.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Bi.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value{var t;return new to({checks:[],typeName:Wo.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...zi(e)})};class ro extends Wi{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==Ei.boolean){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.boolean,received:t.parsedType}),Mi}return Ti(e.data)}}ro.create=e=>new ro({typeName:Wo.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...zi(e)});class no extends Wi{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ei.date){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.date,received:t.parsedType}),Mi}if(isNaN(e.data.getTime()))return Oi(this._getOrReturnCtx(e),{code:Ci.invalid_date}),Mi;const t=new Ri;let r;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()n.value&&(r=this._getOrReturnCtx(e,r),Oi(r,{code:Ci.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):vi.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new no({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Bi.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Bi.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew no({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Wo.ZodDate,...zi(e)});class io extends Wi{_parse(e){if(this._getType(e)!==Ei.symbol){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.symbol,received:t.parsedType}),Mi}return Ti(e.data)}}io.create=e=>new io({typeName:Wo.ZodSymbol,...zi(e)});class oo extends Wi{_parse(e){if(this._getType(e)!==Ei.undefined){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.undefined,received:t.parsedType}),Mi}return Ti(e.data)}}oo.create=e=>new oo({typeName:Wo.ZodUndefined,...zi(e)});class so extends Wi{_parse(e){if(this._getType(e)!==Ei.null){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.null,received:t.parsedType}),Mi}return Ti(e.data)}}so.create=e=>new so({typeName:Wo.ZodNull,...zi(e)});class ao extends Wi{constructor(){super(...arguments),this._any=!0}_parse(e){return Ti(e.data)}}ao.create=e=>new ao({typeName:Wo.ZodAny,...zi(e)});class co extends Wi{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ti(e.data)}}co.create=e=>new co({typeName:Wo.ZodUnknown,...zi(e)});class lo extends Wi{_parse(e){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.never,received:t.parsedType}),Mi}}lo.create=e=>new lo({typeName:Wo.ZodNever,...zi(e)});class uo extends Wi{_parse(e){if(this._getType(e)!==Ei.undefined){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.void,received:t.parsedType}),Mi}return Ti(e.data)}}uo.create=e=>new uo({typeName:Wo.ZodVoid,...zi(e)});class ho extends Wi{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==Ei.array)return Oi(t,{code:Ci.invalid_type,expected:Ei.array,received:t.parsedType}),Mi;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,i=t.data.lengthn.maxLength.value&&(Oi(t,{code:Ci.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map(((e,r)=>n.type._parseAsync(new Ui(t,e,t.path,r))))).then((e=>Ri.mergeArray(r,e)));const i=[...t.data].map(((e,r)=>n.type._parseSync(new Ui(t,e,t.path,r))));return Ri.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new ho({...this._def,minLength:{value:e,message:Bi.toString(t)}})}max(e,t){return new ho({...this._def,maxLength:{value:e,message:Bi.toString(t)}})}length(e,t){return new ho({...this._def,exactLength:{value:e,message:Bi.toString(t)}})}nonempty(e){return this.min(1,e)}}function po(e){if(e instanceof fo){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Mo.create(po(n))}return new fo({...e._def,shape:()=>t})}return e instanceof ho?new ho({...e._def,type:po(e.element)}):e instanceof Mo?Mo.create(po(e.unwrap())):e instanceof No?No.create(po(e.unwrap())):e instanceof vo?vo.create(e.items.map((e=>po(e)))):e}ho.create=(e,t)=>new ho({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Wo.ZodArray,...zi(t)});class fo extends Wi{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=vi.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Ei.object){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.object,received:t.parsedType}),Mi}const{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof lo&&"strip"===this._def.unknownKeys))for(const e in r.data)i.includes(e)||o.push(e);const s=[];for(const e of i){const t=n[e],i=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new Ui(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof lo){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)o.length>0&&(Oi(r,{code:Ci.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const n=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new Ui(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of s){const r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>Ri.mergeObjectSync(t,e))):Ri.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return Bi.errToObj,new fo({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,i,o,s;const a=null!==(o=null===(i=(n=this._def).errorMap)||void 0===i?void 0:i.call(n,t,r).message)&&void 0!==o?o:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=Bi.errToObj(e).message)&&void 0!==s?s:a}:{message:a}}}:{}})}strip(){return new fo({...this._def,unknownKeys:"strip"})}passthrough(){return new fo({...this._def,unknownKeys:"passthrough"})}extend(e){return new fo({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new fo({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Wo.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new fo({...this._def,catchall:e})}pick(e){const t={};return vi.objectKeys(e).forEach((r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])})),new fo({...this._def,shape:()=>t})}omit(e){const t={};return vi.objectKeys(this.shape).forEach((r=>{e[r]||(t[r]=this.shape[r])})),new fo({...this._def,shape:()=>t})}deepPartial(){return po(this)}partial(e){const t={};return vi.objectKeys(this.shape).forEach((r=>{const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()})),new fo({...this._def,shape:()=>t})}required(e){const t={};return vi.objectKeys(this.shape).forEach((r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof Mo;)e=e._def.innerType;t[r]=e}})),new fo({...this._def,shape:()=>t})}keyof(){return Io(vi.objectKeys(this.shape))}}fo.create=(e,t)=>new fo({shape:()=>e,unknownKeys:"strip",catchall:lo.create(),typeName:Wo.ZodObject,...zi(t)}),fo.strictCreate=(e,t)=>new fo({shape:()=>e,unknownKeys:"strict",catchall:lo.create(),typeName:Wo.ZodObject,...zi(t)}),fo.lazycreate=(e,t)=>new fo({shape:e,unknownKeys:"strip",catchall:lo.create(),typeName:Wo.ZodObject,...zi(t)});class go extends Wi{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map((async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const r=e.map((e=>new Si(e.ctx.common.issues)));return Oi(t,{code:Ci.invalid_union,unionErrors:r}),Mi}));{let e;const n=[];for(const i of r){const r={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=n.map((e=>new Si(e)));return Oi(t,{code:Ci.invalid_union,unionErrors:i}),Mi}}get options(){return this._def.options}}go.create=(e,t)=>new go({options:e,typeName:Wo.ZodUnion,...zi(t)});const mo=e=>e instanceof So?mo(e.schema):e instanceof Ro?mo(e.innerType()):e instanceof Ao?[e.value]:e instanceof ko?e.options:e instanceof Po?Object.keys(e.enum):e instanceof To?mo(e._def.innerType):e instanceof oo?[void 0]:e instanceof so?[null]:null;class yo extends Wi{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ei.object)return Oi(t,{code:Ci.invalid_type,expected:Ei.object,received:t.parsedType}),Mi;const r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Oi(t,{code:Ci.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Mi)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const r of t){const t=mo(r.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const i of t){if(n.has(i))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new yo({typeName:Wo.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...zi(r)})}}function wo(e,t){const r=xi(e),n=xi(t);if(e===t)return{valid:!0,data:e};if(r===Ei.object&&n===Ei.object){const r=vi.objectKeys(t),n=vi.objectKeys(e).filter((e=>-1!==r.indexOf(e))),i={...e,...t};for(const r of n){const n=wo(e[r],t[r]);if(!n.valid)return{valid:!1};i[r]=n.data}return{valid:!0,data:i}}if(r===Ei.array&&n===Ei.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let n=0;n{if(ji(e)||ji(n))return Mi;const i=wo(e.value,n.value);return i.valid?((Li(e)||Li(n))&&t.dirty(),{status:t.value,value:i.data}):(Oi(r,{code:Ci.invalid_intersection_types}),Mi)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}bo.create=(e,t,r)=>new bo({left:e,right:t,typeName:Wo.ZodIntersection,...zi(r)});class vo extends Wi{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==Ei.array)return Oi(r,{code:Ci.invalid_type,expected:Ei.array,received:r.parsedType}),Mi;if(r.data.lengththis._def.items.length&&(Oi(r,{code:Ci.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new Ui(r,e,r.path,t)):null})).filter((e=>!!e));return r.common.async?Promise.all(n).then((e=>Ri.mergeArray(t,e))):Ri.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new vo({...this._def,rest:e})}}vo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new vo({items:e,typeName:Wo.ZodTuple,rest:null,...zi(t)})};class _o extends Wi{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==Ei.object)return Oi(r,{code:Ci.invalid_type,expected:Ei.object,received:r.parsedType}),Mi;const n=[],i=this._def.keyType,o=this._def.valueType;for(const e in r.data)n.push({key:i._parse(new Ui(r,e,r.path,e)),value:o._parse(new Ui(r,r.data[e],r.path,e))});return r.common.async?Ri.mergeObjectAsync(t,n):Ri.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new _o(t instanceof Wi?{keyType:e,valueType:t,typeName:Wo.ZodRecord,...zi(r)}:{keyType:Ji.create(),valueType:e,typeName:Wo.ZodRecord,...zi(t)})}}class Eo extends Wi{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==Ei.map)return Oi(r,{code:Ci.invalid_type,expected:Ei.map,received:r.parsedType}),Mi;const n=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map((([e,t],o)=>({key:n._parse(new Ui(r,e,r.path,[o,"key"])),value:i._parse(new Ui(r,t,r.path,[o,"value"]))})));if(r.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const r of o){const n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return Mi;"dirty"!==n.status&&"dirty"!==i.status||t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const r of o){const n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return Mi;"dirty"!==n.status&&"dirty"!==i.status||t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}Eo.create=(e,t,r)=>new Eo({valueType:t,keyType:e,typeName:Wo.ZodMap,...zi(r)});class xo extends Wi{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==Ei.set)return Oi(r,{code:Ci.invalid_type,expected:Ei.set,received:r.parsedType}),Mi;const n=this._def;null!==n.minSize&&r.data.sizen.maxSize.value&&(Oi(r,{code:Ci.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function o(e){const r=new Set;for(const n of e){if("aborted"===n.status)return Mi;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}const s=[...r.data.values()].map(((e,t)=>i._parse(new Ui(r,e,r.path,t))));return r.common.async?Promise.all(s).then((e=>o(e))):o(s)}min(e,t){return new xo({...this._def,minSize:{value:e,message:Bi.toString(t)}})}max(e,t){return new xo({...this._def,maxSize:{value:e,message:Bi.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}xo.create=(e,t)=>new xo({valueType:e,minSize:null,maxSize:null,typeName:Wo.ZodSet,...zi(t)});class Co extends Wi{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ei.function)return Oi(t,{code:Ci.invalid_type,expected:Ei.function,received:t.parsedType}),Mi;function r(e,r){return Pi({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ki(),Ai].filter((e=>!!e)),issueData:{code:Ci.invalid_arguments,argumentsError:r}})}function n(e,r){return Pi({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ki(),Ai].filter((e=>!!e)),issueData:{code:Ci.invalid_return_type,returnTypeError:r}})}const i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Oo){const e=this;return Ti((async function(...t){const s=new Si([]),a=await e._def.args.parseAsync(t,i).catch((e=>{throw s.addIssue(r(t,e)),s})),c=await Reflect.apply(o,this,a);return await e._def.returns._def.type.parseAsync(c,i).catch((e=>{throw s.addIssue(n(c,e)),s}))}))}{const e=this;return Ti((function(...t){const s=e._def.args.safeParse(t,i);if(!s.success)throw new Si([r(t,s.error)]);const a=Reflect.apply(o,this,s.data),c=e._def.returns.safeParse(a,i);if(!c.success)throw new Si([n(a,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Co({...this._def,args:vo.create(e).rest(co.create())})}returns(e){return new Co({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new Co({args:e||vo.create([]).rest(co.create()),returns:t||co.create(),typeName:Wo.ZodFunction,...zi(r)})}}class So extends Wi{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}So.create=(e,t)=>new So({getter:e,typeName:Wo.ZodLazy,...zi(t)});class Ao extends Wi{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Oi(t,{received:t.data,code:Ci.invalid_literal,expected:this._def.value}),Mi}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Io(e,t){return new ko({values:e,typeName:Wo.ZodEnum,...zi(t)})}Ao.create=(e,t)=>new Ao({value:e,typeName:Wo.ZodLiteral,...zi(t)});class ko extends Wi{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return Oi(t,{expected:vi.joinValues(r),received:t.parsedType,code:Ci.invalid_type}),Mi}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return Oi(t,{received:t.data,code:Ci.invalid_enum_value,options:r}),Mi}return Ti(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return ko.create(e)}exclude(e){return ko.create(this.options.filter((t=>!e.includes(t))))}}ko.create=Io;class Po extends Wi{_parse(e){const t=vi.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Ei.string&&r.parsedType!==Ei.number){const e=vi.objectValues(t);return Oi(r,{expected:vi.joinValues(e),received:r.parsedType,code:Ci.invalid_type}),Mi}if(-1===t.indexOf(e.data)){const e=vi.objectValues(t);return Oi(r,{received:r.data,code:Ci.invalid_enum_value,options:e}),Mi}return Ti(e.data)}get enum(){return this._def.values}}Po.create=(e,t)=>new Po({values:e,typeName:Wo.ZodNativeEnum,...zi(t)});class Oo extends Wi{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ei.promise&&!1===t.common.async)return Oi(t,{code:Ci.invalid_type,expected:Ei.promise,received:t.parsedType}),Mi;const r=t.parsedType===Ei.promise?t.data:Promise.resolve(t.data);return Ti(r.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Oo.create=(e,t)=>new Oo({type:e,typeName:Wo.ZodPromise,...zi(t)});class Ro extends Wi{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Wo.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{Oi(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){const e=n.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:r.path,parent:r}))):this._def.schema._parseSync({data:e,path:r.path,parent:r})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?Mi:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((r=>"aborted"===r.status?Mi:("dirty"===r.status&&t.dirty(),e(r.value).then((()=>({status:t.value,value:r.value}))))))}if("transform"===n.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Di(e))return e;const o=n.transform(e.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>Di(e)?Promise.resolve(n.transform(e.value,i)).then((e=>({status:t.value,value:e}))):e))}vi.assertNever(n)}}Ro.create=(e,t,r)=>new Ro({schema:e,typeName:Wo.ZodEffects,effect:t,...zi(r)}),Ro.createWithPreprocess=(e,t,r)=>new Ro({schema:t,effect:{type:"preprocess",transform:e},typeName:Wo.ZodEffects,...zi(r)});class Mo extends Wi{_parse(e){return this._getType(e)===Ei.undefined?Ti(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Mo.create=(e,t)=>new Mo({innerType:e,typeName:Wo.ZodOptional,...zi(t)});class No extends Wi{_parse(e){return this._getType(e)===Ei.null?Ti(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}No.create=(e,t)=>new No({innerType:e,typeName:Wo.ZodNullable,...zi(t)});class To extends Wi{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===Ei.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}To.create=(e,t)=>new To({innerType:e,typeName:Wo.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...zi(t)});class jo extends Wi{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return $i(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Si(r.common.issues)},input:r.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new Si(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}jo.create=(e,t)=>new jo({innerType:e,typeName:Wo.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...zi(t)});class Lo extends Wi{_parse(e){if(this._getType(e)!==Ei.nan){const t=this._getOrReturnCtx(e);return Oi(t,{code:Ci.invalid_type,expected:Ei.nan,received:t.parsedType}),Mi}return{status:"valid",value:e.data}}}Lo.create=e=>new Lo({typeName:Wo.ZodNaN,...zi(e)});const Do=Symbol("zod_brand");class $o extends Wi{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class Bo extends Wi{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?Mi:"dirty"===e.status?(t.dirty(),Ni(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?Mi:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new Bo({in:e,out:t,typeName:Wo.ZodPipeline})}}class Uo extends Wi{_parse(e){const t=this._def.innerType._parse(e);return Di(t)&&(t.value=Object.freeze(t.value)),t}}Uo.create=(e,t)=>new Uo({innerType:e,typeName:Wo.ZodReadonly,...zi(t)});const Fo=(e,t={},r)=>e?ao.create().superRefine(((n,i)=>{var o,s;if(!e(n)){const e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,a=null===(s=null!==(o=e.fatal)&&void 0!==o?o:r)||void 0===s||s,c="string"==typeof e?{message:e}:e;i.addIssue({code:"custom",...c,fatal:a})}})):ao.create(),zo={object:fo.lazycreate};var Wo;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Wo||(Wo={}));const Ho=Ji.create,Vo=eo.create,qo=Lo.create,Go=to.create,Zo=ro.create,Ko=no.create,Yo=io.create,Qo=oo.create,Jo=so.create,Xo=ao.create,es=co.create,ts=lo.create,rs=uo.create,ns=ho.create,is=fo.create,os=fo.strictCreate,ss=go.create,as=yo.create,cs=bo.create,ls=vo.create,us=_o.create,hs=Eo.create,ds=xo.create,ps=Co.create,fs=So.create,gs=Ao.create,ms=ko.create,ys=Po.create,ws=Oo.create,bs=Ro.create,vs=Mo.create,_s=No.create,Es=Ro.createWithPreprocess,xs=Bo.create,Cs={string:e=>Ji.create({...e,coerce:!0}),number:e=>eo.create({...e,coerce:!0}),boolean:e=>ro.create({...e,coerce:!0}),bigint:e=>to.create({...e,coerce:!0}),date:e=>no.create({...e,coerce:!0})},Ss=Mi;var As=Object.freeze({__proto__:null,defaultErrorMap:Ai,setErrorMap:function(e){Ii=e},getErrorMap:ki,makeIssue:Pi,EMPTY_PATH:[],addIssueToContext:Oi,ParseStatus:Ri,INVALID:Mi,DIRTY:Ni,OK:Ti,isAborted:ji,isDirty:Li,isValid:Di,isAsync:$i,get util(){return vi},get objectUtil(){return _i},ZodParsedType:Ei,getParsedType:xi,ZodType:Wi,ZodString:Ji,ZodNumber:eo,ZodBigInt:to,ZodBoolean:ro,ZodDate:no,ZodSymbol:io,ZodUndefined:oo,ZodNull:so,ZodAny:ao,ZodUnknown:co,ZodNever:lo,ZodVoid:uo,ZodArray:ho,ZodObject:fo,ZodUnion:go,ZodDiscriminatedUnion:yo,ZodIntersection:bo,ZodTuple:vo,ZodRecord:_o,ZodMap:Eo,ZodSet:xo,ZodFunction:Co,ZodLazy:So,ZodLiteral:Ao,ZodEnum:ko,ZodNativeEnum:Po,ZodPromise:Oo,ZodEffects:Ro,ZodTransformer:Ro,ZodOptional:Mo,ZodNullable:No,ZodDefault:To,ZodCatch:jo,ZodNaN:Lo,BRAND:Do,ZodBranded:$o,ZodPipeline:Bo,ZodReadonly:Uo,custom:Fo,Schema:Wi,ZodSchema:Wi,late:zo,get ZodFirstPartyTypeKind(){return Wo},coerce:Cs,any:Xo,array:ns,bigint:Go,boolean:Zo,date:Ko,discriminatedUnion:as,effect:bs,enum:ms,function:ps,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Fo((t=>t instanceof e),t),intersection:cs,lazy:fs,literal:gs,map:hs,nan:qo,nativeEnum:ys,never:ts,null:Jo,nullable:_s,number:Vo,object:is,oboolean:()=>Zo().optional(),onumber:()=>Vo().optional(),optional:vs,ostring:()=>Ho().optional(),pipeline:xs,preprocess:Es,promise:ws,record:us,set:ds,strictObject:os,string:Ho,symbol:Yo,transformer:bs,tuple:ls,undefined:Qo,union:ss,unknown:es,void:rs,NEVER:Ss,ZodIssueCode:Ci,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:Si});const Is=As.object({message:As.string()});function ks(e){return As.literal(bi[e])}As.object({accessList:As.array(As.string()),blockHash:As.string().nullable(),blockNumber:As.string().nullable(),chainId:As.string(),from:As.string(),gas:As.string(),hash:As.string(),input:As.string().nullable(),maxFeePerGas:As.string(),maxPriorityFeePerGas:As.string(),nonce:As.string(),r:As.string(),s:As.string(),to:As.string(),transactionIndex:As.string().nullable(),type:As.string(),v:As.string(),value:As.string()});const Ps=As.object({chainId:As.number()}),Os=As.object({email:As.string().email()}),Rs=As.object({otp:As.string()}),Ms=As.object({chainId:As.optional(As.number())}),Ns=As.object({email:As.string().email()}),Ts=As.object({themeMode:As.optional(As.enum(["light","dark"])),themeVariables:As.optional(As.record(As.string(),As.string().or(As.number())))}),js=As.object({metadata:As.object({name:As.string(),description:As.string(),url:As.string(),icons:As.array(As.string())}).optional(),sdkVersion:As.string(),projectId:As.string()}),Ls=As.object({action:As.enum(["VERIFY_DEVICE","VERIFY_OTP"])}),Ds=As.object({email:As.string().email(),address:As.string(),chainId:As.number()}),$s=As.object({isConnected:As.boolean()}),Bs=As.object({chainId:As.number()}),Us=As.object({chainId:As.number()}),Fs=As.object({email:As.string().email()}),zs=As.any(),Ws=As.object({method:As.literal("personal_sign"),params:As.array(As.any())}),Hs=As.object({method:As.literal("eth_sendTransaction"),params:As.array(As.any())}),Vs=As.object({method:As.literal("eth_accounts")}),qs=As.object({method:As.literal("eth_getBalance"),params:As.array(As.any())}),Gs=As.object({method:As.literal("eth_estimateGas"),params:As.array(As.any())}),Zs=As.object({method:As.literal("eth_gasPrice")}),Ks=As.object({method:As.literal("eth_signTypedData_v4"),params:As.array(As.any())}),Ys=As.object({method:As.literal("eth_getTransactionByHash"),params:As.array(As.any())}),Qs=As.object({method:As.literal("eth_blockNumber")}),Js=As.object({method:As.literal("eth_chainId")}),Xs=As.object({token:As.string()}),ea=(As.object({type:ks("APP_SWITCH_NETWORK"),payload:Ps}).or(As.object({type:ks("APP_CONNECT_EMAIL"),payload:Os})).or(As.object({type:ks("APP_CONNECT_DEVICE")})).or(As.object({type:ks("APP_CONNECT_OTP"),payload:Rs})).or(As.object({type:ks("APP_GET_USER"),payload:As.optional(Ms)})).or(As.object({type:ks("APP_SIGN_OUT")})).or(As.object({type:ks("APP_IS_CONNECTED"),payload:As.optional(Xs)})).or(As.object({type:ks("APP_GET_CHAIN_ID")})).or(As.object({type:ks("APP_RPC_REQUEST"),payload:Ws.or(Hs).or(Vs).or(qs).or(Gs).or(Zs).or(Ks).or(Qs).or(Js).or(Ys)})).or(As.object({type:ks("APP_UPDATE_EMAIL"),payload:Ns})).or(As.object({type:ks("APP_AWAIT_UPDATE_EMAIL")})).or(As.object({type:ks("APP_SYNC_THEME"),payload:Ts})).or(As.object({type:ks("APP_SYNC_DAPP_DATA"),payload:js})),As.object({type:ks("FRAME_SWITCH_NETWORK_ERROR"),payload:Is}).or(As.object({type:ks("FRAME_SWITCH_NETWORK_SUCCESS"),payload:Us})).or(As.object({type:ks("FRAME_CONNECT_EMAIL_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_CONNECT_EMAIL_SUCCESS"),payload:Ls})).or(As.object({type:ks("FRAME_CONNECT_OTP_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_CONNECT_OTP_SUCCESS")})).or(As.object({type:ks("FRAME_CONNECT_DEVICE_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_CONNECT_DEVICE_SUCCESS")})).or(As.object({type:ks("FRAME_GET_USER_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_GET_USER_SUCCESS"),payload:Ds})).or(As.object({type:ks("FRAME_SIGN_OUT_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_SIGN_OUT_SUCCESS")})).or(As.object({type:ks("FRAME_IS_CONNECTED_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_IS_CONNECTED_SUCCESS"),payload:$s})).or(As.object({type:ks("FRAME_GET_CHAIN_ID_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_GET_CHAIN_ID_SUCCESS"),payload:Bs})).or(As.object({type:ks("FRAME_RPC_REQUEST_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_RPC_REQUEST_SUCCESS"),payload:zs})).or(As.object({type:ks("FRAME_SESSION_UPDATE"),payload:Xs})).or(As.object({type:ks("FRAME_UPDATE_EMAIL_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_UPDATE_EMAIL_SUCCESS")})).or(As.object({type:ks("FRAME_AWAIT_UPDATE_EMAIL_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_AWAIT_UPDATE_EMAIL_SUCCESS"),payload:Fs})).or(As.object({type:ks("FRAME_SYNC_THEME_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_SYNC_THEME_SUCCESS")})).or(As.object({type:ks("FRAME_SYNC_DAPP_DATA_ERROR"),payload:Is})).or(As.object({type:ks("FRAME_SYNC_DAPP_DATA_SUCCESS")})),{set(e,t){localStorage.setItem(`${bi.STORAGE_KEY}${e}`,t)},get:e=>localStorage.getItem(`${bi.STORAGE_KEY}${e}`),delete(e){localStorage.removeItem(`${bi.STORAGE_KEY}${e}`)}}),ta=["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],ra=3e4,na={getBlockchainApiUrl(){try{const{timeZone:e}=(new Intl.DateTimeFormat).resolvedOptions(),t=e.toUpperCase();return ta.includes(t)?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com"}catch{return!1}},checkIfAllowedToTriggerEmail(){const e=ea.get(bi.LAST_EMAIL_LOGIN_TIME);if(e){const t=Date.now()-Number(e);if(t=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let oa=class extends En.oi{constructor(){super(...arguments),this.email=vn.RouterController.state.data?.email,this.emailConnector=vn.ConnectorController.getEmailConnector(),this.loading=!1,this.timeoutTimeLeft=na.getTimeToNextEmailLogin(),this.error=""}firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}render(){if(!this.email)throw new Error("w3m-email-verify-otp-view: No email provided");const e=Boolean(this.timeoutTimeLeft);return En.dy` + + + Enter the code we sent to + ${this.email} + + + The code expires in 20 minutes + + ${this.loading?En.dy``:En.dy` + + ${this.error?En.dy`${this.error}. Try Again`:null} + `} + + + Didn't receive it? + + Resend ${e?`in ${this.timeoutTimeLeft}s`:"Code"} + + + + `}startOTPTimeout(){this.OTPTimeout=setInterval((()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=na.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)}),1e3)}async onOtpInputChange(e){try{if(!this.loading){const t=e.detail;this.emailConnector&&6===t.length&&(this.loading=!0,await this.emailConnector.provider.connectOtp({otp:t}),vn.Xs.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),await vn.ConnectionController.connectExternal(this.emailConnector),vn.IN.close(),vn.Xs.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email"}}))}}catch(e){vn.Xs.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),this.error=vn.j1.parseError(e),this.loading=!1}}async onResendCode(){try{if(!this.loading&&!this.timeoutTimeLeft){const e=vn.ConnectorController.getEmailConnector();if(!e||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await e.provider.connectEmail({email:this.email}),vn.Xs.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),this.startOTPTimeout(),vn.SnackController.showSuccess("Code email resent")}}catch(e){vn.SnackController.showError(e)}finally{this.loading=!1}}};oa.styles=wi,ia([(0,xn.SB)()],oa.prototype,"loading",void 0),ia([(0,xn.SB)()],oa.prototype,"timeoutTimeLeft",void 0),ia([(0,xn.SB)()],oa.prototype,"error",void 0),oa=ia([(0,_n.customElement)("w3m-email-verify-otp-view")],oa);const sa=En.iv` + wui-icon-box { + height: var(--wui-icon-box-size-xl); + width: var(--wui-icon-box-size-xl); + } +`;var aa=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ca=class extends En.oi{constructor(){super(),this.email=vn.RouterController.state.data?.email,this.emailConnector=vn.ConnectorController.getEmailConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.emailConnector)throw new Error("w3m-email-verify-device-view: No email connector provided");return En.dy` + + + + + + + Approve the login link we sent to + + ${this.email} + + + + The code expires in 20 minutes + + + + + Didn't receive it? + + + Resend email + + + + + `}async listenForDeviceApproval(){this.emailConnector&&(await this.emailConnector.provider.connectDevice(),vn.Xs.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),vn.Xs.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),vn.RouterController.replace("EmailVerifyOtp",{email:this.email}))}async onResendCode(){try{if(!this.loading){if(!this.emailConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.emailConnector.provider.connectEmail({email:this.email}),vn.SnackController.showSuccess("Code email resent")}}catch(e){vn.SnackController.showError(e)}finally{this.loading=!1}}};ca.styles=sa,aa([(0,xn.SB)()],ca.prototype,"loading",void 0),ca=aa([(0,_n.customElement)("w3m-email-verify-device-view")],ca);const la=En.iv` + div { + width: 100%; + height: 400px; + } + + [data-ready='false'] { + transform: scale(1.05); + } + + @media (max-width: 430px) { + [data-ready='false'] { + transform: translateY(-50px); + } + } +`;var ua=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ha=class extends En.oi{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(vn.IN.subscribeKey("open",(e=>{e||this.onHideIframe()})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.bodyObserver?.unobserve(window.document.body)}firstUpdated(){this.iframe.style.display="block";const e=this.renderRoot.querySelector("div");this.bodyObserver=new ResizeObserver((()=>{const t=e?.getBoundingClientRect(),r=t??{left:0,top:0,width:0,height:0};this.iframe.style.width=`${r.width}px`,this.iframe.style.height=r.height-10+"px",this.iframe.style.left=`${r.left}px`,this.iframe.style.top=`${r.top+5}px`,this.ready=!0})),this.bodyObserver.observe(window.document.body)}render(){return this.ready&&this.onShowIframe(),En.dy`
`}onShowIframe(){const e=window.innerWidth<=430;this.iframe.animate([{opacity:0,transform:e?"translateY(50px)":"scale(.95)"},{opacity:1,transform:e?"translateY(0)":"scale(1)"}],{duration:200,easing:"ease",fill:"forwards",delay:300})}async onHideIframe(){await this.iframe.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished,this.iframe.style.display="none"}};ha.styles=la,ua([(0,xn.SB)()],ha.prototype,"ready",void 0),ha=ua([(0,_n.customElement)("w3m-approve-transaction-view")],ha);let da=class extends En.oi{render(){return En.dy` + + Follow the instructions on + + + + You will have to reconnect for security reasons + + + `}};da=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-upgrade-wallet-view")],da);var pa=i(5756);const fa=En.iv` + wui-email-input { + width: 100%; + } + + form { + width: 100%; + display: block; + position: relative; + } +`;var ga=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ma=class extends En.oi{constructor(){super(...arguments),this.formRef=(0,pa.V)(),this.initialValue=vn.RouterController.state.data?.email??"",this.email="",this.loading=!1}firstUpdated(){this.formRef.value?.addEventListener("keydown",(e=>{"Enter"===e.key&&this.onSubmitEmail(e)}))}render(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialValue;return En.dy` + +
+ + + +
+ + + + Cancel + + + + Save + + +
+ `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=vn.ConnectorController.getEmailConnector();if(!t)throw new Error("w3m-update-email-wallet: Email connector not found");await t.provider.updateEmail({email:this.email}),vn.Xs.sendEvent({type:"track",event:"EMAIL_EDIT"}),vn.RouterController.replace("UpdateEmailWalletWaiting",{email:this.email})}catch(e){vn.SnackController.showError(e),this.loading=!1}}};ma.styles=fa,ga([(0,xn.SB)()],ma.prototype,"email",void 0),ga([(0,xn.SB)()],ma.prototype,"loading",void 0),ma=ga([(0,_n.customElement)("w3m-update-email-wallet-view")],ma);const ya=En.iv` + wui-icon-box { + height: var(--wui-icon-box-size-xl); + width: var(--wui-icon-box-size-xl); + } +`;var wa=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ba=class extends En.oi{constructor(){super(),this.email=vn.RouterController.state.data?.email,this.emailConnector=vn.ConnectorController.getEmailConnector(),this.loading=!1,this.listenForEmailUpdateApproval()}render(){if(!this.email)throw new Error("w3m-update-email-wallet-waiting-view: No email provided");if(!this.emailConnector)throw new Error("w3m-update-email-wallet-waiting-view: No email connector provided");return En.dy` + + + + + + + Approve verification link we sent to + + ${this.email} + + + + You will receive an approval request on your former mail to confirm the new one + + + + + Didn't receive it? + + + Resend email + + + + + `}async listenForEmailUpdateApproval(){this.emailConnector&&(await this.emailConnector.provider.awaitUpdateEmail(),vn.RouterController.replace("Account"),vn.SnackController.showSuccess("Email updated"))}async onResendCode(){try{if(!this.loading){if(!this.emailConnector||!this.email)throw new Error("w3m-update-email-wallet-waiting-view: Unable to resend email");this.loading=!0,await this.emailConnector.provider.updateEmail({email:this.email}),this.listenForEmailUpdateApproval(),vn.SnackController.showSuccess("Code email resent")}}catch(e){vn.SnackController.showError(e)}finally{this.loading=!1}}};ba.styles=ya,wa([(0,xn.SB)()],ba.prototype,"loading",void 0),ba=wa([(0,_n.customElement)("w3m-update-email-wallet-waiting-view")],ba);const va=En.iv` + wui-grid { + max-height: clamp(360px, 400px, 80vh); + overflow: scroll; + scrollbar-width: none; + grid-auto-rows: min-content; + grid-template-columns: repeat(auto-fill, 76px); + } + + @media (max-width: 435px) { + wui-grid { + grid-template-columns: repeat(auto-fill, 77px); + } + } + + wui-grid[data-scroll='false'] { + overflow: hidden; + } + + wui-grid::-webkit-scrollbar { + display: none; + } + + wui-loading-spinner { + padding-top: var(--wui-spacing-l); + padding-bottom: var(--wui-spacing-l); + justify-content: center; + grid-column: 1 / span 4; + } +`;function _a(e){const{connectors:t}=vn.ConnectorController.state,r=t.filter((e=>"ANNOUNCED"===e.type)).reduce(((e,t)=>t.info?.rdns?(e[t.info.rdns]=!0,e):e),{});return e.map((e=>({...e,installed:Boolean(e.rdns)&&Boolean(r[e.rdns??""])}))).sort(((e,t)=>Number(t.installed)-Number(e.installed)))}var Ea=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};const xa="local-paginator";let Ca=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.initial=!vn.ApiController.state.wallets.length,this.wallets=vn.ApiController.state.wallets,this.recommended=vn.ApiController.state.recommended,this.featured=vn.ApiController.state.featured,this.unsubscribe.push(vn.ApiController.subscribeKey("wallets",(e=>this.wallets=e)),vn.ApiController.subscribeKey("recommended",(e=>this.recommended=e)),vn.ApiController.subscribeKey("featured",(e=>this.featured=e)))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.paginationObserver?.disconnect()}render(){return En.dy` + + ${this.initial?this.shimmerTemplate(16):this.walletsTemplate()} + ${this.paginationLoaderTemplate()} + + `}async initialFetch(){const e=this.shadowRoot?.querySelector("wui-grid");this.initial&&e&&(await vn.ApiController.fetchWallets({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.initial=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map((()=>En.dy` + + `))}walletsTemplate(){return _a([...this.featured,...this.recommended,...this.wallets]).map((e=>En.dy` + this.onConnectWallet(e)} + .installed=${e.installed} + > + `))}paginationLoaderTemplate(){const{wallets:e,recommended:t,featured:r,count:n}=vn.ApiController.state,i=window.innerWidth<352?3:4,o=e.length+t.length;let s=Math.ceil(o/i)*i-o+i;return s-=e.length?r.length%i:0,0===n&&r.length>0?null:0===n||[...r,...e,...t].length{if(e?.isIntersecting&&!this.initial){const{page:e,count:t,wallets:r}=vn.ApiController.state;r.lengtht===e.id));r?vn.RouterController.push("ConnectingExternal",{connector:r}):vn.RouterController.push("ConnectingWalletConnect",{wallet:e})}};Ca.styles=va,Ea([(0,xn.SB)()],Ca.prototype,"initial",void 0),Ea([(0,xn.SB)()],Ca.prototype,"wallets",void 0),Ea([(0,xn.SB)()],Ca.prototype,"recommended",void 0),Ea([(0,xn.SB)()],Ca.prototype,"featured",void 0),Ca=Ea([(0,_n.customElement)("w3m-all-wallets-list")],Ca);const Sa=En.iv` + wui-grid, + wui-loading-spinner, + wui-flex { + height: 360px; + } + + wui-grid { + overflow: scroll; + scrollbar-width: none; + grid-auto-rows: min-content; + } + + wui-grid[data-scroll='false'] { + overflow: hidden; + } + + wui-grid::-webkit-scrollbar { + display: none; + } + + wui-loading-spinner { + justify-content: center; + align-items: center; + } +`;var Aa=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Ia=class extends En.oi{constructor(){super(...arguments),this.prevQuery="",this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?En.dy``:this.walletsTemplate()}async onSearch(){this.query!==this.prevQuery&&(this.prevQuery=this.query,this.loading=!0,await vn.ApiController.searchWallet({search:this.query}),this.loading=!1)}walletsTemplate(){const{search:e}=vn.ApiController.state,t=_a(e);return e.length?En.dy` + + ${t.map((e=>En.dy` + this.onConnectWallet(e)} + .installed=${e.installed} + > + `))} + + `:En.dy` + + + No Wallet found + + `}onConnectWallet(e){const{connectors:t}=vn.ConnectorController.state,r=t.find((({explorerId:t})=>t===e.id));r?vn.RouterController.push("ConnectingExternal",{connector:r}):vn.RouterController.push("ConnectingWalletConnect",{wallet:e})}};Ia.styles=Sa,Aa([(0,xn.SB)()],Ia.prototype,"loading",void 0),Aa([(0,xn.Cb)()],Ia.prototype,"query",void 0),Ia=Aa([(0,_n.customElement)("w3m-all-wallets-search")],Ia);var ka=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Pa=class extends En.oi{constructor(){super(),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0,this.buffering=!1,this.unsubscribe.push(vn.ConnectionController.subscribeKey("buffering",(e=>this.buffering=e)))}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.generateTabs();return En.dy` + + + + `}generateTabs(){const e=this.platforms.map((e=>"browser"===e?{label:"Browser",icon:"extension",platform:"browser"}:"mobile"===e?{label:"Mobile",icon:"mobile",platform:"mobile"}:"qrcode"===e?{label:"Mobile",icon:"mobile",platform:"qrcode"}:"web"===e?{label:"Webapp",icon:"browser",platform:"web"}:"desktop"===e?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"}));return this.platformTabs=e.map((({platform:e})=>e)),e}onTabChange(e){const t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};ka([(0,xn.Cb)({type:Array})],Pa.prototype,"platforms",void 0),ka([(0,xn.Cb)()],Pa.prototype,"onSelectPlatfrom",void 0),ka([(0,xn.SB)()],Pa.prototype,"buffering",void 0),Pa=ka([(0,_n.customElement)("w3m-connecting-header")],Pa);let Oa=class extends Zn{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),vn.Xs.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){try{this.error=!1;const{connectors:e}=vn.ConnectorController.state,t=e.find((e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns)),r=e.find((e=>"INJECTED"===e.type));t?await vn.ConnectionController.connectExternal(t):r&&await vn.ConnectionController.connectExternal(r),vn.IN.close(),vn.Xs.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser"}})}catch(e){vn.Xs.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};Oa=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-connecting-wc-browser")],Oa);let Ra=class extends Zn{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),vn.Xs.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.timeout=setTimeout((()=>{this.onConnect?.()}),200))}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:e,name:t}=this.wallet,{redirect:r,href:n}=vn.j1.formatNativeUrl(e,this.uri);vn.ConnectionController.setWcLinking({name:t,href:n}),vn.ConnectionController.setRecentWallet(this.wallet),vn.j1.openHref(r,"_blank")}catch{this.error=!0}}};Ra=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-connecting-wc-desktop")],Ra);let Ma=class extends Zn{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),document.addEventListener("visibilitychange",this.onBuffering.bind(this)),vn.Xs.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("visibilitychange",this.onBuffering.bind(this))}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:e,name:t}=this.wallet,{redirect:r,href:n}=vn.j1.formatNativeUrl(e,this.uri);vn.ConnectionController.setWcLinking({name:t,href:n}),vn.ConnectionController.setRecentWallet(this.wallet),vn.j1.openHref(r,"_self")}catch{this.error=!0}}onBuffering(){const e=vn.j1.isIos();"visible"===document?.visibilityState&&!this.error&&e&&(vn.ConnectionController.setBuffering(!0),setTimeout((()=>{vn.ConnectionController.setBuffering(!1)}),5e3))}};Ma=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-connecting-wc-mobile")],Ma);const Na=En.iv` + @keyframes fadein { + from { + opacity: 0; + } + to { + opacity: 1; + } + } + + wui-shimmer { + width: 100%; + aspect-ratio: 1 / 1; + border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important; + } + + wui-qr-code { + opacity: 0; + animation-duration: 200ms; + animation-timing-function: ease; + animation-name: fadein; + animation-fill-mode: forwards; + } +`;let Ta=class extends Zn{constructor(){super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),vn.Xs.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),En.dy` + + ${this.qrCodeTemplate()} + + + Scan this QR Code with your phone + + ${this.copyTemplate()} + + + + `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout((()=>{this.ready=!0}),200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;return vn.ConnectionController.setWcLinking(void 0),vn.ConnectionController.setRecentWallet(this.wallet),En.dy` `}copyTemplate(){const e=!this.uri||!this.ready;return En.dy` + + Copy link + `}};Ta.styles=Na,Ta=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-connecting-wc-qrcode")],Ta);const ja=En.iv` + :host { + display: flex; + justify-content: center; + gap: var(--wui-spacing-2xl); + } + + wui-visual-thumbnail:nth-child(1) { + z-index: 1; + } +`;let La=class extends En.oi{constructor(){super(...arguments),this.dappImageUrl=vn.OptionsController.state.metadata?.icons,this.walletImageUrl=vn.MO.getConnectedWalletImageUrl()}firstUpdated(){const e=this.shadowRoot?.querySelectorAll("wui-visual-thumbnail");e?.[0]&&this.createAnimation(e[0],"translate(18px)"),e?.[1]&&this.createAnimation(e[1],"translate(-18px)")}render(){return En.dy` + + + `}createAnimation(e,t){e.animate([{transform:"translateX(0px)"},{transform:t}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}};La.styles=ja,La=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-connecting-siwe")],La);let Da=class extends En.oi{constructor(){if(super(),this.wallet=vn.RouterController.state.data?.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");vn.Xs.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return En.dy` + + + + Not Detected + + + + `}};Da=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-connecting-wc-unsupported")],Da);let $a=class extends Zn{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel="Open and continue in a new browser tab",this.secondaryBtnIcon="externalLink",vn.Xs.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:e,name:t}=this.wallet,{redirect:r,href:n}=vn.j1.formatUniversalUrl(e,this.uri);vn.ConnectionController.setWcLinking({name:t,href:n}),vn.ConnectionController.setRecentWallet(this.wallet),vn.j1.openHref(r,"_blank")}catch{this.error=!0}}};$a=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-connecting-wc-web")],$a);const Ba=En.iv` + wui-icon-link[data-hidden='true'] { + opacity: 0 !important; + pointer-events: none; + } +`;var Ua=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};function Fa(){const e=vn.RouterController.state.data?.connector?.name,t=vn.RouterController.state.data?.wallet?.name,r=vn.RouterController.state.data?.network?.name,n=t??e,i=vn.ConnectorController.getConnectors();return{Connect:`Connect ${1===i.length&&"w3m-email"===i[0]?.id?"Email":""} Wallet`,Account:void 0,ConnectingExternal:n??"Connect Wallet",ConnectingWalletConnect:n??"WalletConnect",ConnectingSiwe:"Sign In",Networks:"Choose Network",SwitchNetwork:r??"Switch Network",AllWallets:"All Wallets",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",GetWallet:"Get a wallet",Downloads:n?`Get ${n}`:"Downloads",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",ApproveTransaction:"Approve Transaction",Transactions:"Activity",UpgradeEmailWallet:"Upgrade your Wallet",UpdateEmailWallet:"Edit Email",UpdateEmailWalletWaiting:"Approve Email"}}let za=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.heading=Fa()[vn.RouterController.state.view],this.buffering=!1,this.showBack=!1,this.unsubscribe.push(vn.RouterController.subscribeKey("view",(e=>{this.onViewChange(e),this.onHistoryChange()})),vn.ConnectionController.subscribeKey("buffering",(e=>this.buffering=e)))}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){return En.dy` + + ${this.dynamicButtonTemplate()} ${this.titleTemplate()} + + + ${this.separatorTemplate()} + `}onWalletHelp(){vn.Xs.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),vn.RouterController.push("WhatIsAWallet")}async onClose(){vn.yD.state.isSiweEnabled&&"success"!==vn.yD.state.status&&await vn.ConnectionController.disconnect(),vn.IN.close()}titleTemplate(){return En.dy`${this.heading}`}dynamicButtonTemplate(){const{view:e}=vn.RouterController.state,t="Connect"===e,r="ApproveTransaction"===e;return this.showBack&&!r?En.dy``:En.dy``}separatorTemplate(){return this.heading?En.dy``:null}getPadding(){return this.heading?["l","2l","l","2l"]:["l","2l","0","2l"]}async onViewChange(e){const t=this.shadowRoot?.querySelector("wui-text");if(t){const r=Fa()[e];await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.heading=r,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})}}async onHistoryChange(){const{history:e}=vn.RouterController.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){"ConnectingSiwe"===vn.RouterController.state.view?vn.RouterController.push("Connect"):vn.RouterController.goBack()}};za.styles=[Ba],Ua([(0,xn.SB)()],za.prototype,"heading",void 0),Ua([(0,xn.SB)()],za.prototype,"buffering",void 0),Ua([(0,xn.SB)()],za.prototype,"showBack",void 0),za=Ua([(0,_n.customElement)("w3m-header")],za);var Wa=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Ha=class extends En.oi{constructor(){super(...arguments),this.data=[]}render(){return En.dy` + + ${this.data.map((e=>En.dy` + + + ${e.images.map((e=>En.dy``))} + + + + + ${e.title} + + ${e.text} + + `))} + + `}};Wa([(0,xn.Cb)({type:Array})],Ha.prototype,"data",void 0),Ha=Wa([(0,_n.customElement)("w3m-help-widget")],Ha);const Va=En.iv` + wui-flex { + background-color: var(--wui-gray-glass-005); + } + + a { + text-decoration: none; + color: var(--wui-color-fg-175); + font-weight: 500; + } +`;let qa=class extends En.oi{render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=vn.OptionsController.state;return e||t?En.dy` + + + By connecting your wallet, you agree to our
+ ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()} +
+
+ `:null}andTemplate(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=vn.OptionsController.state;return e&&t?"and":""}termsTemplate(){const{termsConditionsUrl:e}=vn.OptionsController.state;return e?En.dy`Terms of Service`:null}privacyTemplate(){const{privacyPolicyUrl:e}=vn.OptionsController.state;return e?En.dy`Privacy Policy`:null}};qa.styles=[Va],qa=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,_n.customElement)("w3m-legal-footer")],qa);const Ga=En.iv` + :host { + display: block; + padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl); + } +`;var Za=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let Ka=class extends En.oi{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:e,app_store:t,play_store:r,chrome_store:n,homepage:i}=this.wallet,o=vn.j1.isMobile(),s=vn.j1.isIos(),a=vn.j1.isAndroid(),c=[t,r,i,n].filter(Boolean).length>1,l=_n.UiHelperUtil.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return c&&!o?En.dy` + vn.RouterController.push("Downloads",{wallet:this.wallet})} + > + `:!c&&i?En.dy` + + `:t&&s?En.dy` + + `:r&&a?En.dy` + + `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&vn.j1.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&vn.j1.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&vn.j1.openHref(this.wallet.homepage,"_blank")}};Ka.styles=[Ga],Za([(0,xn.Cb)({type:Object})],Ka.prototype,"wallet",void 0),Ka=Za([(0,_n.customElement)("w3m-mobile-download-links")],Ka);const Ya=En.iv` + :host { + display: block; + position: absolute; + opacity: 0; + pointer-events: none; + top: 11px; + left: 50%; + width: max-content; + } +`;var Qa=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};const Ja={success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let Xa=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=vn.SnackController.state.open,this.unsubscribe.push(vn.SnackController.subscribeKey("open",(e=>{this.open=e,this.onOpen()})))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach((e=>e()))}render(){const{message:e,variant:t}=vn.SnackController.state,r=Ja[t];return En.dy` + + `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout=setTimeout((()=>vn.SnackController.hide()),2500)):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};Xa.styles=Ya,Qa([(0,xn.SB)()],Xa.prototype,"open",void 0),Xa=Qa([(0,_n.customElement)("w3m-snackbar")],Xa);const ec=En.iv` + :host { + padding: var(--wui-spacing-3xs) 0; + } + + wui-separator { + margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1); + width: calc(100% + var(--wui-spacing-s) * 2); + } + + wui-email-input { + width: 100%; + } + + form { + width: 100%; + display: block; + position: relative; + margin-bottom: var(--wui-spacing-m); + } + + wui-icon-link, + wui-loading-spinner { + position: absolute; + top: 22px; + transform: translateY(-50%); + } + + wui-icon-link { + right: var(--wui-spacing-xs); + } + + wui-loading-spinner { + right: var(--wui-spacing-m); + } + + .alphaBanner { + padding: 10px 12px 10px 10px; + border-radius: var(--wui-border-radius-s); + background: var(--wui-accent-glass-010); + margin-bottom: var(--wui-spacing-xxs); + } +`;var tc=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rc=class extends En.oi{constructor(){super(),this.unsubscribe=[],this.formRef=(0,pa.V)(),this.connectors=vn.ConnectorController.state.connectors,this.email="",this.loading=!1,this.error="",this.unsubscribe.push(vn.ConnectorController.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}firstUpdated(){this.formRef.value?.addEventListener("keydown",(e=>{"Enter"===e.key&&this.onSubmitEmail(e)}))}render(){const e=this.connectors.length>1;return this.connectors.find((e=>"EMAIL"===e.type))?En.dy` + ${this.alphaWarningTemplate()} +
+ + + + ${this.submitButtonTemplate()}${this.loadingTemplate()} + +
+ + ${e?En.dy``:null} + `:null}alphaWarningTemplate(){return En.dy` + + + + This is an alpha version to test before launch + + + `}submitButtonTemplate(){return!this.loading&&this.email.length>3?En.dy` + + + `:null}loadingTemplate(){return this.loading?En.dy``:null}onEmailInputChange(e){this.email=e.detail,this.error=""}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=vn.ConnectorController.getEmailConnector();if(!t)throw new Error("w3m-email-login-widget: Email connector not found");const{action:r}=await t.provider.connectEmail({email:this.email});vn.Xs.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),"VERIFY_OTP"===r?(vn.Xs.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),vn.RouterController.push("EmailVerifyOtp",{email:this.email})):"VERIFY_DEVICE"===r&&vn.RouterController.push("EmailVerifyDevice",{email:this.email})}catch(e){const t=vn.j1.parseError(e);t?.includes("Invalid email")?this.error="Invalid email. Try again.":vn.SnackController.showError(e)}finally{this.loading=!1}}onFocusEvent(){vn.Xs.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};rc.styles=ec,tc([(0,xn.SB)()],rc.prototype,"connectors",void 0),tc([(0,xn.SB)()],rc.prototype,"email",void 0),tc([(0,xn.SB)()],rc.prototype,"loading",void 0),tc([(0,xn.SB)()],rc.prototype,"error",void 0),rc=tc([(0,_n.customElement)("w3m-email-login-widget")],rc);let nc=!1;class ic{constructor(e){this.initPromise=void 0,this.setIsConnected=e=>{vn.AccountController.setIsConnected(e)},this.setCaipAddress=e=>{vn.AccountController.setCaipAddress(e)},this.setBalance=(e,t)=>{vn.AccountController.setBalance(e,t)},this.setProfileName=e=>{vn.AccountController.setProfileName(e)},this.setProfileImage=e=>{vn.AccountController.setProfileImage(e)},this.resetAccount=()=>{vn.AccountController.resetAccount()},this.setCaipNetwork=e=>{vn.NetworkController.setCaipNetwork(e)},this.getCaipNetwork=()=>vn.NetworkController.state.caipNetwork,this.setRequestedCaipNetworks=e=>{vn.NetworkController.setRequestedCaipNetworks(e)},this.getApprovedCaipNetworksData=()=>vn.NetworkController.getApprovedCaipNetworksData(),this.resetNetwork=()=>{vn.NetworkController.resetNetwork()},this.setConnectors=e=>{vn.ConnectorController.setConnectors(e)},this.addConnector=e=>{vn.ConnectorController.addConnector(e)},this.getConnectors=()=>vn.ConnectorController.getConnectors(),this.resetWcConnection=()=>{vn.ConnectionController.resetWcConnection()},this.fetchIdentity=e=>vn.Lr.fetchIdentity(e),this.setAddressExplorerUrl=e=>{vn.AccountController.setAddressExplorerUrl(e)},this.setSIWENonce=e=>{vn.yD.setNonce(e)},this.setSIWESession=e=>{vn.yD.setSession(e)},this.setSIWEStatus=e=>{vn.yD.setStatus(e)},this.setSIWEMessage=e=>{vn.yD.setMessage(e)},this.initControllers(e),this.initOrContinue()}async open(e){await this.initOrContinue(),vn.IN.open(e)}async close(){await this.initOrContinue(),vn.IN.close()}setLoading(e){vn.IN.setLoading(e)}getThemeMode(){return vn.ThemeController.state.themeMode}getThemeVariables(){return vn.ThemeController.state.themeVariables}setThemeMode(e){vn.ThemeController.setThemeMode(e),(0,_n.setColorTheme)(vn.ThemeController.state.themeMode);try{const e=vn.ConnectorController.getEmailConnector();e&&e.provider.syncTheme({themeMode:vn.ThemeController.getSnapshot().themeMode})}catch{console.info("Unable to sync theme to email connector")}}setThemeVariables(e){vn.ThemeController.setThemeVariables(e),(0,_n.setThemeVariables)(vn.ThemeController.state.themeVariables);try{const e=vn.ConnectorController.getEmailConnector();e&&e.provider.syncTheme({themeVariables:vn.ThemeController.getSnapshot().themeVariables})}catch{console.info("Unable to sync theme to email connector")}}subscribeTheme(e){return vn.ThemeController.subscribe(e)}getState(){return{...vn.Ie.state}}subscribeState(e){return vn.Ie.subscribe(e)}getEvent(){return{...vn.Xs.state}}subscribeEvents(e){return vn.Xs.subscribe(e)}subscribeSIWEState(e){return vn.yD.subscribe(e)}initControllers(e){if(vn.NetworkController.setClient(e.networkControllerClient),vn.NetworkController.setDefaultCaipNetwork(e.defaultChain),vn.OptionsController.setProjectId(e.projectId),vn.OptionsController.setIncludeWalletIds(e.includeWalletIds),vn.OptionsController.setExcludeWalletIds(e.excludeWalletIds),vn.OptionsController.setFeaturedWalletIds(e.featuredWalletIds),vn.OptionsController.setTokens(e.tokens),vn.OptionsController.setTermsConditionsUrl(e.termsConditionsUrl),vn.OptionsController.setPrivacyPolicyUrl(e.privacyPolicyUrl),vn.OptionsController.setCustomWallets(e.customWallets),vn.OptionsController.setEnableAnalytics(e.enableAnalytics),vn.OptionsController.setSdkVersion(e._sdkVersion),vn.ConnectionController.setClient(e.connectionControllerClient),e.siweControllerClient){const t=e.siweControllerClient;vn.yD.setSIWEClient(t)}e.metadata&&vn.OptionsController.setMetadata(e.metadata),e.themeMode&&vn.ThemeController.setThemeMode(e.themeMode),e.themeVariables&&vn.ThemeController.setThemeVariables(e.themeVariables)}async initOrContinue(){return this.initPromise||nc||!vn.j1.isClient()||(nc=!0,this.initPromise=new Promise((async e=>{await Promise.all([Promise.resolve().then(i.bind(i,4145)),Promise.resolve().then(i.bind(i,6541))]);const t=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",t),e()}))),this.initPromise}}const oc={WALLET_CONNECT_CONNECTOR_ID:"walletConnect",INJECTED_CONNECTOR_ID:"injected",COINBASE_CONNECTOR_ID:"coinbaseWallet",COINBASE_SDK_CONNECTOR_ID:"coinbaseWalletSDK",SAFE_CONNECTOR_ID:"safe",LEDGER_CONNECTOR_ID:"ledger",EIP6963_CONNECTOR_ID:"eip6963",EMAIL_CONNECTOR_ID:"w3mEmail",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",VERSION:"3.6.0-544a28f1"},sc={ConnectorExplorerIds:{[oc.COINBASE_CONNECTOR_ID]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[oc.SAFE_CONNECTOR_ID]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[oc.LEDGER_CONNECTOR_ID]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927"},EIP155NetworkImageIds:{1:"692ed6ba-e569-459a-556a-776476829e00",42161:"600a9a04-c1b9-42ca-6785-9b4b6ff85200",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100"},ConnectorImageIds:{[oc.COINBASE_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[oc.COINBASE_SDK_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[oc.SAFE_CONNECTOR_ID]:"461db637-8616-43ce-035a-d89b8a1d5800",[oc.LEDGER_CONNECTOR_ID]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[oc.WALLET_CONNECT_CONNECTOR_ID]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[oc.INJECTED_CONNECTOR_ID]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[oc.INJECTED_CONNECTOR_ID]:"Browser Wallet",[oc.WALLET_CONNECT_CONNECTOR_ID]:"WalletConnect",[oc.COINBASE_CONNECTOR_ID]:"Coinbase",[oc.COINBASE_SDK_CONNECTOR_ID]:"Coinbase",[oc.LEDGER_CONNECTOR_ID]:"Ledger",[oc.SAFE_CONNECTOR_ID]:"Safe"},ConnectorTypesMap:{[oc.INJECTED_CONNECTOR_ID]:"INJECTED",[oc.WALLET_CONNECT_CONNECTOR_ID]:"WALLET_CONNECT",[oc.EIP6963_CONNECTOR_ID]:"ANNOUNCED",[oc.EMAIL_CONNECTOR_ID]:"EMAIL"},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]},ac={caipNetworkIdToNumber:e=>e?Number(e.split(":")[1]):void 0,getCaipTokens(e){if(!e)return;const t={};return Object.entries(e).forEach((([e,r])=>{t[`${oc.EIP155}:${e}`]=r})),t}};function cc(e){if(e)return{id:`${oc.EIP155}:${e.id}`,name:e.name,imageId:sc.EIP155NetworkImageIds[e.id]}}class lc extends ic{constructor(e){const{wagmiConfig:r,siweConfig:n,chains:i,defaultChain:o,tokens:s,_sdkVersion:a,...c}=e;if(!r)throw new Error("web3modal:constructor - wagmiConfig is undefined");if(!c.projectId)throw new Error("web3modal:constructor - projectId is undefined");const l={switchCaipNetwork:async e=>{const t=ac.caipNetworkIdToNumber(e?.id);t&&await gn({chainId:t})},async getApprovedCaipNetworksData(){const e=localStorage.getItem("wagmi.wallet");if(e?.includes(oc.EMAIL_CONNECTOR_ID))return{supportsAllNetworks:!1,approvedCaipNetworkIds:sc.WalletConnectRpcChainIds.map((e=>`${oc.EIP155}:${e}`))};if(e?.includes(oc.WALLET_CONNECT_CONNECTOR_ID)){const e=r.connectors.find((e=>e.id===oc.WALLET_CONNECT_CONNECTOR_ID));if(!e)throw new Error("networkControllerClient:getApprovedCaipNetworks - connector is undefined");const t=await e.getProvider(),n=t.signer?.session?.namespaces,i=n?.[oc.EIP155]?.methods,o=n?.[oc.EIP155]?.chains;return{supportsAllNetworks:i?.includes(oc.ADD_CHAIN_METHOD),approvedCaipNetworkIds:o}}return{approvedCaipNetworkIds:void 0,supportsAllNetworks:!0}}},u={connectWalletConnect:async e=>{const t=r.connectors.find((e=>e.id===oc.WALLET_CONNECT_CONNECTOR_ID));if(!t)throw new Error("connectionControllerClient:getWalletConnectUri - connector is undefined");t.on("message",(r=>{"display_uri"===r.type&&(e(r.data),t.removeAllListeners())}));const n=ac.caipNetworkIdToNumber(this.getCaipNetwork()?.id);await on({connector:t,chainId:n})},connectExternal:async({id:e,provider:t,info:n})=>{const i=r.connectors.find((t=>t.id===e));if(!i)throw new Error("connectionControllerClient:connectExternal - connector is undefined");t&&n&&i.id===oc.EIP6963_CONNECTOR_ID&&i.setEip6963Wallet?.({provider:t,info:n});const o=ac.caipNetworkIdToNumber(this.getCaipNetwork()?.id);await on({connector:i,chainId:o})},checkInstalled:e=>{const t=this.getConnectors().filter((e=>"ANNOUNCED"===e.type)),r=this.getConnectors().find((e=>"INJECTED"===e.type));if(!e)return Boolean(window.ethereum);if(t.length){const r=e.some((e=>t.some((t=>t.info?.rdns===e))));if(r)return!0}return!!r&&!!window?.ethereum&&e.some((e=>Boolean(window.ethereum?.[String(e)])))},disconnect:async()=>{await async function(){const e=nn();e.connector&&await e.connector.disconnect(),e.clearState(),e.storage.removeItem("connected")}(),n?.options?.signOutOnDisconnect&&await n.signOut()},signMessage:async e=>async function(e){const r=await ln();if(!r)throw new t;return await r.signMessage({message:e.message})}({message:e})};super({networkControllerClient:l,connectionControllerClient:u,siweControllerClient:n,defaultChain:cc(o),tokens:ac.getCaipTokens(s),_sdkVersion:a??`html-wagmi-${oc.VERSION}`,...c}),this.hasSyncedConnectedAccount=!1,this.options=void 0,this.options=e,this.syncRequestedNetworks(i),this.syncConnectors(r),this.syncEmailConnector(r),this.listenEIP6963Connector(r),this.listenEmailConnector(r),mn((()=>this.syncAccount())),yn((()=>this.syncNetwork()))}getState(){const e=super.getState();return{...e,selectedNetworkId:ac.caipNetworkIdToNumber(e.selectedNetworkId)}}subscribeState(e){return super.subscribeState((t=>e({...t,selectedNetworkId:ac.caipNetworkIdToNumber(t.selectedNetworkId)})))}syncRequestedNetworks(e){const t=e?.map((e=>({id:`${oc.EIP155}:${e.id}`,name:e.name,imageId:sc.EIP155NetworkImageIds[e.id],imageUrl:this.options?.chainImages?.[e.id]})));this.setRequestedCaipNetworks(t??[])}async syncAccount(){const{address:e,isConnected:t}=dn(),{chain:r}=pn();if(this.resetAccount(),t&&e&&r){const n=`${oc.EIP155}:${r.id}:${e}`;this.setIsConnected(t),this.setCaipAddress(n),await Promise.all([this.syncProfile(e,r),this.syncBalance(e,r),this.getApprovedCaipNetworksData()]),this.hasSyncedConnectedAccount=!0}else!t&&this.hasSyncedConnectedAccount&&(this.resetWcConnection(),this.resetNetwork())}async syncNetwork(){const{address:e,isConnected:t}=dn(),{chain:r}=pn();if(r){const n=String(r.id),i=`${oc.EIP155}:${n}`;if(this.setCaipNetwork({id:i,name:r.name,imageId:sc.EIP155NetworkImageIds[r.id],imageUrl:this.options?.chainImages?.[r.id]}),t&&e){const t=`${oc.EIP155}:${r.id}:${e}`;if(this.setCaipAddress(t),r.blockExplorers?.default?.url){const t=`${r.blockExplorers.default.url}/address/${e}`;this.setAddressExplorerUrl(t)}else this.setAddressExplorerUrl(void 0);this.hasSyncedConnectedAccount&&(await this.syncProfile(e,r),await this.syncBalance(e,r))}}}async syncProfile(e,t){if(t.id!==s.id)return this.setProfileName(null),void this.setProfileImage(null);try{const{name:r,avatar:n}=await this.fetchIdentity({caipChainId:`${oc.EIP155}:${t.id}`,address:e});this.setProfileName(r),this.setProfileImage(n)}catch{const r=await async function({address:e,chainId:t}){return cn({chainId:t}).getEnsName({address:(0,f.K)(e)})}({address:e,chainId:t.id});if(r){this.setProfileName(r);const e=await async function({name:e,chainId:t}){const{normalize:r}=await Promise.resolve().then(i.bind(i,4849)),n=cn({chainId:t});return await n.getEnsAvatar({name:r(e)})}({name:r,chainId:t.id});e&&this.setProfileImage(e)}}}async syncBalance(e,t){const r=await async function({address:e,chainId:t,formatUnits:r,token:n}){const i=nn(),o=cn({chainId:t});if(n){const i=async({abi:i})=>{const o={abi:i,address:n,chainId:t},[s,a,c]=await hn({allowFailure:!1,contracts:[{...o,functionName:"balanceOf",args:[e]},{...o,functionName:"decimals"},{...o,functionName:"symbol"}]});return{decimals:a,formatted:(0,jr.b)(s??"0",Hr(r??a)),symbol:c,value:s}};try{return await i({abi:sn})}catch(e){if(e instanceof st.uq){const{symbol:e,...t}=await i({abi:an});return{symbol:(0,H.rR)((0,it.f)(e,{dir:"right"})),...t}}throw e}}const s=[...i.publicClient.chains||[],...i.chains??[]],a=await o.getBalance({address:e}),c=s.find((e=>e.id===o.chain.id));return{decimals:c?.nativeCurrency.decimals??18,formatted:(0,jr.b)(a??"0",Hr(r??18)),symbol:c?.nativeCurrency.symbol??"ETH",value:a}}({address:e,chainId:t.id,token:this.options?.tokens?.[t.id]?.address});this.setBalance(r.formatted,r.symbol)}syncConnectors(e){const t=[];e.connectors.forEach((({id:e,name:r})=>{[oc.EIP6963_CONNECTOR_ID,oc.EMAIL_CONNECTOR_ID].includes(e)||t.push({id:e,explorerId:sc.ConnectorExplorerIds[e],imageId:sc.ConnectorImageIds[e],imageUrl:this.options?.connectorImages?.[e],name:sc.ConnectorNamesMap[e]??r,type:sc.ConnectorTypesMap[e]??"EXTERNAL"})})),this.setConnectors(t)}async syncEmailConnector(e){const t=e.connectors.find((({id:e})=>"w3mEmail"===e));if(t){const e=await t.getProvider();this.addConnector({id:oc.EMAIL_CONNECTOR_ID,type:"EMAIL",name:"Email",provider:e})}}eip6963EventHandler(e,t){if(t.detail){const{info:r,provider:n}=t.detail;this.getConnectors().find((e=>e.name===r.name))||(this.addConnector({id:oc.EIP6963_CONNECTOR_ID,type:"ANNOUNCED",imageUrl:r.icon??this.options?.connectorImages?.[oc.EIP6963_CONNECTOR_ID],name:r.name,provider:n,info:r}),e.isAuthorized({info:r,provider:n}))}}listenEIP6963Connector(e){const t=e.connectors.find((e=>e.id===oc.EIP6963_CONNECTOR_ID));if("undefined"!=typeof window&&t){const e=this.eip6963EventHandler.bind(this,t);window.addEventListener(oc.EIP6963_ANNOUNCE_EVENT,e),window.dispatchEvent(new Event(oc.EIP6963_REQUEST_EVENT))}}async listenEmailConnector(e){const t=e.connectors.find((e=>e.id===oc.EMAIL_CONNECTOR_ID));if("undefined"!=typeof window&&t){super.setLoading(!0);const e=await t.getProvider(),r=e.getLoginEmailUsed();super.setLoading(r),e.onRpcRequest((()=>{super.open({view:"ApproveTransaction"})})),e.onRpcResponse((()=>{super.close()})),e.onIsConnected((()=>{super.setLoading(!1)}))}}}var uc,hc,dc=function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},pc=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};const fc="connectedRdns";class gc extends Ye{constructor(e){super({chains:e.chains,options:{shimDisconnect:!0}}),this.id="eip6963",this.name="EIP6963",uc.set(this,void 0),hc.set(this,void 0),this.onAccountsChanged=e=>{0===e.length?(this.storage?.removeItem(fc),this.emit("disconnect")):e[0]&&this.emit("change",{account:(0,f.K)(e[0])})},dc(this,uc,this.options.getProvider(),"f")}async connect(e){const t=await super.connect(e);return pc(this,hc,"f")&&this.storage?.setItem(fc,pc(this,hc,"f").info.rdns),t}async disconnect(){await super.disconnect(),this.storage?.removeItem(fc),dc(this,hc,void 0,"f")}async isAuthorized(e){const t=this.storage?.getItem(fc);if(t){if(pc(this,hc,"f")&&t===pc(this,hc,"f").info.rdns){const e=pc(this,hc,"f").provider;if((await e.request({method:"eth_accounts"})).length)return!0}e&&dc(this,hc,e,"f")}return super.isAuthorized()}async getProvider(){return Promise.resolve(pc(this,hc,"f")?.provider??pc(this,uc,"f"))}setEip6963Wallet(e){dc(this,hc,e,"f")}}uc=new WeakMap,hc=new WeakMap;var mc,yc,wc=i(8764);"undefined"!=typeof window&&(window.Buffer||(window.Buffer=wc.Buffer),window.global||(window.global=window),window.process||(window.process={}),window.process?.env||(window.process={env:{}}));var bc=class extends p{constructor({chains:e,options:t}){super({chains:e,options:{reloadOnDisconnect:!1,...t}}),this.id="coinbaseWallet",this.name="Coinbase Wallet",this.ready=!0,u(this,mc,void 0),u(this,yc,void 0),this.onAccountsChanged=e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,f.K)(e[0])})},this.onChainChanged=e=>{const t=r(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})},this.onDisconnect=()=>{this.emit("disconnect")}}async connect({chainId:e}={}){try{const t=await this.getProvider();t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect),this.emit("message",{type:"connecting"});const r=await t.enable(),n=(0,f.K)(r[0]);let i=await this.getChainId(),o=this.isChainUnsupported(i);return e&&i!==e&&(i=(await this.switchChain(e)).id,o=this.isChainUnsupported(i)),{account:n,chain:{id:i,unsupported:o}}}catch(e){if(/(user closed modal|accounts received is empty)/i.test(e.message))throw new R(e);throw e}}async disconnect(){if(!l(this,yc))return;const e=await this.getProvider();e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),e.disconnect(),e.close()}async getAccount(){const e=await this.getProvider(),t=await e.request({method:"eth_accounts"});return(0,f.K)(t[0])}async getChainId(){return r((await this.getProvider()).chainId)}async getProvider(){if(!l(this,yc)){let e=(await Promise.resolve().then(i.t.bind(i,5811,19))).default;"function"!=typeof e&&"function"==typeof e.default&&(e=e.default),h(this,mc,new e(this.options));const t=l(this,mc).walletExtension?.getChainId(),r=this.chains.find((e=>this.options.chainId?e.id===this.options.chainId:e.id===t))||this.chains[0],n=this.options.chainId||r?.id,o=this.options.jsonRpcUrl||r?.rpcUrls.default.http[0];h(this,yc,l(this,mc).makeWeb3Provider(o,n))}return l(this,yc)}async getWalletClient({chainId:e}={}){const[t,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return ze({account:r,chain:n,transport:Ze(t)})}async isAuthorized(){try{return!!await this.getAccount()}catch{return!1}}async switchChain(t){const r=await this.getProvider(),n=(0,q.eC)(t);try{return await r.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),this.chains.find((e=>e.id===t))??{id:t,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(i){const o=this.chains.find((e=>e.id===t));if(!o)throw new e({chainId:t,connectorId:this.id});if(4902===i.code)try{return await r.request({method:"wallet_addEthereumChain",params:[{chainId:n,chainName:o.name,nativeCurrency:o.nativeCurrency,rpcUrls:[o.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(o)}]}),o}catch(e){throw new R(e)}throw new L(i)}}async watchAsset({address:e,decimals:t=18,image:r,symbol:n}){return(await this.getProvider()).request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:r,symbol:n}}})}};mc=new WeakMap,yc=new WeakMap;var vc,_c,Ec,xc,Cc,Sc,Ac,Ic,kc,Pc,Oc,Rc,Mc,Nc,Tc,jc,Lc,Dc,$c,Bc,Uc=i(9795),Fc="eip155",zc="requestedChains",Wc="wallet_addEthereumChain",Hc=class extends p{constructor(e){super({...e,options:{isNewChainsStale:!0,...e.options}}),u(this,Ec),u(this,Cc),u(this,Ac),u(this,kc),u(this,Oc),u(this,Mc),u(this,Tc),u(this,Lc),u(this,$c),this.id="walletConnect",this.name="WalletConnect",this.ready=!0,u(this,vc,void 0),u(this,_c,void 0),this.onAccountsChanged=e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,f.K)(e[0])})},this.onChainChanged=e=>{const t=Number(e),r=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:r}})},this.onDisconnect=()=>{d(this,Mc,Nc).call(this,[]),this.emit("disconnect")},this.onDisplayUri=e=>{this.emit("message",{type:"display_uri",data:e})},this.onConnect=()=>{this.emit("connect",{})},d(this,Ec,xc).call(this)}async connect({chainId:e,pairingTopic:t}={}){try{let r=e;if(!r){const e=this.storage?.getItem("store"),t=e?.state?.data?.chain?.id;r=t&&!this.isChainUnsupported(t)?t:this.chains[0]?.id}if(!r)throw new Error("No chains found on connector.");const n=await this.getProvider();d(this,kc,Pc).call(this);const i=d(this,Ac,Ic).call(this);if(n.session&&i&&await n.disconnect(),!n.session||i){const e=this.chains.filter((e=>e.id!==r)).map((e=>e.id));this.emit("message",{type:"connecting"}),await n.connect({pairingTopic:t,optionalChains:[r,...e]}),d(this,Mc,Nc).call(this,this.chains.map((({id:e})=>e)))}const o=await n.enable(),s=(0,f.K)(o[0]),a=await this.getChainId();return{account:s,chain:{id:a,unsupported:this.isChainUnsupported(a)}}}catch(e){if(/user rejected/i.test(e?.message))throw new R(e);throw e}}async disconnect(){const e=await this.getProvider();try{await e.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{d(this,Oc,Rc).call(this),d(this,Mc,Nc).call(this,[])}}async getAccount(){const{accounts:e}=await this.getProvider();return(0,f.K)(e[0])}async getChainId(){const{chainId:e}=await this.getProvider();return e}async getProvider({chainId:e}={}){return l(this,vc)||await d(this,Ec,xc).call(this),e&&await this.switchChain(e),l(this,vc)}async getWalletClient({chainId:e}={}){const[t,r]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),n=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return ze({account:r,chain:n,transport:Ze(t)})}async isAuthorized(){try{const[e,t]=await Promise.all([this.getAccount(),this.getProvider()]),r=d(this,Ac,Ic).call(this);if(!e)return!1;if(r&&t.session){try{await t.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){const t=this.chains.find((t=>t.id===e));if(!t)throw new L(new Error("chain not found on connector."));try{const r=await this.getProvider(),n=d(this,Lc,Dc).call(this),i=d(this,$c,Bc).call(this);if(!n.includes(e)&&i.includes(Wc)){await r.request({method:Wc,params:[{chainId:(0,q.eC)(t.id),blockExplorerUrls:[t.blockExplorers?.default?.url],chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:[...t.rpcUrls.default.http]}]});const n=d(this,Tc,jc).call(this);n.push(e),d(this,Mc,Nc).call(this,n)}return await r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,q.eC)(e)}]}),t}catch(e){if(/user rejected request/i.test("string"==typeof e?e:e?.message))throw new R(e);throw new L(e)}}};vc=new WeakMap,_c=new WeakMap,Ec=new WeakSet,xc=async function(){return l(this,_c)||"undefined"==typeof window||h(this,_c,d(this,Cc,Sc).call(this)),l(this,_c)},Cc=new WeakSet,Sc=async function(){const{EthereumProvider:e}=await Promise.resolve().then(i.bind(i,3098)),t=this.chains.map((({id:e})=>e));if(t.length){const{projectId:r,showQrModal:n=!0,qrModalOptions:i,metadata:o,relayUrl:s}=this.options;h(this,vc,await e.init({showQrModal:n,qrModalOptions:i,projectId:r,optionalChains:t,rpcMap:Object.fromEntries(this.chains.map((e=>[e.id,e.rpcUrls.default.http[0]]))),metadata:o,relayUrl:s}))}},Ac=new WeakSet,Ic=function(){if(d(this,$c,Bc).call(this).includes(Wc))return!1;if(!this.options.isNewChainsStale)return!1;const e=d(this,Tc,jc).call(this),t=this.chains.map((({id:e})=>e)),r=d(this,Lc,Dc).call(this);return!(r.length&&!r.some((e=>t.includes(e)))||t.every((t=>e.includes(t))))},kc=new WeakSet,Pc=function(){l(this,vc)&&(d(this,Oc,Rc).call(this),l(this,vc).on("accountsChanged",this.onAccountsChanged),l(this,vc).on("chainChanged",this.onChainChanged),l(this,vc).on("disconnect",this.onDisconnect),l(this,vc).on("session_delete",this.onDisconnect),l(this,vc).on("display_uri",this.onDisplayUri),l(this,vc).on("connect",this.onConnect))},Oc=new WeakSet,Rc=function(){l(this,vc)&&(l(this,vc).removeListener("accountsChanged",this.onAccountsChanged),l(this,vc).removeListener("chainChanged",this.onChainChanged),l(this,vc).removeListener("disconnect",this.onDisconnect),l(this,vc).removeListener("session_delete",this.onDisconnect),l(this,vc).removeListener("display_uri",this.onDisplayUri),l(this,vc).removeListener("connect",this.onConnect))},Mc=new WeakSet,Nc=function(e){this.storage?.setItem(zc,e)},Tc=new WeakSet,jc=function(){return this.storage?.getItem(zc)??[]},Lc=new WeakSet,Dc=function(){if(!l(this,vc))return[];const e=l(this,vc).session?.namespaces;if(!e)return[];const t=(0,Uc.fK)(e),r=t[Fc]?.chains?.map((e=>parseInt(e.split(":")[1]||"")));return r??[]},$c=new WeakSet,Bc=function(){if(!l(this,vc))return[];const e=l(this,vc).session?.namespaces;if(!e)return[];const t=(0,Uc.fK)(e),r=t[Fc]?.methods;return r??[]};const Vc={SECURE_SITE_SDK:"https://secure.web3modal.com/sdk",APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@w3m-storage/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_AWAIT_UPDATE_EMAIL_SUCCESS:"@w3m-frame/AWAIT_UPDATE_EMAIL_SUCCESS",FRAME_AWAIT_UPDATE_EMAIL_ERROR:"@w3m-frame/AWAIT_UPDATE_EMAIL_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR"},qc=As.object({message:As.string()});function Gc(e){return As.literal(Vc[e])}As.object({accessList:As.array(As.string()),blockHash:As.string().nullable(),blockNumber:As.string().nullable(),chainId:As.string(),from:As.string(),gas:As.string(),hash:As.string(),input:As.string().nullable(),maxFeePerGas:As.string(),maxPriorityFeePerGas:As.string(),nonce:As.string(),r:As.string(),s:As.string(),to:As.string(),transactionIndex:As.string().nullable(),type:As.string(),v:As.string(),value:As.string()});const Zc=As.object({chainId:As.number()}),Kc=As.object({email:As.string().email()}),Yc=As.object({otp:As.string()}),Qc=As.object({chainId:As.optional(As.number())}),Jc=As.object({email:As.string().email()}),Xc=As.object({themeMode:As.optional(As.enum(["light","dark"])),themeVariables:As.optional(As.record(As.string(),As.string().or(As.number())))}),el=As.object({metadata:As.object({name:As.string(),description:As.string(),url:As.string(),icons:As.array(As.string())}).optional(),sdkVersion:As.string(),projectId:As.string()}),tl=As.object({action:As.enum(["VERIFY_DEVICE","VERIFY_OTP"])}),rl=As.object({email:As.string().email(),address:As.string(),chainId:As.number()}),nl=As.object({isConnected:As.boolean()}),il=As.object({chainId:As.number()}),ol=As.object({chainId:As.number()}),sl=As.object({email:As.string().email()}),al=As.any(),cl=As.object({method:As.literal("personal_sign"),params:As.array(As.any())}),ll=As.object({method:As.literal("eth_sendTransaction"),params:As.array(As.any())}),ul=As.object({method:As.literal("eth_accounts")}),hl=As.object({method:As.literal("eth_getBalance"),params:As.array(As.any())}),dl=As.object({method:As.literal("eth_estimateGas"),params:As.array(As.any())}),pl=As.object({method:As.literal("eth_gasPrice")}),fl=As.object({method:As.literal("eth_signTypedData_v4"),params:As.array(As.any())}),gl=As.object({method:As.literal("eth_getTransactionByHash"),params:As.array(As.any())}),ml=As.object({method:As.literal("eth_blockNumber")}),yl=As.object({method:As.literal("eth_chainId")}),wl=As.object({token:As.string()}),bl={appEvent:As.object({type:Gc("APP_SWITCH_NETWORK"),payload:Zc}).or(As.object({type:Gc("APP_CONNECT_EMAIL"),payload:Kc})).or(As.object({type:Gc("APP_CONNECT_DEVICE")})).or(As.object({type:Gc("APP_CONNECT_OTP"),payload:Yc})).or(As.object({type:Gc("APP_GET_USER"),payload:As.optional(Qc)})).or(As.object({type:Gc("APP_SIGN_OUT")})).or(As.object({type:Gc("APP_IS_CONNECTED"),payload:As.optional(wl)})).or(As.object({type:Gc("APP_GET_CHAIN_ID")})).or(As.object({type:Gc("APP_RPC_REQUEST"),payload:cl.or(ll).or(ul).or(hl).or(dl).or(pl).or(fl).or(ml).or(yl).or(gl)})).or(As.object({type:Gc("APP_UPDATE_EMAIL"),payload:Jc})).or(As.object({type:Gc("APP_AWAIT_UPDATE_EMAIL")})).or(As.object({type:Gc("APP_SYNC_THEME"),payload:Xc})).or(As.object({type:Gc("APP_SYNC_DAPP_DATA"),payload:el})),frameEvent:As.object({type:Gc("FRAME_SWITCH_NETWORK_ERROR"),payload:qc}).or(As.object({type:Gc("FRAME_SWITCH_NETWORK_SUCCESS"),payload:ol})).or(As.object({type:Gc("FRAME_CONNECT_EMAIL_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_CONNECT_EMAIL_SUCCESS"),payload:tl})).or(As.object({type:Gc("FRAME_CONNECT_OTP_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_CONNECT_OTP_SUCCESS")})).or(As.object({type:Gc("FRAME_CONNECT_DEVICE_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_CONNECT_DEVICE_SUCCESS")})).or(As.object({type:Gc("FRAME_GET_USER_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_GET_USER_SUCCESS"),payload:rl})).or(As.object({type:Gc("FRAME_SIGN_OUT_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_SIGN_OUT_SUCCESS")})).or(As.object({type:Gc("FRAME_IS_CONNECTED_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_IS_CONNECTED_SUCCESS"),payload:nl})).or(As.object({type:Gc("FRAME_GET_CHAIN_ID_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_GET_CHAIN_ID_SUCCESS"),payload:il})).or(As.object({type:Gc("FRAME_RPC_REQUEST_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_RPC_REQUEST_SUCCESS"),payload:al})).or(As.object({type:Gc("FRAME_SESSION_UPDATE"),payload:wl})).or(As.object({type:Gc("FRAME_UPDATE_EMAIL_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_UPDATE_EMAIL_SUCCESS")})).or(As.object({type:Gc("FRAME_AWAIT_UPDATE_EMAIL_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_AWAIT_UPDATE_EMAIL_SUCCESS"),payload:sl})).or(As.object({type:Gc("FRAME_SYNC_THEME_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_SYNC_THEME_SUCCESS")})).or(As.object({type:Gc("FRAME_SYNC_DAPP_DATA_ERROR"),payload:qc})).or(As.object({type:Gc("FRAME_SYNC_DAPP_DATA_SUCCESS")}))},vl={set(e,t){localStorage.setItem(`${Vc.STORAGE_KEY}${e}`,t)},get:e=>localStorage.getItem(`${Vc.STORAGE_KEY}${e}`),delete(e){localStorage.removeItem(`${Vc.STORAGE_KEY}${e}`)}},_l=["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],El=3e4,xl={getBlockchainApiUrl(){try{const{timeZone:e}=(new Intl.DateTimeFormat).resolvedOptions(),t=e.toUpperCase();return _l.includes(t)?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com"}catch{return!1}},checkIfAllowedToTriggerEmail(){const e=vl.get(Vc.LAST_EMAIL_LOGIN_TIME);if(e){const t=Date.now()-Number(e);if(t{window.addEventListener("message",(({data:t})=>{if(!t.type?.includes(Vc.FRAME_EVENT_KEY))return;const r=bl.frameEvent.parse(t);e(r)}))},onAppEvent:e=>{window.addEventListener("message",(({data:t})=>{if(!t.type?.includes(Vc.APP_EVENT_KEY))return;const r=bl.appEvent.parse(t);e(r)}))},postAppEvent:e=>{if(!this.iframe?.contentWindow)throw new Error("W3mFrame: iframe is not set");bl.appEvent.parse(e),window.postMessage(e),this.iframe.contentWindow.postMessage(e,"*")},postFrameEvent:e=>{if(!parent)throw new Error("W3mFrame: parent is not set");bl.frameEvent.parse(e),parent.postMessage(e,"*")}},this.projectId=e,this.frameLoadPromise=new Promise(((e,t)=>{this.frameLoadPromiseResolver={resolve:e,reject:t}})),t){this.frameLoadPromise=new Promise(((e,t)=>{this.frameLoadPromiseResolver={resolve:e,reject:t}}));const t=document.createElement("iframe");t.id="w3m-iframe",t.src=`${Vc.SECURE_SITE_SDK}?projectId=${e}`,t.style.position="fixed",t.style.zIndex="999999",t.style.display="none",t.style.opacity="0",t.style.borderRadius="clamp(0px, var(--wui-border-radius-l), 44px)",document.body.appendChild(t),this.iframe=t,this.iframe.onload=()=>{this.frameLoadPromiseResolver?.resolve(void 0)},this.iframe.onerror=()=>{this.frameLoadPromiseResolver?.reject("Unable to load email login dependency")}}}get networks(){const e=[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,324,280,100,8453,84531,7777777,999].map((e=>({[e]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=eip155:${e}&projectId=${this.projectId}`,chainId:e}})));return Object.assign({},...e)}}class Sl{constructor(e){this.connectEmailResolver=void 0,this.connectDeviceResolver=void 0,this.connectOtpResolver=void 0,this.connectResolver=void 0,this.disconnectResolver=void 0,this.isConnectedResolver=void 0,this.getChainIdResolver=void 0,this.switchChainResolver=void 0,this.rpcRequestResolver=void 0,this.updateEmailResolver=void 0,this.awaitUpdateEmailResolver=void 0,this.syncThemeResolver=void 0,this.syncDappDataResolver=void 0,this.w3mFrame=new Cl(e,!0),this.w3mFrame.events.onFrameEvent((e=>{switch(console.log("💻 received",e),e.type){case Vc.FRAME_CONNECT_EMAIL_SUCCESS:return this.onConnectEmailSuccess(e);case Vc.FRAME_CONNECT_EMAIL_ERROR:return this.onConnectEmailError(e);case Vc.FRAME_CONNECT_DEVICE_SUCCESS:return this.onConnectDeviceSuccess();case Vc.FRAME_CONNECT_DEVICE_ERROR:return this.onConnectDeviceError(e);case Vc.FRAME_CONNECT_OTP_SUCCESS:return this.onConnectOtpSuccess();case Vc.FRAME_CONNECT_OTP_ERROR:return this.onConnectOtpError(e);case Vc.FRAME_GET_USER_SUCCESS:return this.onConnectSuccess(e);case Vc.FRAME_GET_USER_ERROR:return this.onConnectError(e);case Vc.FRAME_IS_CONNECTED_SUCCESS:return this.onIsConnectedSuccess(e);case Vc.FRAME_IS_CONNECTED_ERROR:return this.onIsConnectedError(e);case Vc.FRAME_GET_CHAIN_ID_SUCCESS:return this.onGetChainIdSuccess(e);case Vc.FRAME_GET_CHAIN_ID_ERROR:return this.onGetChainIdError(e);case Vc.FRAME_SIGN_OUT_SUCCESS:return this.onSignOutSuccess();case Vc.FRAME_SIGN_OUT_ERROR:return this.onSignOutError(e);case Vc.FRAME_SWITCH_NETWORK_SUCCESS:return this.onSwitchChainSuccess(e);case Vc.FRAME_SWITCH_NETWORK_ERROR:return this.onSwitchChainError(e);case Vc.FRAME_RPC_REQUEST_SUCCESS:return this.onRpcRequestSuccess(e);case Vc.FRAME_RPC_REQUEST_ERROR:return this.onRpcRequestError(e);case Vc.FRAME_SESSION_UPDATE:return this.onSessionUpdate(e);case Vc.FRAME_UPDATE_EMAIL_SUCCESS:return this.onUpdateEmailSuccess();case Vc.FRAME_UPDATE_EMAIL_ERROR:return this.onUpdateEmailError(e);case Vc.FRAME_AWAIT_UPDATE_EMAIL_SUCCESS:return this.onAwaitUpdateEmailSuccess(e);case Vc.FRAME_AWAIT_UPDATE_EMAIL_ERROR:return this.onAwaitUpdateEmailError(e);case Vc.FRAME_SYNC_THEME_SUCCESS:return this.onSyncThemeSuccess();case Vc.FRAME_SYNC_THEME_ERROR:return this.onSyncThemeError(e);case Vc.FRAME_SYNC_DAPP_DATA_SUCCESS:return this.onSyncDappDataSuccess();case Vc.FRAME_SYNC_DAPP_DATA_ERROR:return this.onSyncDappDataError(e);default:return null}}))}getLoginEmailUsed(){return Boolean(vl.get(Vc.EMAIL_LOGIN_USED_KEY))}getEmail(){return vl.get(Vc.EMAIL)}async connectEmail(e){return await this.w3mFrame.frameLoadPromise,xl.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Vc.APP_CONNECT_EMAIL,payload:e}),new Promise(((e,t)=>{this.connectEmailResolver={resolve:e,reject:t}}))}async connectDevice(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_CONNECT_DEVICE}),new Promise(((e,t)=>{this.connectDeviceResolver={resolve:e,reject:t}}))}async connectOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_CONNECT_OTP,payload:e}),new Promise(((e,t)=>{this.connectOtpResolver={resolve:e,reject:t}}))}async isConnected(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_IS_CONNECTED,payload:void 0}),new Promise(((e,t)=>{this.isConnectedResolver={resolve:e,reject:t}}))}async getChainId(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_GET_CHAIN_ID}),new Promise(((e,t)=>{this.getChainIdResolver={resolve:e,reject:t}}))}async updateEmail(e){return await this.w3mFrame.frameLoadPromise,xl.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Vc.APP_UPDATE_EMAIL,payload:e}),new Promise(((e,t)=>{this.updateEmailResolver={resolve:e,reject:t}}))}async awaitUpdateEmail(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_AWAIT_UPDATE_EMAIL}),new Promise(((e,t)=>{this.awaitUpdateEmailResolver={resolve:e,reject:t}}))}async syncTheme(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_SYNC_THEME,payload:e}),new Promise(((e,t)=>{this.syncThemeResolver={resolve:e,reject:t}}))}async syncDappData(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_SYNC_DAPP_DATA,payload:e}),new Promise(((e,t)=>{this.syncDappDataResolver={resolve:e,reject:t}}))}async connect(e){const t=e?.chainId??this.getLastUsedChainId()??1;return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_GET_USER,payload:{chainId:t}}),new Promise(((e,t)=>{this.connectResolver={resolve:e,reject:t}}))}async switchNetwork(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_SWITCH_NETWORK,payload:{chainId:e}}),new Promise(((e,t)=>{this.switchChainResolver={resolve:e,reject:t}}))}async disconnect(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Vc.APP_SIGN_OUT}),new Promise(((e,t)=>{this.disconnectResolver={resolve:e,reject:t}}))}async request(e){return await this.w3mFrame.frameLoadPromise,"eth_chainId"===e.method?this.getLastUsedChainId():(this.w3mFrame.events.postAppEvent({type:Vc.APP_RPC_REQUEST,payload:e}),new Promise(((e,t)=>{this.rpcRequestResolver={resolve:e,reject:t}})))}onRpcRequest(e){this.w3mFrame.events.onAppEvent((t=>{t.type.includes(Vc.RPC_METHOD_KEY)&&e(t)}))}onRpcResponse(e){this.w3mFrame.events.onFrameEvent((t=>{t.type.includes(Vc.RPC_METHOD_KEY)&&e(t)}))}onIsConnected(e){this.w3mFrame.events.onFrameEvent((t=>{t.type===Vc.FRAME_GET_USER_SUCCESS&&e()}))}onConnectEmailSuccess(e){this.connectEmailResolver?.resolve(e.payload),this.setNewLastEmailLoginTime()}onConnectEmailError(e){this.connectEmailResolver?.reject(e.payload.message)}onConnectDeviceSuccess(){this.connectDeviceResolver?.resolve(void 0)}onConnectDeviceError(e){this.connectDeviceResolver?.reject(e.payload.message)}onConnectOtpSuccess(){this.connectOtpResolver?.resolve(void 0)}onConnectOtpError(e){this.connectOtpResolver?.reject(e.payload.message)}onConnectSuccess(e){this.setEmailLoginSuccess(e.payload.email),this.setLastUsedChainId(e.payload.chainId),this.connectResolver?.resolve(e.payload)}onConnectError(e){this.connectResolver?.reject(e.payload.message)}onIsConnectedSuccess(e){e.payload.isConnected||this.deleteEmailLoginCache(),this.isConnectedResolver?.resolve(e.payload)}onIsConnectedError(e){this.isConnectedResolver?.reject(e.payload.message)}onGetChainIdSuccess(e){this.setLastUsedChainId(e.payload.chainId),this.getChainIdResolver?.resolve(e.payload)}onGetChainIdError(e){this.getChainIdResolver?.reject(e.payload.message)}onSignOutSuccess(){this.disconnectResolver?.resolve(void 0),this.deleteEmailLoginCache()}onSignOutError(e){this.disconnectResolver?.reject(e.payload.message)}onSwitchChainSuccess(e){this.setLastUsedChainId(e.payload.chainId),this.switchChainResolver?.resolve(e.payload)}onSwitchChainError(e){this.switchChainResolver?.reject(e.payload.message)}onRpcRequestSuccess(e){this.rpcRequestResolver?.resolve(e.payload)}onRpcRequestError(e){this.rpcRequestResolver?.reject(e.payload.message)}onSessionUpdate(e){const{payload:t}=e}onUpdateEmailSuccess(){this.updateEmailResolver?.resolve(void 0),this.setNewLastEmailLoginTime()}onUpdateEmailError(e){this.updateEmailResolver?.reject(e.payload.message)}onAwaitUpdateEmailSuccess(e){this.setEmailLoginSuccess(e.payload.email),this.awaitUpdateEmailResolver?.resolve(e.payload)}onAwaitUpdateEmailError(e){this.awaitUpdateEmailResolver?.reject(e.payload.message)}onSyncThemeSuccess(){this.syncThemeResolver?.resolve(void 0)}onSyncThemeError(e){this.syncThemeResolver?.reject(e.payload.message)}onSyncDappDataSuccess(){this.syncDappDataResolver?.resolve(void 0)}onSyncDappDataError(e){this.syncDappDataResolver?.reject(e.payload.message)}setNewLastEmailLoginTime(){vl.set(Vc.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setEmailLoginSuccess(e){vl.set(Vc.EMAIL,e),vl.set(Vc.EMAIL_LOGIN_USED_KEY,"true"),vl.delete(Vc.LAST_EMAIL_LOGIN_TIME)}deleteEmailLoginCache(){vl.delete(Vc.EMAIL_LOGIN_USED_KEY),vl.delete(Vc.EMAIL),vl.delete(Vc.LAST_USED_CHAIN_KEY)}setLastUsedChainId(e){vl.set(Vc.LAST_USED_CHAIN_KEY,`${e}`)}getLastUsedChainId(){return Number(vl.get(Vc.LAST_USED_CHAIN_KEY))}}class Al extends p{constructor(e){super(e),this.id="w3mEmail",this.name="Web3Modal Email",this.ready=!0,this.provider={},"undefined"!=typeof window&&(this.provider=new Sl(e.options.projectId))}async getProvider(){return Promise.resolve(this.provider)}async connect(e={}){const{address:t,chainId:r}=await this.provider.connect({chainId:e.chainId});return{account:t,chain:{id:r,unsupported:this.isChainUnsupported(1)}}}async switchChain(e){try{const t=this.chains.find((t=>t.id===e));if(!t)throw new L(new Error("chain not found on connector."));await this.provider.switchNetwork(e);const r=this.isChainUnsupported(e);return this.emit("change",{chain:{id:e,unsupported:r}}),t}catch(e){if(e instanceof Error)throw new L(e);throw e}}async disconnect(){await this.provider.disconnect()}async getAccount(){const{address:e}=await this.provider.connect();return e}async getChainId(){const{chainId:e}=await this.provider.getChainId();return e}async getWalletClient(){const{address:e,chainId:t}=await this.provider.connect();return Promise.resolve(ze({account:e,chain:{id:t},transport:Ze(this.provider)}))}async isAuthorized(){const{isConnected:e}=await this.provider.isConnected();return e}onAccountsChanged(){}onChainChanged(){}onDisconnect(){}}const Il=vn.j1.getBlockchainApiUrl();function kl({projectId:e}){return function(t){if(!sc.WalletConnectRpcChainIds.includes(t.id))return null;const r=`${Il}/v1/?chainId=${oc.EIP155}:${t.id}&projectId=${e}`;return{chain:{...t,rpcUrls:{...t.rpcUrls,default:{http:[r]}}},rpcUrls:{http:[r]}}}}function Pl({projectId:e,chains:t,metadata:r,enableInjected:n,enableCoinbase:i,enableEIP6963:o,enableEmail:s,enableWalletConnect:a}){const{publicClient:c}=function(e,t,{batch:r={multicall:{wait:32}},pollingInterval:n=4e3,rank:i,retryCount:o,retryDelay:s,stallTimeout:a}={}){if(!e.length)throw new Error("must have at least one chain");let c=[];const l={},u={};for(const r of e){let e=!1;for(const n of t){const t=n(r);t&&(e=!0,c.some((({id:e})=>e===r.id))||(c=[...c,t.chain]),l[r.id]=[...l[r.id]||[],...t.rpcUrls.http],t.rpcUrls.webSocket&&(u[r.id]=[...u[r.id]||[],...t.rpcUrls.webSocket]))}if(!e)throw new Error([`Could not find valid provider configuration for chain "${r.name}".\n`,"You may need to add `jsonRpcProvider` to `configureChains` with the chain's RPC URLs.","Read more: https://wagmi.sh/core/providers/jsonRpc"].join("\n"))}return{chains:c,publicClient:({chainId:t})=>{const u=c.find((e=>e.id===t))??e[0],h=l[u.id];if(!h||!h[0])throw new Error(`No providers configured for chain "${u.id}"`);const d=_r({batch:r,chain:u,transport:Er(h.map((e=>function(e,t={}){const{batch:r,fetchOptions:n,key:i="http",name:o="HTTP JSON-RPC",retryDelay:s}=t;return({chain:a,retryCount:c,timeout:l})=>{const{batchSize:u=1e3,wait:h=0}="object"==typeof r?r:{},d=t.retryCount??c,p=l??t.timeout??1e4,f=e||a?.rpcUrls.default.http[0];if(!f)throw new xr;return Ge({key:i,name:o,async request({method:t,params:i}){const o={method:t,params:i},{schedule:s}=(0,Cr.S)({id:`${e}`,wait:h,shouldSplitBatch:e=>e.length>u,fn:e=>Or.http(f,{body:e,fetchOptions:n,timeout:p}),sort:(e,t)=>e.id-t.id}),[{error:a,result:c}]=await(async e=>r?s(e):[await Or.http(f,{body:e,fetchOptions:n,timeout:p})])(o);if(a)throw new m.bs({body:o,error:a,url:f});return c},retryCount:d,retryDelay:s,timeout:p,type:"http"},{fetchOptions:n,url:e})}}(e,{timeout:a}))),{rank:i,retryCount:o,retryDelay:s}),pollingInterval:n});return Object.assign(d,{chains:c})},webSocketPublicClient:({chainId:t})=>{const l=c.find((e=>e.id===t))??e[0],h=u[l.id];if(!h||!h[0])return;const d=_r({batch:r,chain:l,transport:Er(h.map((e=>function(e,t={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:i}=t;return({chain:o,retryCount:s,timeout:a})=>{const c=t.retryCount??s,l=a??t.timeout??1e4,u=e||o?.rpcUrls.default.webSocket?.[0];if(!u)throw new xr;return Ge({key:r,name:n,async request({method:e,params:t}){const r={method:e,params:t},n=await Pr(u),{error:i,result:o}=await Or.webSocketAsync(n,{body:r,timeout:l});if(i)throw new m.bs({body:r,error:i,url:u});return o},retryCount:c,retryDelay:i,timeout:l,type:"webSocket"},{getSocket:()=>Pr(u),async subscribe({params:e,onData:t,onError:r}){const n=await Pr(u),{result:i}=await new Promise(((i,o)=>Or.webSocket(n,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return o(e.error),void r?.(e.error);"number"!=typeof e.id?"eth_subscription"===e.method&&t(e.params):i(e)}})));return{subscriptionId:i,unsubscribe:async()=>new Promise((e=>Or.webSocket(n,{body:{method:"eth_unsubscribe",params:[i]},onResponse:e})))}}})}}(e,{timeout:a}))),{rank:i,retryCount:o,retryDelay:s}),pollingInterval:n});return Object.assign(d,{chains:c})}}}(t,[kl({projectId:e}),function(e){return e.rpcUrls.public.http[0]?{chain:e,rpcUrls:e.rpcUrls.public}:null}]),l=[];return!1!==a&&l.push(new Hc({chains:t,options:{projectId:e,showQrModal:!1,metadata:r}})),!1!==n&&l.push(new Ye({chains:t,options:{shimDisconnect:!0}})),!1!==o&&l.push(new gc({chains:t})),!1!==i&&l.push(new bc({chains:t,options:{appName:r?.name??"Unknown"}})),!0===s&&l.push(new Al({chains:t,options:{projectId:e}})),function(e){const t=new rn(e);return en=t,t}({autoConnect:!0,connectors:l,publicClient:c})}let Ol;const Rl=o({id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),Ml=o({id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),Nl={block:we({format(e){const t=e.transactions?.map((e=>{if("string"==typeof e)return e;const t=ge(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,H.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}));return{transactions:t,stateRoot:e.stateRoot}}}),transaction:me({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,H.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:rr({format:e=>({l1GasPrice:e.l1GasPrice?(0,H.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,H.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,H.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},Tl=o({id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}},{formatters:Nl}),jl=o({id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0},{formatters:Nl}),Ll={block:we({format(e){const t=e.transactions?.map((e=>{if("string"==typeof e)return e;const t=Ll.transaction.format(e);return"0x71"===t.typeHex?t.type="eip712":"0xff"===t.typeHex&&(t.type="priority"),t}));return{l1BatchNumber:e.l1BatchNumber?(0,H.y_)(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?(0,H.y_)(e.l1BatchTimestamp):null,transactions:t}}}),transaction:me({format(e){const t={};return"0x71"===e.type?t.type="eip712":"0xff"===e.type&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?(0,H.y_)(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?(0,H.y_)(e.l1BatchTxIndex):null}}}),transactionReceipt:rr({format:e=>({l1BatchNumber:e.l1BatchNumber?(0,H.y_)(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?(0,H.y_)(e.l1BatchTxIndex):null,logs:e.logs.map((e=>({...Kt(e),l1BatchNumber:e.l1BatchNumber?(0,H.y_)(e.l1BatchNumber):null,transactionLogIndex:(0,H.ly)(e.transactionLogIndex),logType:e.logType}))),l2ToL1Logs:e.l2ToL1Logs.map((e=>({blockNumber:(0,H.y_)(e.blockHash),blockHash:e.blockHash,l1BatchNumber:(0,H.y_)(e.l1BatchNumber),transactionIndex:(0,H.y_)(e.transactionIndex),shardId:(0,H.y_)(e.shardId),isService:e.isService,sender:e.sender,key:e.key,value:e.value,transactionHash:e.transactionHash,logIndex:(0,H.y_)(e.logIndex)})))})}),transactionRequest:(0,oe.iy)({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format:e=>e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:(0,q.NC)(e.gasPerPubdata)}:{},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from((0,ct.nr)(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps}:{},...e.customSignature?{customSignature:e.customSignature}:{}},type:"eip712"===e.type?"0x71":"0xff"}:{}})};class Dl extends g.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class $l extends g.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}const Bl={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,assertPosition(e){if(e<0||e>this.bytes.length-1)throw new $l({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Dl({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},incrementPosition(e){if(e<0)throw new Dl({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){const e=this.inspectByte();return this.position++,e},readBytes(e){const t=this.inspectBytes(e);return this.position+=e,t},readUint8(){const e=this.inspectUint8();return this.position+=1,e},readUint16(){const e=this.inspectUint16();return this.position+=2,e},readUint24(){const e=this.inspectUint24();return this.position+=3,e},readUint32(){const e=this.inspectUint32();return this.position+=4,e},setPosition(e){this.assertPosition(e),this.position=e}};function Ul(e,t="hex"){const r=Fl(e),n=function(e){const t=Object.create(Bl);return t.bytes=e,t.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),t}(new Uint8Array(r.length));return r.encode(n),"hex"===t?(0,q.ci)(n.bytes):n.bytes}function Fl(e){return Array.isArray(e)?function(e){const t=e.reduce(((e,t)=>e+t.length),0),r=zl(t);return{length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t));for(const{encode:t}of e)t(n)}}}(e.map((e=>Fl(e)))):function(e){const t="string"==typeof e?(0,ct.nr)(e):e,r=zl(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function zl(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new g.G("Length is too large.")}function Wl(e){if(!e||0===e.length)return[];const t=[];for(let r=0;r{return"customSignature"in(r=e)||"paymaster"in r||"paymasterInput"in r||"gasPerPubdata"in r||"factoryDeps"in r?function(e){const{chainId:t,gas:r,nonce:n,to:i,from:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,customSignature:l,factoryDeps:u,paymaster:h,paymasterInput:d,gasPerPubdata:p,data:f}=e;!function(e){const{chainId:t,to:r,from:n,paymaster:i,paymasterInput:o}=e;if(t<=0)throw new X.hJ({chainId:t});if(r&&!(0,Te.U)(r))throw new Ne.b({address:r});if(n&&!(0,Te.U)(n))throw new Ne.b({address:n});if(i&&!(0,Te.U)(i))throw new Ne.b({address:i});if(i&&!o)throw new g.G("`paymasterInput` must be provided when `paymaster` is defined");if(!i&&o)throw new g.G("`paymaster` must be provided when `paymasterInput` is defined")}(e);const m=[n?(0,q.NC)(n):"0x",c?(0,q.NC)(c):"0x",a?(0,q.NC)(a):"0x",r?(0,q.NC)(r):"0x",i??"0x",s?(0,q.NC)(s):"0x",f??"0x",(0,q.NC)(t),(0,q.NC)(""),(0,q.NC)(""),(0,q.NC)(t),o??"0x",p?(0,q.NC)(p):"0x",u??[],l??"0x",h&&d?[h,d]:[]];return(0,Z.SM)(["0x71",Ul(m)])}(e):function(e,t){const r=Ie(e);return"eip1559"===r?function(e,t){const{chainId:r,gas:n,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:l,data:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=e;if(t<=0)throw new X.hJ({chainId:t});if(o&&!(0,Te.U)(o))throw new Ne.b({address:o});if(n)throw new g.G("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(i&&i>2n**256n-1n)throw new te.Hh({maxFeePerGas:i});if(r&&i&&r>i)throw new te.cs({maxFeePerGas:i,maxPriorityFeePerGas:r})}(e);const h=Wl(l),d=[(0,q.NC)(r),i?(0,q.NC)(i):"0x",c?(0,q.NC)(c):"0x",a?(0,q.NC)(a):"0x",n?(0,q.NC)(n):"0x",o??"0x",s?(0,q.NC)(s):"0x",u??"0x",h];if(t){const e=0n===t.v?"0x":1n===t.v?(0,q.NC)(1):27n===t.v?"0x":(0,q.NC)(1);d.push(e,(0,it.f)(t.r),(0,it.f)(t.s))}return(0,Z.SM)(["0x02",Ul(d)])}(e,t):"eip2930"===r?function(e,t){const{chainId:r,gas:n,data:i,nonce:o,to:s,value:a,accessList:c,gasPrice:l}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=e;if(t<=0)throw new X.hJ({chainId:t});if(o&&!(0,Te.U)(o))throw new Ne.b({address:o});if(r||i)throw new g.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>2n**256n-1n)throw new te.Hh({maxFeePerGas:n})}(e);const u=Wl(c),h=[(0,q.NC)(r),o?(0,q.NC)(o):"0x",l?(0,q.NC)(l):"0x",n?(0,q.NC)(n):"0x",s??"0x",a?(0,q.NC)(a):"0x",i??"0x",u];if(t){const e=0n===t.v?"0x":1n===t.v?(0,q.NC)(1):27n===t.v?"0x":(0,q.NC)(1);h.push(e,(0,it.f)(t.r),(0,it.f)(t.s))}return(0,Z.SM)(["0x01",Ul(h)])}(e,t):function(e,t){const{chainId:r=0,gas:n,data:i,nonce:o,to:s,value:a,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o,accessList:s}=e;if(o&&!(0,Te.U)(o))throw new Ne.b({address:o});if(void 0!==t&&t<=0)throw new X.hJ({chainId:t});if(r||i)throw new g.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>2n**256n-1n)throw new te.Hh({maxFeePerGas:n});if(s)throw new g.G("`accessList` is not a valid Legacy Transaction attribute.")}(e);let l=[o?(0,q.NC)(o):"0x",c?(0,q.NC)(c):"0x",n?(0,q.NC)(n):"0x",s??"0x",a?(0,q.NC)(a):"0x",i??"0x"];if(t){const e=(()=>{if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new re.vl({v:t.v});return e})();l=[...l,(0,q.NC)(e),t.r,t.s]}else r>0&&(l=[...l,(0,q.NC)(r),"0x","0x"]);return Ul(l)}(e,t)}(e,t);var r}},Vl=[{safeNetworkIdentifier:"mainnet",chain:s},{safeNetworkIdentifier:"goerli",chain:a},{safeNetworkIdentifier:"arbitrum",chain:Rl},{chain:Ml},{safeNetworkIdentifier:"optimism",chain:Tl},{chain:jl},{chain:o({id:324,name:"zkSync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]},public:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://explorer.zksync.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}}},{serializers:Hl,formatters:Ll})},{chain:o({id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x21B000Fd62a880b2125A61e36a284BB757b76025",blockCreated:3914906}},testnet:!0})},{chain:o({id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}})}],ql={selectedAccount:null,signedByAccount:null,messageSignature:null,paymentDetails:null,signatureRequested:!1,transactionRequested:!1,transactionHashSubmitted:!1,lastOrderStatus:"",elements:{divPrepare:document.getElementById("prepare"),divError:document.getElementById("message-error"),divSuccess:document.getElementById("success"),divTransactionHash:document.getElementById("pretix-eth-transaction-hash"),aOrderDetailURL:document.getElementById("pretix-order-detail-url"),aNetworkData:document.getElementById("pretix-data-chain-info"),buttonConnect:document.getElementById("btn-connect"),submittedTransactionHash:document.getElementById("pretix-eth-submitted-transaction-hash"),paymentNetworkName:document.getElementById("payment-network-id")},selectors:{paymentSteps:document.querySelectorAll(".pretix-eth-payment-steps")},chains:[],web3Modal:null};function Gl(){return ql.elements.buttonConnect.getAttribute("data-transaction-details-url")}async function Zl(e=!1){if(!e&&null!==ql.paymentDetails)return ql.paymentDetails;const t=await(dn()?.address),r=Gl(),n=await fetch(r+"?"+new URLSearchParams({sender_address:t}));if(n.status>=400)throw"Failed to fetch order details. If this problem persists, please contact the organizer directly.";return await n.json()}function Kl(e){e+="=";const t=decodeURIComponent(document.cookie).split(";");for(let r=0;r{try{const t=JSON.parse(e);if(t.error)throw t.error}catch(e){}};async function tu(){ql.elements.divError.innerHTML="";try{await async function(){if(ql.paymentDetails=await Zl(!0),!0!==ql.paymentDetails.is_signature_submitted)if(!0!==ql.paymentDetails.has_other_unpaid_orders)if((await pn()).chain.id!==ql.paymentDetails.chain_id)try{Ql("switching-chains"),await gn({chainId:ql.paymentDetails.chain_id})}catch(e){console.error(e),Yl("There was an error switching chains. You may have to manually switch to the appropriate chain in your connected wallet, and then try again.")}else await async function(){try{await async function(){if(ql.selectedAccount=await(dn()?.address),ql.paymentDetails=await Zl(),null!==ql.messageSignature&&ql.selectedAccount===ql.signedByAccount)await ru();else if(ql.signatureRequested)console.log("Requesting more than one message signature.");else{Ql("sign-a-message"),ql.signatureRequested=!0;const e=ql.paymentDetails.message,t=cn();if(await t.getBytecode({address:ql.selectedAccount})){const t=async()=>{const e=`https://safe-transaction-${ql.safeNetworkIdentifier}.safe.global/api/v1/safes/${ql.selectedAccount}`;return(await fetch(e)).ok};if(!await t())return Yl("This version of the crypto payment plugin only supports Safe wallet (on supported networks) and EOA wallets. Please connect another wallet."),void(ql.signatureRequested=!1);const r=await fn(e);eu(r);const n=new URL(window.location.origin+window.__validateSignatureUrl);n.searchParams.append("signature",r),n.searchParams.append("sender",ql.selectedAccount);const i=Kl("pretix_csrftoken"),o=await fetch(n.href,{headers:{"Content-Type":"application/x-www-form-urlencoded","X-CSRF-TOKEN":i,"HTTP-X-CSRFTOKEN":i},method:"GET"});if(ql.messageSignature=r,ql.signedByAccount=ql.selectedAccount,!o.ok)return Yl("EIP1271 validation error: unable to verify signature; your wallet may not be supported."),void(ql.signatureRequested=!1);await ru()}else{const t=await fn(e);eu(t),ql.messageSignature=t,ql.signedByAccount=ql.selectedAccount,await ru()}}}()}catch(e){Yl(e),ql.signatureRequested=!1}}();else Yl("Please wait for other payments from your wallet to be confirmed before submitting another transaction.");else Yl("It seems that you have paid for this order already.")}()}catch(e){Yl(e,!0)}}async function ru(){try{await async function(){if(!0!==ql.transactionRequested)if(ql.transactionRequested=!0,ql.paymentDetails=await Zl(),null!==ql.paymentDetails.erc20_contract_address){const e=ql.paymentDetails.erc20_contract_address,r=await un({abi:sn,address:e,functionName:"balanceOf",args:[ql.selectedAccount]});if(BigInt(r)"name"in e&&e.name===s)),chainId:i},result:_}}(o);n=s.request}return{hash:await r.writeContract({...n,chain:e.chainId?{id:e.chainId}:null})}}({abi:sn,address:e,functionName:"transfer",args:[ql.paymentDetails.recipient_address,ql.paymentDetails.amount]});if(!Xl(r.hash))throw"Invalid transaction hash";eu(r),await nu(r.hash)}catch(e){Yl(e)}}else{Ql("send-transaction");try{const e=await async function({accessList:e,account:r,chainId:n,data:o,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,mode:u,nonce:h,to:d,value:p}){const g=await ln({chainId:n});if(!g)throw new t;let m;return n&&wn({chainId:n}),m="prepared"===u?{account:r,accessList:e,chain:null,data:o,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:h,to:d,value:p}:await async function({accessList:e,account:r,chainId:n,data:o,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:h,value:d,walletClient:p}){const g=cn({chainId:n}),m=p??await ln({chainId:n});if(!m)throw new t;n&&wn({chainId:n});const y=(h&&!(0,Te.U)(h)?await async function({chainId:e,name:t}){const{normalize:r}=await Promise.resolve().then(i.bind(i,4849)),n=cn({chainId:e}),o=await n.getEnsAddress({name:r(t)});try{return"0x0000000000000000000000000000000000000000"===o?null:o?(0,f.K)(o):null}catch(e){return null}}({name:h}):h)||void 0;if(y&&!(0,Te.U)(y))throw new Error("Invalid address");return{accessList:e,account:r,data:o,gas:void 0===s?await g.estimateGas({accessList:e,account:m.account,data:o,gas:s??void 0,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:y,value:d}):s||void 0,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,mode:"prepared",nonce:u,to:y,value:d,...n?{chainId:n}:{}}}({accessList:e,account:r,chainId:n,data:o,gas:s||null,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:h,to:d,value:p}),{hash:await g.sendTransaction({...m,chain:n?{id:n}:null})}}({to:ql.paymentDetails.recipient_address,value:ql.paymentDetails.amount});if(!Xl(e.hash))throw"Invalid transaction hash";await nu(e.hash)}catch(e){Yl(e)}}else console.log("Transaction was already submitted.")}()}catch(e){Yl(e,!0)}}async function nu(e){try{await async function(e){const t=await(async e=>{try{const t=`https://safe-transaction-${ql.safeNetworkIdentifier}.safe.global/api/v1/multisig-transactions/${e}`;if((await fetch(t)).ok)return t}catch(e){return}})(e),r=Kl("pretix_csrftoken"),n=Gl();let i=new URLSearchParams({signedMessage:ql.messageSignature,transactionHash:e,selectedAccount:ql.signedByAccount,csrfmiddlewaretoken:r});t&&i.append("safeAppTransactionUrl",t),fetch(n,{headers:{"Content-Type":"application/x-www-form-urlencoded","X-CSRF-TOKEN":r,"HTTP-X-CSRFTOKEN":r},method:"POST",body:i}).then((async r=>{r.ok?(function(e,t){ql.transactionHashSubmitted=!0;const r=ql.elements.aNetworkData.getAttribute("data-chain-id");ql.elements.divTransactionHash.innerHTML=t||function(e,t){const r=Vl.filter((t=>t.chain.id===parseInt(e)));let n;r&&(n=r[0].chain);const i=n?.blockExplorers?.etherscan?.url;return i?''+t+"":t}(r,e),Ql(),ql.elements.divSuccess.style.display="block"}(e,t),await async function(){for(;;)await Jl(),await new Promise((e=>setTimeout(e,5e3)))}()):Yl("There was an error processing your payment, please contact support. Your payment was sent in transaction "+e+".",!1)}))}(e)}catch(e){Yl(e,!0)}}!async function(){const e=ql.elements.buttonConnect.getAttribute("data-chain-id"),t=document.getElementById("web3modal").getAttribute("data-walletconnect-id");document.title="Pretix Payment";const r=Vl.filter((t=>t.chain.id===parseInt(e)));if(r.length<1)return void Yl("Invalid chain ID");const n=(window.location.origin,[r[0].chain,r[0].chain]),i=Pl({chains:n,projectId:t,appName:"Pretix Payment Plugin"});let o;var s,a;ql.web3Modal=(s={wagmiConfig:i,projectId:t,chains:n,themeMode:"light"},Ol||(Ol=new lc({...s,_sdkVersion:`react-wagmi-${oc.VERSION}`}),(a=Ol)&&(bn=a)),Ol),ql.safeNetworkIdentifier=r[0].safeNetworkIdentifier,mn((async e=>{if("connecting"===o&&"connected"===e.status)try{await tu()}catch(e){Yl(e)}o=e.status})),yn((()=>{Ql("prepare")})),ql.elements.divPrepare.style.display="block",document.getElementById("spinner").style.display="none",ql.elements.buttonConnect.addEventListener("click",(async()=>{try{await async function(){try{if((await dn()).isConnected)return!0;await ql.web3Modal.open()}catch(e){throw console.error(e,"Sign in failed"),e}return!1}()&&await tu()}catch(e){Yl(error)}}))}()})()})(); \ No newline at end of file diff --git a/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.4411707096ff89c614b4.js.LICENSE.txt b/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.0d8a283067a5e9dbd598.js.LICENSE.txt similarity index 80% rename from pretix_eth/static/pretix_eth/web3modal-dist/web3modal.4411707096ff89c614b4.js.LICENSE.txt rename to pretix_eth/static/pretix_eth/web3modal-dist/web3modal.0d8a283067a5e9dbd598.js.LICENSE.txt index 78c73950..eeb8d002 100644 --- a/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.4411707096ff89c614b4.js.LICENSE.txt +++ b/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.0d8a283067a5e9dbd598.js.LICENSE.txt @@ -22,6 +22,8 @@ PERFORMANCE OF THIS SOFTWARE. /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ + /** * @license * Copyright 2017 Google LLC @@ -40,6 +42,12 @@ PERFORMANCE OF THIS SOFTWARE. * SPDX-License-Identifier: BSD-3-Clause */ +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ + /** * @license * Copyright 2021 Google LLC @@ -54,3 +62,13 @@ PERFORMANCE OF THIS SOFTWARE. * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ + +/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ diff --git a/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.177d8cabdae10dcc5990.js b/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.177d8cabdae10dcc5990.js deleted file mode 100644 index 9650b9b8..00000000 --- a/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.177d8cabdae10dcc5990.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";const e=[{safeNetworkIdentifier:"mainnet",chain:{id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}},{safeNetworkIdentifier:"goerli",chain:{id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}},{safeNetworkIdentifier:"arbitrum",chain:{id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}},{chain:{id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io/"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}},{safeNetworkIdentifier:"optimism",chain:{id:10,name:"Optimism",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}}},{chain:{id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0}},{chain:{id:324,name:"zkSync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]},public:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://explorer.zksync.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}}}},{chain:{id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}},{chain:{id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}}}}],t={selectedAccount:null,signedByAccount:null,messageSignature:null,paymentDetails:null,signatureRequested:!1,transactionRequested:!1,transactionHashSubmitted:!1,lastOrderStatus:"",elements:{divPrepare:document.getElementById("prepare"),divError:document.getElementById("message-error"),divSuccess:document.getElementById("success"),divTransactionHash:document.getElementById("pretix-eth-transaction-hash"),aOrderDetailURL:document.getElementById("pretix-order-detail-url"),aNetworkData:document.getElementById("pretix-data-chain-info"),buttonConnect:document.getElementById("btn-connect"),submittedTransactionHash:document.getElementById("pretix-eth-submitted-transaction-hash"),paymentNetworkName:document.getElementById("payment-network-id")},selectors:{paymentSteps:document.querySelectorAll(".pretix-eth-payment-steps")},chains:[],web3Modal:null};async function a(){let e=t.elements.aOrderDetailURL.getAttribute("data-order-detail-url");const a=function(e){e+="=";const t=decodeURIComponent(document.cookie).split(";");for(let a=0;a{const r=t.elements.submittedTransactionHash;if(null!==r){const s=t.elements.aNetworkData.getAttribute("data-chain-id"),i=r.innerText;r.innerHTML=function(t,a){const r=e.filter((e=>e.chain.id===parseInt(t)));let s;r&&(s=r[0].chain);const i=s?.blockExplorers?.etherscan?.url;return i?''+a+"":a}(s,i),await async function(){for(;;)await a(),await new Promise((e=>setTimeout(e,5e3)))}()}}))})(); \ No newline at end of file diff --git a/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.30b71e763c28fe96ef2e.js b/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.30b71e763c28fe96ef2e.js new file mode 100644 index 00000000..13198d6b --- /dev/null +++ b/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.30b71e763c28fe96ef2e.js @@ -0,0 +1 @@ +(()=>{"use strict";function e(e,t={}){const{fees:n=e.fees,formatters:r=e.formatters,serializers:a=e.serializers}=t;return{...e,fees:n,formatters:r,serializers:a}}const t=e({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),n=e({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),r=e({id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),a=e({id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0});class s extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"viem@1.21.3"});const n=t.cause instanceof s?t.cause.details:t.cause?.message?t.cause.message:t.details,r=t.cause instanceof s&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...r?[`Docs: https://viem.sh${r}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=r,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return i(this,e)}}function i(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e?i(e.cause,t):t?null:e}class o extends s{constructor({max:e,min:t,signed:n,size:r,value:a}){super(`Number "${a}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class c extends s{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}function l(e){return function(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function u(e,{size:t}){if(l(e)>t)throw new c({givenSize:l(e),maxSize:t})}function h(e,t={}){const{signed:n}=t;t.size&&u(e,{size:t.size});const r=BigInt(e);if(!n)return r;const a=(e.length-2)/2;return r<=(1n<<8n*BigInt(a)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*a,"f")}`)-1n}function d(e,t={}){return Number(h(e,t))}function p(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{const a=t(e);if(n)for(const e of n)delete a[e];return{...a,...r(e)}},type:e})}const m={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function f(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?d(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?d(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?m[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}const b=p("transaction",f);function g(e){const t=e.transactions?.map((e=>"string"==typeof e?e:f(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const y=p("block",g);function x(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const v={"0x0":"reverted","0x1":"success"};function w(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>x(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?d(e.transactionIndex):null,status:e.status?v[e.status]:null,type:e.type?m[e.type]||e.type:null}}const P=p("transactionReceipt",w),I={block:y({format(e){const t=e.transactions?.map((e=>{if("string"==typeof e)return e;const t=f(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?h(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}));return{transactions:t,stateRoot:e.stateRoot}}}),transaction:b({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?h(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:P({format:e=>({l1GasPrice:e.l1GasPrice?h(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?h(e.l1GasUsed):null,l1Fee:e.l1Fee?h(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},k=e({id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}},{formatters:I}),B=e({id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0},{formatters:I});class E extends s{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}function F(e,{dir:t,size:n=32}={}){return"string"==typeof e?function(e,{dir:t,size:n=32}={}){if(null===n)return e;const r=e.replace("0x","");if(r.length>2*n)throw new E({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===t?"padEnd":"padStart"](2*n,"0")}`}(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new E({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let a=0;a=$.zero&&e<=$.nine?e-$.zero:e>=$.A&&e<=$.F?e-($.A-10):e>=$.a&&e<=$.f?e-($.a-10):void 0}function G(e,t={}){let n=e;t.size&&(u(n,{size:t.size}),n=F(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const a=r.length/2,i=new Uint8Array(a);for(let e=0,t=0;et.toString(16).padStart(2,"0")));function T(e,t={}){return"number"==typeof e||"bigint"==typeof e?O(e,t):"string"==typeof e?function(e,t={}){return U(N.encode(e),t)}(e,t):"boolean"==typeof e?function(e,t={}){const n=`0x${Number(e)}`;return"number"==typeof t.size?(u(n,{size:t.size}),F(n,{size:t.size})):n}(e,t):U(e,t)}function U(e,t={}){let n="";for(let t=0;ts||a{if("string"==typeof e)return e;const t=H.transaction.format(e);return"0x71"===t.typeHex?t.type="eip712":"0xff"===t.typeHex&&(t.type="priority"),t}));return{l1BatchNumber:e.l1BatchNumber?h(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?h(e.l1BatchTimestamp):null,transactions:t}}}),transaction:b({format(e){const t={};return"0x71"===e.type?t.type="eip712":"0xff"===e.type&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?h(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?h(e.l1BatchTxIndex):null}}}),transactionReceipt:P({format:e=>({l1BatchNumber:e.l1BatchNumber?h(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?h(e.l1BatchTxIndex):null,logs:e.logs.map((e=>({...x(e),l1BatchNumber:e.l1BatchNumber?h(e.l1BatchNumber):null,transactionLogIndex:d(e.transactionLogIndex),logType:e.logType}))),l2ToL1Logs:e.l2ToL1Logs.map((e=>({blockNumber:h(e.blockHash),blockHash:e.blockHash,l1BatchNumber:h(e.l1BatchNumber),transactionIndex:h(e.transactionIndex),shardId:h(e.shardId),isService:e.isService,sender:e.sender,key:e.key,value:e.value,transactionHash:e.transactionHash,logIndex:h(e.logIndex)})))})}),transactionRequest:C({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format:e=>e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:T(e.gasPerPubdata)}:{},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(G(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps}:{},...e.customSignature?{customSignature:e.customSignature}:{}},type:"eip712"===e.type?"0x71":"0xff"}:{}})};class M extends s{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}class L extends s{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}const D=/^0x[a-fA-F0-9]{40}$/;function R(e){return D.test(e)}function V(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}class q extends s{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class K extends s{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}const _={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,assertPosition(e){if(e<0||e>this.bytes.length-1)throw new K({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new q({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},incrementPosition(e){if(e<0)throw new q({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){const e=this.inspectByte();return this.position++,e},readBytes(e){const t=this.inspectBytes(e);return this.position+=e,t},readUint8(){const e=this.inspectUint8();return this.position+=1,e},readUint16(){const e=this.inspectUint16();return this.position+=2,e},readUint24(){const e=this.inspectUint24();return this.position+=3,e},readUint32(){const e=this.inspectUint32();return this.position+=4,e},setPosition(e){this.assertPosition(e),this.position=e}};function X(e,t="hex"){const n=W(e),r=function(e){const t=Object.create(_);return t.bytes=e,t.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),t}(new Uint8Array(n.length));return n.encode(r),"hex"===t?U(r.bytes):r.bytes}function W(e){return Array.isArray(e)?function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=J(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t));for(const{encode:t}of e)t(r)}}}(e.map((e=>W(e)))):function(e){const t="string"==typeof e?G(e):e,n=J(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function J(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new s("Length is too large.")}function Q(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),n=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`)).join("\n")}class Y extends s{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class Z extends s{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Q(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class ee extends s{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}function te(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,r=0;for(let e=0;e{return"customSignature"in(n=e)||"paymaster"in n||"paymasterInput"in n||"gasPerPubdata"in n||"factoryDeps"in n?function(e){const{chainId:t,gas:n,nonce:r,to:a,from:i,value:o,maxFeePerGas:c,maxPriorityFeePerGas:l,customSignature:u,factoryDeps:h,paymaster:d,paymasterInput:p,gasPerPubdata:m,data:f}=e;return function(e){const{chainId:t,to:n,from:r,paymaster:a,paymasterInput:i}=e;if(t<=0)throw new L({chainId:t});if(n&&!R(n))throw new M({address:n});if(r&&!R(r))throw new M({address:r});if(a&&!R(a))throw new M({address:a});if(a&&!i)throw new s("`paymasterInput` must be provided when `paymaster` is defined");if(!a&&i)throw new s("`paymaster` must be provided when `paymasterInput` is defined")}(e),V(["0x71",X([r?T(r):"0x",l?T(l):"0x",c?T(c):"0x",n?T(n):"0x",a??"0x",o?T(o):"0x",f??"0x",T(t),T(""),T(""),T(t),i??"0x",m?T(m):"0x",h??[],u??"0x",d&&p?[d,p]:[]])])}(e):function(e,t){const n=function(e){if(e.type)return e.type;if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new Z({transaction:e})}(e);return"eip1559"===n?function(e,t){const{chainId:n,gas:r,nonce:a,to:i,value:o,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:h}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:a,to:i}=e;if(t<=0)throw new L({chainId:t});if(i&&!R(i))throw new M({address:i});if(r)throw new s("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(a&&a>2n**256n-1n)throw new se({maxFeePerGas:a});if(n&&a&&n>a)throw new ie({maxFeePerGas:a,maxPriorityFeePerGas:n})}(e);const d=oe(u),p=[T(n),a?T(a):"0x",l?T(l):"0x",c?T(c):"0x",r?T(r):"0x",i??"0x",o?T(o):"0x",h??"0x",d];if(t){const e=0n===t.v?"0x":1n===t.v?T(1):27n===t.v?"0x":T(1);p.push(e,te(t.r),te(t.s))}return V(["0x02",X(p)])}(e,t):"eip2930"===n?function(e,t){const{chainId:n,gas:r,data:a,nonce:i,to:o,value:c,accessList:l,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:a,to:i}=e;if(t<=0)throw new L({chainId:t});if(i&&!R(i))throw new M({address:i});if(n||a)throw new s("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>2n**256n-1n)throw new se({maxFeePerGas:r})}(e);const h=oe(l),d=[T(n),i?T(i):"0x",u?T(u):"0x",r?T(r):"0x",o??"0x",c?T(c):"0x",a??"0x",h];if(t){const e=0n===t.v?"0x":1n===t.v?T(1):27n===t.v?"0x":T(1);d.push(e,te(t.r),te(t.s))}return V(["0x01",X(d)])}(e,t):function(e,t){const{chainId:n=0,gas:r,data:a,nonce:i,to:o,value:c,gasPrice:l}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:a,to:i,accessList:o}=e;if(i&&!R(i))throw new M({address:i});if(void 0!==t&&t<=0)throw new L({chainId:t});if(n||a)throw new s("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>2n**256n-1n)throw new se({maxFeePerGas:r});if(o)throw new s("`accessList` is not a valid Legacy Transaction attribute.")}(e);let u=[i?T(i):"0x",l?T(l):"0x",r?T(r):"0x",o??"0x",c?T(c):"0x",a??"0x"];if(t){const e=(()=>{if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new Y({v:t.v});return e})();u=[...u,T(e),t.r,t.s]}else n>0&&(u=[...u,T(n),"0x","0x"]);return X(u)}(e,t)}(e,t);var n}},formatters:H})},{chain:e({id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x21B000Fd62a880b2125A61e36a284BB757b76025",blockCreated:3914906}},testnet:!0})},{chain:e({id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}})}],le={selectedAccount:null,signedByAccount:null,messageSignature:null,paymentDetails:null,signatureRequested:!1,transactionRequested:!1,transactionHashSubmitted:!1,lastOrderStatus:"",elements:{divPrepare:document.getElementById("prepare"),divError:document.getElementById("message-error"),divSuccess:document.getElementById("success"),divTransactionHash:document.getElementById("pretix-eth-transaction-hash"),aOrderDetailURL:document.getElementById("pretix-order-detail-url"),aNetworkData:document.getElementById("pretix-data-chain-info"),buttonConnect:document.getElementById("btn-connect"),submittedTransactionHash:document.getElementById("pretix-eth-submitted-transaction-hash"),paymentNetworkName:document.getElementById("payment-network-id")},selectors:{paymentSteps:document.querySelectorAll(".pretix-eth-payment-steps")},chains:[],web3Modal:null};async function ue(){let e=le.elements.aOrderDetailURL.getAttribute("data-order-detail-url");const t=function(e){e+="=";const t=decodeURIComponent(document.cookie).split(";");for(let n=0;n{const e=le.elements.submittedTransactionHash;if(null!==e){const t=le.elements.aNetworkData.getAttribute("data-chain-id"),n=e.innerText;e.innerHTML=function(e,t){const n=ce.filter((t=>t.chain.id===parseInt(e)));let r;n&&(r=n[0].chain);const a=r?.blockExplorers?.etherscan?.url;return a?''+t+"":t}(t,n),await async function(){for(;;)await ue(),await new Promise((e=>setTimeout(e,5e3)))}()}}))})(); \ No newline at end of file diff --git a/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.4411707096ff89c614b4.js b/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.4411707096ff89c614b4.js deleted file mode 100644 index 335e7fde..00000000 --- a/pretix_eth/static/pretix_eth/web3modal-dist/web3modal.4411707096ff89c614b4.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see web3modal.4411707096ff89c614b4.js.LICENSE.txt */ -(()=>{var e={8099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7117);function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function o(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function s(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function a(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function l(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function u(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),u(e/4294967296>>>0,t,r),u(e>>>0,t,r+4),t}function p(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),h(e>>>0,t,r),h(e/4294967296>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=o,t.writeInt16LE=o,t.readInt32BE=s,t.readUint32BE=a,t.readInt32LE=c,t.readUint32LE=l,t.writeUint32BE=u,t.writeInt32BE=u,t.writeUint32LE=h,t.writeInt32LE=h,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=s(e,t),n=s(e,t+4);return 4294967296*r+n-4294967296*(n>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*a(e,t)+a(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 4294967296*c(e,t+4)+r-4294967296*(r>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=l(e,t);return 4294967296*l(e,t+4)+r},t.writeUint64BE=d,t.writeInt64BE=d,t.writeUint64LE=p,t.writeInt64LE=p,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=e/8+r-1;o>=r;o--)n+=t[o]*i,i*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o=i;s--)r[s]=t/o&255,o*=256;return r},t.writeUintLE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,s=i;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8099),i=r(7309),o=20;function s(e,t,r){for(var i=1634760805,s=857760878,a=2036477234,c=1797285236,l=r[3]<<24|r[2]<<16|r[1]<<8|r[0],u=r[7]<<24|r[6]<<16|r[5]<<8|r[4],h=r[11]<<24|r[10]<<16|r[9]<<8|r[8],d=r[15]<<24|r[14]<<16|r[13]<<8|r[12],p=r[19]<<24|r[18]<<16|r[17]<<8|r[16],f=r[23]<<24|r[22]<<16|r[21]<<8|r[20],m=r[27]<<24|r[26]<<16|r[25]<<8|r[24],g=r[31]<<24|r[30]<<16|r[29]<<8|r[28],w=t[3]<<24|t[2]<<16|t[1]<<8|t[0],b=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],y=t[15]<<24|t[14]<<16|t[13]<<8|t[12],x=i,A=s,C=a,E=c,I=l,_=u,P=h,O=d,S=p,k=f,M=m,T=g,N=w,j=b,R=v,L=y,B=0;B>>16|N<<16)|0)>>>20|I<<12,_=(_^=k=k+(j=(j^=A=A+_|0)>>>16|j<<16)|0)>>>20|_<<12,P=(P^=M=M+(R=(R^=C=C+P|0)>>>16|R<<16)|0)>>>20|P<<12,O=(O^=T=T+(L=(L^=E=E+O|0)>>>16|L<<16)|0)>>>20|O<<12,P=(P^=M=M+(R=(R^=C=C+P|0)>>>24|R<<8)|0)>>>25|P<<7,O=(O^=T=T+(L=(L^=E=E+O|0)>>>24|L<<8)|0)>>>25|O<<7,_=(_^=k=k+(j=(j^=A=A+_|0)>>>24|j<<8)|0)>>>25|_<<7,I=(I^=S=S+(N=(N^=x=x+I|0)>>>24|N<<8)|0)>>>25|I<<7,_=(_^=M=M+(L=(L^=x=x+_|0)>>>16|L<<16)|0)>>>20|_<<12,P=(P^=T=T+(N=(N^=A=A+P|0)>>>16|N<<16)|0)>>>20|P<<12,O=(O^=S=S+(j=(j^=C=C+O|0)>>>16|j<<16)|0)>>>20|O<<12,I=(I^=k=k+(R=(R^=E=E+I|0)>>>16|R<<16)|0)>>>20|I<<12,O=(O^=S=S+(j=(j^=C=C+O|0)>>>24|j<<8)|0)>>>25|O<<7,I=(I^=k=k+(R=(R^=E=E+I|0)>>>24|R<<8)|0)>>>25|I<<7,P=(P^=T=T+(N=(N^=A=A+P|0)>>>24|N<<8)|0)>>>25|P<<7,_=(_^=M=M+(L=(L^=x=x+_|0)>>>24|L<<8)|0)>>>25|_<<7;n.writeUint32LE(x+i|0,e,0),n.writeUint32LE(A+s|0,e,4),n.writeUint32LE(C+a|0,e,8),n.writeUint32LE(E+c|0,e,12),n.writeUint32LE(I+l|0,e,16),n.writeUint32LE(_+u|0,e,20),n.writeUint32LE(P+h|0,e,24),n.writeUint32LE(O+d|0,e,28),n.writeUint32LE(S+p|0,e,32),n.writeUint32LE(k+f|0,e,36),n.writeUint32LE(M+m|0,e,40),n.writeUint32LE(T+g|0,e,44),n.writeUint32LE(N+w|0,e,48),n.writeUint32LE(j+b|0,e,52),n.writeUint32LE(R+v|0,e,56),n.writeUint32LE(L+y|0,e,60)}function a(e,t,r,n,o){if(void 0===o&&(o=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=a,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),a(e,t,r,r,n)}},5501:(e,t,r)=>{"use strict";var n=r(5439),i=r(3027),o=r(7309),s=r(8099),a=r(4153);t.Cv=32,t.WH=12,t.pg=16;var c=new Uint8Array(16),l=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);n.stream(this._key,s,a,4);var c,l=t.length+this.tagLength;if(i){if(i.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");c=i}else c=new Uint8Array(l);return n.streamXOR(this._key,s,t,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),r),o.wipe(s),c},e.prototype.open=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&a.update(c.subarray(n.length%16))),a.update(r),r.length%16>0&&a.update(c.subarray(r.length%16));var l=new Uint8Array(8);n&&s.writeUint64LE(n.length,l),a.update(l),s.writeUint64LE(r.length,l),a.update(l);for(var u=a.digest(),h=0;h{"use strict";function r(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,r){return~(e-1)&t|e-1&r},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=r,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==r(e,t)}},1050:(e,t,r)=>{"use strict";t.Xx=t._w=t.aP=t.KS=t.jQ=void 0;r(1416);const n=r(3350);r(7309);function i(e){const t=new Float64Array(16);if(e)for(let r=0;r>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,d(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}function f(e){const t=new Uint8Array(32);return p(t,e),1&t[0]}function m(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function g(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function w(e,t,r){let n,i,o=0,s=0,a=0,c=0,l=0,u=0,h=0,d=0,p=0,f=0,m=0,g=0,w=0,b=0,v=0,y=0,x=0,A=0,C=0,E=0,I=0,_=0,P=0,O=0,S=0,k=0,M=0,T=0,N=0,j=0,R=0,L=r[0],B=r[1],$=r[2],U=r[3],D=r[4],z=r[5],W=r[6],F=r[7],H=r[8],q=r[9],V=r[10],G=r[11],K=r[12],Z=r[13],Q=r[14],Y=r[15];n=t[0],o+=n*L,s+=n*B,a+=n*$,c+=n*U,l+=n*D,u+=n*z,h+=n*W,d+=n*F,p+=n*H,f+=n*q,m+=n*V,g+=n*G,w+=n*K,b+=n*Z,v+=n*Q,y+=n*Y,n=t[1],s+=n*L,a+=n*B,c+=n*$,l+=n*U,u+=n*D,h+=n*z,d+=n*W,p+=n*F,f+=n*H,m+=n*q,g+=n*V,w+=n*G,b+=n*K,v+=n*Z,y+=n*Q,x+=n*Y,n=t[2],a+=n*L,c+=n*B,l+=n*$,u+=n*U,h+=n*D,d+=n*z,p+=n*W,f+=n*F,m+=n*H,g+=n*q,w+=n*V,b+=n*G,v+=n*K,y+=n*Z,x+=n*Q,A+=n*Y,n=t[3],c+=n*L,l+=n*B,u+=n*$,h+=n*U,d+=n*D,p+=n*z,f+=n*W,m+=n*F,g+=n*H,w+=n*q,b+=n*V,v+=n*G,y+=n*K,x+=n*Z,A+=n*Q,C+=n*Y,n=t[4],l+=n*L,u+=n*B,h+=n*$,d+=n*U,p+=n*D,f+=n*z,m+=n*W,g+=n*F,w+=n*H,b+=n*q,v+=n*V,y+=n*G,x+=n*K,A+=n*Z,C+=n*Q,E+=n*Y,n=t[5],u+=n*L,h+=n*B,d+=n*$,p+=n*U,f+=n*D,m+=n*z,g+=n*W,w+=n*F,b+=n*H,v+=n*q,y+=n*V,x+=n*G,A+=n*K,C+=n*Z,E+=n*Q,I+=n*Y,n=t[6],h+=n*L,d+=n*B,p+=n*$,f+=n*U,m+=n*D,g+=n*z,w+=n*W,b+=n*F,v+=n*H,y+=n*q,x+=n*V,A+=n*G,C+=n*K,E+=n*Z,I+=n*Q,_+=n*Y,n=t[7],d+=n*L,p+=n*B,f+=n*$,m+=n*U,g+=n*D,w+=n*z,b+=n*W,v+=n*F,y+=n*H,x+=n*q,A+=n*V,C+=n*G,E+=n*K,I+=n*Z,_+=n*Q,P+=n*Y,n=t[8],p+=n*L,f+=n*B,m+=n*$,g+=n*U,w+=n*D,b+=n*z,v+=n*W,y+=n*F,x+=n*H,A+=n*q,C+=n*V,E+=n*G,I+=n*K,_+=n*Z,P+=n*Q,O+=n*Y,n=t[9],f+=n*L,m+=n*B,g+=n*$,w+=n*U,b+=n*D,v+=n*z,y+=n*W,x+=n*F,A+=n*H,C+=n*q,E+=n*V,I+=n*G,_+=n*K,P+=n*Z,O+=n*Q,S+=n*Y,n=t[10],m+=n*L,g+=n*B,w+=n*$,b+=n*U,v+=n*D,y+=n*z,x+=n*W,A+=n*F,C+=n*H,E+=n*q,I+=n*V,_+=n*G,P+=n*K,O+=n*Z,S+=n*Q,k+=n*Y,n=t[11],g+=n*L,w+=n*B,b+=n*$,v+=n*U,y+=n*D,x+=n*z,A+=n*W,C+=n*F,E+=n*H,I+=n*q,_+=n*V,P+=n*G,O+=n*K,S+=n*Z,k+=n*Q,M+=n*Y,n=t[12],w+=n*L,b+=n*B,v+=n*$,y+=n*U,x+=n*D,A+=n*z,C+=n*W,E+=n*F,I+=n*H,_+=n*q,P+=n*V,O+=n*G,S+=n*K,k+=n*Z,M+=n*Q,T+=n*Y,n=t[13],b+=n*L,v+=n*B,y+=n*$,x+=n*U,A+=n*D,C+=n*z,E+=n*W,I+=n*F,_+=n*H,P+=n*q,O+=n*V,S+=n*G,k+=n*K,M+=n*Z,T+=n*Q,N+=n*Y,n=t[14],v+=n*L,y+=n*B,x+=n*$,A+=n*U,C+=n*D,E+=n*z,I+=n*W,_+=n*F,P+=n*H,O+=n*q,S+=n*V,k+=n*G,M+=n*K,T+=n*Z,N+=n*Q,j+=n*Y,n=t[15],y+=n*L,x+=n*B,A+=n*$,C+=n*U,E+=n*D,I+=n*z,_+=n*W,P+=n*F,O+=n*H,S+=n*q,k+=n*V,M+=n*G,T+=n*K,N+=n*Z,j+=n*Q,R+=n*Y,o+=38*x,s+=38*A,a+=38*C,c+=38*E,l+=38*I,u+=38*_,h+=38*P,d+=38*O,p+=38*S,f+=38*k,m+=38*M,g+=38*T,w+=38*N,b+=38*j,v+=38*R,i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,o+=i-1+37*(i-1),i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=l,e[5]=u,e[6]=h,e[7]=d,e[8]=p,e[9]=f,e[10]=m,e[11]=g,e[12]=w,e[13]=b,e[14]=v,e[15]=y}function b(e,t){w(e,t,t)}function v(e,t){const r=i(),n=i(),o=i(),s=i(),c=i(),l=i(),u=i(),h=i(),d=i();g(r,e[1],e[0]),g(d,t[1],t[0]),w(r,r,d),m(n,e[0],e[1]),m(d,t[0],t[1]),w(n,n,d),w(o,e[3],t[3]),w(o,o,a),w(s,e[2],t[2]),m(s,s,s),g(c,n,r),g(l,s,o),m(u,s,o),m(h,n,r),w(e[0],c,l),w(e[1],h,u),w(e[2],u,l),w(e[3],c,h)}function y(e,t,r){for(let n=0;n<4;n++)d(e[n],t[n],r)}function x(e,t){const r=i(),n=i(),o=i();(function(e,t){const r=i();let n;for(n=0;n<16;n++)r[n]=t[n];for(n=253;n>=0;n--)b(r,r),2!==n&&4!==n&&w(r,r,t);for(n=0;n<16;n++)e[n]=r[n]})(o,t[2]),w(r,t[0],o),w(n,t[1],o),p(e,n),e[31]^=f(r)<<7}function A(e,t){const r=[i(),i(),i(),i()];u(r[0],c),u(r[1],l),u(r[2],s),w(r[3],c,l),function(e,t,r){u(e[0],o),u(e[1],s),u(e[2],s),u(e[3],o);for(let n=255;n>=0;--n){const i=r[n/8|0]>>(7&n)&1;y(e,t,i),v(t,e),v(e,e),y(e,t,i)}}(e,r,t)}t._w=function(e){if(e.length!==t.aP)throw new Error(`ed25519: seed must be ${t.aP} bytes`);const r=(0,n.hash)(e);r[0]&=248,r[31]&=127,r[31]|=64;const o=new Uint8Array(32),s=[i(),i(),i(),i()];A(s,r),x(o,s);const a=new Uint8Array(64);return a.set(e),a.set(o,32),{publicKey:o,secretKey:a}};const C=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function E(e,t){let r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>4)*C[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*C[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function I(e){const t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let t=0;t<64;t++)e[t]=0;E(e,t)}t.Xx=function(e,t){const r=new Float64Array(64),o=[i(),i(),i(),i()],s=(0,n.hash)(e.subarray(0,32));s[0]&=248,s[31]&=127,s[31]|=64;const a=new Uint8Array(64);a.set(s.subarray(32),32);const c=new n.SHA512;c.update(a.subarray(32)),c.update(t);const l=c.digest();c.clean(),I(l),A(o,l),x(a,o),c.reset(),c.update(a.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const u=c.digest();I(u);for(let e=0;e<32;e++)r[e]=l[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=u[e]*s[t];return E(a.subarray(32),r),a}},9984:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState}},512:(e,t,r)=>{"use strict";var n=r(5629),i=r(7309),o=function(){function e(e,t,r,i){void 0===r&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=n.hmac(this._hash,r,t);this._hmac=new n.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9984),i=r(4153),o=r(7309),s=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(r).clean():r.set(t);for(var i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},3027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4153),i=r(7309);t.DIGEST_LENGTH=16;var o=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=8191&r;var n=e[2]|e[3]<<8;this._r[1]=8191&(r>>>13|n<<3);var i=e[4]|e[5]<<8;this._r[2]=7939&(n>>>10|i<<6);var o=e[6]|e[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=e[8]|e[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=e[10]|e[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var l=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|l<<8),this._r[9]=l>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,r){for(var n=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],c=this._h[4],l=this._h[5],u=this._h[6],h=this._h[7],d=this._h[8],p=this._h[9],f=this._r[0],m=this._r[1],g=this._r[2],w=this._r[3],b=this._r[4],v=this._r[5],y=this._r[6],x=this._r[7],A=this._r[8],C=this._r[9];r>=16;){var E=e[t+0]|e[t+1]<<8;i+=8191&E;var I=e[t+2]|e[t+3]<<8;o+=8191&(E>>>13|I<<3);var _=e[t+4]|e[t+5]<<8;s+=8191&(I>>>10|_<<6);var P=e[t+6]|e[t+7]<<8;a+=8191&(_>>>7|P<<9);var O=e[t+8]|e[t+9]<<8;c+=8191&(P>>>4|O<<12),l+=O>>>1&8191;var S=e[t+10]|e[t+11]<<8;u+=8191&(O>>>14|S<<2);var k=e[t+12]|e[t+13]<<8;h+=8191&(S>>>11|k<<5);var M=e[t+14]|e[t+15]<<8,T=0,N=T;N+=i*f,N+=o*(5*C),N+=s*(5*A),N+=a*(5*x),T=(N+=c*(5*y))>>>13,N&=8191,N+=l*(5*v),N+=u*(5*b),N+=h*(5*w),N+=(d+=8191&(k>>>8|M<<8))*(5*g);var j=T+=(N+=(p+=M>>>5|n)*(5*m))>>>13;j+=i*m,j+=o*f,j+=s*(5*C),j+=a*(5*A),T=(j+=c*(5*x))>>>13,j&=8191,j+=l*(5*y),j+=u*(5*v),j+=h*(5*b),j+=d*(5*w),T+=(j+=p*(5*g))>>>13,j&=8191;var R=T;R+=i*g,R+=o*m,R+=s*f,R+=a*(5*C),T=(R+=c*(5*A))>>>13,R&=8191,R+=l*(5*x),R+=u*(5*y),R+=h*(5*v),R+=d*(5*b);var L=T+=(R+=p*(5*w))>>>13;L+=i*w,L+=o*g,L+=s*m,L+=a*f,T=(L+=c*(5*C))>>>13,L&=8191,L+=l*(5*A),L+=u*(5*x),L+=h*(5*y),L+=d*(5*v);var B=T+=(L+=p*(5*b))>>>13;B+=i*b,B+=o*w,B+=s*g,B+=a*m,T=(B+=c*f)>>>13,B&=8191,B+=l*(5*C),B+=u*(5*A),B+=h*(5*x),B+=d*(5*y);var $=T+=(B+=p*(5*v))>>>13;$+=i*v,$+=o*b,$+=s*w,$+=a*g,T=($+=c*m)>>>13,$&=8191,$+=l*f,$+=u*(5*C),$+=h*(5*A),$+=d*(5*x);var U=T+=($+=p*(5*y))>>>13;U+=i*y,U+=o*v,U+=s*b,U+=a*w,T=(U+=c*g)>>>13,U&=8191,U+=l*m,U+=u*f,U+=h*(5*C),U+=d*(5*A);var D=T+=(U+=p*(5*x))>>>13;D+=i*x,D+=o*y,D+=s*v,D+=a*b,T=(D+=c*w)>>>13,D&=8191,D+=l*g,D+=u*m,D+=h*f,D+=d*(5*C);var z=T+=(D+=p*(5*A))>>>13;z+=i*A,z+=o*x,z+=s*y,z+=a*v,T=(z+=c*b)>>>13,z&=8191,z+=l*w,z+=u*g,z+=h*m,z+=d*f;var W=T+=(z+=p*(5*C))>>>13;W+=i*C,W+=o*A,W+=s*x,W+=a*y,T=(W+=c*v)>>>13,W&=8191,W+=l*b,W+=u*w,W+=h*g,W+=d*m,i=N=8191&(T=(T=((T+=(W+=p*f)>>>13)<<2)+T|0)+(N&=8191)|0),o=j+=T>>>=13,s=R&=8191,a=L&=8191,c=B&=8191,l=$&=8191,u=U&=8191,h=D&=8191,d=z&=8191,p=W&=8191,t+=16,r-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=c,this._h[5]=l,this._h[6]=u,this._h[7]=h,this._h[8]=d,this._h[9]=p},e.prototype.finish=function(e,t){void 0===t&&(t=0);var r,n,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=r,r=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,s[0]=this._h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this._h[o]=this._h[o]&n|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,r=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var i=0;i=16&&(t=n-n%16,this._blocks(e,r,t),r+=t,n-=t),n){for(i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const n=r(6008),i=r(8099),o=r(7309);function s(e,r=t.defaultRandomSource){return r.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=s,t.randomUint32=function(e=t.defaultRandomSource){const r=s(4,e),n=(0,i.readUint32LE)(r);return(0,o.wipe)(r),n};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(e,r=a,n=t.defaultRandomSource){if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let i="";const c=r.length,l=256-256%c;for(;e>0;){const t=s(Math.ceil(256*e/l),n);for(let n=0;n0;n++){const o=t[n];o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0,t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const n=r(7309);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=r(5883);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(e);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const n=r(5455),i=r(8871);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},3294:(e,t,r)=>{"use strict";var n=r(8099),i=r(7309);t.k=32,t.cn=64;var o=function(){function e(){this.digestLength=t.k,this.blockSize=t.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=a(this._temp,this._state,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,s=t%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=o;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function a(e,t,r,i,o){for(;o>=64;){for(var a=t[0],c=t[1],l=t[2],u=t[3],h=t[4],d=t[5],p=t[6],f=t[7],m=0;m<16;m++){var g=i+4*m;e[m]=n.readUint32BE(r,g)}for(m=16;m<64;m++){var w=e[m-2],b=(w>>>17|w<<15)^(w>>>19|w<<13)^w>>>10,v=((w=e[m-15])>>>7|w<<25)^(w>>>18|w<<14)^w>>>3;e[m]=(b+e[m-7]|0)+(v+e[m-16]|0)}for(m=0;m<64;m++)b=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&d^~h&p)|0)+(f+(s[m]+e[m]|0)|0)|0,v=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&l^c&l)|0,f=p,p=d,d=h,h=u+b|0,u=l,l=c,c=a,a=b+v|0;t[0]+=a,t[1]+=c,t[2]+=l,t[3]+=u,t[4]+=h,t[5]+=d,t[6]+=p,t[7]+=f,i+=64,o-=64}return i}t.vp=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},3350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8099),i=r(7309);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var o=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,s=t%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.stateHi),i.wipe(e.stateLo),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=o;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(e,t,r,i,o,a,c){for(var l,u,h,d,p,f,m,g,w=r[0],b=r[1],v=r[2],y=r[3],x=r[4],A=r[5],C=r[6],E=r[7],I=i[0],_=i[1],P=i[2],O=i[3],S=i[4],k=i[5],M=i[6],T=i[7];c>=128;){for(var N=0;N<16;N++){var j=8*N+a;e[N]=n.readUint32BE(o,j),t[N]=n.readUint32BE(o,j+4)}for(N=0;N<80;N++){var R,L,B=w,$=b,U=v,D=y,z=x,W=A,F=C,H=I,q=_,V=P,G=O,K=S,Z=k,Q=M;if(p=65535&(u=T),f=u>>>16,m=65535&(l=E),g=l>>>16,p+=65535&(u=(S>>>14|x<<18)^(S>>>18|x<<14)^(x>>>9|S<<23)),f+=u>>>16,m+=65535&(l=(x>>>14|S<<18)^(x>>>18|S<<14)^(S>>>9|x<<23)),g+=l>>>16,p+=65535&(u=S&k^~S&M),f+=u>>>16,m+=65535&(l=x&A^~x&C),g+=l>>>16,l=s[2*N],p+=65535&(u=s[2*N+1]),f+=u>>>16,m+=65535&l,g+=l>>>16,l=e[N%16],f+=(u=t[N%16])>>>16,m+=65535&l,g+=l>>>16,m+=(f+=(p+=65535&u)>>>16)>>>16,p=65535&(u=d=65535&p|f<<16),f=u>>>16,m=65535&(l=h=65535&m|(g+=m>>>16)<<16),g=l>>>16,p+=65535&(u=(I>>>28|w<<4)^(w>>>2|I<<30)^(w>>>7|I<<25)),f+=u>>>16,m+=65535&(l=(w>>>28|I<<4)^(I>>>2|w<<30)^(I>>>7|w<<25)),g+=l>>>16,f+=(u=I&_^I&P^_&P)>>>16,m+=65535&(l=w&b^w&v^b&v),g+=l>>>16,R=65535&(m+=(f+=(p+=65535&u)>>>16)>>>16)|(g+=m>>>16)<<16,L=65535&p|f<<16,p=65535&(u=G),f=u>>>16,m=65535&(l=D),g=l>>>16,f+=(u=d)>>>16,m+=65535&(l=h),g+=l>>>16,b=B,v=$,y=U,x=D=65535&(m+=(f+=(p+=65535&u)>>>16)>>>16)|(g+=m>>>16)<<16,A=z,C=W,E=F,w=R,_=H,P=q,O=V,S=G=65535&p|f<<16,k=K,M=Z,T=Q,I=L,N%16==15)for(j=0;j<16;j++)l=e[j],p=65535&(u=t[j]),f=u>>>16,m=65535&l,g=l>>>16,l=e[(j+9)%16],p+=65535&(u=t[(j+9)%16]),f+=u>>>16,m+=65535&l,g+=l>>>16,h=e[(j+1)%16],p+=65535&(u=((d=t[(j+1)%16])>>>1|h<<31)^(d>>>8|h<<24)^(d>>>7|h<<25)),f+=u>>>16,m+=65535&(l=(h>>>1|d<<31)^(h>>>8|d<<24)^h>>>7),g+=l>>>16,h=e[(j+14)%16],f+=(u=((d=t[(j+14)%16])>>>19|h<<13)^(h>>>29|d<<3)^(d>>>6|h<<26))>>>16,m+=65535&(l=(h>>>19|d<<13)^(d>>>29|h<<3)^h>>>6),g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,e[j]=65535&m|g<<16,t[j]=65535&p|f<<16}p=65535&(u=I),f=u>>>16,m=65535&(l=w),g=l>>>16,l=r[0],f+=(u=i[0])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[0]=w=65535&m|g<<16,i[0]=I=65535&p|f<<16,p=65535&(u=_),f=u>>>16,m=65535&(l=b),g=l>>>16,l=r[1],f+=(u=i[1])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[1]=b=65535&m|g<<16,i[1]=_=65535&p|f<<16,p=65535&(u=P),f=u>>>16,m=65535&(l=v),g=l>>>16,l=r[2],f+=(u=i[2])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[2]=v=65535&m|g<<16,i[2]=P=65535&p|f<<16,p=65535&(u=O),f=u>>>16,m=65535&(l=y),g=l>>>16,l=r[3],f+=(u=i[3])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[3]=y=65535&m|g<<16,i[3]=O=65535&p|f<<16,p=65535&(u=S),f=u>>>16,m=65535&(l=x),g=l>>>16,l=r[4],f+=(u=i[4])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[4]=x=65535&m|g<<16,i[4]=S=65535&p|f<<16,p=65535&(u=k),f=u>>>16,m=65535&(l=A),g=l>>>16,l=r[5],f+=(u=i[5])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[5]=A=65535&m|g<<16,i[5]=k=65535&p|f<<16,p=65535&(u=M),f=u>>>16,m=65535&(l=C),g=l>>>16,l=r[6],f+=(u=i[6])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[6]=C=65535&m|g<<16,i[6]=M=65535&p|f<<16,p=65535&(u=T),f=u>>>16,m=65535&(l=E),g=l>>>16,l=r[7],f+=(u=i[7])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[7]=E=65535&m|g<<16,i[7]=T=65535&p|f<<16,a+=128,c-=128}return a}t.hash=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},7309:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t{"use strict";t.gi=t.Au=t.KS=t.kz=void 0;const n=r(1416),i=r(7309);function o(e){const t=new Float64Array(16);if(e)for(let r=0;r=0;--e){const t=r[e>>>3]>>>(7&e)&1;l(i,s,t),l(f,m,t),u(g,i,f),h(i,i,f),u(f,s,m),h(s,s,m),p(m,g),p(w,i),d(i,f,i),d(f,s,g),u(g,i,f),h(i,i,f),p(s,i),h(f,m,w),d(i,f,a),u(i,i,m),d(f,f,i),d(i,m,w),d(m,s,n),p(s,g),l(i,s,t),l(f,m,t)}for(let e=0;e<16;e++)n[e+16]=i[e],n[e+32]=f[e],n[e+48]=s[e],n[e+64]=m[e];const b=n.subarray(32),v=n.subarray(16);!function(e,t){const r=o();for(let e=0;e<16;e++)r[e]=t[e];for(let e=253;e>=0;e--)p(r,r),2!==e&&4!==e&&d(r,r,t);for(let t=0;t<16;t++)e[t]=r[t]}(b,b),d(v,v,b);const y=new Uint8Array(32);return function(e,t){const r=o(),n=o();for(let e=0;e<16;e++)n[e]=t[e];c(n),c(n),c(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,l(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}(y,v),y}t.Au=function(e){const r=(0,n.randomBytes)(32,e),o=function(e){if(e.length!==t.KS)throw new Error(`x25519: seed must be ${t.KS} bytes`);const r=new Uint8Array(e);return{publicKey:(n=r,f(n,s)),secretKey:r};var n}(r);return(0,i.wipe)(r),o},t.gi=function(e,r,n=!1){if(e.length!==t.kz)throw new Error("X25519: incorrect secret key length");if(r.length!==t.kz)throw new Error("X25519: incorrect public key length");const i=f(e,r);if(n){let e=0;for(let t=0;t{"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function i(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=i,t.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},8618:(e,t)=>{"use strict";function r(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function n(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=r,t.isNode=n,t.isBrowser=function(){return!r()&&!n()}},1468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(926),t),n.__exportStar(r(8618),t)},9328:(e,t,r)=>{"use strict";r.d(t,{OPTIONAL_EVENTS:()=>Na,OPTIONAL_METHODS:()=>Ma,default:()=>qa});var n={};r.r(n),r.d(n,{identity:()=>B});var i={};r.r(i),r.d(i,{base2:()=>$});var o={};r.r(o),r.d(o,{base8:()=>U});var s={};r.r(s),r.d(s,{base10:()=>D});var a={};r.r(a),r.d(a,{base16:()=>z,base16upper:()=>W});var c={};r.r(c),r.d(c,{base32:()=>F,base32hex:()=>G,base32hexpad:()=>Z,base32hexpadupper:()=>Q,base32hexupper:()=>K,base32pad:()=>q,base32padupper:()=>V,base32upper:()=>H,base32z:()=>Y});var l={};r.r(l),r.d(l,{base36:()=>J,base36upper:()=>X});var u={};r.r(u),r.d(u,{base58btc:()=>ee,base58flickr:()=>te});var h={};r.r(h),r.d(h,{base64:()=>re,base64pad:()=>ne,base64url:()=>ie,base64urlpad:()=>oe});var d={};r.r(d),r.d(d,{base256emoji:()=>le});var p={};r.r(p),r.d(p,{sha256:()=>Me,sha512:()=>Te});var f={};r.r(f),r.d(f,{identity:()=>je});var m={};r.r(m),r.d(m,{code:()=>Le,decode:()=>$e,encode:()=>Be,name:()=>Re});var g={};r.r(g),r.d(g,{code:()=>We,decode:()=>He,encode:()=>Fe,name:()=>ze});var w=r(7187),b=r.n(w),v=r(5501),y=r(512),x=r(1416),A=r(3294),C=r(7664);function E(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function I(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?E(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function _(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const r=I(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return E(r)}const P=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,d=o-1;(0!==u||h>>0,s[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var p=o-i;p!==o&&0===s[p];)p++;for(var f=new Uint8Array(n+(o-p)),m=n;p!==o;)f[m++]=s[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*u+1>>>0,l=new Uint8Array(s);i!==o;){for(var h=t[i],d=0,p=s-1;(0!==h||d>>0,l[p]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var f=s-n;f!==s&&0===l[f];)f++;for(var m=c.repeat(r);f{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class S{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class k{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return T(this,e)}}class M{constructor(e){this.decoders=e}or(e){return T(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const T=(e,t)=>new M({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class N{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new S(e,t,r),this.decoder=new k(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const j=({name:e,prefix:t,encode:r,decode:n})=>new N(e,t,r,n),R=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=P(r,t);return j({prefix:e,name:t,encode:n,decode:e=>O(i(e))})},L=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>j({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<((e,t,r,n)=>{const i={};for(let e=0;e=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,n,r,e)}),B=j({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)}),$=L({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),U=L({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),D=R({prefix:"9",name:"base10",alphabet:"0123456789"}),z=L({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),W=L({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),F=L({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),H=L({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),q=L({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),V=L({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),G=L({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),K=L({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Z=L({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Q=L({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Y=L({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),J=R({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),X=R({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),ee=R({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),te=R({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),re=L({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),ne=L({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),ie=L({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),oe=L({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),se=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),ae=se.reduce(((e,t,r)=>(e[r]=t,e)),[]),ce=se.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]),le=j({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+ae[t]),"")},decode:function(e){const t=[];for(const r of e){const e=ce[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var ue=128,he=-128,de=Math.pow(2,31),pe=Math.pow(2,7),fe=Math.pow(2,14),me=Math.pow(2,21),ge=Math.pow(2,28),we=Math.pow(2,35),be=Math.pow(2,42),ve=Math.pow(2,49),ye=Math.pow(2,56),xe=Math.pow(2,63);const Ae=function e(t,r,n){r=r||[];for(var i=n=n||0;t>=de;)r[n++]=255&t|ue,t/=128;for(;t&he;)r[n++]=255&t|ue,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},Ce=function(e){return e(Ae(e,t,r),t),Ie=e=>Ce(e),_e=(e,t)=>{const r=t.byteLength,n=Ie(e),i=n+Ie(r),o=new Uint8Array(i+r);return Ee(e,o,0),Ee(r,o,n),o.set(t,i),new Pe(e,r,t,o)};class Pe{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const Oe=({name:e,code:t,encode:r})=>new Se(e,t,r);class Se{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?_e(this.code,t):t.then((e=>_e(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ke=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Me=Oe({name:"sha2-256",code:18,encode:ke("SHA-256")}),Te=Oe({name:"sha2-512",code:19,encode:ke("SHA-512")}),Ne=O,je={code:0,name:"identity",encode:Ne,digest:e=>_e(0,Ne(e))},Re="raw",Le=85,Be=e=>O(e),$e=e=>O(e),Ue=new TextEncoder,De=new TextDecoder,ze="json",We=512,Fe=e=>Ue.encode(JSON.stringify(e)),He=e=>JSON.parse(De.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom"),Symbol.for("@ipld/js-cid/CID");const qe={...n,...i,...o,...s,...a,...c,...l,...u,...h,...d};function Ve(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const Ge=Ve("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Ke=Ve("ascii","a",(e=>{let t="a";for(let r=0;r{const t=I((e=e.substring(1)).length);for(let r=0;r"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function Et(e){return 1===e.type&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var It=Object.defineProperty,_t=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,St=(e,t,r)=>t in e?It(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kt=(e,t)=>{for(var r in t||(t={}))Pt.call(t,r)&&St(e,r,t[r]);if(_t)for(var r of _t(t))Ot.call(t,r)&&St(e,r,t[r]);return e};const Mt="ReactNative",Tt={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Nt="js";function jt(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Rt(){return!(0,ut.getDocument)()&&!!(0,ut.getNavigator)()&&navigator.product===Mt}function Lt(){return!jt()&&!!(0,ut.getNavigator)()}function Bt(){return Rt()?Tt.reactNative:jt()?Tt.node:Lt()?Tt.browser:Tt.unknown}function $t(e,t,n){const i=function(){if(typeof(null==r.g?void 0:r.g.Platform)<"u"){const{OS:e,Version:t}=r.g.Platform;return[e,t].join("-")}const e=t?ct(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new nt:"undefined"!=typeof navigator?ct(navigator.userAgent):"undefined"!=typeof process&&process.version?new et(process.version.slice(1)):null;var t;if(null===e)return"unknown";const n=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[n,e.name,e.version].join("-"):[n,e.version].join("-")}(),o=function(){var e;const t=Bt();return t===Tt.browser?[t,(null==(e=(0,ut.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[Nt,n].join("-"),i,o].join("/")}function Ut(e,t){return e.filter((e=>t.includes(e))).length===e.length}function Dt(e){return Object.fromEntries(e.entries())}function zt(e){return new Map(Object.entries(e))}function Wt(e=lt.FIVE_MINUTES,t){const r=(0,lt.toMiliseconds)(e||lt.FIVE_MINUTES);let n,i,o;return{resolve:e=>{o&&n&&(clearTimeout(o),n(e))},reject:e=>{o&&i&&(clearTimeout(o),i(e))},done:()=>new Promise(((e,s)=>{o=setTimeout((()=>{s(new Error(t))}),r),n=e,i=s}))}}function Ft(e,t,r){return new Promise((async(n,i)=>{const o=setTimeout((()=>i(new Error(r))),t);try{n(await e)}catch(e){i(e)}clearTimeout(o)}))}function Ht(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function qt(e){const[t,r]=e.split(":"),n={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)n.topic=r;else{if("id"!==t||!Number.isInteger(Number(r)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);n.id=Number(r)}return n}function Vt(e,t){return(0,lt.fromMiliseconds)((t||Date.now())+(0,lt.toMiliseconds)(e))}function Gt(e){return Date.now()>=(0,lt.toMiliseconds)(e)}function Kt(e,t){return`${e}${t?`:${t}`:""}`}function Zt(e=[],t=[]){return[...new Set([...e,...t])]}function Qt(e){return e?.relay||{protocol:"irn"}}function Yt(e){const t=pt[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Jt=Object.defineProperty,Xt=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable,rr=(e,t,r)=>t in e?Jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function nr(e,t="-"){const r={},n="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(n)){const i=t.replace(n,""),o=e[t];r[i]=o}})),r}function ir(e){return e.startsWith("//")?e.substring(2):e}function or(e){const t=[];return e.forEach((e=>{const[r,n]=e.split(":");t.push(`${r}:${n}`)})),t}function sr(e){return e.includes(":")}function ar(e){return sr(e)?e.split(":")[0]:e}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const cr={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},lr={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function ur(e,t){const{message:r,code:n}=lr[e];return{message:t?`${r} ${t}`:r,code:n}}function hr(e,t){const{message:r,code:n}=cr[e];return{message:t?`${r} ${t}`:r,code:n}}function dr(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function pr(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function fr(e){return typeof e>"u"}function mr(e,t){return!(!t||!fr(e))||"string"==typeof e&&!!e.trim().length}function gr(e,t){return!(!t||!fr(e))||"number"==typeof e&&!isNaN(e)}function wr(e){return!(!mr(e,!1)||!e.includes(":"))&&2===e.split(":").length}function br(e){let t=!0;return dr(e)?e.length&&(t=e.every((e=>mr(e,!1)))):t=!1,t}function vr(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=function(e,t){let r=null;return br(e?.methods)?br(e?.events)||(r=hr("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=hr("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}(e,`${t}, namespace`);n&&(r=n)})),r}function yr(e,t){let r=null;if(e&&pr(e)){const n=vr(e,t);n&&(r=n);const i=function(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=function(e,t){let r=null;return dr(e)?e.forEach((e=>{r||function(e){if(mr(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&wr(e)}}return!1}(e)||(r=hr("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):r=hr("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}(e?.accounts,`${t} namespace`);n&&(r=n)})),r}(e,t);i&&(r=i)}else r=ur("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function xr(e){return mr(e.protocol,!0)}function Ar(e){return typeof e<"u"&&null!==typeof e}function Cr(e,t){return!(!wr(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...or(e.accounts))})),t}(e).includes(t))}function Er(e,t,r){let n=null;const i=function(e){const t={};return Object.keys(e).forEach((r=>{var n;r.includes(":")?t[r]=e[r]:null==(n=e[r].chains)||n.forEach((n=>{t[n]={methods:e[r].methods,events:e[r].events}}))})),t}(e),o=function(e){const t={};return Object.keys(e).forEach((r=>{if(r.includes(":"))t[r]=e[r];else{const n=or(e[r].accounts);n?.forEach((n=>{t[n]={accounts:e[r].accounts.filter((e=>e.includes(`${n}:`))),methods:e[r].methods,events:e[r].events}}))}})),t}(t),s=Object.keys(i),a=Object.keys(o),c=Ir(Object.keys(e)),l=Ir(Object.keys(t)),u=c.filter((e=>!l.includes(e)));return u.length&&(n=ur("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n Required: ${u.toString()}\n Received: ${Object.keys(t).toString()}`)),Ut(s,a)||(n=ur("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.\n Required: ${s.toString()}\n Approved: ${a.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||n)return;const i=or(t[e].accounts);i.includes(e)||(n=ur("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),s.forEach((e=>{n||(Ut(i[e].methods,o[e].methods)?Ut(i[e].events,o[e].events)||(n=ur("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):n=ur("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))})),n}function Ir(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}var _r=r(5150),Pr=r(772),Or=r(9107),Sr=r(8200);class kr extends Sr.q{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class Mr extends Sr.q{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class Tr{constructor(e,t){this.logger=e,this.core=t}}class Nr extends Sr.q{constructor(e,t){super(),this.relayer=e,this.logger=t}}class jr extends Sr.q{constructor(e){super()}}class Rr{constructor(e,t,r,n){this.core=e,this.logger=t,this.name=r}}class Lr extends Sr.q{constructor(e,t){super(),this.relayer=e,this.logger=t}}class Br extends Sr.q{constructor(e,t){super(),this.core=e,this.logger=t}}class $r{constructor(e,t){this.projectId=e,this.logger=t}}class Ur{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class Dr{constructor(e){this.client=e}}const zr=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t));function Wr(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return(e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))})(e)}catch(t){return e}}function Fr(e){return"string"==typeof e?e:zr(e)||""}var Hr=r(1050);const qr="base64url",Vr="utf8",Gr=":",Kr="did",Zr="key",Qr="base58btc",Yr="z",Jr="K36";function Xr(e){return Ye(Qe(Fr(e),Vr),qr)}function en(e){const t=Qe(Jr,Qr),r=Yr+Ye(_([t,e]),Qr);return[Kr,Zr,r].join(Gr)}function tn(e=(0,x.randomBytes)(32)){return Hr._w(e)}r(3014);const rn="INTERNAL_ERROR",nn="SERVER_ERROR",on=[-32700,-32600,-32601,-32602,-32603],sn={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[rn]:{code:-32603,message:"Internal error"},[nn]:{code:-32e3,message:"Server error"}},an=nn;function cn(e){return Object.keys(sn).includes(e)?sn[e]:sn[an]}function ln(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var un=r(1468);function hn(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function dn(e=6){return BigInt(hn(e))}function pn(e,t,r){return{id:r||hn(),jsonrpc:"2.0",method:e,params:t}}function fn(e,t){return{id:e,jsonrpc:"2.0",result:t}}function mn(e,t,r){return{id:e,jsonrpc:"2.0",error:gn(t,r)}}function gn(e,t){return void 0===e?cn(rn):("string"==typeof e&&(e=Object.assign(Object.assign({},cn(nn)),{message:e})),void 0!==t&&(e.data=t),r=e.code,on.includes(r)&&(e=function(e){return Object.values(sn).find((t=>t.code===e))||sn[an]}(e.code)),e);var r}class wn{}class bn extends wn{constructor(){super()}}class vn extends bn{constructor(e){super()}}function yn(e,t){const r=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==r&&new RegExp(t).test(r)}function xn(e){return yn(e,"^https?:")}function An(e){return yn(e,"^wss?:")}function Cn(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function En(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function In(e){return En(e)&&"method"in e}function _n(e){return En(e)&&(Pn(e)||On(e))}function Pn(e){return"result"in e}function On(e){return"error"in e}class Sn extends vn{constructor(e){super(e),this.events=new w.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(pn(e.method,e.params||[],e.id||dn().toString()),t)}async requestStrict(e,t){return new Promise((async(r,n)=>{if(!this.connection.connected)try{await this.open()}catch(e){n(e)}this.events.on(`${e.id}`,(e=>{On(e)?n(e.error):r(e.result)}));try{await this.connection.send(e,t)}catch(e){n(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),_n(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const kn=void 0!==r.g&&void 0!==r.g.WebSocket?r.g.WebSocket:"undefined"!=typeof window&&void 0!==window.WebSocket?window.WebSocket:r(7026);var Mn=r(2307),Tn=r.n(Mn),Nn=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,d=o-1;(0!==u||h>>0,s[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var p=o-i;p!==o&&0===s[p];)p++;for(var f=new Uint8Array(n+(o-p)),m=n;p!==o;)f[m++]=s[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*u+1>>>0,l=new Uint8Array(s);i!==o;){for(var h=t[i],d=0,p=s-1;(0!==h||d>>0,l[p]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var f=s-n;f!==s&&0===l[f];)f++;for(var m=c.repeat(r);f{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class Rn{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Ln{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return $n(this,e)}}class Bn{constructor(e){this.decoders=e}or(e){return $n(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const $n=(e,t)=>new Bn({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Un{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new Rn(e,t,r),this.decoder=new Ln(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Dn=({name:e,prefix:t,encode:r,decode:n})=>new Un(e,t,r,n),zn=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=Nn(r,t);return Dn({prefix:e,name:t,encode:n,decode:e=>jn(i(e))})},Wn=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>Dn({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<((e,t,r,n)=>{const i={};for(let e=0;e=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,n,r,e)}),Fn=Dn({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var Hn=Object.freeze({__proto__:null,identity:Fn});const qn=Wn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Vn=Object.freeze({__proto__:null,base2:qn});const Gn=Wn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Kn=Object.freeze({__proto__:null,base8:Gn});const Zn=zn({prefix:"9",name:"base10",alphabet:"0123456789"});var Qn=Object.freeze({__proto__:null,base10:Zn});const Yn=Wn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Jn=Wn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Xn=Object.freeze({__proto__:null,base16:Yn,base16upper:Jn});const ei=Wn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),ti=Wn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),ri=Wn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),ni=Wn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ii=Wn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),oi=Wn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),si=Wn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),ai=Wn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),ci=Wn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var li=Object.freeze({__proto__:null,base32:ei,base32upper:ti,base32pad:ri,base32padupper:ni,base32hex:ii,base32hexupper:oi,base32hexpad:si,base32hexpadupper:ai,base32z:ci});const ui=zn({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),hi=zn({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var di=Object.freeze({__proto__:null,base36:ui,base36upper:hi});const pi=zn({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),fi=zn({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var mi=Object.freeze({__proto__:null,base58btc:pi,base58flickr:fi});const gi=Wn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),wi=Wn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),bi=Wn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),vi=Wn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var yi=Object.freeze({__proto__:null,base64:gi,base64pad:wi,base64url:bi,base64urlpad:vi});const xi=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Ai=xi.reduce(((e,t,r)=>(e[r]=t,e)),[]),Ci=xi.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]),Ei=Dn({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+Ai[t]),"")},decode:function(e){const t=[];for(const r of e){const e=Ci[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var Ii=Object.freeze({__proto__:null,base256emoji:Ei}),_i=128,Pi=-128,Oi=Math.pow(2,31),Si=Math.pow(2,7),ki=Math.pow(2,14),Mi=Math.pow(2,21),Ti=Math.pow(2,28),Ni=Math.pow(2,35),ji=Math.pow(2,42),Ri=Math.pow(2,49),Li=Math.pow(2,56),Bi=Math.pow(2,63),$i=function e(t,r,n){r=r||[];for(var i=n=n||0;t>=Oi;)r[n++]=255&t|_i,t/=128;for(;tΠ)r[n++]=255&t|_i,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},Ui=function(e){return e($i(e,t,r),t),zi=e=>Ui(e),Wi=(e,t)=>{const r=t.byteLength,n=zi(e),i=n+zi(r),o=new Uint8Array(i+r);return Di(e,o,0),Di(r,o,n),o.set(t,i),new Fi(e,r,t,o)};class Fi{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const Hi=({name:e,code:t,encode:r})=>new qi(e,t,r);class qi{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Wi(this.code,t):t.then((e=>Wi(this.code,e)))}throw Error("Unknown type, must be binary type")}}const Vi=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Gi=Hi({name:"sha2-256",code:18,encode:Vi("SHA-256")}),Ki=Hi({name:"sha2-512",code:19,encode:Vi("SHA-512")});Object.freeze({__proto__:null,sha256:Gi,sha512:Ki});const Zi=jn,Qi={code:0,name:"identity",encode:Zi,digest:e=>Wi(0,Zi(e))};Object.freeze({__proto__:null,identity:Qi}),new TextEncoder,new TextDecoder;const Yi={...Hn,...Vn,...Kn,...Qn,...Xn,...li,...di,...mi,...yi,...Ii};function Ji(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Xi(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const eo=Xi("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),to=Xi("ascii","a",(e=>{let t="a";for(let r=0;r{const t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Ji(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let r=0;r{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=ur("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=(0,Or.generateChildLogger)(t,this.name)}get context(){return(0,Or.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,Dt(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?zt(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}}class jo{constructor(e,t,r){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),en(tn(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=function(){const e=C.Au();return{privateKey:Ye(e.secretKey,gt),publicKey:Ye(e.publicKey,gt)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=tn(await this.getClientSeed()),r=vt(),n=ao;return await async function(e,t,r,n,i=(0,lt.fromMiliseconds)(Date.now())){const o={alg:"EdDSA",typ:"JWT"},s={iss:en(n.publicKey),sub:e,aud:t,iat:i,exp:i+r},a=Qe([Xr((c={header:o,payload:s}).header),Xr(c.payload)].join("."),"utf8");var c;return function(e){return[Xr(e.header),Xr(e.payload),(t=e.signature,Ye(t,qr))].join(".");var t}({header:o,payload:s,signature:Hr.Xx(n.secretKey,a)})}(r,e,n,t)},this.generateSharedKey=(e,t,r)=>{this.isInitialized();const n=function(e,t){const r=C.gi(Qe(e,gt),Qe(t,gt));return Ye(new y.t(A.mE,r).expand(32),gt)}(this.getPrivateKey(e),t);return this.setSymKey(n,r)},this.setSymKey=async(e,t)=>{this.isInitialized();const r=t||function(e){return Ye((0,A.vp)(Qe(e,gt)),gt)}(e);return await this.keychain.set(r,e),r},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,r)=>{this.isInitialized();const n=Ct(r),i=Fr(t);if(Et(n)){const t=n.senderPublicKey,r=n.receiverPublicKey;e=await this.generateSharedKey(t,r)}const o=this.getSymKey(e),{type:s,senderPublicKey:a}=n;return function(e){const t=function(e){return Qe(`${e}`,mt)}(typeof e.type<"u"?e.type:0);if(1===xt(t)&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?Qe(e.senderPublicKey,gt):void 0,n=typeof e.iv<"u"?Qe(e.iv,gt):(0,x.randomBytes)(12);return function(e){if(1===xt(e.type)){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Ye(_([e.type,e.senderPublicKey,e.iv,e.sealed]),wt)}return Ye(_([e.type,e.iv,e.sealed]),wt)}({type:t,sealed:new v.OK(Qe(e.symKey,gt)).seal(n,Qe(e.message,bt)),iv:n,senderPublicKey:r})}({type:s,symKey:o,message:i,senderPublicKey:a})},this.decode=async(e,t,r)=>{this.isInitialized();const n=function(e,t){const r=At(e);return Ct({type:xt(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Ye(r.senderPublicKey,gt):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,r);if(Et(n)){const t=n.receiverPublicKey,r=n.senderPublicKey;e=await this.generateSharedKey(t,r)}const i=function(e){const t=new v.OK(Qe(e.symKey,gt)),{sealed:r,iv:n}=At(e.encoded),i=t.open(n,r);if(null===i)throw new Error("Failed to decrypt");return Ye(i,bt)}({symKey:this.getSymKey(e),encoded:t});return Wr(i)},this.getPayloadType=e=>xt(At(e).type),this.getPayloadSenderPublicKey=e=>{const t=At(e);return t.senderPublicKey?Ye(t.senderPublicKey,gt):void 0},this.core=e,this.logger=(0,Or.generateChildLogger)(t,this.name),this.keychain=r||new No(this.core,this.logger)}get context(){return(0,Or.getLoggerContext)(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(so)}catch{e=vt(),await this.keychain.set(so,e)}return function(e,t="utf8"){const r=ro[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):Ji(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Ro extends Tr{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=io,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const r=yt(t);let n=this.messages.get(e);return typeof n>"u"&&(n={}),typeof n[r]<"u"||(n[r]=t,this.messages.set(e,n),await this.persist()),r},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>(this.isInitialized(),typeof this.get(e)[yt(t)]<"u"),this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=(0,Or.generateChildLogger)(e,this.name),this.core=t}get context(){return(0,Or.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,Dt(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?zt(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Lo extends Nr{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new w.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,lt.toMiliseconds)(lt.TEN_SECONDS),this.queueTimeout=(0,lt.toMiliseconds)(lt.FIVE_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,r)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});try{const n=r?.ttl||co,i=Qt(r),o=r?.prompt||!1,s=r?.tag||0,a=r?.id||dn().toString(),c={topic:e,message:t,opts:{ttl:n,relay:i,prompt:o,tag:s,id:a}},l=setTimeout((()=>this.queue.set(a,c)),this.queueTimeout);try{await await Ft(this.rpcPublish(e,t,n,i,o,s,a),this.publishTimeout),clearTimeout(l),this.relayer.events.emit(wo,c)}catch{return this.logger.debug("Publishing Payload stalled"),void(this.needsTransportRestart=!0)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=(0,Or.generateChildLogger)(t,this.name),this.registerEventListeners()}get context(){return(0,Or.getLoggerContext)(this.logger)}rpcPublish(e,t,r,n,i,o,s){var a,c,l,u;const h={method:Yt(n.protocol).publish,params:{topic:e,message:t,ttl:r,prompt:i,tag:o},id:s};return fr(null==(a=h.params)?void 0:a.prompt)&&(null==(c=h.params)||delete c.prompt),fr(null==(l=h.params)?void 0:l.tag)&&(null==(u=h.params)||delete u.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:h}),this.relayer.request(h)}onPublish(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:r,opts:n}=e;await this.publish(t,r,n)}))}registerEventListeners(){this.relayer.core.heartbeat.on(Pr.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(mo);this.checkQueue()})),this.relayer.on(ho,(e=>{this.onPublish(e.id.toString())}))}}class Bo{constructor(){this.map=new Map,this.set=(e,t)=>{const r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,t))return;const n=r.filter((e=>e!==t));n.length?this.map.set(e,n):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var $o=Object.defineProperty,Uo=Object.defineProperties,Do=Object.getOwnPropertyDescriptors,zo=Object.getOwnPropertySymbols,Wo=Object.prototype.hasOwnProperty,Fo=Object.prototype.propertyIsEnumerable,Ho=(e,t,r)=>t in e?$o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qo=(e,t)=>{for(var r in t||(t={}))Wo.call(t,r)&&Ho(e,r,t[r]);if(zo)for(var r of zo(t))Fo.call(t,r)&&Ho(e,r,t[r]);return e},Vo=(e,t)=>Uo(e,Do(t));class Go extends Lr{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Bo,this.events=new w.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=io,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const r=Qt(t),n={topic:e,relay:r};this.pending.set(e,n);const i=await this.rpcSubscribe(e,r);return this.onSubscribe(i,n),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>!!this.topics.includes(e)||await new Promise(((t,r)=>{const n=new lt.Watch;n.start(this.pendingSubscriptionWatchLabel);const i=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),t(!0)),n.elapsed(this.pendingSubscriptionWatchLabel)>=Co&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1)),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=(0,Or.generateChildLogger)(t,this.name),this.clientId=""}get context(){return(0,Or.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const r=this.topicMap.get(e);await Promise.all(r.map((async r=>await this.unsubscribeById(e,r,t))))}async unsubscribeById(e,t,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}});try{const n=Qt(r);await this.rpcUnsubscribe(e,t,n);const i=hr("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){const r={method:Yt(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await Ft(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(mo)}return yt(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t={method:Yt(e[0].relay.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await Ft(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(mo)}}rpcUnsubscribe(e,t,r){const n={method:Yt(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n}),this.relayer.request(n)}onSubscribe(e,t){this.setSubscription(e,Vo(qo({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,qo({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,r){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,r),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,qo({},t)),this.topicMap.set(t.topic,e),this.events.emit(yo,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=ur("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(xo,Vo(qo({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit("subscription_sync")}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=ur("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);dr(t)&&this.onBatchSubscribe(t.map(((t,r)=>Vo(qo({},e[r]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(Pr.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(po,(async()=>{await this.onConnect()})),this.relayer.on(fo,(()=>{this.onDisconnect()})),this.events.on(yo,(async e=>{const t=yo;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(xo,(async e=>{const t=xo;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}}var Ko=Object.defineProperty,Zo=Object.getOwnPropertySymbols,Qo=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable,Jo=(e,t,r)=>t in e?Ko(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class Xo extends jr{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new w.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async e=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(e)}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?(0,Or.generateChildLogger)(e.logger,this.name):(0,Or.pino)((0,Or.getDefaultLoggerOptions)({level:e.logger||"error"})),this.messages=new Ro(this.logger,e.core),this.subscriber=new Go(this,this.logger),this.publisher=new Lo(this,this.logger),this.relayUrl=e?.relayUrl||lo,this.projectId=e.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.transportOpen(),this.subscriber.init()]),this.registerEventListeners(),this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribted to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return(0,Or.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var r;this.isInitialized();let n=(null==(r=this.subscriber.topicMap.get(e))?void 0:r[0])||"";return n||(await Promise.all([new Promise((t=>{this.subscriber.once(yo,(r=>{r.topic===e&&t()}))})),new Promise((async r=>{n=await this.subscriber.subscribe(e,t),r()}))]),n)}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(go))}async transportOpen(e){if(this.transportExplicitlyClosed=!1,!this.reconnecting){this.relayUrl=e||this.relayUrl,this.reconnecting=!0;try{await Promise.all([new Promise((e=>{this.initialized||e(),this.subscriber.once(Ao,(()=>{e()}))})),await Promise.race([new Promise((async(e,t)=>{await Ft(this.provider.connect(),5e3,"socket stalled").catch((e=>t(e))).then((()=>e())).finally((()=>this.removeListener(go,this.rejectTransportOpen)))})),new Promise((e=>this.once(go,this.rejectTransportOpen)))])])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.events.emit(go)}finally{this.reconnecting=!1}}}async restartTransport(e){this.transportExplicitlyClosed||this.reconnecting||(this.relayUrl=e||this.relayUrl,this.connected&&await Promise.all([new Promise((e=>{this.provider.once(bo,(()=>{e()}))})),this.transportClose()]),await this.createProvider(),await this.transportOpen())}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}rejectTransportOpen(){throw new Error("Attempt to connect to relay via `transportOpen` has stalled. Retrying...")}async createProvider(){const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Sn(new class{constructor(e){if(this.url=e,this.events=new w.EventEmitter,this.registering=!1,!An(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return void 0!==this.socket}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{void 0!==this.socket?(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close()):t(new Error("Connection already closed"))}))}async send(e,t){void 0===this.socket&&(this.socket=await this.register());try{this.socket.send(Fr(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!An(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.socket)return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,r)=>{const n=(0,un.isReactNative)()?void 0:{rejectUnauthorized:!Cn(e)},i=new kn(e,[],n);"undefined"!=typeof window?i.onerror=e=>{const t=e;r(this.emitError(t.error))}:i.on("error",(e=>{r(this.emitError(e))})),i.onopen=()=>{this.onOpen(i),t(i)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?Wr(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),n=mn(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return ln(e,t,"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error((null==e?void 0:e.message)||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",t),t}}(function({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:i,projectId:o,useOnCloseEvent:s}){const a=r.split("?"),c={auth:i,ua:$t(e,t,n),projectId:o,useOnCloseEvent:s||void 0},l=function(e,t){let r=dt.parse(e);return r=kt(kt({},r),t),dt.stringify(r)}(a[1]||"",c);return a[0]+"?"+l}({sdkVersion:"2.8.4",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:r}=e;await this.messages.set(t,r)}async shouldIgnoreMessageEvent(e){const{topic:t,message:r}=e;return!await this.subscriber.isSubscribed(t)||this.messages.has(t,r)}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),In(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:r,message:n,publishedAt:i}=t.data,o={topic:r,message:n,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var r in t||(t={}))Qo.call(t,r)&&Jo(e,r,t[r]);if(Zo)for(var r of Zo(t))Yo.call(t,r)&&Jo(e,r,t[r]);return e})({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else _n(e)&&this.events.emit(ho,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(uo,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=fn(e.id,!0);await this.provider.connection.send(t)}registerProviderListeners(){this.provider.on("payload",(e=>this.onProviderPayload(e))),this.provider.on("connect",(()=>{this.events.emit(po)})),this.provider.on(bo,(()=>{this.onProviderDisconnect()})),this.provider.on("error",(e=>{this.logger.error(e),this.events.emit("relayer_error",e)}))}registerEventListeners(){this.events.on(mo,(async()=>{await this.restartTransport()}))}onProviderDisconnect(){this.events.emit(fo),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout((async()=>{await this.restartTransport()}),(0,lt.toMiliseconds)(vo))}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}}var es=Object.defineProperty,ts=Object.getOwnPropertySymbols,rs=Object.prototype.hasOwnProperty,ns=Object.prototype.propertyIsEnumerable,is=(e,t,r)=>t in e?es(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,os=(e,t)=>{for(var r in t||(t={}))rs.call(t,r)&&is(e,r,t[r]);if(ts)for(var r of ts(t))ns.call(t,r)&&is(e,r,t[r]);return e};class ss extends Rr{constructor(e,t,r,n=io,i=void 0){super(e,t,r,n),this.core=e,this.logger=t,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=io,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!fr(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):function(e){return e?.topic}(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((r=>Tn()(t[r],e[r]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const r=os(os({},this.getData(e)),t);this.map.set(e,r),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=(0,Or.generateChildLogger)(t,this.name),this.storagePrefix=n,this.getKey=i}get context(){return(0,Or.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=ur("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=ur("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}}class as{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new(b()),this.initialized=!1,this.storagePrefix=io,this.ignoredPayloadTypes=[1],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const e=vt(),t=await this.core.crypto.setSymKey(e),r=Vt(lt.FIVE_MINUTES),n={protocol:"irn"},i={topic:t,expiry:r,relay:n,active:!1},o=function(e){return`${e.protocol}:${e.topic}@${e.version}?`+dt.stringify(((e,t)=>{for(var r in t||(t={}))er.call(t,r)&&rr(e,r,t[r]);if(Xt)for(var r of Xt(t))tr.call(t,r)&&rr(e,r,t[r]);return e})({symKey:e.symKey},function(e,t="-"){const r={};return Object.keys(e).forEach((n=>{const i="relay"+t+n;e[n]&&(r[i]=e[n])})),r}(e.relay)))}({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:n});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,r),{topic:t,uri:o}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:r,relay:n}=function(e){const t=e.indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,n=e.substring(0,t),i=e.substring(t+1,r).split("@"),o=typeof r<"u"?e.substring(r):"",s=dt.parse(o);return{protocol:n,topic:ir(i[0]),version:parseInt(i[1],10),symKey:s.symKey,relay:nr(s)}}(e.uri);if(this.pairings.keys.includes(t))throw new Error(`Pairing already exists: ${t}`);if(this.core.crypto.hasKeys(t))throw new Error(`Keychain already exists: ${t}`);const i=Vt(lt.FIVE_MINUTES),o={topic:t,relay:n,expiry:i,active:!1};return await this.pairings.set(t,o),await this.core.crypto.setSymKey(r,t),await this.core.relayer.subscribe(t,{relay:n}),this.core.expirer.set(t,i),e.activatePairing&&await this.activate({topic:t}),o},this.activate=async({topic:e})=>{this.isInitialized();const t=Vt(lt.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:n,reject:i}=Wt();this.events.once(Kt("pairing_ping",e),(({error:e})=>{e?i(e):n()})),await r()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",hr("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,r)=>{const n=pn(t,r),i=await this.core.crypto.encode(e,n),o=Eo[t].req;return this.core.history.set(e,n),this.core.relayer.publish(e,i,o),n.id},this.sendResult=async(e,t,r)=>{const n=fn(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),s=Eo[o.request.method].res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(n)},this.sendError=async(e,t,r)=>{const n=mn(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),s=Eo[o.request.method]?Eo[o.request.method].res:Eo.unregistered_method.res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(n)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,hr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>Gt(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:r}=e,n=r.method;if(this.pairings.keys.includes(t))switch(n){case"wc_pairingPing":return this.onPairingPingRequest(t,r);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,r);default:return this.onUnknownRpcMethodRequest(t,r)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.core.history.get(t,r.id)).request.method;if(this.pairings.keys.includes(t))return"wc_pairingPing"===n?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(n)},this.onPairingPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit("pairing_ping",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{const{id:r}=t;setTimeout((()=>{Pn(t)?this.events.emit(Kt("pairing_ping",r),{}):On(t)&&this.events.emit(Kt("pairing_ping",r),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit("pairing_delete",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:r,method:n}=t;try{if(this.registeredMethods.includes(n))return;const t=hr("WC_METHOD_UNSUPPORTED",n);await this.sendError(r,e,t),this.logger.error(t)}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error(hr("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(mr(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){const{message:t}=ur("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}},this.isValidPing=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!mr(e,!1)){const{message:t}=ur("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=ur("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Gt(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=ur("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=(0,Or.generateChildLogger)(t,this.name),this.pairings=new ss(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,Or.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(uo,(async e=>{const{topic:t,message:r}=e;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;const n=await this.core.crypto.decode(t,r);In(n)?(this.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):_n(n)&&(await this.core.history.resolve(n),this.onRelayEventResponse({topic:t,payload:n}))}))}registerExpirerEvents(){this.core.expirer.on(ko,(async e=>{const{topic:t}=qt(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit("pairing_expire",{topic:t}))}))}}class cs extends Mr{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new w.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=io,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:r}),this.records.has(t.id))return;const n={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r};this.records.set(n.id,n),this.events.emit(Io,n)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=On(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(_o,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((r=>{if(r.topic===e){if(typeof t<"u"&&r.id!==t)return;this.records.delete(r.id),this.events.emit(Po,r)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,Or.generateChildLogger)(t,this.name)}get context(){return(0,Or.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const r={topic:t.topic,request:pn(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(r)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=ur("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit("history_sync")}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=ur("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Io,(e=>{const t=Io;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(_o,(e=>{const t=_o;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Po,(e=>{const t=Po;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}}class ls extends Br{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new w.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=io,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const r=this.formatTarget(e),n={target:r,expiry:t};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(Oo,{target:r,expiration:n})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),r=this.getExpiration(t);this.expirations.delete(t),this.events.emit(So,{target:t,expiration:r})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,Or.generateChildLogger)(t,this.name)}get context(){return(0,Or.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function(e){return Ht("topic",e)}(e);if("number"==typeof e)return function(e){return Ht("id",e)}(e);const{message:t}=ur("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit("expirer_sync")}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=ur("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=ur("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:r}=t;(0,lt.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(ko,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(Pr.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(Oo,(e=>{const t=Oo;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(ko,(e=>{const t=ko;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(So,(e=>{const t=So;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}}class us extends $r{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Mo,this.initialized=!1,this.init=async e=>{Rt()||!Lt()||(this.verifyUrl=e?.verifyUrl||To,await this.createIframe())},this.register=async e=>{var t;if(this.initialized||await this.init(),this.iframe)try{null==(t=this.iframe.contentWindow)||t.postMessage(e.attestationId,this.verifyUrl),this.logger.info(`postMessage sent: ${e.attestationId} ${this.verifyUrl}`)}catch{}},this.resolve=async e=>{var t;if(this.isDevEnv)return"";this.logger.info(`resolving attestation: ${e.attestationId}`);const r=this.startAbortTimer(lt.FIVE_SECONDS),n=await fetch(`${this.verifyUrl}/attestation/${e.attestationId}`,{signal:this.abortController.signal});return clearTimeout(r),200===n.status?null==(t=await n.json())?void 0:t.origin:""},this.createIframe=async()=>{try{await Promise.race([new Promise(((e,t)=>{if(document.getElementById(Mo))return e();const r=document.createElement("iframe");r.setAttribute("id",Mo),r.setAttribute("src",`${this.verifyUrl}/${this.projectId}`),r.style.display="none",r.addEventListener("load",(()=>{this.initialized=!0,e()})),r.addEventListener("error",(e=>{t(e)})),document.body.append(r),this.iframe=r})),new Promise((e=>{setTimeout((()=>e("iframe load timeout")),(0,lt.toMiliseconds)(lt.ONE_SECOND/2))}))])}catch(e){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(e)}},this.logger=(0,Or.generateChildLogger)(t,this.name),this.verifyUrl=To,this.abortController=new AbortController,this.isDevEnv=jt()&&process.env.IS_VITEST}get context(){return(0,Or.getLoggerContext)(this.logger)}startAbortTimer(e){return setTimeout((()=>this.abortController.abort()),(0,lt.toMiliseconds)(e))}}var hs=Object.defineProperty,ds=Object.getOwnPropertySymbols,ps=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,ms=(e,t,r)=>t in e?hs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gs=(e,t)=>{for(var r in t||(t={}))ps.call(t,r)&&ms(e,r,t[r]);if(ds)for(var r of ds(t))fs.call(t,r)&&ms(e,r,t[r]);return e};class ws extends kr{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=no,this.events=new w.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||lo;const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,Or.pino)((0,Or.getDefaultLoggerOptions)({level:e?.logger||"error"}));this.logger=(0,Or.generateChildLogger)(t,this.name),this.heartbeat=new Pr.HeartBeat,this.crypto=new jo(this,this.logger,e?.keychain),this.history=new cs(this,this.logger),this.expirer=new ls(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new _r.ZP(gs(gs({},oo),e?.storageOptions)),this.relayer=new Xo({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new as(this,this.logger),this.verify=new us(this.projectId||"",this.logger)}static async init(e){const t=new ws(e);await t.initialize();const r=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",r),t}get context(){return(0,Or.getLoggerContext)(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const bs=ws,vs="client",ys=`wc@2:${vs}:`,xs=vs,As="Proposal expired",Cs=lt.SEVEN_DAYS,Es={wc_sessionPropose:{req:{ttl:lt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:lt.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:lt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:lt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:lt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:lt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:lt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:lt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:lt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:lt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:lt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:lt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:lt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:lt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:lt.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:lt.THIRTY_SECONDS,prompt:!1,tag:1115}}},Is={min:lt.FIVE_MINUTES,max:lt.SEVEN_DAYS},_s=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Ps=Object.defineProperty,Os=Object.defineProperties,Ss=Object.getOwnPropertyDescriptors,ks=Object.getOwnPropertySymbols,Ms=Object.prototype.hasOwnProperty,Ts=Object.prototype.propertyIsEnumerable,Ns=(e,t,r)=>t in e?Ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,js=(e,t)=>{for(var r in t||(t={}))Ms.call(t,r)&&Ns(e,r,t[r]);if(ks)for(var r of ks(t))Ts.call(t,r)&&Ns(e,r,t[r]);return e},Rs=(e,t)=>Os(e,Ss(t));class Ls extends Dr{constructor(e){super(e),this.name="engine",this.events=new(b()),this.initialized=!1,this.ignoredPayloadTypes=[1],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(Es)}),this.initialized=!0)},this.connect=async e=>{this.isInitialized();const t=Rs(js({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:r,requiredNamespaces:n,optionalNamespaces:i,sessionProperties:o,relays:s}=t;let a,c=r,l=!1;if(c&&(l=this.client.core.pairing.pairings.get(c).active),!c||!l){const{topic:e,uri:t}=await this.client.core.pairing.create();c=e,a=t}const u=await this.client.core.crypto.generateKeyPair(),h=js({requiredNamespaces:n,optionalNamespaces:i,relays:s??[{protocol:"irn"}],proposer:{publicKey:u,metadata:this.client.metadata}},o&&{sessionProperties:o}),{reject:d,resolve:p,done:f}=Wt(lt.FIVE_MINUTES,As);if(this.events.once(Kt("session_connect"),(async({error:e,session:t})=>{if(e)d(e);else if(t){t.self.publicKey=u;const e=Rs(js({},t),{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:t.peer.metadata}),p(e)}})),!c){const{message:e}=ur("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}const m=await this.sendRequest(c,"wc_sessionPropose",h),g=Vt(lt.FIVE_MINUTES);return await this.setProposal(m,js({id:m,expiry:g},h)),{uri:a,approval:f}},this.pair=async e=>(this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:r,namespaces:n,sessionProperties:i}=e,o=this.client.proposal.get(t);let{pairingTopic:s,proposer:a,requiredNamespaces:c,optionalNamespaces:l}=o;s=s||"",pr(c)||(c=function(e,t){const r=yr(e,"approve()");if(r)throw new Error(r.message);const n={};for(const[t,r]of Object.entries(e))n[t]={methods:r.methods,events:r.events,chains:r.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return n}(n));const u=await this.client.core.crypto.generateKeyPair(),h=a.publicKey,d=await this.client.core.crypto.generateSharedKey(u,h);s&&t&&(await this.client.core.pairing.updateMetadata({topic:s,metadata:a.metadata}),await this.sendResult(t,s,{relay:{protocol:r??"irn"},responderPublicKey:u}),await this.client.proposal.delete(t,hr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:s}));const p=js({relay:{protocol:r??"irn"},namespaces:n,requiredNamespaces:c,optionalNamespaces:l,pairingTopic:s,controller:{publicKey:u,metadata:this.client.metadata},expiry:Vt(Cs)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(d),await this.sendRequest(d,"wc_sessionSettle",p);const f=Rs(js({},p),{topic:d,pairingTopic:s,acknowledged:!1,self:p.controller,peer:{publicKey:a.publicKey,metadata:a.metadata},controller:u});return await this.client.session.set(d,f),await this.setExpiry(d,Vt(Cs)),{topic:d,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(d))),500)))}},this.reject=async e=>{this.isInitialized(),await this.isValidReject(e);const{id:t,reason:r}=e,{pairingTopic:n}=this.client.proposal.get(t);n&&(await this.sendError(t,n,r),await this.client.proposal.delete(t,hr("USER_DISCONNECTED")))},this.update=async e=>{this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:r}=e,n=await this.sendRequest(t,"wc_sessionUpdate",{namespaces:r}),{done:i,resolve:o,reject:s}=Wt();return this.events.once(Kt("session_update",n),(({error:e})=>{e?s(e):o()})),await this.client.session.update(t,{namespaces:r}),{acknowledged:i}},this.extend=async e=>{this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,r=await this.sendRequest(t,"wc_sessionExtend",{}),{done:n,resolve:i,reject:o}=Wt();return this.events.once(Kt("session_extend",r),(({error:e})=>{e?o(e):i()})),await this.setExpiry(t,Vt(Cs)),{acknowledged:n}},this.request=async e=>{this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:n,topic:i,expiry:o}=e,s=await this.sendRequest(i,"wc_sessionRequest",{request:n,chainId:t},o),{done:a,resolve:c,reject:l}=Wt(o);return this.events.once(Kt("session_request",s),(({error:e,result:t})=>{e?l(e):c(t)})),this.client.events.emit("session_request_sent",{topic:i,request:n,chainId:t,id:s}),async function({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;const i="string"==typeof n?JSON.parse(n):n;let o=i?.href;if("string"!=typeof o)return;o.endsWith("/")&&(o=o.slice(0,-1));const s=`${o}/wc?requestId=${e}&sessionTopic=${t}`,a=Bt();a===Tt.browser?window.open(s,"_self","noreferrer noopener"):a===Tt.reactNative&&typeof(null==r.g?void 0:r.g.Linking)<"u"&&await r.g.Linking.openURL(s)}catch(e){console.error(e)}}({id:s,topic:i,wcDeepLink:await this.client.core.storage.getItem("WALLETCONNECT_DEEPLINK_CHOICE")}),await a()},this.respond=async e=>{this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:r}=e,{id:n}=r;Pn(r)?await this.sendResult(n,t,r.result):On(r)&&await this.sendError(n,t,r.error),this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0})},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest(t,"wc_sessionPing",{}),{done:r,resolve:n,reject:i}=Wt();this.events.once(Kt("session_ping",e),(({error:e})=>{e?i(e):n()})),await r()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:r,chainId:n}=e;await this.sendRequest(t,"wc_sessionEvent",{event:r,chainId:n})},this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=dn().toString();let r;const n=t=>{t?.id.toString()===e&&(this.client.core.relayer.events.removeListener(ho,n),r())};await Promise.all([new Promise((e=>{r=e,this.client.core.relayer.on(ho,n)})),this.sendRequest(t,"wc_sessionDelete",hr("USER_DISCONNECTED"),void 0,e)]),await this.deleteSession(t)}else await this.client.core.pairing.disconnect({topic:t})},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>function(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),i=Object.keys(r);let o=!0;return!!Ut(i,n)&&(n.forEach((t=>{const{accounts:n,methods:i,events:s}=e.namespaces[t],a=or(n),c=r[t];Ut(ft(t,c),a)&&Ut(c.methods,i)&&Ut(c.events,s)||(o=!1)})),o)}(t,e)))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter((r=>{var n,i;return(null==(n=r.peerMetadata)?void 0:n.url)&&(null==(i=r.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&r.topic&&r.topic!==t.topic}));if(0===r.length)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async(e,t)=>{const{self:r}=this.client.session.get(e);await this.client.core.relayer.unsubscribe(e),this.client.session.delete(e,hr("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(r.publicKey)&&await this.client.core.crypto.deleteKeyPair(r.publicKey),this.client.core.crypto.keychain.has(e)&&await this.client.core.crypto.deleteSymKey(e),t||this.client.core.expirer.del(e)},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,hr("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,r=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)])},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,t.expiry)},this.setPendingSessionRequest=async e=>{const t=Es.wc_sessionRequest.req.ttl,{id:r,topic:n,params:i}=e;await this.client.pendingRequest.set(r,{id:r,topic:n,params:i}),t&&this.client.core.expirer.set(r,Vt(t))},this.sendRequest=async(e,t,r,n,i)=>{const o=pn(t,r);if(Lt()&&_s.includes(t)){const e=yt(JSON.stringify(o));await this.client.core.verify.register({attestationId:e})}const s=await this.client.core.crypto.encode(e,o),a=Es[t].req;return n&&(a.ttl=n),i&&(a.id=i),this.client.core.history.set(e,o),this.client.core.relayer.publish(e,s,a),o.id},this.sendResult=async(e,t,r)=>{const n=fn(e,r),i=await this.client.core.crypto.encode(t,n),o=await this.client.core.history.get(t,e),s=Es[o.request.method].res;this.client.core.relayer.publish(t,i,s),await this.client.core.history.resolve(n)},this.sendError=async(e,t,r)=>{const n=mn(e,r),i=await this.client.core.crypto.encode(t,n),o=await this.client.core.history.get(t,e),s=Es[o.request.method].res;this.client.core.relayer.publish(t,i,s),await this.client.core.history.resolve(n)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{Gt(t.expiry)&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{Gt(e.expiry)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession(e))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=e=>{const{topic:t,payload:r}=e,n=r.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeRequest(t,r);case"wc_sessionSettle":return this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return this.onSessionExtendRequest(t,r);case"wc_sessionPing":return this.onSessionPingRequest(t,r);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return this.onSessionRequest(t,r);case"wc_sessionEvent":return this.onSessionEventRequest(t,r);default:return this.client.logger.info(`Unsupported request method ${n}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.client.core.history.get(t,r.id)).request.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r);case"wc_sessionSettle":return this.onSessionSettleResponse(t,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,r);case"wc_sessionExtend":return this.onSessionExtendResponse(t,r);case"wc_sessionPing":return this.onSessionPingResponse(t,r);case"wc_sessionRequest":return this.onSessionRequestResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${n}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:r}=ur("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(r)},this.onSessionProposeRequest=async(e,t)=>{const{params:r,id:n}=t;try{this.isValidConnect(js({},t.params));const i=Vt(lt.FIVE_MINUTES),o=js({id:n,pairingTopic:e,expiry:i},r);await this.setProposal(n,o);const s=yt(JSON.stringify(t)),a=await this.getVerifyContext(s,o.proposer.metadata);this.client.events.emit("session_proposal",{id:n,params:o,verifyContext:a})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{const{id:r}=t;if(Pn(t)){const{result:n}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:n});const i=this.client.proposal.get(r);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const o=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const s=n.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:s});const a=await this.client.core.crypto.generateSharedKey(o,s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:a});const c=await this.client.core.relayer.subscribe(a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else On(t)&&(await this.client.proposal.delete(r,hr("USER_DISCONNECTED")),this.events.emit(Kt("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidSessionSettleRequest(n);const{relay:r,controller:i,expiry:o,namespaces:s,requiredNamespaces:a,optionalNamespaces:c,sessionProperties:l,pairingTopic:u}=t.params,h=js({topic:e,relay:r,expiry:o,namespaces:s,acknowledged:!0,pairingTopic:u,requiredNamespaces:a,optionalNamespaces:c,controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},l&&{sessionProperties:l});await this.sendResult(t.id,e,!0),this.events.emit(Kt("session_connect"),{session:h}),this.cleanupDuplicatePairings(h)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:r}=t;Pn(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(Kt("session_approve",r),{})):On(t)&&(await this.client.session.delete(e,hr("USER_DISCONNECTED")),this.events.emit(Kt("session_approve",r),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:r,id:n}=t;try{this.isValidUpdate(js({topic:e},r)),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult(n,e,!0),this.client.events.emit("session_update",{id:n,topic:e,params:r})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionUpdateResponse=(e,t)=>{const{id:r}=t;Pn(t)?this.events.emit(Kt("session_update",r),{}):On(t)&&this.events.emit(Kt("session_update",r),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,Vt(Cs)),await this.sendResult(r,e,!0),this.client.events.emit("session_extend",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{const{id:r}=t;Pn(t)?this.events.emit(Kt("session_extend",r),{}):On(t)&&this.events.emit(Kt("session_extend",r),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.client.events.emit("session_ping",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{const{id:r}=t;setTimeout((()=>{Pn(t)?this.events.emit(Kt("session_ping",r),{}):On(t)&&this.events.emit(Kt("session_ping",r),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(wo,(async()=>{t(await this.deleteSession(e))}))})),this.sendResult(r,e,!0)]),this.client.events.emit("session_delete",{id:r,topic:e})}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidRequest(js({topic:e},n)),await this.setPendingSessionRequest({id:r,topic:e,params:n});const i=yt(JSON.stringify(t)),o=this.client.session.get(e),s=await this.getVerifyContext(i,o.peer.metadata);this.client.events.emit("session_request",{id:r,topic:e,params:n,verifyContext:s})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:r}=t;Pn(t)?this.events.emit(Kt("session_request",r),{result:t.result}):On(t)&&this.events.emit(Kt("session_request",r),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidEmit(js({topic:e},n)),this.client.events.emit("session_event",{id:r,topic:e,params:n})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.isValidConnect=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:r,optionalNamespaces:n,sessionProperties:i,relays:o}=e;if(fr(t)||await this.isValidPairingTopic(t),!function(e,t){let r=!1;return e?e&&dr(e)&&e.length&&e.forEach((e=>{r=xr(e)})):r=!0,r}(o)){const{message:e}=ur("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(e)}!fr(r)&&0!==pr(r)&&this.validateNamespaces(r,"requiredNamespaces"),!fr(n)&&0!==pr(n)&&this.validateNamespaces(n,"optionalNamespaces"),fr(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const r=function(e,t,r){let n=null;if(e&&pr(e)){const r=vr(e,t);r&&(n=r);const i=function(e,t){let r=null;return Object.entries(e).forEach((([e,n])=>{if(r)return;const i=function(e,t,r){let n=null;return dr(t)?t.forEach((t=>{n||(!wr(t)||!t.includes(e))&&(n=hr("UNSUPPORTED_CHAINS",`${r}, chain ${t} should be a string and conform to "namespace:chainId" format`))})):n=hr("UNSUPPORTED_CHAINS",`${r}, chains ${t} should be an array of strings conforming to "namespace:chainId" format`),n}(e,ft(e,n),`${t} requiredNamespace`);i&&(r=i)})),r}(e,t);i&&(n=i)}else n=ur("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}(e,"connect()",t);if(r)throw new Error(r.message)},this.isValidApprove=async e=>{if(!Ar(e))throw new Error(ur("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:r,relayProtocol:n,sessionProperties:i}=e;await this.isValidProposalId(t);const o=this.client.proposal.get(t),s=yr(r,"approve()");if(s)throw new Error(s.message);const a=Er(o.requiredNamespaces,r,"approve()");if(a)throw new Error(a.message);if(!mr(n,!0)){const{message:e}=ur("MISSING_OR_INVALID",`approve() relayProtocol: ${n}`);throw new Error(e)}fr(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:r}=e;if(await this.isValidProposalId(t),!function(e){return!!(e&&"object"==typeof e&&e.code&&gr(e.code,!1)&&e.message&&mr(e.message,!1))}(r)){const{message:e}=ur("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:r,namespaces:n,expiry:i}=e;if(!xr(t)){const{message:e}=ur("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const o=function(e,t){let r=null;return mr(e?.publicKey,!1)||(r=ur("MISSING_OR_INVALID","onSessionSettleRequest() controller public key should be a string")),r}(r);if(o)throw new Error(o.message);const s=yr(n,"onSessionSettleRequest()");if(s)throw new Error(s.message);if(Gt(i)){const{message:e}=ur("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:r}=e;await this.isValidSessionTopic(t);const n=this.client.session.get(t),i=yr(r,"update()");if(i)throw new Error(i.message);const o=Er(n.requiredNamespaces,r,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:r,chainId:n,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:o}=this.client.session.get(t);if(!Cr(o,n)){const{message:e}=ur("MISSING_OR_INVALID",`request() chainId: ${n}`);throw new Error(e)}if(!function(e){return!(fr(e)||!mr(e.method,!1))}(r)){const{message:e}=ur("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw new Error(e)}if(!function(e,t,r){return!!mr(r,!1)&&function(e,t){const r=[];return Object.values(e).forEach((e=>{or(e.accounts).includes(t)&&r.push(...e.methods)})),r}(e,t).includes(r)}(o,n,r.method)){const{message:e}=ur("MISSING_OR_INVALID",`request() method: ${r.method}`);throw new Error(e)}if(i&&!function(e,t){return gr(e,!1)&&e<=t.max&&e>=t.min}(i,Is)){const{message:e}=ur("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${Is.min} and ${Is.max}`);throw new Error(e)}},this.isValidRespond=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:t,response:r}=e;if(await this.isValidSessionTopic(t),!function(e){return!(fr(e)||fr(e.result)&&fr(e.error)||!gr(e.id,!1)||!mr(e.jsonrpc,!1))}(r)){const{message:e}=ur("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:r,chainId:n}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!Cr(i,n)){const{message:e}=ur("MISSING_OR_INVALID",`emit() chainId: ${n}`);throw new Error(e)}if(!function(e){return!(fr(e)||!mr(e.name,!1))}(r)){const{message:e}=ur("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}if(!function(e,t,r){return!!mr(r,!1)&&function(e,t){const r=[];return Object.values(e).forEach((e=>{or(e.accounts).includes(t)&&r.push(...e.events)})),r}(e,t).includes(r)}(i,n,r.name)){const{message:e}=ur("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!Ar(e)){const{message:t}=ur("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const r={verified:{verifyUrl:t.verifyUrl||"",validation:"UNKNOWN",origin:t.url||""}};try{const n=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});n&&(r.verified.origin=n,r.verified.validation=n===t.url?"VALID":"INVALID")}catch(e){this.client.logger.error(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(r)}`),r},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!mr(e,!1)){const{message:r}=ur("MISSING_OR_INVALID",`${t} must be in Record format. Received: ${JSON.stringify(e)}`);throw new Error(r)}}))}}isInitialized(){if(!this.initialized){const{message:e}=ur("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.client.core.relayer.on(uo,(async e=>{const{topic:t,message:r}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(r)))return;const n=await this.client.core.crypto.decode(t,r);In(n)?(this.client.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):_n(n)?(await this.client.core.history.resolve(n),this.onRelayEventResponse({topic:t,payload:n})):this.onRelayEventUnknownPayload({topic:t,payload:n})}))}registerExpirerEvents(){this.client.core.expirer.on(ko,(async e=>{const{topic:t,id:r}=qt(e.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,ur("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession(t,!0),this.client.events.emit("session_expire",{topic:t})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))}))}isValidPairingTopic(e){if(!mr(e,!1)){const{message:t}=ur("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=ur("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Gt(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=ur("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!mr(e,!1)){const{message:t}=ur("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=ur("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(Gt(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:t}=ur("EXPIRED",`session topic: ${e}`);throw new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if(mr(e,!1)){const{message:t}=ur("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=ur("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if("number"!=typeof e){const{message:t}=ur("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=ur("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(Gt(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:t}=ur("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class Bs extends ss{constructor(e,t){super(e,t,"proposal",ys),this.core=e,this.logger=t}}class $s extends ss{constructor(e,t){super(e,t,"session",ys),this.core=e,this.logger=t}}class Us extends ss{constructor(e,t){super(e,t,"request",ys,(e=>e.id)),this.core=e,this.logger=t}}class Ds extends Ur{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=xs,this.events=new w.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||xs,this.metadata=e?.metadata||(0,ht.D)()||{name:"",description:"",url:"",icons:[""]};const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,Or.pino)((0,Or.getDefaultLoggerOptions)({level:e?.logger||"error"}));this.core=e?.core||new bs(e),this.logger=(0,Or.generateChildLogger)(t,this.name),this.session=new $s(this.core,this.logger),this.proposal=new Bs(this.core,this.logger),this.pendingRequest=new Us(this.core,this.logger),this.engine=new Ls(this)}static async init(e){const t=new Ds(e);return await t.initialize(),t}get context(){return(0,Or.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var zs=r(4098),Ws=r.n(zs);const Fs={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class Hs{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new w.EventEmitter,this.isAvailable=!1,this.registering=!1,!xn(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=Fr(e),r=await Ws()(this.url,Object.assign(Object.assign({},Fs),{body:t})),n=await r.json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!xn(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.isAvailable)return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=Fr({id:1,jsonrpc:"2.0",method:"test",params:[]});await Ws()(e,Object.assign(Object.assign({},Fs),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?Wr(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),n=mn(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return ln(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const qs=Hs,Vs="error",Gs="wc@2:universal_provider:",Ks="default_chain_changed";var Zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{},Qs={exports:{}};!function(e,t){(function(){var r,n="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",s=32,a=128,c=1/0,l=9007199254740991,u=NaN,h=4294967295,d=[["ary",a],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],p="[object Arguments]",f="[object Array]",m="[object Boolean]",g="[object Date]",w="[object Error]",b="[object Function]",v="[object GeneratorFunction]",y="[object Map]",x="[object Number]",A="[object Object]",C="[object Promise]",E="[object RegExp]",I="[object Set]",_="[object String]",P="[object Symbol]",O="[object WeakMap]",S="[object ArrayBuffer]",k="[object DataView]",M="[object Float32Array]",T="[object Float64Array]",N="[object Int8Array]",j="[object Int16Array]",R="[object Int32Array]",L="[object Uint8Array]",B="[object Uint8ClampedArray]",$="[object Uint16Array]",U="[object Uint32Array]",D=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,q=RegExp(F.source),V=RegExp(H.source),G=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,ee=RegExp(X.source),te=/^\s+/,re=/\s/,ne=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ie=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ae=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,le=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ue=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,fe=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ge=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,be=/['\n\r\u2028\u2029\\]/g,ve="\\ud800-\\udfff",ye="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\ufe0e\\ufe0f",Ie="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_e="["+ve+"]",Pe="["+Ie+"]",Oe="["+ye+"]",Se="\\d+",ke="["+xe+"]",Me="["+Ae+"]",Te="[^"+ve+Ie+Se+xe+Ae+Ce+"]",Ne="\\ud83c[\\udffb-\\udfff]",je="[^"+ve+"]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",Le="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Ce+"]",$e="\\u200d",Ue="(?:"+Me+"|"+Te+")",De="(?:"+Be+"|"+Te+")",ze="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Fe="(?:"+Oe+"|"+Ne+")?",He="["+Ee+"]?",qe=He+Fe+"(?:"+$e+"(?:"+[je,Re,Le].join("|")+")"+He+Fe+")*",Ve="(?:"+[ke,Re,Le].join("|")+")"+qe,Ge="(?:"+[je+Oe+"?",Oe,Re,Le,_e].join("|")+")",Ke=RegExp("['’]","g"),Ze=RegExp(Oe,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Ge+qe,"g"),Ye=RegExp([Be+"?"+Me+"+"+ze+"(?="+[Pe,Be,"$"].join("|")+")",De+"+"+We+"(?="+[Pe,Be+Ue,"$"].join("|")+")",Be+"?"+Ue+"+"+ze,Be+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Se,Ve].join("|"),"g"),Je=RegExp("["+$e+ve+ye+Ee+"]"),Xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,et=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],tt=-1,rt={};rt[M]=rt[T]=rt[N]=rt[j]=rt[R]=rt[L]=rt[B]=rt[$]=rt[U]=!0,rt[p]=rt[f]=rt[S]=rt[m]=rt[k]=rt[g]=rt[w]=rt[b]=rt[y]=rt[x]=rt[A]=rt[E]=rt[I]=rt[_]=rt[O]=!1;var nt={};nt[p]=nt[f]=nt[S]=nt[k]=nt[m]=nt[g]=nt[M]=nt[T]=nt[N]=nt[j]=nt[R]=nt[y]=nt[x]=nt[A]=nt[E]=nt[I]=nt[_]=nt[P]=nt[L]=nt[B]=nt[$]=nt[U]=!0,nt[w]=nt[b]=nt[O]=!1;var it={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,st=parseInt,at="object"==typeof Zs&&Zs&&Zs.Object===Object&&Zs,ct="object"==typeof self&&self&&self.Object===Object&&self,lt=at||ct||Function("return this")(),ut=t&&!t.nodeType&&t,ht=ut&&e&&!e.nodeType&&e,dt=ht&&ht.exports===ut,pt=dt&&at.process,ft=function(){try{return ht&&ht.require&&ht.require("util").types||pt&&pt.binding&&pt.binding("util")}catch{}}(),mt=ft&&ft.isArrayBuffer,gt=ft&&ft.isDate,wt=ft&&ft.isMap,bt=ft&&ft.isRegExp,vt=ft&&ft.isSet,yt=ft&&ft.isTypedArray;function xt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function At(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i-1}function Ot(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function Yt(e,t){for(var r=e.length;r--&&Bt(t,e[r],0)>-1;);return r}var Jt=Wt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Xt=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function er(e){return"\\"+it[e]}function tr(e){return Je.test(e)}function rr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function nr(e,t){return function(r){return e(t(r))}}function ir(e,t){for(var r=-1,n=e.length,i=0,s=[];++r",""":'"',"'":"'"}),ur=function e(t){var re=(t=null==t?lt:ur.defaults(lt.Object(),t,ur.pick(lt,et))).Array,ve=t.Date,ye=t.Error,xe=t.Function,Ae=t.Math,Ce=t.Object,Ee=t.RegExp,Ie=t.String,_e=t.TypeError,Pe=re.prototype,Oe=xe.prototype,Se=Ce.prototype,ke=t["__core-js_shared__"],Me=Oe.toString,Te=Se.hasOwnProperty,Ne=0,je=function(){var e=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Re=Se.toString,Le=Me.call(Ce),Be=lt._,$e=Ee("^"+Me.call(Te).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=dt?t.Buffer:r,De=t.Symbol,ze=t.Uint8Array,We=Ue?Ue.allocUnsafe:r,Fe=nr(Ce.getPrototypeOf,Ce),He=Ce.create,qe=Se.propertyIsEnumerable,Ve=Pe.splice,Ge=De?De.isConcatSpreadable:r,Qe=De?De.iterator:r,Je=De?De.toStringTag:r,it=function(){try{var e=so(Ce,"defineProperty");return e({},"",{}),e}catch{}}(),at=t.clearTimeout!==lt.clearTimeout&&t.clearTimeout,ct=ve&&ve.now!==lt.Date.now&&ve.now,ut=t.setTimeout!==lt.setTimeout&&t.setTimeout,ht=Ae.ceil,pt=Ae.floor,ft=Ce.getOwnPropertySymbols,jt=Ue?Ue.isBuffer:r,Wt=t.isFinite,hr=Pe.join,dr=nr(Ce.keys,Ce),pr=Ae.max,fr=Ae.min,mr=ve.now,gr=t.parseInt,wr=Ae.random,br=Pe.reverse,vr=so(t,"DataView"),yr=so(t,"Map"),xr=so(t,"Promise"),Ar=so(t,"Set"),Cr=so(t,"WeakMap"),Er=so(Ce,"create"),Ir=Cr&&new Cr,_r={},Pr=Ro(vr),Or=Ro(yr),Sr=Ro(xr),kr=Ro(Ar),Mr=Ro(Cr),Tr=De?De.prototype:r,Nr=Tr?Tr.valueOf:r,jr=Tr?Tr.toString:r;function Rr(e){if(Js(e)&&!zs(e)&&!(e instanceof Ur)){if(e instanceof $r)return e;if(Te.call(e,"__wrapped__"))return Lo(e)}return new $r(e)}var Lr=function(){function e(){}return function(t){if(!Ys(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function Br(){}function $r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Dr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function nn(e,t,n,i,o,s){var a,c=1&t,l=2&t,u=4&t;if(n&&(a=o?n(e,i,o,s):n(e)),a!==r)return a;if(!Ys(e))return e;var h=zs(e);if(h){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return Ei(e,a)}else{var d=lo(e),f=d==b||d==v;if(qs(e))return bi(e,c);if(d==A||d==p||f&&!o){if(a=l||f?{}:ho(e),!c)return l?function(e,t){return Ii(e,co(e),t)}(e,function(e,t){return e&&Ii(t,Sa(t),e)}(a,e)):function(e,t){return Ii(e,ao(e),t)}(e,Xr(a,e))}else{if(!nt[d])return o?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case S:return vi(e);case m:case g:return new n(+e);case k:return function(e,t){var r=t?vi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case M:case T:case N:case j:case R:case L:case B:case $:case U:return yi(e,r);case y:return new n;case x:case _:return new n(e);case E:return function(e){var t=new e.constructor(e.source,ue.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return new n;case P:return function(e){return Nr?Ce(Nr.call(e)):{}}(e)}}(e,d,c)}}s||(s=new Hr);var w=s.get(e);if(w)return w;s.set(e,a),na(e)?e.forEach((function(r){a.add(nn(r,t,n,r,e,s))})):Xs(e)&&e.forEach((function(r,i){a.set(i,nn(r,t,n,i,e,s))}));var C=h?r:(u?l?Xi:Ji:l?Sa:Oa)(e);return Ct(C||e,(function(r,i){C&&(r=e[i=r]),Qr(a,i,nn(r,t,n,i,e,s))})),a}function on(e,t,n){var i=n.length;if(null==e)return!i;for(e=Ce(e);i--;){var o=n[i],s=t[o],a=e[o];if(a===r&&!(o in e)||!s(a))return!1}return!0}function sn(e,t,i){if("function"!=typeof e)throw new _e(n);return _o((function(){e.apply(r,i)}),t)}function an(e,t,r,n){var i=-1,o=Pt,s=!0,a=e.length,c=[],l=t.length;if(!a)return c;r&&(t=St(t,Gt(r))),n?(o=Ot,s=!1):t.length>=200&&(o=Zt,s=!1,t=new Fr(t));e:for(;++i-1},zr.prototype.set=function(e,t){var r=this.__data__,n=Yr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Wr.prototype.clear=function(){this.size=0,this.__data__={hash:new Dr,map:new(yr||zr),string:new Dr}},Wr.prototype.delete=function(e){var t=io(this,e).delete(e);return this.size-=t?1:0,t},Wr.prototype.get=function(e){return io(this,e).get(e)},Wr.prototype.has=function(e){return io(this,e).has(e)},Wr.prototype.set=function(e,t){var r=io(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Fr.prototype.add=Fr.prototype.push=function(e){return this.__data__.set(e,i),this},Fr.prototype.has=function(e){return this.__data__.has(e)},Hr.prototype.clear=function(){this.__data__=new zr,this.size=0},Hr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Hr.prototype.get=function(e){return this.__data__.get(e)},Hr.prototype.has=function(e){return this.__data__.has(e)},Hr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof zr){var n=r.__data__;if(!yr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Wr(n)}return r.set(e,t),this.size=r.size,this};var cn=Oi(gn),ln=Oi(wn,!0);function un(e,t){var r=!0;return cn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function hn(e,t,n){for(var i=-1,o=e.length;++i0&&r(a)?t>1?pn(a,t-1,r,n,i):kt(i,a):n||(i[i.length]=a)}return i}var fn=Si(),mn=Si(!0);function gn(e,t){return e&&fn(e,t,Oa)}function wn(e,t){return e&&mn(e,t,Oa)}function bn(e,t){return _t(t,(function(t){return Ks(e[t])}))}function vn(e,t){for(var n=0,i=(t=fi(t,e)).length;null!=e&&nt}function Cn(e,t){return null!=e&&Te.call(e,t)}function En(e,t){return null!=e&&t in Ce(e)}function In(e,t,n){for(var i=n?Ot:Pt,o=e[0].length,s=e.length,a=s,c=re(s),l=1/0,u=[];a--;){var h=e[a];a&&t&&(h=St(h,Gt(t))),l=fr(h.length,l),c[a]=!n&&(t||o>=120&&h.length>=120)?new Fr(a&&h):r}h=e[0];var d=-1,p=c[0];e:for(;++d=a?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Dn(e,t,r){for(var n=-1,i=t.length,o={};++n-1;)a!==e&&Ve.call(a,c,1),Ve.call(e,c,1);return e}function Wn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;fo(i)?Ve.call(e,i,1):si(e,i)}}return e}function Fn(e,t){return e+pt(wr()*(t-e+1))}function Hn(e,t){var r="";if(!e||t<1||t>l)return r;do{t%2&&(r+=e),(t=pt(t/2))&&(e+=e)}while(t);return r}function qn(e,t){return Po(Ao(e,t,ec),e+"")}function Vn(e){return Vr(Ba(e))}function Gn(e,t){var r=Ba(e);return ko(r,rn(t,0,r.length))}function Kn(e,t,n,i){if(!Ys(e))return e;for(var o=-1,s=(t=fi(t,e)).length,a=s-1,c=e;null!=c&&++oi?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=re(i);++n>>1,s=e[o];null!==s&&!oa(s)&&(r?s<=t:s=200){var l=t?null:Hi(e);if(l)return or(l);s=!1,i=Zt,c=new Fr}else c=t?[]:a;e:for(;++n=i?e:Jn(e,t,n)}var wi=at||function(e){return lt.clearTimeout(e)};function bi(e,t){if(t)return e.slice();var r=e.length,n=We?We(r):new e.constructor(r);return e.copy(n),n}function vi(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function yi(e,t){var r=t?vi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,s=oa(e),a=t!==r,c=null===t,l=t==t,u=oa(t);if(!c&&!u&&!s&&e>t||s&&a&&l&&!c&&!u||i&&a&&l||!n&&l||!o)return 1;if(!i&&!s&&!u&&e1?n[o-1]:r,a=o>2?n[2]:r;for(s=e.length>3&&"function"==typeof s?(o--,s):r,a&&mo(n[0],n[1],a)&&(s=o<3?r:s,o=1),t=Ce(t);++i-1?o[s?t[a]:a]:r}}function ji(e){return Yi((function(t){var i=t.length,o=i,s=$r.prototype.thru;for(e&&t.reverse();o--;){var a=t[o];if("function"!=typeof a)throw new _e(n);if(s&&!c&&"wrapper"==to(a))var c=new $r([],!0)}for(o=c?o:i;++o1&&v.reverse(),d&&uc))return!1;var u=s.get(e),h=s.get(t);if(u&&h)return u==t&&h==e;var d=-1,p=!0,f=2&n?new Fr:r;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ne,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Ct(d,(function(r){var n="_."+r[0];t&r[1]&&!Pt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ie);return t?t[1].split(oe):[]}(n),r)))}function So(e){var t=0,n=0;return function(){var i=mr(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function ko(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,rs(e,n)}));function ls(e){var t=Rr(e);return t.__chain__=!0,t}function us(e,t){return t(e)}var hs=Yi((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return tn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Ur&&fo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:us,args:[o],thisArg:r}),new $r(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)})),ds=_i((function(e,t,r){Te.call(e,r)?++e[r]:en(e,r,1)})),ps=Ni(Do),fs=Ni(zo);function ms(e,t){return(zs(e)?Ct:cn)(e,no(t,3))}function gs(e,t){return(zs(e)?Et:ln)(e,no(t,3))}var ws=_i((function(e,t,r){Te.call(e,r)?e[r].push(t):en(e,r,[t])})),bs=qn((function(e,t,r){var n=-1,i="function"==typeof t,o=Fs(e)?re(e.length):[];return cn(e,(function(e){o[++n]=i?xt(t,e,r):_n(e,t,r)})),o})),vs=_i((function(e,t,r){en(e,r,t)}));function ys(e,t){return(zs(e)?St:jn)(e,no(t,3))}var xs=_i((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),As=qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&mo(e,t[0],t[1])?t=[]:r>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Un(e,pn(t,1),[])})),Cs=ct||function(){return lt.Date.now()};function Es(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Vi(e,a,r,r,r,r,t)}function Is(e,t){var i;if("function"!=typeof t)throw new _e(n);return e=ha(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var _s=qn((function(e,t,r){var n=1;if(r.length){var i=ir(r,ro(_s));n|=s}return Vi(e,n,t,r,i)})),Ps=qn((function(e,t,r){var n=3;if(r.length){var i=ir(r,ro(Ps));n|=s}return Vi(t,n,e,r,i)}));function Os(e,t,i){var o,s,a,c,l,u,h=0,d=!1,p=!1,f=!0;if("function"!=typeof e)throw new _e(n);function m(t){var n=o,i=s;return o=s=r,h=t,c=e.apply(i,n)}function g(e){var n=e-u;return u===r||n>=t||n<0||p&&e-h>=a}function w(){var e=Cs();if(g(e))return b(e);l=_o(w,function(e){var r=t-(e-u);return p?fr(r,a-(e-h)):r}(e))}function b(e){return l=r,f&&o?m(e):(o=s=r,c)}function v(){var e=Cs(),n=g(e);if(o=arguments,s=this,u=e,n){if(l===r)return function(e){return h=e,l=_o(w,t),d?m(e):c}(u);if(p)return wi(l),l=_o(w,t),m(u)}return l===r&&(l=_o(w,t)),c}return t=pa(t)||0,Ys(i)&&(d=!!i.leading,a=(p="maxWait"in i)?pr(pa(i.maxWait)||0,t):a,f="trailing"in i?!!i.trailing:f),v.cancel=function(){l!==r&&wi(l),h=0,o=u=s=l=r},v.flush=function(){return l===r?c:b(Cs())},v}var Ss=qn((function(e,t){return sn(e,1,t)})),ks=qn((function(e,t,r){return sn(e,pa(t)||0,r)}));function Ms(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ms.Cache||Wr),r}function Ts(e){if("function"!=typeof e)throw new _e(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ms.Cache=Wr;var Ns=mi((function(e,t){var r=(t=1==t.length&&zs(t[0])?St(t[0],Gt(no())):St(pn(t,1),Gt(no()))).length;return qn((function(n){for(var i=-1,o=fr(n.length,r);++i=t})),Ds=Pn(function(){return arguments}())?Pn:function(e){return Js(e)&&Te.call(e,"callee")&&!qe.call(e,"callee")},zs=re.isArray,Ws=mt?Gt(mt):function(e){return Js(e)&&xn(e)==S};function Fs(e){return null!=e&&Qs(e.length)&&!Ks(e)}function Hs(e){return Js(e)&&Fs(e)}var qs=jt||pc,Vs=gt?Gt(gt):function(e){return Js(e)&&xn(e)==g};function Gs(e){if(!Js(e))return!1;var t=xn(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ta(e)}function Ks(e){if(!Ys(e))return!1;var t=xn(e);return t==b||t==v||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Zs(e){return"number"==typeof e&&e==ha(e)}function Qs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function Ys(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Js(e){return null!=e&&"object"==typeof e}var Xs=wt?Gt(wt):function(e){return Js(e)&&lo(e)==y};function ea(e){return"number"==typeof e||Js(e)&&xn(e)==x}function ta(e){if(!Js(e)||xn(e)!=A)return!1;var t=Fe(e);if(null===t)return!0;var r=Te.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Me.call(r)==Le}var ra=bt?Gt(bt):function(e){return Js(e)&&xn(e)==E},na=vt?Gt(vt):function(e){return Js(e)&&lo(e)==I};function ia(e){return"string"==typeof e||!zs(e)&&Js(e)&&xn(e)==_}function oa(e){return"symbol"==typeof e||Js(e)&&xn(e)==P}var sa=yt?Gt(yt):function(e){return Js(e)&&Qs(e.length)&&!!rt[xn(e)]},aa=zi(Nn),ca=zi((function(e,t){return e<=t}));function la(e){if(!e)return[];if(Fs(e))return ia(e)?ar(e):Ei(e);if(Qe&&e[Qe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Qe]());var t=lo(e);return(t==y?rr:t==I?or:Ba)(e)}function ua(e){return e?(e=pa(e))===c||e===-c?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ha(e){var t=ua(e),r=t%1;return t==t?r?t-r:t:0}function da(e){return e?rn(ha(e),0,h):0}function pa(e){if("number"==typeof e)return e;if(oa(e))return u;if(Ys(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ys(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Vt(e);var r=de.test(e);return r||fe.test(e)?st(e.slice(2),r?2:8):he.test(e)?u:+e}function fa(e){return Ii(e,Sa(e))}function ma(e){return null==e?"":ii(e)}var ga=Pi((function(e,t){if(vo(t)||Fs(t))Ii(t,Oa(t),e);else for(var r in t)Te.call(t,r)&&Qr(e,r,t[r])})),wa=Pi((function(e,t){Ii(t,Sa(t),e)})),ba=Pi((function(e,t,r,n){Ii(t,Sa(t),e,n)})),va=Pi((function(e,t,r,n){Ii(t,Oa(t),e,n)})),ya=Yi(tn),xa=qn((function(e,t){e=Ce(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&mo(t[0],t[1],o)&&(i=1);++n1),t})),Ii(e,Xi(e),r),n&&(r=nn(r,7,Zi));for(var i=t.length;i--;)si(r,t[i]);return r})),Na=Yi((function(e,t){return null==e?{}:function(e,t){return Dn(e,t,(function(t,r){return Ea(e,r)}))}(e,t)}));function ja(e,t){if(null==e)return{};var r=St(Xi(e),(function(e){return[e]}));return t=no(t),Dn(e,r,(function(e,r){return t(e,r[0])}))}var Ra=qi(Oa),La=qi(Sa);function Ba(e){return null==e?[]:Kt(e,Oa(e))}var $a=Mi((function(e,t,r){return t=t.toLowerCase(),e+(r?Ua(t):t)}));function Ua(e){return Ga(ma(e).toLowerCase())}function Da(e){return(e=ma(e))&&e.replace(ge,Jt).replace(Ze,"")}var za=Mi((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Wa=Mi((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Fa=ki("toLowerCase"),Ha=Mi((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),qa=Mi((function(e,t,r){return e+(r?" ":"")+Ga(t)})),Va=Mi((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ga=ki("toUpperCase");function Ka(e,t,n){return e=ma(e),(t=n?r:t)===r?function(e){return Xe.test(e)}(e)?function(e){return e.match(Ye)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Za=qn((function(e,t){try{return xt(e,r,t)}catch(e){return Gs(e)?e:new ye(e)}})),Qa=Yi((function(e,t){return Ct(t,(function(t){t=jo(t),en(e,t,_s(e[t],e))})),e}));function Ya(e){return function(){return e}}var Ja=ji(),Xa=ji(!0);function ec(e){return e}function tc(e){return Mn("function"==typeof e?e:nn(e,1))}var rc=qn((function(e,t){return function(r){return _n(r,e,t)}})),nc=qn((function(e,t){return function(r){return _n(e,r,t)}}));function ic(e,t,r){var n=Oa(t),i=bn(t,n);null==r&&(!Ys(t)||!i.length&&n.length)&&(r=t,t=e,e=this,i=bn(t,Oa(t)));var o=!(Ys(r)&&"chain"in r&&!r.chain),s=Ks(e);return Ct(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ei(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,kt([this.value()],arguments))})})),e}function oc(){}var sc=$i(St),ac=$i(It),cc=$i(Nt);function lc(e){return go(e)?zt(jo(e)):function(e){return function(t){return vn(t,e)}}(e)}var uc=Di(),hc=Di(!0);function dc(){return[]}function pc(){return!1}var fc=Bi((function(e,t){return e+t}),0),mc=Fi("ceil"),gc=Bi((function(e,t){return e/t}),1),wc=Fi("floor"),bc=Bi((function(e,t){return e*t}),1),vc=Fi("round"),yc=Bi((function(e,t){return e-t}),0);return Rr.after=function(e,t){if("function"!=typeof t)throw new _e(n);return e=ha(e),function(){if(--e<1)return t.apply(this,arguments)}},Rr.ary=Es,Rr.assign=ga,Rr.assignIn=wa,Rr.assignInWith=ba,Rr.assignWith=va,Rr.at=ya,Rr.before=Is,Rr.bind=_s,Rr.bindAll=Qa,Rr.bindKey=Ps,Rr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return zs(e)?e:[e]},Rr.chain=ls,Rr.chunk=function(e,t,n){t=(n?mo(e,t,n):t===r)?1:pr(ha(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,a=re(ht(i/t));oo?0:o+n),(i=i===r||i>o?o:ha(i))<0&&(i+=o),i=n>i?0:da(i);n>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ra(t))&&!(t=ii(t))&&tr(e)?gi(ar(e),0,n):e.split(t,n):[]},Rr.spread=function(e,t){if("function"!=typeof e)throw new _e(n);return t=null==t?0:pr(ha(t),0),qn((function(r){var n=r[t],i=gi(r,0,t);return n&&kt(i,n),xt(e,this,i)}))},Rr.tail=function(e){var t=null==e?0:e.length;return t?Jn(e,1,t):[]},Rr.take=function(e,t,n){return e&&e.length?Jn(e,0,(t=n||t===r?1:ha(t))<0?0:t):[]},Rr.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Jn(e,(t=i-(t=n||t===r?1:ha(t)))<0?0:t,i):[]},Rr.takeRightWhile=function(e,t){return e&&e.length?ci(e,no(t,3),!1,!0):[]},Rr.takeWhile=function(e,t){return e&&e.length?ci(e,no(t,3)):[]},Rr.tap=function(e,t){return t(e),e},Rr.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new _e(n);return Ys(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Os(e,t,{leading:i,maxWait:t,trailing:o})},Rr.thru=us,Rr.toArray=la,Rr.toPairs=Ra,Rr.toPairsIn=La,Rr.toPath=function(e){return zs(e)?St(e,jo):oa(e)?[e]:Ei(No(ma(e)))},Rr.toPlainObject=fa,Rr.transform=function(e,t,r){var n=zs(e),i=n||qs(e)||sa(e);if(t=no(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Ys(e)&&Ks(o)?Lr(Fe(e)):{}}return(i?Ct:gn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Rr.unary=function(e){return Es(e,1)},Rr.union=Jo,Rr.unionBy=Xo,Rr.unionWith=es,Rr.uniq=function(e){return e&&e.length?oi(e):[]},Rr.uniqBy=function(e,t){return e&&e.length?oi(e,no(t,2)):[]},Rr.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?oi(e,r,t):[]},Rr.unset=function(e,t){return null==e||si(e,t)},Rr.unzip=ts,Rr.unzipWith=rs,Rr.update=function(e,t,r){return null==e?e:ai(e,t,pi(r))},Rr.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:ai(e,t,pi(n),i)},Rr.values=Ba,Rr.valuesIn=function(e){return null==e?[]:Kt(e,Sa(e))},Rr.without=ns,Rr.words=Ka,Rr.wrap=function(e,t){return js(pi(t),e)},Rr.xor=is,Rr.xorBy=os,Rr.xorWith=ss,Rr.zip=as,Rr.zipObject=function(e,t){return hi(e||[],t||[],Qr)},Rr.zipObjectDeep=function(e,t){return hi(e||[],t||[],Kn)},Rr.zipWith=cs,Rr.entries=Ra,Rr.entriesIn=La,Rr.extend=wa,Rr.extendWith=ba,ic(Rr,Rr),Rr.add=fc,Rr.attempt=Za,Rr.camelCase=$a,Rr.capitalize=Ua,Rr.ceil=mc,Rr.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=pa(n))==n?n:0),t!==r&&(t=(t=pa(t))==t?t:0),rn(pa(e),t,n)},Rr.clone=function(e){return nn(e,4)},Rr.cloneDeep=function(e){return nn(e,5)},Rr.cloneDeepWith=function(e,t){return nn(e,5,t="function"==typeof t?t:r)},Rr.cloneWith=function(e,t){return nn(e,4,t="function"==typeof t?t:r)},Rr.conformsTo=function(e,t){return null==t||on(e,t,Oa(t))},Rr.deburr=Da,Rr.defaultTo=function(e,t){return null==e||e!=e?t:e},Rr.divide=gc,Rr.endsWith=function(e,t,n){e=ma(e),t=ii(t);var i=e.length,o=n=n===r?i:rn(ha(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},Rr.eq=Bs,Rr.escape=function(e){return(e=ma(e))&&V.test(e)?e.replace(H,Xt):e},Rr.escapeRegExp=function(e){return(e=ma(e))&&ee.test(e)?e.replace(X,"\\$&"):e},Rr.every=function(e,t,n){var i=zs(e)?It:un;return n&&mo(e,t,n)&&(t=r),i(e,no(t,3))},Rr.find=ps,Rr.findIndex=Do,Rr.findKey=function(e,t){return Rt(e,no(t,3),gn)},Rr.findLast=fs,Rr.findLastIndex=zo,Rr.findLastKey=function(e,t){return Rt(e,no(t,3),wn)},Rr.floor=wc,Rr.forEach=ms,Rr.forEachRight=gs,Rr.forIn=function(e,t){return null==e?e:fn(e,no(t,3),Sa)},Rr.forInRight=function(e,t){return null==e?e:mn(e,no(t,3),Sa)},Rr.forOwn=function(e,t){return e&&gn(e,no(t,3))},Rr.forOwnRight=function(e,t){return e&&wn(e,no(t,3))},Rr.get=Ca,Rr.gt=$s,Rr.gte=Us,Rr.has=function(e,t){return null!=e&&uo(e,t,Cn)},Rr.hasIn=Ea,Rr.head=Fo,Rr.identity=ec,Rr.includes=function(e,t,r,n){e=Fs(e)?e:Ba(e),r=r&&!n?ha(r):0;var i=e.length;return r<0&&(r=pr(i+r,0)),ia(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Bt(e,t,r)>-1},Rr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ha(r);return i<0&&(i=pr(n+i,0)),Bt(e,t,i)},Rr.inRange=function(e,t,n){return t=ua(t),n===r?(n=t,t=0):n=ua(n),function(e,t,r){return e>=fr(t,r)&&e=-l&&e<=l},Rr.isSet=na,Rr.isString=ia,Rr.isSymbol=oa,Rr.isTypedArray=sa,Rr.isUndefined=function(e){return e===r},Rr.isWeakMap=function(e){return Js(e)&&lo(e)==O},Rr.isWeakSet=function(e){return Js(e)&&"[object WeakSet]"==xn(e)},Rr.join=function(e,t){return null==e?"":hr.call(e,t)},Rr.kebabCase=za,Rr.last=Go,Rr.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=ha(n))<0?pr(i+o,0):fr(o,i-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Lt(e,Ut,o,!0)},Rr.lowerCase=Wa,Rr.lowerFirst=Fa,Rr.lt=aa,Rr.lte=ca,Rr.max=function(e){return e&&e.length?hn(e,ec,An):r},Rr.maxBy=function(e,t){return e&&e.length?hn(e,no(t,2),An):r},Rr.mean=function(e){return Dt(e,ec)},Rr.meanBy=function(e,t){return Dt(e,no(t,2))},Rr.min=function(e){return e&&e.length?hn(e,ec,Nn):r},Rr.minBy=function(e,t){return e&&e.length?hn(e,no(t,2),Nn):r},Rr.stubArray=dc,Rr.stubFalse=pc,Rr.stubObject=function(){return{}},Rr.stubString=function(){return""},Rr.stubTrue=function(){return!0},Rr.multiply=bc,Rr.nth=function(e,t){return e&&e.length?$n(e,ha(t)):r},Rr.noConflict=function(){return lt._===this&&(lt._=Be),this},Rr.noop=oc,Rr.now=Cs,Rr.pad=function(e,t,r){e=ma(e);var n=(t=ha(t))?sr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ui(pt(i),r)+e+Ui(ht(i),r)},Rr.padEnd=function(e,t,r){e=ma(e);var n=(t=ha(t))?sr(e):0;return t&&nt){var i=e;e=t,t=i}if(n||e%1||t%1){var o=wr();return fr(e+o*(t-e+ot("1e-"+((o+"").length-1))),t)}return Fn(e,t)},Rr.reduce=function(e,t,r){var n=zs(e)?Mt:Ft,i=arguments.length<3;return n(e,no(t,4),r,i,cn)},Rr.reduceRight=function(e,t,r){var n=zs(e)?Tt:Ft,i=arguments.length<3;return n(e,no(t,4),r,i,ln)},Rr.repeat=function(e,t,n){return t=(n?mo(e,t,n):t===r)?1:ha(t),Hn(ma(e),t)},Rr.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Rr.result=function(e,t,n){var i=-1,o=(t=fi(t,e)).length;for(o||(o=1,e=r);++il)return[];var r=h,n=fr(e,h);t=no(t),e-=h;for(var i=qt(n,t);++r=s)return e;var c=n-sr(i);if(c<1)return i;var l=a?gi(a,0,c).join(""):e.slice(0,c);if(o===r)return l+i;if(a&&(c+=l.length-c),ra(o)){if(e.slice(c).search(o)){var u,h=l;for(o.global||(o=Ee(o.source,ma(ue.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var d=u.index;l=l.slice(0,d===r?c:d)}}else if(e.indexOf(ii(o),c)!=c){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+i},Rr.unescape=function(e){return(e=ma(e))&&q.test(e)?e.replace(F,lr):e},Rr.uniqueId=function(e){var t=++Ne;return ma(e)+t},Rr.upperCase=Va,Rr.upperFirst=Ga,Rr.each=ms,Rr.eachRight=gs,Rr.first=Fo,ic(Rr,function(){var e={};return gn(Rr,(function(t,r){Te.call(Rr.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),Rr.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Rr[e].placeholder=Rr})),Ct(["drop","take"],(function(e,t){Ur.prototype[e]=function(n){n=n===r?1:pr(ha(n),0);var i=this.__filtered__&&!t?new Ur(this):this.clone();return i.__filtered__?i.__takeCount__=fr(n,i.__takeCount__):i.__views__.push({size:fr(n,h),type:e+(i.__dir__<0?"Right":"")}),i},Ur.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Ur.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:no(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Ct(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Ur.prototype[e]=function(){return this[r](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Ur.prototype[e]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(ec)},Ur.prototype.find=function(e){return this.filter(e).head()},Ur.prototype.findLast=function(e){return this.reverse().find(e)},Ur.prototype.invokeMap=qn((function(e,t){return"function"==typeof e?new Ur(this):this.map((function(r){return _n(r,e,t)}))})),Ur.prototype.reject=function(e){return this.filter(Ts(no(e)))},Ur.prototype.slice=function(e,t){e=ha(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Ur(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ha(t))<0?n.dropRight(-t):n.take(t-e)),n)},Ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ur.prototype.toArray=function(){return this.take(h)},gn(Ur.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Rr[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(Rr.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,c=t instanceof Ur,l=a[0],u=c||zs(t),h=function(e){var t=o.apply(Rr,kt([e],a));return i&&d?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var d=this.__chain__,p=!!this.__actions__.length,f=s&&!d,m=c&&!p;if(!s&&u){t=m?t:new Ur(this);var g=e.apply(t,a);return g.__actions__.push({func:us,args:[h],thisArg:r}),new $r(g,d)}return f&&m?e.apply(this,a):(g=this.thru(h),f?i?g.value()[0]:g.value():g)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Rr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(zs(i)?i:[],e)}return this[r]((function(r){return t.apply(zs(r)?r:[],e)}))}})),gn(Ur.prototype,(function(e,t){var r=Rr[t];if(r){var n=r.name+"";Te.call(_r,n)||(_r[n]=[]),_r[n].push({name:t,func:r})}})),_r[Ri(r,2).name]=[{name:"wrapper",func:r}],Ur.prototype.clone=function(){var e=new Ur(this.__wrapped__);return e.__actions__=Ei(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ei(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ei(this.__views__),e},Ur.prototype.reverse=function(){if(this.__filtered__){var e=new Ur(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ur.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=zs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Rr.prototype.plant=function(e){for(var t,n=this;n instanceof Br;){var i=Lo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},Rr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ur){var t=e;return this.__actions__.length&&(t=new Ur(this)),(t=t.reverse()).__actions__.push({func:us,args:[Yo],thisArg:r}),new $r(t,this.__chain__)}return this.thru(Yo)},Rr.prototype.toJSON=Rr.prototype.valueOf=Rr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Rr.prototype.first=Rr.prototype.head,Qe&&(Rr.prototype[Qe]=function(){return this}),Rr}();ht?((ht.exports=ur)._=ur,ut._=ur):lt._=ur}).call(Zs)}(Qs,Qs.exports);var Ys=Object.defineProperty,Js=Object.defineProperties,Xs=Object.getOwnPropertyDescriptors,ea=Object.getOwnPropertySymbols,ta=Object.prototype.hasOwnProperty,ra=Object.prototype.propertyIsEnumerable,na=(e,t,r)=>t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ia=(e,t)=>{for(var r in t||(t={}))ta.call(t,r)&&na(e,r,t[r]);if(ea)for(var r of ea(t))ra.call(t,r)&&na(e,r,t[r]);return e},oa=(e,t)=>Js(e,Xs(t));function sa(e,t,r){let n;const i=aa(e);return t.rpcMap&&(n=t.rpcMap[i]),n||(n=`https://rpc.walletconnect.com/v1?chainId=eip155:${i}&projectId=${r}`),n}function aa(e){return e.includes("eip155")?Number(e.split(":")[1]):Number(e)}function ca(e){var t,r,n,i;const o={};if(!pr(e))return o;for(const[s,a]of Object.entries(e)){const e=sr(s)?[s]:a.chains,c=a.methods||[],l=a.events||[],u=a.rpcMap||{},h=ar(s);o[h]=oa(ia(ia({},o[h]),a),{chains:Zt(e,null==(t=o[h])?void 0:t.chains),methods:Zt(c,null==(r=o[h])?void 0:r.methods),events:Zt(l,null==(n=o[h])?void 0:n.events),rpcMap:ia(ia({},u),null==(i=o[h])?void 0:i.rpcMap)})}return o}const la={},ua=e=>la[e],ha=(e,t)=>{la[e]=t};class da{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=ua("events"),this.client=ua("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const r=t||sa(`${this.name}:${e}`,this.namespace);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Ks,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||sa(e,this.namespace);return typeof r>"u"?void 0:new Sn(new qs(r,ua("disableProviderPing")))}}class pa{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=ua("events"),this.client=ua("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){const r=aa(e);if(!this.httpProviders[r]){const e=t||sa(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!e)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,e)}this.chainId=r,this.events.emit(Ks,`${this.name}:${r}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const r=t||sa(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Sn(new Hs(r,ua("disableProviderPing")))}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=aa(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t;let r=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const n=parseInt(r,16);if(this.isChainApproved(n))this.setDefaultChain(`${n}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${n}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:r}]},chainId:e.chainId}),this.setDefaultChain(`${n}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class fa{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=ua("events"),this.client=ua("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const r=t||sa(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Ks,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||sa(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Sn(new qs(r,ua("disableProviderPing")))}}class ma{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=ua("events"),this.client=ua("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const r=t||sa(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Ks,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||sa(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Sn(new qs(r,ua("disableProviderPing")))}}class ga{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=ua("events"),this.client=ua("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const r=t||this.getCardanoRPCUrl(e);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Ks,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const r=this.getCardanoRPCUrl(t);e[t]=this.createHttpProvider(t,r)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||this.getCardanoRPCUrl(e);return typeof r>"u"?void 0:new Sn(new qs(r,ua("disableProviderPing")))}}class wa{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=ua("events"),this.client=ua("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const r=t||sa(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Ks,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||sa(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Sn(new qs(r,ua("disableProviderPing")))}}class ba{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=ua("events"),this.client=ua("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const r=t||sa(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Ks,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||sa(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Sn(new qs(r,ua("disableProviderPing")))}}var va=Object.defineProperty,ya=Object.defineProperties,xa=Object.getOwnPropertyDescriptors,Aa=Object.getOwnPropertySymbols,Ca=Object.prototype.hasOwnProperty,Ea=Object.prototype.propertyIsEnumerable,Ia=(e,t,r)=>t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_a=(e,t)=>{for(var r in t||(t={}))Ca.call(t,r)&&Ia(e,r,t[r]);if(Aa)for(var r of Aa(t))Ea.call(t,r)&&Ia(e,r,t[r]);return e},Pa=(e,t)=>ya(e,xa(t));class Oa{constructor(e){this.events=new(b()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,Or.pino)((0,Or.getDefaultLoggerOptions)({level:e?.logger||Vs})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new Oa(e);return await t.initialize(),t}async request(e,t){const[r,n]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(r).request({request:_a({},e),chainId:`${r}:${n}`,topic:this.session.topic})}sendAsync(e,t,r){this.request(e,r).then((e=>t(null,e))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:hr("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await n().then((e=>{this.session=e})).catch((e=>{if(e.message!==As)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{const[r,n]=this.validateChain(e);this.getProvider(r).setDefaultChain(n,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(dr(t)){for(const r of t)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await Ds.init({logger:this.providerOpts.logger||Vs,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>ar(e))))];ha("client",this.client),ha("events",this.events),ha("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=function(e,t){const r=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!r.length)return[];const n=[];return r.forEach((e=>{const r=t.namespaces[e].accounts;n.push(...r)})),n}(e,this.session),r=function(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}(t),n=function(e,t={}){const r=ca(e),n=ca(t);return Qs.exports.merge(r,n)}(this.namespaces,this.optionalNamespaces),i=Pa(_a({},n[e]),{accounts:t,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new pa({namespace:i});break;case"solana":this.rpcProviders[e]=new fa({namespace:i});break;case"cosmos":this.rpcProviders[e]=new ma({namespace:i});break;case"polkadot":this.rpcProviders[e]=new da({namespace:i});break;case"cip34":this.rpcProviders[e]=new ga({namespace:i});break;case"elrond":this.rpcProviders[e]=new wa({namespace:i});break;case"multiversx":this.rpcProviders[e]=new ba({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:r}=t;"accountsChanged"===r.name?this.events.emit("accountsChanged",r.data):"chainChanged"===r.name?this.onChainChanged(t.chainId):this.events.emit(r.name,r.data),this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var r;const{namespaces:n}=t,i=null==(r=this.client)?void 0:r.session.get(e);this.session=Pa(_a({},i),{namespaces:n}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",Pa(_a({},hr("USER_DISCONNECTED")),{data:e.topic}))})),this.on(Ks,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:r,sessionProperties:n}=e;if(!t||!Object.keys(t).length)throw new Error("Namespaces must be not empty");this.namespaces=t,this.optionalNamespaces=r,this.sessionProperties=n,this.persist("namespaces",t),this.persist("optionalNamespaces",r)}validateChain(e){const[t,r]=e?.split(":")||["",""];if(t&&!Object.keys(this.namespaces).map((e=>ar(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];const n=ar(Object.keys(this.namespaces)[0]);return[n,this.rpcProviders[n].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var r;const[n,i]=this.validateChain(e);t||this.getProvider(n).setDefaultChain(i),(null!=(r=this.namespaces[n])?r:this.namespaces[`${n}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Gs}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Gs}/${e}`)}}const Sa=Oa,ka=["eth_sendTransaction","personal_sign"],Ma=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],Ta=["chainChanged","accountsChanged"],Na=["message","disconnect","connect"];var ja=Object.defineProperty,Ra=Object.defineProperties,La=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertySymbols,$a=Object.prototype.hasOwnProperty,Ua=Object.prototype.propertyIsEnumerable,Da=(e,t,r)=>t in e?ja(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,za=(e,t)=>{for(var r in t||(t={}))$a.call(t,r)&&Da(e,r,t[r]);if(Ba)for(var r of Ba(t))Ua.call(t,r)&&Da(e,r,t[r]);return e},Wa=(e,t)=>Ra(e,La(t));function Fa(e){return Number(e[0].split(":")[1])}function Ha(e){return`0x${e.toString(16)}`}class qa{constructor(){this.events=new w.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new qa;return await t.initialize(e),t}async request(e){return await this.signer.request(e,this.formatChainId(this.chainId))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:r}=function(e){const{chains:t,optionalChains:r,methods:n,optionalMethods:i,events:o,optionalEvents:s,rpcMap:a}=e;if(!dr(t))throw new Error("Invalid chains");const c=t,l=n||ka,u=o||Ta,h={chains:c,methods:l,events:u,rpcMap:{[Fa(c)]:a[Fa(c)]}},d=o?.filter((e=>!Ta.includes(e))),p=n?.filter((e=>!ka.includes(e)));return r||s||i||null!=d&&d.length||null!=p&&p.length?{required:h,optional:{chains:[...new Set(d?.length&&p?.length||!r?c.concat(r||[]):r)],methods:[...new Set(l.concat(i||[]))],events:[...new Set(u.concat(s||[]))],rpcMap:a}}:{required:h}}(this.rpc);try{const n=await new Promise((async(n,i)=>{var o;this.rpc.showQrModal&&(null==(o=this.modal)||o.subscribeModal((e=>{!e.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),i(new Error("Connection request reset. Please try again.")))}))),await this.signer.connect(Wa(za({namespaces:{[this.namespace]:t}},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:e?.pairingTopic})).then((e=>{n(e)})).catch((e=>{i(new Error(e.message))}))}));if(!n)return;this.setChainIds(this.rpc.chains);const i=function(e,t=[]){const r=[];return Object.keys(e).forEach((n=>{if(t.length&&!t.includes(n))return;const i=e[n];r.push(...i.accounts)})),r}(n.namespaces,[this.namespace]);this.setAccounts(i),this.events.emit("connect",{chainId:Ha(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:r}=t;"accountsChanged"===r.name?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===r.name?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Ha(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Wa(za({},hr("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{var t,r;this.rpc.showQrModal&&(null==(t=this.modal)||t.closeModal(),null==(r=this.modal)||r.openModal({uri:e})),this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))).map((e=>this.parseChainId(e)));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Ha(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,r,n]=e.split(":");return{chainId:`${t}:${r}`,address:n}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,r;return{chains:(null==(t=e.chains)?void 0:t.map((e=>this.formatChainId(e))))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map((e=>this.formatChainId(e))):void 0,methods:e?.methods||ka,events:e?.events||Ta,optionalMethods:e?.optionalMethods||[],optionalEvents:e?.optionalEvents||[],rpcMap:e?.rpcMap||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),showQrModal:!(null==e||!e.showQrModal),qrModalOptions:null!=(r=e?.qrModalOptions)?r:void 0,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const r={};return e.forEach((e=>{r[e]=this.getRpcUrl(e,t)})),r}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=Fa(this.rpc.chains),this.signer=await Sa.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let e;try{const{WalletConnectModal:t}=await Promise.resolve().then(r.bind(r,9343));e=t}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(e)try{this.modal=new e(za({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(e){throw this.signer.logger.error(e),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:r,rpcMap:n}=e;t&&dr(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)}))),r&&dr(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=r?.map((e=>this.formatChainId(e))),r.forEach((e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)})))}getRpcUrl(e,t){var r;return(null==(r=this.rpc.rpcMap)?void 0:r[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t?.accounts),this.setAccounts(t?.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}},8200:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});class n{}},997:(e,t,r)=>{"use strict";r.r(t),r.d(t,{IEvents:()=>n.q});var n=r(8200)},2568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HEARTBEAT_EVENTS=t.HEARTBEAT_INTERVAL=void 0;const n=r(6736);t.HEARTBEAT_INTERVAL=n.FIVE_SECONDS,t.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},3401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(2568),t)},8969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartBeat=void 0;const n=r(655),i=r(7187),o=r(6736),s=r(1614),a=r(3401);class c extends s.IHeartBeat{constructor(e){super(e),this.events=new i.EventEmitter,this.interval=a.HEARTBEAT_INTERVAL,this.interval=(null==e?void 0:e.interval)||a.HEARTBEAT_INTERVAL}static init(e){return n.__awaiter(this,void 0,void 0,(function*(){const t=new c(e);return yield t.init(),t}))}init(){return n.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return n.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),o.toMiliseconds(this.interval))}))}pulse(){this.events.emit(a.HEARTBEAT_EVENTS.pulse)}}t.HeartBeat=c},772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(8969),t),n.__exportStar(r(1614),t),n.__exportStar(r(3401),t)},4174:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHeartBeat=void 0;const n=r(997);class i extends n.IEvents{constructor(e){super()}}t.IHeartBeat=i},1614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(4174),t)},5150:(e,t,r)=>{"use strict";const n=r(655),i=r(3954),o=n.__importDefault(r(653)),s=r(9728);t.ZP=class{constructor(){this.localStorage=o.default}getKeys(){return n.__awaiter(this,void 0,void 0,(function*(){return Object.keys(this.localStorage)}))}getEntries(){return n.__awaiter(this,void 0,void 0,(function*(){return Object.entries(this.localStorage).map(s.parseEntry)}))}getItem(e){return n.__awaiter(this,void 0,void 0,(function*(){const t=this.localStorage.getItem(e);if(null!==t)return i.safeJsonParse(t)}))}setItem(e,t){return n.__awaiter(this,void 0,void 0,(function*(){this.localStorage.setItem(e,i.safeJsonStringify(t))}))}removeItem(e){return n.__awaiter(this,void 0,void 0,(function*(){this.localStorage.removeItem(e)}))}}},653:(e,t,r)=>{"use strict";!function(){let t;function n(){}t=n,t.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},t.prototype.setItem=function(e,t){this[e]=String(t)},t.prototype.removeItem=function(e){delete this[e]},t.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},t.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},t.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),void 0!==r.g&&r.g.localStorage?e.exports=r.g.localStorage:"undefined"!=typeof window&&window.localStorage?e.exports=window.localStorage:e.exports=new n}()},9728:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(9076),t),n.__exportStar(r(496),t)},9076:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeyValueStorage=void 0,t.IKeyValueStorage=class{}},496:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEntry=void 0;const n=r(3954);t.parseEntry=function(e){var t;return[e[0],n.safeJsonParse(null!==(t=e[1])&&void 0!==t?t:"")]}},5727:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PINO_CUSTOM_CONTEXT_KEY=t.PINO_LOGGER_DEFAULTS=void 0,t.PINO_LOGGER_DEFAULTS={level:"info"},t.PINO_CUSTOM_CONTEXT_KEY="custom_context"},9107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const n=r(655),i=n.__importDefault(r(6559));Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return i.default}}),n.__exportStar(r(5727),t),n.__exportStar(r(8048),t)},8048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateChildLogger=t.formatChildLoggerContext=t.getLoggerContext=t.setBrowserLoggerContext=t.getBrowserLoggerContext=t.getDefaultLoggerOptions=void 0;const n=r(5727);function i(e,t=n.PINO_CUSTOM_CONTEXT_KEY){return e[t]||""}function o(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){return e[r]=t,e}function s(e,t=n.PINO_CUSTOM_CONTEXT_KEY){let r="";return r=void 0===e.bindings?i(e,t):e.bindings().context||"",r}function a(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const i=s(e,r);return i.trim()?`${i}/${t}`:t}t.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null==e?void 0:e.level)||n.PINO_LOGGER_DEFAULTS.level})},t.getBrowserLoggerContext=i,t.setBrowserLoggerContext=o,t.getLoggerContext=s,t.formatChildLoggerContext=a,t.generateChildLogger=function(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const i=a(e,t,r);return o(e.child({context:i}),i,r)}},1882:()=>{},3014:()=>{},6900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(6869),t),n.__exportStar(r(8033),t)},6869:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},8033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},6736:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(4273),t),n.__exportStar(r(7001),t),n.__exportStar(r(2939),t),n.__exportStar(r(6900),t)},2939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(8766),t)},8766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0,t.IWatch=class{}},3207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const n=r(6900);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},3873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},4273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(3873),t),n.__exportStar(r(3207),t)},7001:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=r,t.default=r},6151:(e,t,r)=>{"use strict";const n=r(610),i=r(4020),o=r(500),s=r(2806),a=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?i(e):e}function h(e){return Array.isArray(e)?e.sort():"object"==typeof e?h(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function d(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function p(e){const t=(e=d(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"colon-list-separator":return(e,r,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const i="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!i&&u(r,e).includes(e.arrayFormatSeparator);r=o?u(r,e):r;const s=i||o?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);n[t]=s};case"bracket-separator":return(t,r,n)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r?u(r,e):r);const o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const i of e.split("&")){if(""===i)continue;let[e,s]=o(t.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:u(s,t),r(u(e,t),s,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=f(r[e],t);else n[e]=f(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=h(r):e[t]=r,e}),Object.create(null))}t.extract=p,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[",i,"]"].join("")]:[...r,[l(t,e),"[",l(i,e),"]=",l(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),":list="].join("")]:[...r,[l(t,e),":list=",l(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[l(r,e),t,l(i,e)].join("")]:[[n,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,l(t,e)]:[...r,[l(t,e),"=",l(n,e)].join("")]}}(t),i={};for(const t of Object.keys(e))r(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((r=>{const i=e[r];return void 0===i?"":null===i?l(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":i.reduce(n(r),[]).join("&"):l(r,t)+"="+l(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(p(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);const n=d(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),s=Object.assign(o,e.query);let c=t.stringify(s,r);c&&(c=`?${c}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[a]?l(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${c}${u}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);const{url:i,query:o,fragmentIdentifier:c}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:s(o,r),fragmentIdentifier:c},n)},t.exclude=(e,r,n)=>{const i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,i,n)}},2873:(e,t)=>{"use strict";function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function n(e){const t=r(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},5755:(e,t,r)=>{"use strict";t.D=void 0;const n=r(2873);t.D=function(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(e){return null}function r(...t){const r=e.getElementsByTagName("meta");for(let e=0;en.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=n.getAttribute("content");if(e)return e}}return""}const i=function(){let t=r("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:r("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const r=e.getElementsByTagName("link"),n=[];for(let e=0;e-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{const n=t.pathname.split("/");n.pop(),r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){const r=t.protocol+e;n.push(r)}else n.push(e)}}return n}(),name:i}}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],c=o[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,c)),u=0,h=c>0?s-4:s;for(r=0;r>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,l=n-i;al?l:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return u(e),a(e<0?0:0|f(e))}function d(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function w(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":case"latin1":case"binary":return A(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function O(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function j(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function R(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function L(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,o){return t=+t,r>>>=0,o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=J((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||T(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=J((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||T(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=J((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=J((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=J((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=J((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function W(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){F(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function F(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw F(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function J(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},4098:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function m(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function x(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},w.call(v.prototype),w.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];x.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function C(e,r){return new Promise((function(n,o){var s=new v(e,r);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new x(i,r))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}C.polyfill=!0,e.fetch||(e.fetch=C,e.Headers=d,e.Request=v,e.Response=x),t.Headers=d,t.Request=v,t.Response=x,t.fetch=C,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},4020:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function i(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],i(r),i(n))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r)||[],n=1;n{"use strict";var t={single_source_shortest_paths:function(e,r,n){var i={},o={};o[r]=0;var s,a,c,l,u,h,d,p=t.PriorityQueue.make();for(p.push(r,0);!p.empty();)for(c in a=(s=p.pop()).value,l=s.cost,u=e[a]||{})u.hasOwnProperty(c)&&(h=l+u[c],d=o[c],(void 0===o[c]||d>h)&&(o[c]=h,p.push(c,h),i[c]=a));if(void 0!==n&&void 0===o[n]){var f=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var i=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,i={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},2378:e=>{"use strict";e.exports=function(e){for(var t=[],r=e.length,n=0;n=55296&&i<=56319&&r>n+1){var o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,n+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},6729:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,s,l;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=f(c,l);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},2806:e=>{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<>1,u=-7,h=r?i-1:0,d=r?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=l}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,l=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=f,a/=256,i-=8);for(s=s<0;e[r+p]=255&s,p+=f,s/=256,l-=8);e[r+p-f]|=128*m}},2307:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",f="[object GeneratorFunction]",m="[object Map]",g="[object Number]",w="[object Null]",b="[object Object]",v="[object Promise]",y="[object Proxy]",x="[object RegExp]",A="[object Set]",C="[object String]",E="[object Undefined]",I="[object WeakMap]",_="[object ArrayBuffer]",P="[object DataView]",O=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[a]=k[c]=k[_]=k[u]=k[P]=k[h]=k[d]=k[p]=k[m]=k[g]=k[b]=k[x]=k[A]=k[C]=k[I]=!1;var M="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,T="object"==typeof self&&self&&self.Object===Object&&self,N=M||T||Function("return this")(),j=t&&!t.nodeType&&t,R=j&&e&&!e.nodeType&&e,L=R&&R.exports===j,B=L&&M.process,$=function(){try{return B&&B.binding&&B.binding("util")}catch(e){}}(),U=$&&$.isTypedArray;function D(e,t){for(var r=-1,n=null==e?0:e.length;++rl))return!1;var h=a.get(e);if(h&&a.get(t))return h==t;var d=-1,p=!0,f=r&o?new _e:void 0;for(a.set(e,t),a.set(t,e);++d-1},Ee.prototype.set=function(e,t){var r=this.__data__,n=Oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Ie.prototype.clear=function(){this.size=0,this.__data__={hash:new Ce,map:new(he||Ee),string:new Ce}},Ie.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Ie.prototype.get=function(e){return je(this,e).get(e)},Ie.prototype.has=function(e){return je(this,e).has(e)},Ie.prototype.set=function(e,t){var r=je(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},_e.prototype.add=_e.prototype.push=function(e){return this.__data__.set(e,n),this},_e.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.clear=function(){this.__data__=new Ee,this.size=0},Pe.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ee){var n=r.__data__;if(!he||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ie(n)}return r.set(e,t),this.size=r.size,this};var Le=ae?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,i=null==t?0:t.length,o=0,s=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=s}function Ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var Ke=U?function(e){return function(t){return e(t)}}(U):function(e){return Ge(e)&&qe(e.length)&&!!k[Se(e)]};function Ze(e){return null!=(t=e)&&qe(t.length)&&!He(t)?function(e,t){var r=We(e),n=!r&&ze(e),i=!r&&!n&&Fe(e),o=!r&&!n&&!i&&Ke(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r{"use strict";r.d(t,{j:()=>ce});const n={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},i=e=>1e3*e,o=e=>e/1e3,s=()=>{},a=e=>e;function c(e,t=!0){if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch(e){}}const l=e=>e(),u=(e,t,r=n.duration)=>new Proxy({animations:e.map(l).filter(Boolean),duration:r,options:t},h),h={get:(e,t)=>{const r=e.animations[0];switch(t){case"duration":return e.duration;case"currentTime":return o((null==r?void 0:r[t])||0);case"playbackRate":case"playState":return null==r?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(d)).catch(s)),e.finished;case"stop":return()=>{e.animations.forEach((e=>c(e)))};case"forEachNative":return t=>{e.animations.forEach((r=>t(r,e)))};default:return void 0===(null==r?void 0:r[t])?void 0:()=>e.animations.forEach((e=>e[t]()))}},set:(e,t,r)=>{switch(t){case"currentTime":r=i(r);case"currentTime":case"playbackRate":for(let n=0;ne.finished,p=e=>"object"==typeof e&&Boolean(e.createAnimation),f=e=>"number"==typeof e,m=e=>Array.isArray(e)&&!f(e[0]),g=(e,t,r)=>-r*e+r*t+e,w=(e,t,r)=>t-e==0?1:(r-e)/(t-e);function b(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=w(0,t,n);e.push(g(r,1,i))}}const v=(e,t,r)=>Math.min(Math.max(r,e),t);const y=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,x=1e-7,A=12;function C(e,t,r,n){if(e===t&&r===n)return a;return i=>0===i||1===i?i:y(function(e,t,r,n,i){let o,s,a=0;do{s=t+(r-t)/2,o=y(s,n,i)-e,o>0?r=s:t=s}while(Math.abs(o)>x&&++a"function"==typeof e,I=e=>Array.isArray(e)&&f(e[0]),_={ease:C(.25,.1,.25,1),"ease-in":C(.42,0,1,1),"ease-in-out":C(.42,0,.58,1),"ease-out":C(0,0,.58,1)},P=/\((.*?)\)/;function O(e){if(E(e))return e;if(I(e))return C(...e);if(_[e])return _[e];if(e.startsWith("steps")){const t=P.exec(e);if(t){const e=t[1].split(",");return((e,t="end")=>r=>{const n=(r="end"===t?Math.min(r,.999):Math.max(r,.001))*e,i="end"===t?Math.floor(n):Math.ceil(n);return v(0,1,i/e)})(parseFloat(e[0]),e[1].trim())}}return a}class S{constructor(e,t=[0,1],{easing:r,duration:i=n.duration,delay:o=n.delay,endDelay:s=n.endDelay,repeat:c=n.repeat,offset:l,direction:u="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=a,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),r=r||n.easing,p(r)){const e=r.createAnimation(t);r=e.easing,t=e.keyframes||t,i=e.duration||i}this.repeat=c,this.easing=m(r)?a:O(r),this.updateDuration(i);const h=function(e,t=function(e){const t=[0];return b(t,e-1),t}(e.length),r=a){const n=e.length,i=n-t.length;return i>0&&b(t,i),i=>{let o=0;for(;o{const n=t-e;return((r-e)%n+n)%n+e})(0,e.length,t)]:e}(r,o);return s=a(s),g(e[o],e[o+1],s)}}(t,l,m(r)?r.map(O):a);this.tick=t=>{var r;let n=0;n=void 0!==this.pauseTime?this.pauseTime:(t-this.startTime)*this.rate,this.t=n,n/=1e3,n=Math.max(n-o,0),"finished"===this.playState&&void 0===this.pauseTime&&(n=this.totalDuration);const i=n/this.duration;let a=Math.floor(i),c=i%1;!c&&i>=1&&(c=1),1===c&&a--;const l=a%2;("reverse"===u||"alternate"===u&&l||"alternate-reverse"===u&&!l)&&(c=1-c);const d=n>=this.totalDuration?1:Math.min(c,1),p=h(this.easing(d));e(p),void 0===this.pauseTime&&("finished"===this.playState||n>=this.totalDuration+s)?(this.playState="finished",null===(r=this.resolve)||void 0===r||r.call(this,p)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class k{setAnimation(e){this.animation=e,null==e||e.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const M=new WeakMap;function T(e){return M.has(e)||M.set(e,{transforms:[],values:new Map}),M.get(e)}const N=["","X","Y","Z"],j={x:"translateX",y:"translateY",z:"translateZ"},R={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},L={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:R,scale:{syntax:"",initialValue:1,toDefaultUnit:a},skew:R},B=new Map,$=e=>`--motion-${e}`,U=["x","y","z"];["translate","scale","rotate","skew"].forEach((e=>{N.forEach((t=>{U.push(e+t),B.set($(e+t),L[e])}))}));const D=(e,t)=>U.indexOf(e)-U.indexOf(t),z=new Set(U),W=e=>z.has(e),F=e=>e.sort(D).reduce(H,"").trim(),H=(e,t)=>`${e} ${t}(var(${$(t)}))`,q=e=>e.startsWith("--"),V=new Set,G=(e,t)=>document.createElement("div").animate(e,t),K={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{G({opacity:[1]})}catch(e){return!1}return!0},finished:()=>Boolean(G({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{G({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}},Z={},Q={};for(const e in K)Q[e]=()=>(void 0===Z[e]&&(Z[e]=K[e]()),Z[e]);const Y=(e,t)=>E(e)?Q.linearEasing()?`linear(${((e,t)=>{let r="";const n=Math.round(t/.015);for(let t=0;t`cubic-bezier(${e}, ${t}, ${r}, ${n})`;function X(e){return j[e]&&(e=j[e]),W(e)?$(e):e}const ee=(e,t)=>{t=X(t);let r=q(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&0!==r){const e=B.get(t);e&&(r=e.initialValue)}return r},te=(e,t,r)=>{t=X(t),q(t)?e.style.setProperty(t,r):e.style[t]=r};function re(e,t,r,o={},l){const u=window.__MOTION_DEV_TOOLS_RECORD,h=!1!==o.record&&u;let d,{duration:g=n.duration,delay:w=n.delay,endDelay:b=n.endDelay,repeat:v=n.repeat,easing:y=n.easing,persist:x=!1,direction:A,offset:C,allowWebkitAcceleration:I=!1}=o;const _=T(e),P=W(t);let O=Q.waapi();P&&((e,t)=>{j[t]&&(t=j[t]);const{transforms:r}=T(e);var n,i;i=t,-1===(n=r).indexOf(i)&&n.push(i),e.style.transform=F(r)})(e,t);const S=X(t),M=function(e,t){return e.has(t)||e.set(t,new k),e.get(t)}(_.values,S),N=B.get(S);return c(M.animation,!(p(y)&&M.generator)&&!1!==o.record),()=>{const n=()=>{var t,r;return null!==(r=null!==(t=ee(e,S))&&void 0!==t?t:null==N?void 0:N.initialValue)&&void 0!==r?r:0};let c=function(e,t){for(let r=0;rArray.isArray(e)?e:[e])(r),n);const _=function(e,t){var r;let n=(null==t?void 0:t.toDefaultUnit)||a;const i=e[e.length-1];if("string"==typeof i){const e=(null===(r=i.match(/(-?[\d.]+)([a-z%]*)/))||void 0===r?void 0:r[2])||"";e&&(n=t=>t+e)}return n}(c,N);if(p(y)){const e=y.createAnimation(c,"opacity"!==t,n,S,M);y=e.easing,c=e.keyframes||c,g=e.duration||g}if(q(S)&&(Q.cssRegisterProperty()?function(e){if(!V.has(e)){V.add(e);try{const{syntax:t,initialValue:r}=B.has(e)?B.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch(e){}}}(S):O=!1),P&&!Q.linearEasing()&&(E(y)||m(y)&&y.some(E))&&(O=!1),O){N&&(c=c.map((e=>f(e)?N.toDefaultUnit(e):e))),1!==c.length||Q.partialKeyframes()&&!h||c.unshift(n());const t={delay:i(w),duration:i(g),endDelay:i(b),easing:m(y)?void 0:Y(y,g),direction:A,iterations:v+1,fill:"both"};d=e.animate({[S]:c,offset:C,easing:m(y)?y.map((e=>Y(e,g))):void 0},t),d.finished||(d.finished=new Promise(((e,t)=>{d.onfinish=e,d.oncancel=t})));const r=c[c.length-1];d.finished.then((()=>{x||(te(e,S,r),d.cancel())})).catch(s),I||(d.playbackRate=1.000001)}else if(l&&P)c=c.map((e=>"string"==typeof e?parseFloat(e):e)),1===c.length&&c.unshift(parseFloat(n())),d=new l((t=>{te(e,S,_?_(t):t)}),c,Object.assign(Object.assign({},o),{duration:g,easing:y}));else{const t=c[c.length-1];te(e,S,N&&f(t)?N.toDefaultUnit(t):t)}return h&&u(e,t,c,{duration:g,delay:w,easing:y,repeat:v,offset:C},"motion-one"),M.setAnimation(d),d}}const ne=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function ie(e,t,r){return E(e)?e(t,r):e}const oe=(se=S,function(e,t,r={}){const n=(e=function(e,t){return"string"==typeof e?e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}(e)).length;Boolean(n),Boolean(t);const i=[];for(let o=0;o{const r=new S(e,[0,1],t);return r.finished.catch((()=>{})),r}],t,t.duration)}function ce(e,t,r){return(E(e)?ae:oe)(e,t,r)}},2592:(e,t,r)=>{const n=r(7138),i=r(5115),o=r(6907),s=r(3776);function a(e,t,r,o,s){const a=[].slice.call(arguments,1),c=a.length,l="function"==typeof a[c-1];if(!l&&!n())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(r=t,t=o=void 0):2!==c||t.getContext||(o=r,r=t,t=void 0),new Promise((function(n,s){try{const s=i.create(r,o);n(e(s,t,o))}catch(e){s(e)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(s=r,r=t,t=o=void 0):3===c&&(t.getContext&&void 0===s?(s=o,o=void 0):(s=o,o=r,r=t,t=void 0));try{const n=i.create(r,o);s(null,e(n,t,o))}catch(e){s(e)}}t.create=i.create,t.toCanvas=a.bind(null,o.render),t.toDataURL=a.bind(null,o.renderToDataURL),t.toString=a.bind(null,(function(e,t,r){return s.render(e,r)}))},7138:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},1845:(e,t,r)=>{const n=r(242).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),o=[r-7];for(let e=1;e{const n=r(6910),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=n.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},7245:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},3280:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},3424:(e,t,r)=>{const n=r(2378),i=r(6910);function o(e){this.mode=i.BYTE,"string"==typeof e&&(e=n(e)),this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,r=this.data.length;t{const n=r(4908),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case n.L:return i[4*(e-1)+0];case n.M:return i[4*(e-1)+1];case n.Q:return i[4*(e-1)+2];case n.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return o[4*(e-1)+0];case n.M:return o[4*(e-1)+1];case n.Q:return o[4*(e-1)+2];case n.H:return o[4*(e-1)+3];default:return}}},4908:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},6526:(e,t,r)=>{const n=r(242).getSymbolSize;t.getPositions=function(e){const t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},1642:(e,t,r)=>{const n=r(242),i=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){const r=e.bit<<3|t;let o=r<<10;for(;n.getBCHDigit(o)-i>=0;)o^=1335<{const r=new Uint8Array(512),n=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},5442:(e,t,r)=>{const n=r(6910),i=r(242);function o(e){this.mode=n.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=o},7126:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function r(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(r+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return r*n%2+r*n%3==0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,n=0,i=0,o=null,s=null;for(let a=0;a=5&&(r+=n-5+3),o=t,n=1),t=e.get(c,a),t===s?i++:(i>=5&&(r+=i-5+3),s=t,i=1)}n>=5&&(r+=n-5+3),i>=5&&(r+=i-5+3)}return r},t.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n=10&&(1488===n||93===n)&&r++,i=i<<1&2047|e.get(s,o),s>=10&&(1488===i||93===i)&&r++}return 40*r},t.getPenaltyN4=function(e){let t=0;const r=e.data.length;for(let n=0;n{const n=r(3114),i=r(7007);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},1085:(e,t,r)=>{const n=r(6910);function i(e){this.mode=n.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))},e.exports=i},6143:(e,t,r)=>{const n=r(9729);t.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let i=0;i=0;){const e=r[0];for(let i=0;i{const n=r(242),i=r(4908),o=r(7245),s=r(3280),a=r(1845),c=r(6526),l=r(7126),u=r(5393),h=r(2882),d=r(3103),p=r(1642),f=r(6910),m=r(6130);function g(e,t,r){const n=e.size,i=p.getEncodedBits(t,r);let o,s;for(o=0;o<15;o++)s=1==(i>>o&1),o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(n-15+o,8,s,!0),o<8?e.set(8,n-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(n-8,8,1,!0)}function w(e,t,r,i){let p;if(Array.isArray(e))p=m.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=m.rawSplit(e);n=d.getBestVersionForData(t,r)}p=m.fromString(e,n||40)}}const w=d.getBestVersionForData(p,r);if(!w)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(i+t,o+n,!0,!0):e.set(i+t,o+n,!1,!0))}}(y,t),function(e){const t=e.size;for(let r=8;r=7&&function(e,t){const r=e.size,n=d.getEncodedBits(t);let i,o,s;for(let t=0;t<18;t++)i=Math.floor(t/3),o=t%3+r-8-3,s=1==(n>>t&1),e.set(i,o,s,!0),e.set(o,i,s,!0)}(y,t),function(e,t){const r=e.size;let n=-1,i=r-1,o=7,s=0;for(let a=r-1;a>0;a-=2)for(6===a&&a--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,a-r)){let n=!1;s>>o&1)),e.set(i,a-r,n),o--,-1===o&&(s++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(y,b),isNaN(i)&&(i=l.getBestMask(y,g.bind(null,y,r))),l.applyMask(i,y),g(y,r,i),{modules:y,version:t,errorCorrectionLevel:r,maskPattern:i,segments:p}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,o,s=i.M;return void 0!==t&&(s=i.from(t.errorCorrectionLevel,i.M),r=d.from(t.version),o=l.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),w(e,r,s,o)}},2882:(e,t,r)=>{const n=r(6143);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=i},7007:(e,t)=>{const r="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+n+"$"),s=new RegExp("^"+r+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return a.test(e)}},6130:(e,t,r)=>{const n=r(6910),i=r(1085),o=r(8260),s=r(3424),a=r(5442),c=r(7007),l=r(242),u=r(5987);function h(e){return unescape(encodeURIComponent(e)).length}function d(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function p(e){const t=d(c.NUMERIC,n.NUMERIC,e),r=d(c.ALPHANUMERIC,n.ALPHANUMERIC,e);let i,o;return l.isKanjiModeEnabled()?(i=d(c.BYTE,n.BYTE,e),o=d(c.KANJI,n.KANJI,e)):(i=d(c.BYTE_KANJI,n.BYTE,e),o=[]),t.concat(r,i,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function f(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return o.getBitsLength(e);case n.KANJI:return a.getBitsLength(e);case n.BYTE:return s.getBitsLength(e)}}function m(e,t){let r;const c=n.getBestModeForData(e);if(r=n.from(t,c),r!==n.BYTE&&r.bit=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[]))},t.rawSplit=function(e){return t.fromArray(p(e,l.isKanjiModeEnabled()))}},242:(e,t)=>{let r;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return n[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},3114:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},3103:(e,t,r)=>{const n=r(242),i=r(5393),o=r(4908),s=r(6910),a=r(3114),c=n.getBCHDigit(7973);function l(e,t){return s.getCharCountIndicator(e,t)+4}function u(e,t){let r=0;return e.forEach((function(e){const n=l(e.mode,t);r+=n+e.getBitsLength()})),r}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=s.BYTE);const o=8*(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(r===s.MIXED)return o;const c=o-l(r,e);switch(r){case s.NUMERIC:return Math.floor(c/10*3);case s.ALPHANUMERIC:return Math.floor(c/11*2);case s.KANJI:return Math.floor(c/13);case s.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,r){let n;const i=o.from(r,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let n=1;n<=40;n++)if(u(e,n)<=t.getCapacity(n,r,s.MIXED))return n}(e,i);if(0===e.length)return 1;n=e[0]}else n=e;return function(e,r,n){for(let i=1;i<=40;i++)if(r<=t.getCapacity(i,n,e))return i}(n.mode,n.getLength(),i)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-c>=0;)t^=7973<{const n=r(9653);t.render=function(e,t,r){let i=r,o=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);const s=n.getImageWidth(e.modules.size,i),a=o.getContext("2d"),c=a.createImageData(s,s);return n.qrToImageData(c.data,e,i),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(a,o,s),a.putImageData(c,0,0),o},t.renderToDataURL=function(e,r,n){let i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});const o=t.render(e,r,i),s=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}},3776:(e,t,r)=>{const n=r(9653);function i(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}t.render=function(e,t,r){const s=n.getOptions(t),a=e.modules.size,c=e.modules.data,l=a+2*s.margin,u=s.color.light.a?"':"",h="0&&l>0&&e[c-1]||(n+=s?o("M",l+r,.5+u+r):o("m",i,0),i=0,s=!1),l+1',d='viewBox="0 0 '+l+" "+l+'"',p=''+u+h+"\n";return"function"==typeof r&&r(null,p),p}},9653:(e,t)=>{function r(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){const n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){const i=r.modules.size,o=r.modules.data,s=t.getScale(i,n),a=Math.floor((i+2*n.margin)*s),c=n.margin*s,l=[n.color.light,n.color.dark];for(let t=0;t=c&&r>=c&&t{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"==typeof e&&null!==e){var o=r.length+1;if(1===o)return e;var s=new Array(o);s[0]=i(e);for(var a=1;a-1?h:0,e.charCodeAt(p+1)){case 100:case 102:if(u>=c)break;if(null==r[u])break;h=c)break;if(null==r[u])break;h=c)break;if(void 0===r[u])break;h",h=p+2,p++;break}l+=i(r[u]),h=p+2,p++;break;case 115:if(u>=c)break;h{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.safeJsonParse=function(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}},t.safeJsonStringify=function(e){return"string"==typeof e?e:JSON.stringify(e,((e,t)=>void 0===t?null:t))}},500:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},610:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},655:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>y,__asyncGenerator:()=>v,__asyncValues:()=>x,__await:()=>b,__awaiter:()=>u,__classPrivateFieldGet:()=>I,__classPrivateFieldSet:()=>_,__createBinding:()=>d,__decorate:()=>a,__exportStar:()=>p,__extends:()=>i,__generator:()=>h,__importDefault:()=>E,__importStar:()=>C,__makeTemplateObject:()=>A,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>s,__spread:()=>g,__spreadArrays:()=>w,__values:()=>f});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function h(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function g(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof b?Promise.resolve(r.value.v).then(c,l):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function y(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function A(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function E(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function _(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},5289:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=null;"undefined"!=typeof WebSocket?n=WebSocket:"undefined"!=typeof MozWebSocket?n=MozWebSocket:void 0!==r.g?n=r.g.WebSocket||r.g.MozWebSocket:"undefined"!=typeof window?n=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(n=self.WebSocket||self.MozWebSocket);const i=n},7026:e=>{"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},5883:()=>{},6559:(e,t,r)=>{"use strict";const n=r(5346);e.exports=s;const i=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},o={mapHttpRequest:d,mapHttpResponse:d,wrapRequestSerializer:p,wrapResponseSerializer:p,wrapErrorSerializer:p,req:d,res:d,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}};function s(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,n);let d=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(d=!1),"function"==typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===e.enabled&&(e.level="silent");const p=e.level||"info",m=Object.create(r);m.log||(m.log=f),Object.defineProperty(m,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(m,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,a(g,m,"error","log"),a(g,m,"fatal","error"),a(g,m,"warn","error"),a(g,m,"info","log"),a(g,m,"debug","log"),a(g,m,"trace","log")}});const g={transmit:t,serialize:o,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:h(e)};return m.levels=s.levels,m.level=p,m.setMaxListeners=m.getMaxListeners=m.emit=m.addListener=m.on=m.prependListener=m.once=m.prependOnceListener=m.removeListener=m.removeAllListeners=m.listeners=m.listenerCount=m.eventNames=m.write=m.flush=f,m.serializers=n,m._serialize=o,m._stdErrSerialize=d,m.child=function(r,i){if(!r)throw new Error("missing bindings for child Pino");i=i||{},o&&r.serializers&&(i.serializers=r.serializers);const s=i.serializers;if(o&&s){var a=Object.assign({},n,s),h=!0===e.browser.serialize?Object.keys(a):o;delete r.serializers,c([r],h,a,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.error=l(e,r,"error"),this.fatal=l(e,r,"fatal"),this.warn=l(e,r,"warn"),this.info=l(e,r,"info"),this.debug=l(e,r,"debug"),this.trace=l(e,r,"trace"),a&&(this.serializers=a,this._serialize=h),t&&(this._logEvent=u([].concat(e._logEvent.bindings,r)))}return d.prototype=this,new d(this)},t&&(m._logEvent=u()),m}function a(e,t,r,o){const a=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?f:a[r]?a[r]:i[r]||i[o]||f,function(e,t,r){var o;(e.transmit||t[r]!==f)&&(t[r]=(o=t[r],function(){const a=e.timestamp(),l=new Array(arguments.length),h=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var d=0;d-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function l(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var i=1;i{"use strict";r.d(t,{AV:()=>s,ConfigCtrl:()=>f,ExplorerCtrl:()=>S,OptionsCtrl:()=>d,ThemeCtrl:()=>$,ToastCtrl:()=>D,jb:()=>M,uA:()=>u,zv:()=>a});var n=r(6828),i=r(8764);const o=(0,n.sj)({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),s={state:o,subscribe:e=>(0,n.Ld)(o,(()=>e(o))),push(e,t){e!==o.view&&(o.view=e,t&&(o.data=t),o.history.push(e))},reset(e){o.view=e,o.history=[e]},replace(e){o.history.length>1&&(o.history[o.history.length-1]=e,o.view=e)},goBack(){if(o.history.length>1){o.history.pop();const[e]=o.history.slice(-1);o.view=e}},setData(e){o.data=e}},a={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>a.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return a.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,r){if(a.isHttpUrl(e))return this.formatUniversalUrl(e,t,r);let n=e;return n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,r){if(!a.isHttpUrl(e))return this.formatNativeUrl(e,t,r);let n=e;return n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){localStorage.setItem(a.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))},setWalletConnectAndroidDeepLink(e){const[t]=e.split("?");localStorage.setItem(a.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))},removeWalletConnectDeepLink(){localStorage.removeItem(a.WALLETCONNECT_DEEPLINK_CHOICE)},setModalVersionInStorage(){typeof localStorage<"u"&&localStorage.setItem(a.WCM_VERSION,"2.5.4")},getWalletRouterData(){var e;const t=null==(e=s.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},c=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),l=(0,n.sj)({enabled:c,userSessionId:"",events:[],connectedWalletId:void 0}),u={state:l,subscribe:e=>(0,n.Ld)(l.events,(()=>e((0,n.CO)(l.events[l.events.length-1])))),initialize(){l.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(l.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){l.connectedWalletId=e},click(e){if(l.enabled){const t={type:"CLICK",name:e.name,userSessionId:l.userSessionId,timestamp:Date.now(),data:e};l.events.push(t)}},track(e){if(l.enabled){const t={type:"TRACK",name:e.name,userSessionId:l.userSessionId,timestamp:Date.now(),data:e};l.events.push(t)}},view(e){if(l.enabled){const t={type:"VIEW",name:e.name,userSessionId:l.userSessionId,timestamp:Date.now(),data:e};l.events.push(t)}}},h=(0,n.sj)({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),d={state:h,subscribe:e=>(0,n.Ld)(h,(()=>e(h))),setChains(e){h.chains=e},setWalletConnectUri(e){h.walletConnectUri=e},setIsCustomDesktop(e){h.isCustomDesktop=e},setIsCustomMobile(e){h.isCustomMobile=e},setIsDataLoaded(e){h.isDataLoaded=e},setIsUiLoaded(e){h.isUiLoaded=e},setIsAuth(e){h.isAuth=e}},p=(0,n.sj)({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),f={state:p,subscribe:e=>(0,n.Ld)(p,(()=>e(p))),setConfig(e){var t,r;u.initialize(),d.setChains(e.chains),d.setIsAuth(Boolean(e.enableAuthMode)),d.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),d.setIsCustomDesktop(Boolean(null==(r=e.desktopWallets)?void 0:r.length)),a.setModalVersionInStorage(),Object.assign(p,e)}},m="https://explorer-api.walletconnect.com";async function g(e,t){const r=new URL(e,m);return r.searchParams.append("projectId",f.state.projectId),Object.entries(t).forEach((([e,t])=>{t&&r.searchParams.append(e,String(t))})),(await fetch(r)).json()}const w=async e=>g("/w3m/v1/getDesktopListings",e),b=async e=>g("/w3m/v1/getMobileListings",e),v=async e=>g("/w3m/v1/getAllListings",e),y=e=>`${m}/w3m/v1/getWalletImage/${e}?projectId=${f.state.projectId}`,x=e=>`${m}/w3m/v1/getAssetImage/${e}?projectId=${f.state.projectId}`;var A=Object.defineProperty,C=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,_=(e,t,r)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const P=a.isMobile(),O=(0,n.sj)({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),S={state:O,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=f.state;if("NONE"===e||"ALL"===t&&!e)return O.recomendedWallets;if(a.isArray(e)){const t={recommendedIds:e.join(",")},{listings:r}=await v(t),n=Object.values(r);n.sort(((t,r)=>e.indexOf(t.id)-e.indexOf(r.id))),O.recomendedWallets=n}else{const{chains:e,isAuth:r}=d.state,n=e?.join(","),i=a.isArray(t),o={page:1,sdks:r?"auth_v1":void 0,entries:a.RECOMMENDED_WALLET_AMOUNT,chains:n,version:2,excludedIds:i?t.join(","):void 0},{listings:s}=P?await b(o):await w(o);O.recomendedWallets=Object.values(s)}return O.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var r in t||(t={}))E.call(t,r)&&_(e,r,t[r]);if(C)for(var r of C(t))I.call(t,r)&&_(e,r,t[r]);return e})({},e),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:n}=f.state,{recomendedWallets:i}=O;if("ALL"===n)return O.wallets;t.search||(i.length?t.excludedIds=i.map((e=>e.id)).join(","):a.isArray(r)&&(t.excludedIds=r.join(","))),a.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),d.state.isAuth&&(t.sdks="auth_v1");const{page:o,search:s}=e,{listings:c,total:l}=P?await b(t):await w(t),u=Object.values(c),h=s?"search":"wallets";return O[h]={listings:[...O[h].listings,...u],total:l,page:o??1},{listings:u,total:l}},getWalletImageUrl:e=>y(e),getAssetImageUrl:e=>x(e),resetSearch(){O.search={listings:[],total:0,page:1}}},k=(0,n.sj)({open:!1}),M={state:k,subscribe:e=>(0,n.Ld)(k,(()=>e(k))),open:async e=>new Promise((t=>{const{isUiLoaded:r,isDataLoaded:n}=d.state;if(d.setWalletConnectUri(e?.uri),d.setChains(e?.chains),s.reset("ConnectWallet"),r&&n)k.open=!0,t();else{const e=setInterval((()=>{const r=d.state;r.isUiLoaded&&r.isDataLoaded&&(clearInterval(e),k.open=!0,t())}),200)}})),close(){k.open=!1}};var T=Object.defineProperty,N=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,L=(e,t,r)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const B=(0,n.sj)({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),$={state:B,subscribe:e=>(0,n.Ld)(B,(()=>e(B))),setThemeConfig(e){const{themeMode:t,themeVariables:r}=e;t&&(B.themeMode=t),r&&(B.themeVariables=((e,t)=>{for(var r in t||(t={}))j.call(t,r)&&L(e,r,t[r]);if(N)for(var r of N(t))R.call(t,r)&&L(e,r,t[r]);return e})({},r))}},U=(0,n.sj)({open:!1,message:"",variant:"success"}),D={state:U,subscribe:e=>(0,n.Ld)(U,(()=>e(U))),openToast(e,t){U.open=!0,U.message=e,U.variant=t},closeToast(){U.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=i.lW),window.global||(window.global=window),window.process||(window.process={env:{}}),window.global||(window.global=window))},141:(e,t,r)=>{"use strict";r.r(t),r.d(t,{WcmModal:()=>Je,WcmQrCode:()=>oe});var n=r(9392),i=r(7408),o=r(623),s=r(672),a=r(3692),c=r(4213);const l=e=>null!=e?e:a.Ld;var u=r(2592),h=Object.defineProperty,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,m=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&m(e,r,t[r]);if(d)for(var r of d(t))f.call(t,r)&&m(e,r,t[r]);return e};const w={getPreset:e=>({"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}[e]),setTheme(){const e=document.querySelector(":root"),{themeVariables:t}=s.ThemeCtrl.state;if(e){const r=g(g(g({},function(){var e;const t={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(e=s.ThemeCtrl.state.themeMode)?e:"dark"];return{"--wcm-color-fg-1":t.foreground[1],"--wcm-color-fg-2":t.foreground[2],"--wcm-color-fg-3":t.foreground[3],"--wcm-color-bg-1":t.background[1],"--wcm-color-bg-2":t.background[2],"--wcm-color-bg-3":t.background[3],"--wcm-color-overlay":t.overlay}}()),{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}),t);Object.entries(r).forEach((([t,r])=>e.style.setProperty(t,r)))}},globalCss:n.iv`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},b=n.iv`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,x=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?y(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&v(t,r,o),o};let A=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const e={"wcm-icon-left":void 0!==this.iconLeft,"wcm-icon-right":void 0!==this.iconRight,"wcm-ghost":"ghost"===this.variant,"wcm-outline":"outline"===this.variant};let t="inverse";return"ghost"===this.variant&&(t="secondary"),"outline"===this.variant&&(t="accent"),n.dy``}};A.styles=[w.globalCss,b],x([(0,i.Cb)({type:Boolean})],A.prototype,"disabled",2),x([(0,i.Cb)()],A.prototype,"iconLeft",2),x([(0,i.Cb)()],A.prototype,"iconRight",2),x([(0,i.Cb)()],A.prototype,"onClick",2),x([(0,i.Cb)()],A.prototype,"variant",2),A=x([(0,i.Mo)("wcm-button")],A);const C=n.iv`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var E=Object.defineProperty,I=Object.getOwnPropertyDescriptor,_=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?I(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&E(t,r,o),o};let P=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const e={"wcm-secondary":"secondary"===this.variant};return n.dy``}};P.styles=[w.globalCss,C],_([(0,i.Cb)({type:Boolean})],P.prototype,"disabled",2),_([(0,i.Cb)()],P.prototype,"variant",2),P=_([(0,i.Mo)("wcm-button-big")],P);const O=n.iv`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let S=class extends n.oi{render(){return n.dy`
`}};S.styles=[w.globalCss,O],S=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-info-footer")],S);const k={CROSS_ICON:a.YP``,WALLET_CONNECT_LOGO:a.YP``,WALLET_CONNECT_ICON:a.YP``,WALLET_CONNECT_ICON_COLORED:a.YP``,BACK_ICON:a.YP``,COPY_ICON:a.YP``,RETRY_ICON:a.YP``,DESKTOP_ICON:a.YP``,MOBILE_ICON:a.YP``,ARROW_DOWN_ICON:a.YP``,ARROW_UP_RIGHT_ICON:a.YP``,ARROW_RIGHT_ICON:a.YP``,QRCODE_ICON:a.YP``,SCAN_ICON:a.YP``,CHECKMARK_ICON:a.YP``,SEARCH_ICON:a.YP``,WALLET_PLACEHOLDER:a.YP``,GLOBE_ICON:a.YP``},M=n.iv`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let T=class extends n.oi{render(){return n.dy`
${k.WALLET_CONNECT_LOGO}
`}};T.styles=[w.globalCss,M],T=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-modal-backcard")],T);const N=n.iv`main{padding:20px;padding-top:0;width:100%}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let j=class extends n.oi{render(){return n.dy`
`}};j.styles=[w.globalCss,N],j=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-modal-content")],j);const R=n.iv`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let L=class extends n.oi{render(){return n.dy`
`}};L.styles=[w.globalCss,R],L=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-modal-footer")],L);const B=n.iv`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var $=Object.defineProperty,U=Object.getOwnPropertyDescriptor,D=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?U(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&$(t,r,o),o};let z=class extends n.oi{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return n.dy``}actionBtnTemplate(){return n.dy``}render(){const e={"wcm-border":this.border},t=s.AV.state.history.length>1,r=this.title?n.dy`${this.title}`:n.dy``;return n.dy`
${t?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}
`}};z.styles=[w.globalCss,B],D([(0,i.Cb)()],z.prototype,"title",2),D([(0,i.Cb)()],z.prototype,"onAction",2),D([(0,i.Cb)()],z.prototype,"actionIcon",2),D([(0,i.Cb)({type:Boolean})],z.prototype,"border",2),z=D([(0,i.Mo)("wcm-modal-header")],z);const W={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(e,t){const r=e.renderRoot.querySelector(t);if(!r)throw new Error(`${t} not found`);return r},getWalletIcon({id:e,image_id:t}){const{walletImages:r}=s.ConfigCtrl.state;return null!=r&&r[e]?r[e]:t?s.ExplorerCtrl.getWalletImageUrl(t):""},getWalletName:(e,t=!1)=>t?e.split(" ")[0]:e,isMobileAnimation:()=>window.innerWidth<=W.MOBILE_BREAKPOINT,async preloadImage(e){const t=new Promise(((t,r)=>{const n=new Image;n.onload=t,n.onerror=r,n.src=e}));return Promise.race([t,s.zv.wait(3e3)])},getErrorMessage:e=>e instanceof Error?e.message:"Unknown Error",debounce(e,t=500){let r;return(...n)=>{r&&clearTimeout(r),r=setTimeout((function(){e(...n)}),t)}},handleMobileLinking(e){const{walletConnectUri:t}=s.OptionsCtrl.state,{mobile:r,name:n}=e,i=r?.native,o=r?.universal;W.setRecentWallet(e),t&&function(e){let t="";i?t=s.zv.formatUniversalUrl(i,e,n):o&&(t=s.zv.formatNativeUrl(o,e,n)),s.zv.openHref(t,"_self")}(t)},handleAndroidLinking(){const{walletConnectUri:e}=s.OptionsCtrl.state;e&&(s.zv.setWalletConnectAndroidDeepLink(e),s.zv.openHref(e,"_self"))},async handleUriCopy(){const{walletConnectUri:e}=s.OptionsCtrl.state;if(e)try{await navigator.clipboard.writeText(e),s.ToastCtrl.openToast("Link copied","success")}catch{s.ToastCtrl.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:e}=s.ConfigCtrl.state,t=Object.values(e??{});return Object.values(t)},truncate:(e,t=8)=>e.length<=t?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`,setRecentWallet(e){localStorage.setItem(W.WCM_RECENT_WALLET_DATA,JSON.stringify(e))},getRecentWallet(){const e=localStorage.getItem(W.WCM_RECENT_WALLET_DATA);if(e)return JSON.parse(e)},caseSafeIncludes:(e,t)=>e.toUpperCase().includes(t.toUpperCase()),openWalletExplorerUrl(){s.zv.openHref(W.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:e,mobile:t}=s.zv.getWalletRouterData(),r=Boolean(e?.native),n=Boolean(e?.universal);return{isDesktop:r,isMobile:Boolean(t?.native)||Boolean(t?.universal),isWeb:n}},goToConnectingView(e){s.AV.setData({Wallet:e});const t=s.zv.isMobile(),{isDesktop:r,isWeb:n,isMobile:i}=W.getCachedRouterWalletPlatforms();t?i?s.AV.push("MobileConnecting"):n?s.AV.push("WebConnecting"):s.AV.push("InstallWallet"):r?s.AV.push("DesktopConnecting"):n?s.AV.push("WebConnecting"):i?s.AV.push("MobileQrcodeConnecting"):s.AV.push("InstallWallet")}},F=n.iv`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var H=Object.defineProperty,q=Object.getOwnPropertyDescriptor,V=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?q(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&H(t,r,o),o};let G=class extends n.oi{constructor(){super(),this.view=s.AV.state.view,this.prevView=s.AV.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=s.AV.subscribe((e=>{this.view!==e.view&&this.onChangeRoute()}))}firstUpdated(){this.resizeObserver=new ResizeObserver((([e])=>{const t=`${e.contentRect.height}px`;"0px"!==this.oldHeight&&(0,c.j)(this.routerEl,{height:[this.oldHeight,t]},{duration:.2}),this.oldHeight=t})),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,t;null==(e=this.unsubscribe)||e.call(this),null==(t=this.resizeObserver)||t.disconnect()}get routerEl(){return W.getShadowRootElement(this,".wcm-router")}get contentEl(){return W.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return n.dy``;case"DesktopConnecting":return n.dy``;case"MobileConnecting":return n.dy``;case"WebConnecting":return n.dy``;case"MobileQrcodeConnecting":return n.dy``;case"WalletExplorer":return n.dy``;case"Qrcode":return n.dy``;case"InstallWallet":return n.dy``;default:return n.dy`
Not Found
`}}async onChangeRoute(){await(0,c.j)(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=s.AV.state.view,(0,c.j)(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return n.dy`
${this.viewTemplate()}
`}};G.styles=[w.globalCss,F],V([(0,i.SB)()],G.prototype,"view",2),V([(0,i.SB)()],G.prototype,"prevView",2),G=V([(0,i.Mo)("wcm-modal-router")],G);const K=n.iv`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var Z=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,Y=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Q(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Z(t,r,o),o};let J=class extends n.oi{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=s.ToastCtrl.subscribe((e=>{e.open?(this.open=!0,this.timeout=setTimeout((()=>s.ToastCtrl.closeToast()),2200)):(this.open=!1,clearTimeout(this.timeout))}))}disconnectedCallback(){var e;null==(e=this.unsubscribe)||e.call(this),clearTimeout(this.timeout),s.ToastCtrl.closeToast()}render(){const{message:e,variant:t}=s.ToastCtrl.state,r={"wcm-success":"success"===t,"wcm-error":"error"===t};return this.open?n.dy`
${"success"===t?k.CHECKMARK_ICON:null} ${"error"===t?k.CROSS_ICON:null}${e}
`:null}};function X(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+.1}J.styles=[w.globalCss,K],Y([(0,i.SB)()],J.prototype,"open",2),J=Y([(0,i.Mo)("wcm-modal-toast")],J);const ee={generate(e,t,r){const i="#141414",o=[],s=function(e,t){const r=Array.prototype.slice.call(u.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),n=Math.sqrt(r.length);return r.reduce(((e,t,r)=>(r%n==0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e),a=t/s.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach((({x:e,y:t})=>{const r=(s.length-7)*a*e,l=(s.length-7)*a*t;for(let e=0;e`)}}));const l=Math.floor((r+25)/a),h=s.length/2-l/2,d=s.length/2+l/2-1,p=[];s.forEach(((e,t)=>{e.forEach(((e,r)=>{if(s[t][r]&&!(t<7&&r<7||t>s.length-8&&r<7||t<7&&r>s.length-8)&&!(t>h&&th&&r{f[e]?f[e].push(t):f[e]=[t]})),Object.entries(f).map((([e,t])=>{const r=t.filter((e=>t.every((t=>!X(e,t,a)))));return[Number(e),r]})).forEach((([e,t])=>{t.forEach((t=>{o.push(n.YP``)}))})),Object.entries(f).filter((([e,t])=>t.length>1)).map((([e,t])=>{const r=t.filter((e=>t.some((t=>X(e,t,a)))));return[Number(e),r]})).map((([e,t])=>{t.sort(((e,t)=>et.some((t=>X(e,t,a)))));t?t.push(e):r.push([e])}return[e,r.map((e=>[e[0],e[e.length-1]]))]})).forEach((([e,t])=>{t.forEach((([t,r])=>{o.push(n.YP``)}))})),o}},te=n.iv`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var re=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,ie=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ne(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&re(t,r,o),o};let oe=class extends n.oi{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const e="light"===s.ThemeCtrl.state.themeMode?this.size:this.size-36;return n.YP`${ee.generate(this.uri,e,e/4)}`}render(){const e={"wcm-dark":"dark"===s.ThemeCtrl.state.themeMode};return n.dy`
${this.walletId||this.imageUrl?n.dy``:k.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`}};oe.styles=[w.globalCss,te],ie([(0,i.Cb)()],oe.prototype,"uri",2),ie([(0,i.Cb)({type:Number})],oe.prototype,"size",2),ie([(0,i.Cb)()],oe.prototype,"imageId",2),ie([(0,i.Cb)()],oe.prototype,"walletId",2),ie([(0,i.Cb)()],oe.prototype,"imageUrl",2),oe=ie([(0,i.Mo)("wcm-qrcode")],oe);const se=n.iv`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var ae=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,le=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ce(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ae(t,r,o),o};let ue=class extends n.oi{constructor(){super(...arguments),this.onChange=()=>null}render(){return n.dy` ${k.SEARCH_ICON}`}};ue.styles=[w.globalCss,se],le([(0,i.Cb)()],ue.prototype,"onChange",2),ue=le([(0,i.Mo)("wcm-search-input")],ue);const he=n.iv`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let de=class extends n.oi{render(){return n.dy``}};de.styles=[w.globalCss,he],de=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-spinner")],de);const pe=n.iv`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var fe=Object.defineProperty,me=Object.getOwnPropertyDescriptor,ge=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?me(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&fe(t,r,o),o};let we=class extends n.oi{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const e={"wcm-big-bold":"big-bold"===this.variant,"wcm-medium-regular":"medium-regular"===this.variant,"wcm-small-regular":"small-regular"===this.variant,"wcm-small-thin":"small-thin"===this.variant,"wcm-xsmall-regular":"xsmall-regular"===this.variant,"wcm-xsmall-bold":"xsmall-bold"===this.variant,"wcm-color-primary":"primary"===this.color,"wcm-color-secondary":"secondary"===this.color,"wcm-color-tertiary":"tertiary"===this.color,"wcm-color-inverse":"inverse"===this.color,"wcm-color-accnt":"accent"===this.color,"wcm-color-error":"error"===this.color};return n.dy``}};we.styles=[w.globalCss,pe],ge([(0,i.Cb)()],we.prototype,"variant",2),ge([(0,i.Cb)()],we.prototype,"color",2),we=ge([(0,i.Mo)("wcm-text")],we);const be=n.iv`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var ve=Object.defineProperty,ye=Object.getOwnPropertyDescriptor,xe=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ye(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ve(t,r,o),o};let Ae=class extends n.oi{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?n.dy`RECENT`:this.installed?n.dy`INSTALLED`:null}handleClick(){s.uA.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var e;return n.dy``}};Ae.styles=[w.globalCss,be],xe([(0,i.Cb)()],Ae.prototype,"onClick",2),xe([(0,i.Cb)()],Ae.prototype,"name",2),xe([(0,i.Cb)()],Ae.prototype,"walletId",2),xe([(0,i.Cb)()],Ae.prototype,"label",2),xe([(0,i.Cb)()],Ae.prototype,"imageId",2),xe([(0,i.Cb)({type:Boolean})],Ae.prototype,"installed",2),xe([(0,i.Cb)({type:Boolean})],Ae.prototype,"recent",2),Ae=xe([(0,i.Mo)("wcm-wallet-button")],Ae);const Ce=n.iv`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Ee=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,_e=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ie(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ee(t,r,o),o};let Pe=class extends n.oi{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var e;const t=null!=(e=this.imageUrl)&&e.length?this.imageUrl:W.getWalletIcon({id:this.walletId,image_id:this.imageId});return n.dy`${t.length?n.dy`
${this.id}
`:k.WALLET_PLACEHOLDER}`}};Pe.styles=[w.globalCss,Ce],_e([(0,i.Cb)()],Pe.prototype,"walletId",2),_e([(0,i.Cb)()],Pe.prototype,"imageId",2),_e([(0,i.Cb)()],Pe.prototype,"imageUrl",2),Pe=_e([(0,i.Mo)("wcm-wallet-image")],Pe);var Oe=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,ke=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Se(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Oe(t,r,o),o};let Me=class extends n.oi{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{null!=e&&e.length&&await Promise.all(e.map((async e=>W.preloadImage(e))))}catch{console.info("Unsuccessful attempt at preloading some images",e)}}async preloadListings(){if(s.ConfigCtrl.state.enableExplorer){await s.ExplorerCtrl.getRecomendedWallets(),s.OptionsCtrl.setIsDataLoaded(!0);const{recomendedWallets:e}=s.ExplorerCtrl.state,t=e.map((e=>W.getWalletIcon(e)));await this.loadImages(t)}else s.OptionsCtrl.setIsDataLoaded(!0)}async preloadCustomImages(){const e=W.getCustomImageUrls();await this.loadImages(e)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(e){console.error(e),s.ToastCtrl.openToast("Failed preloading","error")}}};ke([(0,i.SB)()],Me.prototype,"preload",2),Me=ke([(0,i.Mo)("wcm-explorer-context")],Me);Object.defineProperty,Object.getOwnPropertyDescriptor;let Te=class extends n.oi{constructor(){super(),this.unsubscribeTheme=void 0,w.setTheme(),this.unsubscribeTheme=s.ThemeCtrl.subscribe(w.setTheme)}disconnectedCallback(){var e;null==(e=this.unsubscribeTheme)||e.call(this)}};Te=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-theme-context")],Te);const Ne=n.iv`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let je=class extends n.oi{onGoToQrcode(){s.AV.push("Qrcode")}render(){const{recomendedWallets:e}=s.ExplorerCtrl.state,t=[...e,...e],r=2*s.zv.RECOMMENDED_WALLET_AMOUNT;return n.dy`
${k.MOBILE_ICON}WalletConnect
${[...Array(r)].map(((e,r)=>{const i=t[r%t.length];return i?n.dy``:k.WALLET_PLACEHOLDER}))}
Select Wallet
Choose WalletConnect to see supported apps on your device`}};je.styles=[w.globalCss,Ne],je=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-android-wallet-selection")],je);const Re=n.iv`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var Le=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,$e=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Be(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Le(t,r,o),o};let Ue=class extends n.oi{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var e,t;const r=null!=(t=null==(e=s.ThemeCtrl.state.themeVariables)?void 0:e["--wcm-wallet-icon-large-border-radius"])?t:w.getPreset("--wcm-wallet-icon-large-border-radius");let i=0;i=r.includes("%")?.88*parseInt(r,10):parseInt(r,10),i*=1.17;const o=317-1.57*i,a=425-1.8*i;return n.dy``}render(){const e={"wcm-error":this.isError,"wcm-stale":this.isStale};return n.dy`
${this.svgLoaderTemplate()}
${this.isError?"Connection declined":this.label}`}};Ue.styles=[w.globalCss,Re],$e([(0,i.Cb)()],Ue.prototype,"walletId",2),$e([(0,i.Cb)()],Ue.prototype,"imageId",2),$e([(0,i.Cb)({type:Boolean})],Ue.prototype,"isError",2),$e([(0,i.Cb)({type:Boolean})],Ue.prototype,"isStale",2),$e([(0,i.Cb)()],Ue.prototype,"label",2),Ue=$e([(0,i.Mo)("wcm-connector-waiting")],Ue);const De={manualWallets(){var e,t;const{mobileWallets:r,desktopWallets:n}=s.ConfigCtrl.state,i=null==(e=De.recentWallet())?void 0:e.id,o=s.zv.isMobile()?r:n,a=o?.filter((e=>i!==e.id));return null!=(t=s.zv.isMobile()?a?.map((({id:e,name:t,links:r})=>({id:e,name:t,mobile:r,links:r}))):a?.map((({id:e,name:t,links:r})=>({id:e,name:t,desktop:r,links:r}))))?t:[]},recentWallet:()=>W.getRecentWallet(),recomendedWallets(e=!1){var t;const r=e||null==(t=De.recentWallet())?void 0:t.id,{recomendedWallets:n}=s.ExplorerCtrl.state;return n.filter((e=>r!==e.id))}},ze={onConnecting(e){W.goToConnectingView(e)},manualWalletsTemplate(){return De.manualWallets().map((e=>n.dy``))},recomendedWalletsTemplate(e=!1){return De.recomendedWallets(e).map((e=>n.dy``))},recentWalletTemplate(){const e=De.recentWallet();if(e)return n.dy``}},We=n.iv`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Fe=class extends n.oi{render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=s.ConfigCtrl.state,r="ALL"!==e&&t,i=ze.manualWalletsTemplate(),o=ze.recomendedWalletsTemplate();let a=[ze.recentWalletTemplate(),...i,...o];a=a.filter(Boolean);const c=a.length>4||r;let l=[];l=c?a.slice(0,3):a;const u=Boolean(l.length);return n.dy`
${k.MOBILE_ICON}Mobile
${k.SCAN_ICON}Scan with your wallet
${u?n.dy`
${k.DESKTOP_ICON}Desktop
${l} ${c?n.dy``:null}
`:null}`}};Fe.styles=[w.globalCss,We],Fe=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-desktop-wallet-selection")],Fe);const He=n.iv`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let qe=class extends n.oi{render(){const{termsOfServiceUrl:e,privacyPolicyUrl:t}=s.ConfigCtrl.state;return e??t?n.dy`
By connecting your wallet to this app, you agree to the app's ${e?n.dy`Terms of Service`:null} ${e&&t?"and":null} ${t?n.dy`Privacy Policy`:null}
`:null}};qe.styles=[w.globalCss,He],qe=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-legal-notice")],qe);const Ve=n.iv`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Ge=class extends n.oi{onQrcode(){s.AV.push("Qrcode")}render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=s.ConfigCtrl.state,r="ALL"!==e&&t,i=ze.manualWalletsTemplate(),o=ze.recomendedWalletsTemplate();let a=[ze.recentWalletTemplate(),...i,...o];a=a.filter(Boolean);const c=a.length>8||r;let l=[];l=c?a.slice(0,7):a;const u=Boolean(l.length);return n.dy`${u?n.dy`
${l} ${c?n.dy``:null}
`:null}`}};Ge.styles=[w.globalCss,Ve],Ge=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-mobile-wallet-selection")],Ge);const Ke=n.iv`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var Ze=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ye=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Qe(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ze(t,r,o),o};let Je=class extends n.oi{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=s.jb.subscribe((e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()}))}disconnectedCallback(){var e;null==(e=this.unsubscribeModal)||e.call(this)}get overlayEl(){return W.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return W.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(e){if(document.querySelector("body"))if(e){const e=document.getElementById("wcm-styles");e?.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(e){e.target===e.currentTarget&&s.jb.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout((async()=>{const e=W.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]};await Promise.all([(0,c.j)(this.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,(0,c.j)(this.containerEl,e,{delay:.1,duration:.2}).finished]),this.active=!0}),0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const e=W.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]};await Promise.all([(0,c.j)(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished,(0,c.j)(this.containerEl,e,{duration:.2}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",(e=>{var t;"Escape"===e.key?s.jb.close():"Tab"===e.key&&(null!=(t=e.target)&&t.tagName.includes("wcm-")||this.containerEl.focus())}),this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;null==(e=this.abortController)||e.abort(),this.abortController=void 0}render(){const e={"wcm-overlay":!0,"wcm-active":this.active};return n.dy`
${this.open?n.dy`
`:null}
`}};Je.styles=[w.globalCss,Ke],Ye([(0,i.SB)()],Je.prototype,"open",2),Ye([(0,i.SB)()],Je.prototype,"active",2),Je=Ye([(0,i.Mo)("wcm-modal")],Je);const Xe=n.iv`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,rt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?tt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&et(t,r,o),o};let nt=class extends n.oi{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){s.zv.isMobile()?s.AV.replace("MobileConnecting"):s.AV.replace("MobileQrcodeConnecting")}onDesktop(){s.AV.replace("DesktopConnecting")}onWeb(){s.AV.replace("WebConnecting")}render(){return n.dy`
${this.isRetry?n.dy``:null} ${this.isMobile?n.dy`Mobile`:null} ${this.isDesktop?n.dy`Desktop`:null} ${this.isWeb?n.dy`Web`:null}
`}};nt.styles=[w.globalCss,Xe],rt([(0,i.Cb)({type:Boolean})],nt.prototype,"isMobile",2),rt([(0,i.Cb)({type:Boolean})],nt.prototype,"isDesktop",2),rt([(0,i.Cb)({type:Boolean})],nt.prototype,"isWeb",2),rt([(0,i.Cb)({type:Boolean})],nt.prototype,"isRetry",2),nt=rt([(0,i.Mo)("wcm-platform-selection")],nt);const it=n.iv`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let ot=class extends n.oi{onClick(){s.AV.push("WalletExplorer")}render(){const{recomendedWallets:e}=s.ExplorerCtrl.state,t=[...e,...De.manualWallets()].reverse().slice(0,4);return n.dy``}};ot.styles=[w.globalCss,it],ot=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-view-all-wallets-button")],ot);const st=n.iv`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var at=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,lt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ct(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&at(t,r,o),o};let ut=class extends n.oi{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout((()=>{const{walletConnectUri:e}=s.OptionsCtrl.state;this.uri=e}),0)}get overlayEl(){return W.getShadowRootElement(this,".wcm-qr-container")}render(){return n.dy`
${this.uri?n.dy``:n.dy``}
`}};ut.styles=[w.globalCss,st],lt([(0,i.Cb)()],ut.prototype,"walletId",2),lt([(0,i.Cb)()],ut.prototype,"imageId",2),lt([(0,i.SB)()],ut.prototype,"uri",2),ut=lt([(0,i.Mo)("wcm-walletconnect-qr")],ut);Object.defineProperty,Object.getOwnPropertyDescriptor;let ht=class extends n.oi{viewTemplate(){return s.zv.isAndroid()?n.dy``:s.zv.isMobile()?n.dy``:n.dy``}render(){return n.dy`${this.viewTemplate()}`}};ht.styles=[w.globalCss],ht=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-connect-wallet-view")],ht);const dt=n.iv`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var pt=Object.defineProperty,ft=Object.getOwnPropertyDescriptor,mt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ft(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&pt(t,r,o),o};let gt=class extends n.oi{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(e){const{desktop:t,name:r}=s.zv.getWalletRouterData(),n=t?.native;if(n){const t=s.zv.formatNativeUrl(n,e,r);s.zv.openHref(t,"_self")}}openDesktopApp(){const{walletConnectUri:e}=s.OptionsCtrl.state,t=s.zv.getWalletRouterData();W.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=s.zv.getWalletRouterData(),{isMobile:i,isWeb:o}=W.getCachedRouterWalletPlatforms();return n.dy`${`Connection can continue loading if ${e} is not installed on your device`}Retry`}};gt.styles=[w.globalCss,dt],mt([(0,i.SB)()],gt.prototype,"isError",2),gt=mt([(0,i.Mo)("wcm-desktop-connecting-view")],gt);const wt=n.iv`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let bt=class extends n.oi{onInstall(e){e&&s.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,homepage:i}=s.zv.getWalletRouterData();return n.dy`${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}Download`}};bt.styles=[w.globalCss,wt],bt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-install-wallet-view")],bt);const vt=n.iv`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var yt=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,At=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?xt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&yt(t,r,o),o};let Ct=class extends n.oi{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(e,t=!1){const{mobile:r,name:n}=s.zv.getWalletRouterData(),i=r?.native,o=r?.universal;if(i&&!t){const t=s.zv.formatNativeUrl(i,e,n);s.zv.openHref(t,"_self")}else if(o){const t=s.zv.formatUniversalUrl(o,e,n);s.zv.openHref(t,"_self")}}openMobileApp(e=!1){const{walletConnectUri:t}=s.OptionsCtrl.state,r=s.zv.getWalletRouterData();W.setRecentWallet(r),t&&this.onFormatAndRedirect(t,e)}onGoToAppStore(e){e&&s.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,app:i,mobile:o}=s.zv.getWalletRouterData(),{isWeb:a}=W.getCachedRouterWalletPlatforms(),c=i?.ios,u=o?.universal;return n.dy`Retry${u?n.dy`Still doesn't work? Try this alternate link`:null}
${`Get ${e}`}
App Store
`}};Ct.styles=[w.globalCss,vt],At([(0,i.SB)()],Ct.prototype,"isError",2),Ct=At([(0,i.Mo)("wcm-mobile-connecting-view")],Ct);const Et=n.iv`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let It=class extends n.oi{render(){const{name:e,id:t,image_id:r}=s.zv.getWalletRouterData(),{isDesktop:i,isWeb:o}=W.getCachedRouterWalletPlatforms();return n.dy`${`Scan this QR Code with your phone's camera or inside ${e} app`}`}};It.styles=[w.globalCss,Et],It=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-mobile-qr-connecting-view")],It);Object.defineProperty,Object.getOwnPropertyDescriptor;let _t=class extends n.oi{render(){return n.dy``}};_t.styles=[w.globalCss],_t=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-qrcode-view")],_t);const Pt=n.iv`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var Ot=Object.defineProperty,St=Object.getOwnPropertyDescriptor,kt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?St(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ot(t,r,o),o};let Mt=class extends n.oi{constructor(){super(...arguments),this.loading=!s.ExplorerCtrl.state.wallets.listings.length,this.firstFetch=!s.ExplorerCtrl.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=W.debounce((e=>{e.length>=3?(this.firstFetch=!0,this.endReached=!1,this.search=e,s.ExplorerCtrl.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),s.ExplorerCtrl.resetSearch())}))}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;null==(e=this.intersectionObserver)||e.disconnect()}get placeholderEl(){return W.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver((([e])=>{e.isIntersecting&&(!this.search||!this.firstFetch)&&this.fetchWallets()})),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:e,search:t}=s.ExplorerCtrl.state,{listings:r,total:n}=this.search?t:e;return n<=40||r.length>=n}async fetchWallets(){var e;const{wallets:t,search:r}=s.ExplorerCtrl.state,{listings:n,total:i,page:o}=this.search?r:t;if(!this.endReached&&(this.firstFetch||i>40&&n.lengthW.getWalletIcon(e)));await Promise.all([...n.map((async e=>W.preloadImage(e))),s.zv.wait(300)]),this.endReached=this.isLastPage()}catch(e){console.error(e),s.ToastCtrl.openToast(W.getErrorMessage(e),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(e){s.zv.isAndroid()?W.handleMobileLinking(e):W.goToConnectingView(e)}onSearchChange(e){const{value:t}=e.target;this.searchDebounce(t)}render(){const{wallets:e,search:t}=s.ExplorerCtrl.state,{listings:r}=this.search?t:e,i=this.loading&&!r.length,a=this.search.length>=3;let c=ze.manualWalletsTemplate(),l=ze.recomendedWalletsTemplate(!0);a&&(c=c.filter((({values:e})=>W.caseSafeIncludes(e[0],this.search))),l=l.filter((({values:e})=>W.caseSafeIncludes(e[0],this.search))));const u=!this.loading&&!r.length&&!l.length,h={"wcm-loading":i,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":u};return n.dy`
${i?null:c} ${i?null:l} ${i?null:r.map((e=>n.dy`${e?n.dy``:null}`))}
${u?n.dy`No results found`:null} ${!u&&this.loading?n.dy``:null}
`}};Mt.styles=[w.globalCss,Pt],kt([(0,i.SB)()],Mt.prototype,"loading",2),kt([(0,i.SB)()],Mt.prototype,"firstFetch",2),kt([(0,i.SB)()],Mt.prototype,"search",2),kt([(0,i.SB)()],Mt.prototype,"endReached",2),Mt=kt([(0,i.Mo)("wcm-wallet-explorer-view")],Mt);const Tt=n.iv`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Nt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,Rt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?jt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Nt(t,r,o),o};let Lt=class extends n.oi{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(e){const{desktop:t,name:r}=s.zv.getWalletRouterData(),n=t?.universal;if(n){const t=s.zv.formatUniversalUrl(n,e,r);s.zv.openHref(t,"_blank")}}openWebWallet(){const{walletConnectUri:e}=s.OptionsCtrl.state,t=s.zv.getWalletRouterData();W.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=s.zv.getWalletRouterData(),{isMobile:i,isDesktop:o}=W.getCachedRouterWalletPlatforms(),a=s.zv.isMobile();return n.dy`${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};Lt.styles=[w.globalCss,Tt],Rt([(0,i.SB)()],Lt.prototype,"isError",2),Lt=Rt([(0,i.Mo)("wcm-web-connecting-view")],Lt)},9343:(e,t,r)=>{"use strict";r.d(t,{WalletConnectModal:()=>i});var n=r(672);class i{constructor(e){this.openModal=n.jb.open,this.closeModal=n.jb.close,this.subscribeModal=n.jb.subscribe,this.setTheme=n.ThemeCtrl.setThemeConfig,n.ThemeCtrl.setThemeConfig(e),n.ConfigCtrl.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(r.bind(r,141));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),n.OptionsCtrl.setIsUiLoaded(!0)}}}},1475:(e,t,r)=>{"use strict";r.d(t,{AV:()=>c,AccountCtrl:()=>b,ConfigCtrl:()=>g,ExplorerCtrl:()=>j,Id:()=>s,OptionsCtrl:()=>f,ThemeCtrl:()=>q,ToastCtrl:()=>G,WcConnectionCtrl:()=>L,jb:()=>$,uA:()=>d,zv:()=>l});var n=r(6828),i=r(8764);let o;const s={ethereumClient:void 0,setEthereumClient(e){o=e},client(){if(o)return o;throw new Error("ClientCtrl has no client set")}},a=(0,n.sj)({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),c={state:a,subscribe:e=>(0,n.Ld)(a,(()=>e(a))),push(e,t){e!==a.view&&(a.view=e,t&&(a.data=t),a.history.push(e))},reset(e){a.view=e,a.history=[e]},replace(e){a.history.length>1&&(a.history[a.history.length-1]=e,a.view=e)},goBack(){if(a.history.length>1){a.history.pop();const[e]=a.history.slice(-1);a.view=e}},setData(e){a.data=e}},l={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",W3M_VERSION:"W3M_VERSION",W3M_PREFER_INJECTED_URL_FLAG:"w3mPreferInjected",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>l.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return l.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,r){if(l.isHttpUrl(e))return this.formatUniversalUrl(e,t,r);let n=e;return n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,r){if(!l.isHttpUrl(e))return this.formatNativeUrl(e,t,r);let n=e;return n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(l.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(l.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(l.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setWeb3ModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(l.W3M_VERSION,"2.6.1")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=c.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t},getSwitchNetworkRouterData(){var e;const t=null==(e=c.state.data)?void 0:e.SwitchNetwork;if(!t)throw new Error('Missing "SwitchNetwork" view data');return t},isPreferInjectedFlag:()=>typeof location<"u"&&new URLSearchParams(location.search).has(l.W3M_PREFER_INJECTED_URL_FLAG)},u=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),h=(0,n.sj)({enabled:u,userSessionId:"",events:[],connectedWalletId:void 0}),d={state:h,subscribe:e=>(0,n.Ld)(h.events,(()=>e((0,n.CO)(h.events[h.events.length-1])))),initialize(){h.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(h.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){h.connectedWalletId=e},click(e){if(h.enabled){const t={type:"CLICK",name:e.name,userSessionId:h.userSessionId,timestamp:Date.now(),data:e};h.events.push(t)}},track(e){if(h.enabled){const t={type:"TRACK",name:e.name,userSessionId:h.userSessionId,timestamp:Date.now(),data:e};h.events.push(t)}},view(e){if(h.enabled){const t={type:"VIEW",name:e.name,userSessionId:h.userSessionId,timestamp:Date.now(),data:e};h.events.push(t)}}},p=(0,n.sj)({selectedChain:void 0,chains:void 0,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1,isPreferInjected:!1}),f={state:p,subscribe:e=>(0,n.Ld)(p,(()=>e(p))),setChains(e){p.chains=e},getSelectedChain(){const e=s.client().getNetwork().chain;return e&&(p.selectedChain=e),p.selectedChain},setSelectedChain(e){p.selectedChain=e},setIsCustomDesktop(e){p.isCustomDesktop=e},setIsCustomMobile(e){p.isCustomMobile=e},setIsDataLoaded(e){p.isDataLoaded=e},setIsUiLoaded(e){p.isUiLoaded=e},setIsPreferInjected(e){p.isPreferInjected=e}},m=(0,n.sj)({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chainImages:void 0,tokenImages:void 0,tokenContracts:void 0,enableNetworkView:!1,enableAccountView:!0,enableExplorer:!0,defaultChain:void 0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),g={state:m,subscribe:e=>(0,n.Ld)(m,(()=>e(m))),setConfig(e){var t,r;d.initialize(),f.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),f.setIsCustomDesktop(Boolean(null==(r=e.desktopWallets)?void 0:r.length)),f.setChains(s.client().chains),f.setIsPreferInjected(s.client().isInjectedProviderInstalled()&&l.isPreferInjectedFlag()),e.defaultChain&&f.setSelectedChain(e.defaultChain),l.setWeb3ModalVersionInStorage(),Object.assign(m,e)}},w=(0,n.sj)({address:void 0,profileName:void 0,profileAvatar:void 0,profileLoading:!1,balanceLoading:!1,balance:void 0,isConnected:!1}),b={state:w,subscribe:e=>(0,n.Ld)(w,(()=>e(w))),getAccount(){const e=s.client().getAccount();w.address=e.address,w.isConnected=e.isConnected},async fetchProfile(e,t){var r;try{w.profileLoading=!0;const n=t??w.address,i=null==(r=f.state.chains)?void 0:r.find((e=>1===e.id));if(n&&i){const t=await s.client().fetchEnsName({address:n,chainId:1});if(t){const r=await s.client().fetchEnsAvatar({name:t,chainId:1});r&&await e(r),w.profileAvatar=r}w.profileName=t}}finally{w.profileLoading=!1}},async fetchBalance(e){try{const{chain:t}=s.client().getNetwork(),{tokenContracts:r}=g.state;let n;t&&r&&(n=r[t.id]),w.balanceLoading=!0;const i=e??w.address;if(i){const e=await s.client().fetchBalance({address:i,token:n});w.balance={amount:e.formatted,symbol:e.symbol}}}finally{w.balanceLoading=!1}},setAddress(e){w.address=e},setIsConnected(e){w.isConnected=e},resetBalance(){w.balance=void 0},resetAccount(){w.address=void 0,w.isConnected=!1,w.profileName=void 0,w.profileAvatar=void 0,w.balance=void 0}},v="https://explorer-api.walletconnect.com";async function y(e,t){const r=new URL(e,v);return r.searchParams.append("projectId",g.state.projectId),Object.entries(t).forEach((([e,t])=>{t&&r.searchParams.append(e,String(t))})),(await fetch(r)).json()}const x=async e=>y("/w3m/v1/getDesktopListings",e),A=async e=>y("/w3m/v1/getMobileListings",e),C=async e=>y("/w3m/v1/getInjectedListings",e),E=async e=>y("/w3m/v1/getAllListings",e),I=e=>`${v}/w3m/v1/getWalletImage/${e}?projectId=${g.state.projectId}`,_=e=>`${v}/w3m/v1/getAssetImage/${e}?projectId=${g.state.projectId}`;var P=Object.defineProperty,O=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,M=(e,t,r)=>t in e?P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const T=l.isMobile(),N=(0,n.sj)({wallets:{listings:[],total:0,page:1},injectedWallets:[],search:{listings:[],total:0,page:1},recomendedWallets:[]}),j={state:N,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=g.state;if("NONE"===e||"ALL"===t&&!e)return N.recomendedWallets;if(l.isArray(e)){const t={recommendedIds:e.join(",")},{listings:r}=await E(t),n=Object.values(r);n.sort(((t,r)=>e.indexOf(t.id)-e.indexOf(r.id))),N.recomendedWallets=n}else{const e=l.isArray(t),r={page:1,entries:l.RECOMMENDED_WALLET_AMOUNT,version:2,excludedIds:e?t.join(","):void 0},{listings:n}=T?await A(r):await x(r);N.recomendedWallets=Object.values(n)}return N.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var r in t||(t={}))S.call(t,r)&&M(e,r,t[r]);if(O)for(var r of O(t))k.call(t,r)&&M(e,r,t[r]);return e})({},e),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:n}=g.state,{recomendedWallets:i}=N;if("ALL"===n)return N.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):l.isArray(r)&&(t.excludedIds=r.join(",")),l.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(","));const{page:o,search:s}=e,{listings:a,total:c}=T?await A(t):await x(t),u=Object.values(a),h=s?"search":"wallets";return N[h]={listings:[...N[h].listings,...u],total:c,page:o??1},{listings:u,total:c}},async getInjectedWallets(){const{listings:e}=await C({}),t=Object.values(e);return N.injectedWallets=t,N.injectedWallets},getWalletImageUrl:e=>I(e),getAssetImageUrl:e=>_(e),resetSearch(){N.search={listings:[],total:0,page:1}}},R=(0,n.sj)({pairingEnabled:!1,pairingUri:"",pairingError:!1}),L={state:R,subscribe:e=>(0,n.Ld)(R,(()=>e(R))),setPairingUri(e){R.pairingUri=e},setPairingError(e){R.pairingError=e},setPairingEnabled(e){R.pairingEnabled=e}},B=(0,n.sj)({open:!1}),$={state:B,subscribe:e=>(0,n.Ld)(B,(()=>e(B))),open:async e=>new Promise((t=>{const{isUiLoaded:r,isDataLoaded:n,isPreferInjected:i,selectedChain:o}=f.state,{isConnected:a}=b.state,{enableNetworkView:l}=g.state;if(L.setPairingEnabled(!0),null!=e&&e.route)c.reset(e.route);else if(a)c.reset("Account");else if(l)c.reset("SelectNetwork");else{if(i)return s.client().connectConnector("injected",o?.id).catch((e=>console.error(e))),void t();c.reset("ConnectWallet")}const{pairingUri:u}=L.state;if(r&&n&&(u||a))B.open=!0,t();else{const e=setInterval((()=>{const r=f.state,n=L.state;r.isUiLoaded&&r.isDataLoaded&&(n.pairingUri||a)&&(clearInterval(e),B.open=!0,t())}),200)}})),close(){B.open=!1}};var U=Object.defineProperty,D=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,F=(e,t,r)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const H=(0,n.sj)({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),q={state:H,subscribe:e=>(0,n.Ld)(H,(()=>e(H))),setThemeConfig(e){const{themeMode:t,themeVariables:r}=e;t&&(H.themeMode=t),r&&(H.themeVariables=((e,t)=>{for(var r in t||(t={}))z.call(t,r)&&F(e,r,t[r]);if(D)for(var r of D(t))W.call(t,r)&&F(e,r,t[r]);return e})({},r))}},V=(0,n.sj)({open:!1,message:"",variant:"success"}),G={state:V,subscribe:e=>(0,n.Ld)(V,(()=>e(V))),openToast(e,t){V.open=!0,V.message=e,V.variant=t},closeToast(){V.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=i.lW),window.global||(window.global=window),window.process||(window.process={env:{}}),window.global||(window.global=window))},8416:(e,t,r)=>{"use strict";r.r(t),r.d(t,{W3mAccountButton:()=>bt,W3mConnectButton:()=>Vt,W3mCoreButton:()=>tr,W3mModal:()=>dr,W3mNetworkSwitch:()=>wr,W3mQrCode:()=>Ie});var n=r(9392),i=r(7408),o=r(1475),s=r(623),a=r(3692),c=r(4213),l=r(2592),u=Object.defineProperty,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&f(e,r,t[r]);if(h)for(var r of h(t))p.call(t,r)&&f(e,r,t[r]);return e};const g={getPreset:e=>({"--w3m-accent-color":"#3396FF","--w3m-accent-fill-color":"#FFFFFF","--w3m-z-index":"89","--w3m-background-color":"#3396FF","--w3m-background-border-radius":"8px","--w3m-container-border-radius":"30px","--w3m-wallet-icon-border-radius":"15px","--w3m-wallet-icon-large-border-radius":"30px","--w3m-wallet-icon-small-border-radius":"7px","--w3m-input-border-radius":"28px","--w3m-button-border-radius":"10px","--w3m-notification-border-radius":"36px","--w3m-secondary-button-border-radius":"28px","--w3m-icon-button-border-radius":"50%","--w3m-button-hover-highlight-border-radius":"10px","--w3m-text-big-bold-size":"20px","--w3m-text-big-bold-weight":"600","--w3m-text-big-bold-line-height":"24px","--w3m-text-big-bold-letter-spacing":"-0.03em","--w3m-text-big-bold-text-transform":"none","--w3m-text-xsmall-bold-size":"10px","--w3m-text-xsmall-bold-weight":"700","--w3m-text-xsmall-bold-line-height":"12px","--w3m-text-xsmall-bold-letter-spacing":"0.02em","--w3m-text-xsmall-bold-text-transform":"uppercase","--w3m-text-xsmall-regular-size":"12px","--w3m-text-xsmall-regular-weight":"600","--w3m-text-xsmall-regular-line-height":"14px","--w3m-text-xsmall-regular-letter-spacing":"-0.03em","--w3m-text-xsmall-regular-text-transform":"none","--w3m-text-small-thin-size":"14px","--w3m-text-small-thin-weight":"500","--w3m-text-small-thin-line-height":"16px","--w3m-text-small-thin-letter-spacing":"-0.03em","--w3m-text-small-thin-text-transform":"none","--w3m-text-small-regular-size":"14px","--w3m-text-small-regular-weight":"600","--w3m-text-small-regular-line-height":"16px","--w3m-text-small-regular-letter-spacing":"-0.03em","--w3m-text-small-regular-text-transform":"none","--w3m-text-medium-regular-size":"16px","--w3m-text-medium-regular-weight":"600","--w3m-text-medium-regular-line-height":"20px","--w3m-text-medium-regular-letter-spacing":"-0.03em","--w3m-text-medium-regular-text-transform":"none","--w3m-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--w3m-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--w3m-success-color":"rgb(38,181,98)","--w3m-error-color":"rgb(242, 90, 103)","--w3m-overlay-background-color":"rgba(0, 0, 0, 0.3)","--w3m-overlay-backdrop-filter":"none"}[e]),setTheme(){const e=document.querySelector(":root"),{themeVariables:t}=o.ThemeCtrl.state;if(e){const r=m(m(m(m({},function(){var e;const t={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(e=o.ThemeCtrl.state.themeMode)?e:"dark"];return{"--w3m-color-fg-1":t.foreground[1],"--w3m-color-fg-2":t.foreground[2],"--w3m-color-fg-3":t.foreground[3],"--w3m-color-bg-1":t.background[1],"--w3m-color-bg-2":t.background[2],"--w3m-color-bg-3":t.background[3],"--w3m-color-overlay":t.overlay}}()),{"--w3m-accent-color":"#3396FF","--w3m-accent-fill-color":"#FFFFFF","--w3m-z-index":"89","--w3m-background-color":"#3396FF","--w3m-background-border-radius":"8px","--w3m-container-border-radius":"30px","--w3m-wallet-icon-border-radius":"15px","--w3m-wallet-icon-large-border-radius":"30px","--w3m-wallet-icon-small-border-radius":"7px","--w3m-input-border-radius":"28px","--w3m-button-border-radius":"10px","--w3m-notification-border-radius":"36px","--w3m-secondary-button-border-radius":"28px","--w3m-icon-button-border-radius":"50%","--w3m-button-hover-highlight-border-radius":"10px","--w3m-text-big-bold-size":"20px","--w3m-text-big-bold-weight":"600","--w3m-text-big-bold-line-height":"24px","--w3m-text-big-bold-letter-spacing":"-0.03em","--w3m-text-big-bold-text-transform":"none","--w3m-text-xsmall-bold-size":"10px","--w3m-text-xsmall-bold-weight":"700","--w3m-text-xsmall-bold-line-height":"12px","--w3m-text-xsmall-bold-letter-spacing":"0.02em","--w3m-text-xsmall-bold-text-transform":"uppercase","--w3m-text-xsmall-regular-size":"12px","--w3m-text-xsmall-regular-weight":"600","--w3m-text-xsmall-regular-line-height":"14px","--w3m-text-xsmall-regular-letter-spacing":"-0.03em","--w3m-text-xsmall-regular-text-transform":"none","--w3m-text-small-thin-size":"14px","--w3m-text-small-thin-weight":"500","--w3m-text-small-thin-line-height":"16px","--w3m-text-small-thin-letter-spacing":"-0.03em","--w3m-text-small-thin-text-transform":"none","--w3m-text-small-regular-size":"14px","--w3m-text-small-regular-weight":"600","--w3m-text-small-regular-line-height":"16px","--w3m-text-small-regular-letter-spacing":"-0.03em","--w3m-text-small-regular-text-transform":"none","--w3m-text-medium-regular-size":"16px","--w3m-text-medium-regular-weight":"600","--w3m-text-medium-regular-line-height":"20px","--w3m-text-medium-regular-letter-spacing":"-0.03em","--w3m-text-medium-regular-text-transform":"none","--w3m-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--w3m-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--w3m-success-color":"rgb(38,181,98)","--w3m-error-color":"rgb(242, 90, 103)","--w3m-overlay-background-color":"rgba(0, 0, 0, 0.3)","--w3m-overlay-backdrop-filter":"none"}),t),function(){const{themeVariables:e}=o.ThemeCtrl.state;return{"--w3m-background-image-url":null!=e&&e["--w3m-background-image-url"]?`url(${e["--w3m-background-image-url"]})`:"none"}}());Object.entries(r).forEach((([t,r])=>e.style.setProperty(t,r)))}},globalCss:n.iv`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button w3m-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--w3m-accent-fill-color);background:var(--w3m-accent-color)}`},w=n.iv`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;justify-content:center;padding:5px;width:100px}button:active{background-color:var(--w3m-color-overlay)}button:disabled{opacity:.7}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}button>div{display:flex;justify-content:center;align-items:center;width:32px;height:32px;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-accent-color);border-radius:var(--w3m-icon-button-border-radius);margin-bottom:4px}button path{fill:var(--w3m-accent-fill-color)}`;var b=Object.defineProperty,v=Object.getOwnPropertyDescriptor,y=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?v(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&b(t,r,o),o};let x=class extends n.oi{constructor(){super(...arguments),this.icon=void 0,this.label="",this.loading=!1,this.onClick=()=>null}render(){return n.dy``}};x.styles=[g.globalCss,w],y([(0,i.Cb)()],x.prototype,"icon",2),y([(0,i.Cb)()],x.prototype,"label",2),y([(0,i.Cb)()],x.prototype,"loading",2),y([(0,i.Cb)()],x.prototype,"onClick",2),x=y([(0,i.Mo)("w3m-box-button")],x);const A=n.iv`button{border-radius:var(--w3m-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--w3m-accent-color)}button path{fill:var(--w3m-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--w3m-color-overlay)}button:disabled::after{background-color:transparent}.w3m-icon-left svg{margin-right:5px}.w3m-icon-right svg{margin-left:5px}button:active::after{background-color:var(--w3m-color-overlay)}.w3m-ghost,.w3m-ghost:active::after,.w3m-outline{background-color:transparent}.w3m-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--w3m-color-overlay)}.w3m-ghost:hover::after{background-color:transparent}.w3m-ghost:hover{opacity:.5}}button:disabled{background-color:var(--w3m-color-bg-3);pointer-events:none}.w3m-ghost::after{border-color:transparent}.w3m-ghost path{fill:var(--w3m-color-fg-2)}.w3m-outline path{fill:var(--w3m-accent-color)}.w3m-outline:disabled{background-color:transparent;opacity:.5}`;var C=Object.defineProperty,E=Object.getOwnPropertyDescriptor,I=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?E(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&C(t,r,o),o};let _=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const e={"w3m-icon-left":void 0!==this.iconLeft,"w3m-icon-right":void 0!==this.iconRight,"w3m-ghost":"ghost"===this.variant,"w3m-outline":"outline"===this.variant};let t="inverse";return"ghost"===this.variant&&(t="secondary"),"outline"===this.variant&&(t="accent"),n.dy``}};_.styles=[g.globalCss,A],I([(0,i.Cb)()],_.prototype,"disabled",2),I([(0,i.Cb)()],_.prototype,"iconLeft",2),I([(0,i.Cb)()],_.prototype,"iconRight",2),I([(0,i.Cb)()],_.prototype,"onClick",2),I([(0,i.Cb)()],_.prototype,"variant",2),_=I([(0,i.Mo)("w3m-button")],_);const P=n.iv`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--w3m-button-border-radius);color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:active::after{background-color:var(--w3m-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--w3m-color-bg-3);color:var(--w3m-color-fg-3)}.w3m-secondary{color:var(--w3m-accent-color);background-color:transparent}.w3m-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--w3m-color-overlay)}}`;var O=Object.defineProperty,S=Object.getOwnPropertyDescriptor,k=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?S(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&O(t,r,o),o};let M=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const e={"w3m-secondary":"secondary"===this.variant};return n.dy``}};M.styles=[g.globalCss,P],k([(0,i.Cb)()],M.prototype,"disabled",2),k([(0,i.Cb)()],M.prototype,"variant",2),M=k([(0,i.Mo)("w3m-button-big")],M);const T=n.iv`:host{background-color:var(--w3m-color-bg-2);border-top:1px solid var(--w3m-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let N=class extends n.oi{render(){return n.dy`
`}};N.styles=[g.globalCss,T],N=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-info-footer")],N);const j={CROSS_ICON:a.YP``,WALLET_CONNECT_LOGO:a.YP``,WALLET_CONNECT_ICON:a.YP``,WALLET_CONNECT_ICON_COLORED:a.YP``,BACK_ICON:a.YP``,COPY_ICON:a.YP``,RETRY_ICON:a.YP``,DESKTOP_ICON:a.YP``,MOBILE_ICON:a.YP``,ARROW_DOWN_ICON:a.YP``,ARROW_UP_RIGHT_ICON:a.YP``,ARROW_RIGHT_ICON:a.YP``,QRCODE_ICON:a.YP``,SCAN_ICON:a.YP``,CHECKMARK_ICON:a.YP``,HELP_ETH_IMG:a.YP``,HELP_PAINTING_IMG:a.YP``,HELP_CHART_IMG:a.YP``,HELP_KEY_IMG:a.YP``,HELP_USER_IMG:a.YP``,HELP_LOCK_IMG:a.YP``,HELP_COMPAS_IMG:a.YP``,HELP_NOUN_IMG:a.YP``,HELP_DAO_IMG:a.YP``,SEARCH_ICON:a.YP``,HELP_ICON:a.YP``,WALLET_ICON:a.YP``,NETWORK_PLACEHOLDER:a.YP``,WALLET_PLACEHOLDER:a.YP``,TOKEN_PLACEHOLDER:a.YP``,ACCOUNT_COPY:a.YP``,ACCOUNT_DISCONNECT:a.YP``,GLOBE_ICON:a.YP``},R=n.iv`.w3m-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--w3m-background-border-radius) * .9);background-color:var(--w3m-background-color);background-image:var(--w3m-background-image-url);background-position:center;background-size:cover}.w3m-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.w3m-toolbar img,.w3m-toolbar svg{height:28px;object-position:left center;object-fit:contain}#w3m-wc-logo path{fill:var(--w3m-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--w3m-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--w3m-color-bg-1);box-shadow:0 0 0 1px var(--w3m-color-overlay)}button:active{background-color:var(--w3m-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--w3m-color-fg-1)}.w3m-toolbar div{display:flex}.w3m-toolbar div button:first-child{margin-right:16px}.w3m-help-active button:first-child{background-color:var(--w3m-color-fg-1)}.w3m-help-active button:first-child path{fill:var(--w3m-color-bg-1)}@media(hover:hover){button:hover{background-color:var(--w3m-color-bg-2)}}`;var L=Object.defineProperty,B=Object.getOwnPropertyDescriptor,$=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?B(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&L(t,r,o),o};let U=class extends n.oi{constructor(){super(),this.isHelp=!1,this.unsubscribeRouter=void 0,this.unsubscribeRouter=o.AV.subscribe((e=>{this.isHelp="Help"===e.view}))}disconnectedCallback(){var e;null==(e=this.unsubscribeRouter)||e.call(this)}onHelp(){o.AV.push("Help")}logoTemplate(){var e;const t=null==(e=o.ThemeCtrl.state.themeVariables)?void 0:e["--w3m-logo-image-url"];return t?n.dy``:j.WALLET_CONNECT_LOGO}render(){const e={"w3m-help-active":this.isHelp};return n.dy`
${this.logoTemplate()}
`}};U.styles=[g.globalCss,R],$([(0,i.SB)()],U.prototype,"isHelp",2),U=$([(0,i.Mo)("w3m-modal-backcard")],U);const D=n.iv`main{padding:20px;padding-top:0;width:100%}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let z=class extends n.oi{render(){return n.dy`
`}};z.styles=[g.globalCss,D],z=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-modal-content")],z);const W=n.iv`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--w3m-color-bg-2)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let F=class extends n.oi{render(){return n.dy`
`}};F.styles=[g.globalCss,W],F=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-modal-footer")],F);const H=n.iv`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.w3m-border{border-bottom:1px solid var(--w3m-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.w3m-back-btn{position:absolute;left:0}.w3m-action-btn{position:absolute;right:0}path{fill:var(--w3m-accent-color)}`;var q=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?V(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&q(t,r,o),o};let K=class extends n.oi{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return n.dy``}actionBtnTemplate(){return n.dy``}render(){const e={"w3m-border":this.border},t=o.AV.state.history.length>1,r=this.title?n.dy`${this.title}`:n.dy``;return n.dy`
${t?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}
`}};K.styles=[g.globalCss,H],G([(0,i.Cb)()],K.prototype,"title",2),G([(0,i.Cb)()],K.prototype,"onAction",2),G([(0,i.Cb)()],K.prototype,"actionIcon",2),G([(0,i.Cb)()],K.prototype,"border",2),K=G([(0,i.Mo)("w3m-modal-header")],K);const Z={1:"692ed6ba-e569-459a-556a-776476829e00",42161:"600a9a04-c1b9-42ca-6785-9b4b6ff85200",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00"},Q={ETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},WETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},AVAX:{icon:"30c46e53-e989-45fb-4549-be3bd4eb3b00"},FTM:{icon:"06b26297-fe0c-4733-5d6b-ffa5498aac00"},BNB:{icon:"93564157-2e8e-4ce7-81df-b264dbee9b00"},MATIC:{icon:"41d04d42-da3b-4453-8506-668cc0727900"},OP:{icon:"ab9c186a-c52f-464b-2906-ca59d760a400"},xDAI:{icon:"02b53f6a-e3d4-479e-1cb4-21178987d100"},EVMOS:{icon:"f926ff41-260d-4028-635e-91913fc28e00"},METIS:{icon:"3897a66d-40b9-4833-162f-a2c90531c900"},IOTX:{icon:"34e68754-e536-40da-c153-6ef2e7188a00"}},Y={externalWallets(){let e=o.Id.client().getConnectors();return e=e.filter((e=>"injected"!==e.id)),e},manualWallets(){var e,t;const{mobileWallets:r,desktopWallets:n}=o.ConfigCtrl.state,i=null==(e=Y.recentWallet())?void 0:e.id,s=o.zv.isMobile()?r:n,a=s?.filter((e=>i!==e.id));return null!=(t=o.zv.isMobile()?a?.map((({id:e,name:t,links:r})=>({id:e,name:t,mobile:r,links:r}))):a?.map((({id:e,name:t,links:r})=>({id:e,name:t,desktop:r,links:r}))))?t:[]},installedInjectedWallets(){if(!o.Id.client().isInjectedProviderInstalled())return[];const{namespace:e}=o.Id.client(),{injectedWallets:t}=o.ExplorerCtrl.state;let r=t.filter((({injected:t})=>Boolean(t.some((t=>o.Id.client().safeCheckInjectedProvider(t.injected_id)&&t.namespace===e)))));return r.length>1&&(r=r.filter((({injected:e})=>{const t=e.map((({injected_id:e})=>e));return Boolean(t.every((e=>"isMetaMask"!==e)))}))),r.length?r:[{name:"Browser",id:"browser",image_id:void 0}]},injectedWallets(){const{explorerExcludedWalletIds:e,explorerRecommendedWalletIds:t}=o.ConfigCtrl.state,r=o.zv.isMobile();if("ALL"===e||r)return[];const{namespace:n}=o.Id.client(),{injectedWallets:i}=o.ExplorerCtrl.state;return i.filter((({id:r,injected:i})=>{const s=o.zv.isArray(e)?e:[],a=o.zv.isArray(t)?t:[];return Boolean(i.some((e=>e.namespace===n&&!s.includes(r)&&!a.includes(r))))}))},recentWallet:()=>J.getRecentWallet(),recomendedWallets(e=!1){var t;const r=[...Y.installedInjectedWallets().map((({id:e})=>e)),e||null==(t=Y.recentWallet())?void 0:t.id],{recomendedWallets:n}=o.ExplorerCtrl.state;return n.filter((e=>!r.includes(e.id)))}},J={MOBILE_BREAKPOINT:600,W3M_RECENT_WALLET_INFO:"W3M_RECENT_WALLET_INFO",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",WAGMI_WALLET:"wagmi.wallet",getShadowRootElement(e,t){const r=e.renderRoot.querySelector(t);if(!r)throw new Error(`${t} not found`);return r},getWalletIcon({id:e,image_id:t}){const{walletImages:r}=o.ConfigCtrl.state;return null!=r&&r[e]?r[e]:t?o.ExplorerCtrl.getWalletImageUrl(t):""},getWalletName:(e,t=!1)=>t?e.split(" ")[0]:e,getChainIcon(e){var t;const r=Z[e],{projectId:n,chainImages:i}=o.ConfigCtrl.state;return null!=(t=i?.[e])?t:n&&r?o.ExplorerCtrl.getAssetImageUrl(r):""},getTokenIcon(e){var t,r;const n=null==(t=Q[e])?void 0:t.icon,{projectId:i,tokenImages:s}=o.ConfigCtrl.state;return null!=(r=s?.[e])?r:i&&n?o.ExplorerCtrl.getAssetImageUrl(n):""},isMobileAnimation:()=>window.innerWidth<=J.MOBILE_BREAKPOINT,async preloadImage(e){const t=new Promise(((t,r)=>{const n=new Image;n.onload=t,n.onerror=r,n.src=e}));return Promise.race([t,o.zv.wait(3e3)])},getErrorMessage:e=>e instanceof Error?e.message:"Unknown Error",debounce(e,t=500){let r;return(...n)=>{r&&clearTimeout(r),r=setTimeout((function(){e(...n)}),t)}},handleMobileLinking(e){const{pairingUri:t}=o.WcConnectionCtrl.state,{mobile:r,name:n}=e,i=r?.native,s=r?.universal;J.setRecentWallet(e),function(e){let t="";i?t=o.zv.formatUniversalUrl(i,e,n):s&&(t=o.zv.formatNativeUrl(s,e,n)),o.zv.openHref(t,"_self")}(t)},handleAndroidLinking(){const{pairingUri:e}=o.WcConnectionCtrl.state;o.zv.setWalletConnectAndroidDeepLink(e),o.zv.openHref(e,"_self")},async handleUriCopy(){try{const{pairingUri:e}=o.WcConnectionCtrl.state;await navigator.clipboard.writeText(e),o.ToastCtrl.openToast("Link copied","success")}catch{o.ToastCtrl.openToast("Failed to copy","error")}},async handleConnectorConnection(e,t){try{const{selectedChain:t}=o.OptionsCtrl.state;await o.Id.client().connectConnector(e,t?.id),o.jb.close()}catch(e){console.error(e),t?t():o.ToastCtrl.openToast(J.getErrorMessage(e),"error")}},getCustomImageUrls(){const{chainImages:e,walletImages:t}=o.ConfigCtrl.state,r=Object.values(e??{}),n=Object.values(t??{});return Object.values([...r,...n])},truncate:(e,t=8)=>e.length<=t?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`,generateAvatarColors(e){var t;const r=null==(t=e.match(/.{1,7}/g))?void 0:t.splice(0,5),n=[];r?.forEach((e=>{let t=0;for(let r=0;r>8*e&255;r[e]=n}n.push(`rgb(${r[0]}, ${r[1]}, ${r[2]})`)}));const i=document.querySelector(":root");if(i){const e={"--w3m-color-av-1":n[0],"--w3m-color-av-2":n[1],"--w3m-color-av-3":n[2],"--w3m-color-av-4":n[3],"--w3m-color-av-5":n[4]};Object.entries(e).forEach((([e,t])=>i.style.setProperty(e,t)))}},setRecentWallet(e){try{localStorage.setItem(J.W3M_RECENT_WALLET_INFO,JSON.stringify(e))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const e=localStorage.getItem(J.W3M_RECENT_WALLET_INFO);return e?JSON.parse(e):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes:(e,t)=>e.toUpperCase().includes(t.toUpperCase()),openWalletExplorerUrl(){o.zv.openHref(J.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{id:e,desktop:t,mobile:r,injected:n}=o.zv.getWalletRouterData(),i=Y.installedInjectedWallets(),s=Boolean(n?.length),a=i.some((t=>t.id===e)),c=Boolean(t?.native),l=Boolean(t?.universal);return{isInjectedInstalled:a,isInjected:s,isDesktop:c,isMobile:Boolean(r?.native)||Boolean(r?.universal),isWeb:l}},goToConnectingView(e){o.AV.setData({Wallet:e});const t=o.zv.isMobile(),{isDesktop:r,isWeb:n,isMobile:i,isInjectedInstalled:s}=J.getCachedRouterWalletPlatforms();t?s?o.AV.push("InjectedConnecting"):i?o.AV.push("MobileConnecting"):n?o.AV.push("WebConnecting"):o.AV.push("InstallWallet"):s?o.AV.push("InjectedConnecting"):r?o.AV.push("DesktopConnecting"):n?o.AV.push("WebConnecting"):i?o.AV.push("MobileQrcodeConnecting"):o.AV.push("InstallWallet")},getWagmiWalletType:()=>localStorage.getItem(J.WAGMI_WALLET)},X=n.iv`.w3m-router{overflow:hidden;will-change:transform}.w3m-content{display:flex;flex-direction:column}`;var ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,re=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?te(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ee(t,r,o),o};let ne=class extends n.oi{constructor(){super(),this.view=o.AV.state.view,this.prevView=o.AV.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=o.AV.subscribe((e=>{this.view!==e.view&&this.onChangeRoute()}))}firstUpdated(){this.resizeObserver=new ResizeObserver((([e])=>{const t=`${e.contentRect.height}px`;"0px"!==this.oldHeight&&(0,c.j)(this.routerEl,{height:[this.oldHeight,t]},{duration:.2}),this.oldHeight=t})),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,t;null==(e=this.unsubscribe)||e.call(this),null==(t=this.resizeObserver)||t.disconnect()}get routerEl(){return J.getShadowRootElement(this,".w3m-router")}get contentEl(){return J.getShadowRootElement(this,".w3m-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return n.dy``;case"SelectNetwork":return n.dy``;case"InjectedConnecting":return n.dy``;case"DesktopConnecting":return n.dy``;case"MobileConnecting":return n.dy``;case"WebConnecting":return n.dy``;case"MobileQrcodeConnecting":return n.dy``;case"GetWallet":return n.dy``;case"WalletExplorer":return n.dy``;case"Qrcode":return n.dy``;case"Help":return n.dy``;case"Account":return n.dy``;case"SwitchNetwork":return n.dy``;case"InstallWallet":return n.dy``;default:return n.dy`
Not Found
`}}async onChangeRoute(){await(0,c.j)(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=o.AV.state.view,(0,c.j)(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return n.dy`
${this.viewTemplate()}
`}};ne.styles=[g.globalCss,X],re([(0,i.SB)()],ne.prototype,"view",2),re([(0,i.SB)()],ne.prototype,"prevView",2),ne=re([(0,i.Mo)("w3m-modal-router")],ne);const ie=n.iv`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--w3m-notification-border-radius);border:1px solid var(--w3m-color-overlay);background-color:var(--w3m-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--w3m-color-bg-3)}}.w3m-success path{fill:var(--w3m-accent-color)}.w3m-error path{fill:var(--w3m-error-color)}`;var oe=Object.defineProperty,se=Object.getOwnPropertyDescriptor,ae=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?se(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&oe(t,r,o),o};let ce=class extends n.oi{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=o.ToastCtrl.subscribe((e=>{e.open?(this.open=!0,this.timeout=setTimeout((()=>o.ToastCtrl.closeToast()),2200)):(this.open=!1,clearTimeout(this.timeout))}))}disconnectedCallback(){var e;null==(e=this.unsubscribe)||e.call(this),clearTimeout(this.timeout),o.ToastCtrl.closeToast()}render(){const{message:e,variant:t}=o.ToastCtrl.state,r={"w3m-success":"success"===t,"w3m-error":"error"===t};return this.open?n.dy`
${"success"===t?j.CHECKMARK_ICON:null} ${"error"===t?j.CROSS_ICON:null}${e}
`:null}};ce.styles=[g.globalCss,ie],ae([(0,i.SB)()],ce.prototype,"open",2),ce=ae([(0,i.Mo)("w3m-modal-toast")],ce);const le=n.iv`button{padding:5px;border-radius:var(--w3m-button-hover-highlight-border-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;width:80px;height:90px;position:relative}w3m-network-image{width:54px;height:59px}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;margin-top:5px}button:active{background-color:var(--w3m-color-overlay)}.w3m-unsupported{opacity:.3}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}`;var ue=Object.defineProperty,he=Object.getOwnPropertyDescriptor,de=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?he(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ue(t,r,o),o};let pe=class extends n.oi{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.chainId="",this.unsupported=!1}render(){const e={"w3m-unsupported":this.unsupported};return n.dy``}};pe.styles=[g.globalCss,le],de([(0,i.Cb)()],pe.prototype,"onClick",2),de([(0,i.Cb)()],pe.prototype,"name",2),de([(0,i.Cb)()],pe.prototype,"chainId",2),de([(0,i.Cb)()],pe.prototype,"unsupported",2),pe=de([(0,i.Mo)("w3m-network-button")],pe);const fe=n.iv`@keyframes loading{to{stroke-dashoffset:0}}:host{width:inherit;height:inherit;position:relative}path{stroke:var(--w3m-color-overlay)}svg{width:100%;height:100%;margin:0}#network-placeholder-fill{fill:var(--w3m-color-bg-3)}#network-placeholder-dash{stroke:var(--w3m-color-overlay)}image{clip-path:path('M17.033 4.964c3.852-2.262 5.778-3.393 7.84-3.77a11.807 11.807 0 0 1 4.254 0c2.062.377 3.988 1.508 7.84 3.77l6.066 3.562c3.852 2.263 5.777 3.394 7.13 5.022a12.268 12.268 0 0 1 2.127 3.747c.71 2.006.71 4.268.71 8.793v7.124c0 4.525 0 6.787-.71 8.793a12.268 12.268 0 0 1-2.126 3.747c-1.354 1.628-3.28 2.76-7.131 5.022l-6.066 3.562c-3.852 2.262-5.778 3.393-7.84 3.771a11.814 11.814 0 0 1-4.254 0c-2.062-.378-3.988-1.509-7.84-3.77l-6.066-3.563c-3.852-2.263-5.778-3.394-7.13-5.022a12.268 12.268 0 0 1-2.127-3.747C1 40 1 37.737 1 33.212v-7.124c0-4.525 0-6.787.71-8.793a12.268 12.268 0 0 1 2.127-3.747c1.352-1.628 3.278-2.76 7.13-5.022l6.066-3.562Z')}`;var me=Object.defineProperty,ge=Object.getOwnPropertyDescriptor,we=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ge(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&me(t,r,o),o};let be=class extends n.oi{constructor(){super(...arguments),this.chainId=""}render(){const e=J.getChainIcon(this.chainId);return e?n.dy``:n.dy`${j.NETWORK_PLACEHOLDER}`}};function ve(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+.1}be.styles=[g.globalCss,fe],we([(0,i.Cb)()],be.prototype,"chainId",2),be=we([(0,i.Mo)("w3m-network-image")],be);const ye={generate(e,t,r){const i="#141414",o=[],s=function(e,t){const r=Array.prototype.slice.call(l.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),n=Math.sqrt(r.length);return r.reduce(((e,t,r)=>(r%n==0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e),a=t/s.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach((({x:e,y:t})=>{const r=(s.length-7)*a*e,l=(s.length-7)*a*t;for(let e=0;e`)}}));const u=Math.floor((r+25)/a),h=s.length/2-u/2,d=s.length/2+u/2-1,p=[];s.forEach(((e,t)=>{e.forEach(((e,r)=>{if(s[t][r]&&!(t<7&&r<7||t>s.length-8&&r<7||t<7&&r>s.length-8)&&!(t>h&&th&&r{f[e]?f[e].push(t):f[e]=[t]})),Object.entries(f).map((([e,t])=>{const r=t.filter((e=>t.every((t=>!ve(e,t,a)))));return[Number(e),r]})).forEach((([e,t])=>{t.forEach((t=>{o.push(n.YP``)}))})),Object.entries(f).filter((([e,t])=>t.length>1)).map((([e,t])=>{const r=t.filter((e=>t.some((t=>ve(e,t,a)))));return[Number(e),r]})).map((([e,t])=>{t.sort(((e,t)=>et.some((t=>ve(e,t,a)))));t?t.push(e):r.push([e])}return[e,r.map((e=>[e[0],e[e.length-1]]))]})).forEach((([e,t])=>{t.forEach((([t,r])=>{o.push(n.YP``)}))})),o}},xe=n.iv`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.w3m-dark{background-color:#fff;border-radius:var(--w3m-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,w3m-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{width:25%;height:25%;border-radius:var(--w3m-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--w3m-accent-color)}svg:first-child path:last-child{stroke:var(--w3m-color-overlay)}`;var Ae=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,Ee=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ce(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ae(t,r,o),o};let Ie=class extends n.oi{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const e="light"===o.ThemeCtrl.state.themeMode?this.size:this.size-36;return n.YP`${ye.generate(this.uri,e,e/4)}`}render(){const e={"w3m-dark":"dark"===o.ThemeCtrl.state.themeMode};return n.dy`
${this.walletId||this.imageUrl?n.dy``:j.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`}};Ie.styles=[g.globalCss,xe],Ee([(0,i.Cb)()],Ie.prototype,"uri",2),Ee([(0,i.Cb)({type:Number})],Ie.prototype,"size",2),Ee([(0,i.Cb)()],Ie.prototype,"imageId",2),Ee([(0,i.Cb)()],Ie.prototype,"walletId",2),Ee([(0,i.Cb)()],Ie.prototype,"imageUrl",2),Ie=Ee([(0,i.Mo)("w3m-qrcode")],Ie);const _e=n.iv`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--w3m-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--w3m-color-fg-1);background-color:var(--w3m-color-bg-3);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);caret-color:var(--w3m-accent-color)}input::placeholder{color:var(--w3m-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--w3m-accent-color)}path{fill:var(--w3m-color-fg-2)}`;var Pe=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Se=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Oe(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Pe(t,r,o),o};let ke=class extends n.oi{constructor(){super(...arguments),this.onChange=()=>null}render(){return n.dy` ${j.SEARCH_ICON}`}};ke.styles=[g.globalCss,_e],Se([(0,i.Cb)()],ke.prototype,"onChange",2),ke=Se([(0,i.Mo)("w3m-search-input")],ke);const Me=n.iv`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}:host{width:100%;height:100%;display:flex;justify-content:center;align-items:center}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite}.accent{stroke:var(--w3m-accent-color)}.fill{stroke:var(--w3m-accent-fill-color)}`;var Te=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,je=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ne(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Te(t,r,o),o};let Re=class extends n.oi{constructor(){super(...arguments),this.color="accent",this.size=24}render(){return n.dy``}};Re.styles=[g.globalCss,Me],je([(0,i.Cb)()],Re.prototype,"color",2),je([(0,i.Cb)({type:Number})],Re.prototype,"size",2),Re=je([(0,i.Mo)("w3m-spinner")],Re);const Le=n.iv`span{font-style:normal;font-family:var(--w3m-font-family);font-feature-settings:var(--w3m-font-feature-settings)}.w3m-xsmall-bold{font-family:var(--w3m-text-xsmall-bold-font-family);font-weight:var(--w3m-text-xsmall-bold-weight);font-size:var(--w3m-text-xsmall-bold-size);line-height:var(--w3m-text-xsmall-bold-line-height);letter-spacing:var(--w3m-text-xsmall-bold-letter-spacing);text-transform:var(--w3m-text-xsmall-bold-text-transform)}.w3m-xsmall-regular{font-family:var(--w3m-text-xsmall-regular-font-family);font-weight:var(--w3m-text-xsmall-regular-weight);font-size:var(--w3m-text-xsmall-regular-size);line-height:var(--w3m-text-xsmall-regular-line-height);letter-spacing:var(--w3m-text-xsmall-regular-letter-spacing);text-transform:var(--w3m-text-xsmall-regular-text-transform)}.w3m-small-thin{font-family:var(--w3m-text-small-thin-font-family);font-weight:var(--w3m-text-small-thin-weight);font-size:var(--w3m-text-small-thin-size);line-height:var(--w3m-text-small-thin-line-height);letter-spacing:var(--w3m-text-small-thin-letter-spacing);text-transform:var(--w3m-text-small-thin-text-transform)}.w3m-small-regular{font-family:var(--w3m-text-small-regular-font-family);font-weight:var(--w3m-text-small-regular-weight);font-size:var(--w3m-text-small-regular-size);line-height:var(--w3m-text-small-regular-line-height);letter-spacing:var(--w3m-text-small-regular-letter-spacing);text-transform:var(--w3m-text-small-regular-text-transform)}.w3m-medium-regular{font-family:var(--w3m-text-medium-regular-font-family);font-weight:var(--w3m-text-medium-regular-weight);font-size:var(--w3m-text-medium-regular-size);line-height:var(--w3m-text-medium-regular-line-height);letter-spacing:var(--w3m-text-medium-regular-letter-spacing);text-transform:var(--w3m-text-medium-regular-text-transform)}.w3m-big-bold{font-family:var(--w3m-text-big-bold-font-family);font-weight:var(--w3m-text-big-bold-weight);font-size:var(--w3m-text-big-bold-size);line-height:var(--w3m-text-big-bold-line-height);letter-spacing:var(--w3m-text-big-bold-letter-spacing);text-transform:var(--w3m-text-big-bold-text-transform)}:host(*){color:var(--w3m-color-fg-1)}.w3m-color-primary{color:var(--w3m-color-fg-1)}.w3m-color-secondary{color:var(--w3m-color-fg-2)}.w3m-color-tertiary{color:var(--w3m-color-fg-3)}.w3m-color-inverse{color:var(--w3m-accent-fill-color)}.w3m-color-accnt{color:var(--w3m-accent-color)}.w3m-color-error{color:var(--w3m-error-color)}`;var Be=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,Ue=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?$e(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Be(t,r,o),o};let De=class extends n.oi{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const e={"w3m-big-bold":"big-bold"===this.variant,"w3m-medium-regular":"medium-regular"===this.variant,"w3m-small-regular":"small-regular"===this.variant,"w3m-small-thin":"small-thin"===this.variant,"w3m-xsmall-regular":"xsmall-regular"===this.variant,"w3m-xsmall-bold":"xsmall-bold"===this.variant,"w3m-color-primary":"primary"===this.color,"w3m-color-secondary":"secondary"===this.color,"w3m-color-tertiary":"tertiary"===this.color,"w3m-color-inverse":"inverse"===this.color,"w3m-color-accnt":"accent"===this.color,"w3m-color-error":"error"===this.color};return n.dy``}};De.styles=[g.globalCss,Le],Ue([(0,i.Cb)()],De.prototype,"variant",2),Ue([(0,i.Cb)()],De.prototype,"color",2),De=Ue([(0,i.Mo)("w3m-text")],De);const ze=n.iv`div{overflow:hidden;position:relative;border-radius:50%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:50%;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}svg{width:100%;height:100%}#token-placeholder-fill{fill:var(--w3m-color-bg-3)}#token-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var We=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,He=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Fe(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&We(t,r,o),o};let qe=class extends n.oi{constructor(){super(...arguments),this.symbol=void 0}render(){var e;const t=J.getTokenIcon(null!=(e=this.symbol)?e:"");return t?n.dy`
${this.id}
`:j.TOKEN_PLACEHOLDER}};qe.styles=[g.globalCss,ze],He([(0,i.Cb)()],qe.prototype,"symbol",2),qe=He([(0,i.Mo)("w3m-token-image")],qe);const Ve=n.iv`button{width:100%;height:100%;border-radius:var(--w3m-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}w3m-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--w3m-wallet-icon-border-radius);margin-bottom:5px}.w3m-sublabel{margin-top:2px}`;var Ge=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,Ze=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ke(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ge(t,r,o),o};let Qe=class extends n.oi{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?n.dy`RECENT`:this.installed?n.dy`INSTALLED`:null}handleClick(){o.uA.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var e;return n.dy``}};Qe.styles=[g.globalCss,Ve],Ze([(0,i.Cb)()],Qe.prototype,"onClick",2),Ze([(0,i.Cb)()],Qe.prototype,"name",2),Ze([(0,i.Cb)()],Qe.prototype,"walletId",2),Ze([(0,i.Cb)()],Qe.prototype,"label",2),Ze([(0,i.Cb)()],Qe.prototype,"imageId",2),Ze([(0,i.Cb)()],Qe.prototype,"installed",2),Ze([(0,i.Cb)()],Qe.prototype,"recent",2),Qe=Ze([(0,i.Mo)("w3m-wallet-button")],Qe);const Ye=n.iv`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--w3m-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var Je=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,et=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Xe(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Je(t,r,o),o};let tt=class extends n.oi{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var e;const t=null!=(e=this.imageUrl)&&e.length?this.imageUrl:J.getWalletIcon({id:this.walletId,image_id:this.imageId});return n.dy`${t.length?n.dy`
${this.id}
`:j.WALLET_PLACEHOLDER}`}};tt.styles=[g.globalCss,Ye],et([(0,i.Cb)()],tt.prototype,"walletId",2),et([(0,i.Cb)()],tt.prototype,"imageId",2),et([(0,i.Cb)()],tt.prototype,"imageUrl",2),tt=et([(0,i.Mo)("w3m-wallet-image")],tt);Object.defineProperty,Object.getOwnPropertyDescriptor;let rt=class extends n.oi{constructor(){super(),this.unwatchAccount=void 0,o.AccountCtrl.getAccount(),this.fetchProfile(),this.fetchBalance(),this.unwatchAccount=o.Id.client().watchAccount((e=>{const{address:t,isConnected:r}=o.AccountCtrl.state;e.isConnected&&e.address!==t&&(this.fetchProfile(e.address),this.fetchBalance(e.address),o.AccountCtrl.setAddress(e.address)),e.isConnected||o.AccountCtrl.resetAccount(),r!==e.isConnected&&o.jb.close(),!r&&e.isConnected?o.uA.track({name:"ACCOUNT_CONNECTED"}):r&&!e.isConnected&&o.uA.track({name:"ACCOUNT_DISCONNECTED"}),o.AccountCtrl.setIsConnected(e.isConnected)}))}disconnectedCallback(){var e;null==(e=this.unwatchAccount)||e.call(this)}async fetchProfile(e){var t;const r=null==(t=o.OptionsCtrl.state.chains)?void 0:t.find((e=>1===e.id));if(o.ConfigCtrl.state.enableAccountView&&r)try{await o.AccountCtrl.fetchProfile(J.preloadImage,e)}catch(e){console.error(e),o.ToastCtrl.openToast(J.getErrorMessage(e),"error")}}async fetchBalance(e){if(o.ConfigCtrl.state.enableAccountView)try{await o.AccountCtrl.fetchBalance(e)}catch(e){console.error(e),o.ToastCtrl.openToast(J.getErrorMessage(e),"error")}}};rt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-account-context")],rt);var nt=Object.defineProperty,it=Object.getOwnPropertyDescriptor,ot=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?it(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&nt(t,r,o),o};let st=class extends n.oi{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{null!=e&&e.length&&await Promise.all(e.map((async e=>J.preloadImage(e))))}catch{console.info("Unsuccessful attempt at preloading some images",e)}}async preloadListings(){var e;if(o.ConfigCtrl.state.enableExplorer){const{chains:t}=o.OptionsCtrl.state;await Promise.all([o.ExplorerCtrl.getRecomendedWallets(),o.ExplorerCtrl.getInjectedWallets()]),o.OptionsCtrl.setIsDataLoaded(!0);const{recomendedWallets:r}=o.ExplorerCtrl.state,n=Y.installedInjectedWallets(),i=null!=(e=t?.map((e=>J.getChainIcon(e.id))))?e:[],s=r.map((e=>J.getWalletIcon(e))),a=n.map((e=>J.getWalletIcon(e)));await this.loadImages([...i,...s,...a])}else o.OptionsCtrl.setIsDataLoaded(!0)}async preloadCustomImages(){const e=J.getCustomImageUrls();await this.loadImages(e)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(e){console.error(e),o.ToastCtrl.openToast("Failed preloading","error")}}};ot([(0,i.SB)()],st.prototype,"preload",2),st=ot([(0,i.Mo)("w3m-explorer-context")],st);var at=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,lt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ct(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&at(t,r,o),o};let ut=class extends n.oi{constructor(){super(),this.activeChainId=void 0,this.unwatchNetwork=void 0;const e=o.OptionsCtrl.getSelectedChain();this.activeChainId=e?.id,this.unwatchNetwork=o.Id.client().watchNetwork((e=>{const t=e.chain;t&&this.activeChainId!==t.id&&(o.OptionsCtrl.setSelectedChain(t),this.activeChainId=t.id,o.AccountCtrl.resetBalance(),this.fetchBalance())}))}disconnectedCallback(){var e;null==(e=this.unwatchNetwork)||e.call(this)}async fetchBalance(){if(o.ConfigCtrl.state.enableAccountView)try{await o.AccountCtrl.fetchBalance()}catch(e){console.error(e),o.ToastCtrl.openToast(J.getErrorMessage(e),"error")}}};lt([(0,i.SB)()],ut.prototype,"activeChainId",2),ut=lt([(0,i.Mo)("w3m-network-context")],ut);Object.defineProperty,Object.getOwnPropertyDescriptor;let ht=class extends n.oi{constructor(){super(),this.unsubscribeTheme=void 0,g.setTheme(),this.unsubscribeTheme=o.ThemeCtrl.subscribe(g.setTheme),this.preloadThemeImages()}disconnectedCallback(){var e;null==(e=this.unsubscribeTheme)||e.call(this)}async preloadThemeImages(){try{const{themeVariables:e}=o.ThemeCtrl.state,t=[e?.["--w3m-background-image-url"],e?.["--w3m-logo-image-url"]].filter(Boolean);t.length&&await Promise.all(t.map((async e=>J.preloadImage(e))))}catch{console.info("Unsuccessful attempt at preloading some images")}}};ht=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-theme-context")],ht);var dt;Object.defineProperty,Object.getOwnPropertyDescriptor;let pt=class extends n.oi{constructor(){super(),this.unwatchOptions=void 0,this.unwatchAccount=void 0,this.unwatchWcConnection=void 0,this.timeout=void 0,this.isGenerated=!1,this.selectedChainId=null==(dt=o.OptionsCtrl.state.selectedChain)?void 0:dt.id,this.isAccountConnected=o.AccountCtrl.state.isConnected,this.lastRetry=Date.now(),this.unwatchOptions=o.OptionsCtrl.subscribe((e=>{var t,r;(null==(t=e.selectedChain)?void 0:t.id)!==this.selectedChainId&&(this.selectedChainId=null==(r=e.selectedChain)?void 0:r.id,this.connectAndWait())})),this.unwatchAccount=o.AccountCtrl.subscribe((e=>{(this.isAccountConnected!==e.isConnected||!this.isGenerated)&&(this.isAccountConnected=e.isConnected,this.connectAndWait())})),this.unwatchWcConnection=o.WcConnectionCtrl.subscribe((e=>{e.pairingEnabled&&!this.isGenerated&&this.connectAndWait()}))}disconnectedCallback(){var e,t,r;null==(e=this.unwatchOptions)||e.call(this),null==(t=this.unwatchAccount)||t.call(this),null==(r=this.unwatchWcConnection)||r.call(this)}async connectAndWait(){const{pairingEnabled:e}=o.WcConnectionCtrl.state;if(clearTimeout(this.timeout),!this.isAccountConnected&&e){this.isGenerated=!0,this.timeout=setTimeout(this.connectAndWait.bind(this),24e4);try{const{selectedChain:e}=o.OptionsCtrl.state;await o.Id.client().connectWalletConnect((e=>o.WcConnectionCtrl.setPairingUri(e)),e?.id)}catch(e){console.error(e),o.WcConnectionCtrl.setPairingError(!0),o.ToastCtrl.openToast("Connection request declined","error"),Date.now()-this.lastRetry>=1e3&&(this.lastRetry=Date.now(),this.connectAndWait())}}}};pt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-wc-connection-context")],pt);const ft=n.iv`:host{all:initial}div{display:flex;align-items:center;background-color:var(--w3m-color-overlay);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);border-radius:var(--w3m-button-border-radius);padding:4px 4px 4px 8px}div button{border-radius:var(--w3m-secondary-button-border-radius);padding:4px 8px;padding-left:4px;height:auto;margin-left:10px;color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}.w3m-no-avatar{padding-left:8px}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:hover::after{background-color:var(--w3m-color-overlay)}w3m-avatar{margin-right:6px}w3m-button-big w3m-avatar{margin-left:-5px}`;var mt=Object.defineProperty,gt=Object.getOwnPropertyDescriptor,wt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?gt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&mt(t,r,o),o};let bt=class extends n.oi{constructor(){super(),this.balance="hide",this.avatar="show"}onOpen(){o.uA.click({name:"ACCOUNT_BUTTON"}),o.jb.open({route:"Account"})}accountTemplate(){const e="show"===this.avatar;return n.dy`${e?n.dy``:null}`}render(){const e="show"===this.balance,t={"w3m-no-avatar":"hide"===this.avatar};return e?n.dy`
`:n.dy`${this.accountTemplate()}`}};bt.styles=[g.globalCss,ft],wt([(0,i.Cb)()],bt.prototype,"balance",2),wt([(0,i.Cb)()],bt.prototype,"avatar",2),bt=wt([(0,i.Mo)("w3m-account-button")],bt);const vt=n.iv`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;justify-content:center;padding:5px;width:100px}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}button:disabled{pointer-events:none}w3m-network-image{width:32px;height:32px}w3m-text{margin-top:4px}`;var yt=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,At=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?xt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&yt(t,r,o),o};let Ct=class extends n.oi{constructor(){super(),this.chainId=0,this.label="",this.unsubscribeNetwork=void 0;const{selectedChain:e}=o.OptionsCtrl.state;this.chainId=e?.id,this.label=e?.name,this.unsubscribeNetwork=o.OptionsCtrl.subscribe((({selectedChain:e})=>{this.chainId=e?.id,this.label=e?.name}))}disconnectedCallback(){var e;null==(e=this.unsubscribeNetwork)||e.call(this)}onClick(){o.AV.push("SelectNetwork")}render(){const{chains:e,selectedChain:t}=o.OptionsCtrl.state,r=e?.map((e=>e.id)),i=t&&r?.includes(t.id),s=e&&e.length<=1&&i;return n.dy``}};Ct.styles=[g.globalCss,vt],At([(0,i.SB)()],Ct.prototype,"chainId",2),At([(0,i.SB)()],Ct.prototype,"label",2),Ct=At([(0,i.Mo)("w3m-account-network-button")],Ct);const Et=n.iv`@keyframes slide{0%{background-position:0 0}100%{background-position:200px 0}}w3m-text{padding:1px 0}.w3m-loading{background:linear-gradient(270deg,var(--w3m-color-fg-1) 36.33%,var(--w3m-color-fg-3) 42.07%,var(--w3m-color-fg-1) 83.3%);background-size:200px 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation-name:slide;animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear}`;var It=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,Pt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?_t(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&It(t,r,o),o};let Ot=class extends n.oi{constructor(){super(),this.address=void 0,this.name=void 0,this.loading=!0,this.variant="button",this.unsubscribeAccount=void 0,this.address=o.AccountCtrl.state.address,this.name=o.AccountCtrl.state.profileName,this.loading=Boolean(o.AccountCtrl.state.profileLoading),this.unsubscribeAccount=o.AccountCtrl.subscribe((({address:e,profileName:t,profileLoading:r})=>{this.address=e,this.name=t,this.loading=Boolean(r)}))}disconnectedCallback(){var e;null==(e=this.unsubscribeAccount)||e.call(this)}render(){var e;const t="button"===this.variant,r={"w3m-loading":this.loading};return n.dy`${this.name?this.name:J.truncate(null!=(e=this.address)?e:"")}`}};Ot.styles=[g.globalCss,Et],Pt([(0,i.SB)()],Ot.prototype,"address",2),Pt([(0,i.SB)()],Ot.prototype,"name",2),Pt([(0,i.SB)()],Ot.prototype,"loading",2),Pt([(0,i.Cb)()],Ot.prototype,"variant",2),Ot=Pt([(0,i.Mo)("w3m-address-text")],Ot);const St={onConnecting(e){J.goToConnectingView(e)},onExternal(e){J.handleConnectorConnection(e)},manualWalletsTemplate(){return Y.manualWallets().map((e=>n.dy``))},recomendedWalletsTemplate(e=!1){return Y.recomendedWallets(e).map((e=>n.dy``))},externalWalletsTemplate(){return Y.externalWallets().map((e=>n.dy``))},recentWalletTemplate(){const e=Y.recentWallet();if(e)return n.dy``},installedInjectedWalletsTemplate(){return Y.installedInjectedWallets().map((e=>n.dy``))},injectedWalletsTemplate(){return Y.injectedWallets().map((e=>n.dy``))}},kt=n.iv`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.w3m-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.w3m-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.w3m-track svg{margin:0 5px}w3m-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--w3m-wallet-icon-border-radius)}.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.w3m-title{display:flex;align-items:center;margin-bottom:10px}.w3m-title svg{margin-right:6px}.w3m-title path{fill:var(--w3m-accent-color)}w3m-modal-footer .w3m-title{padding:0 10px}w3m-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--w3m-color-bg-1))}w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-info-footer w3m-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Mt=class extends n.oi{onGoToQrcode(){o.AV.push("Qrcode")}onGetWallet(){o.AV.push("GetWallet")}render(){const{recomendedWallets:e}=o.ExplorerCtrl.state,t=[...e,...e],r=St.externalWalletsTemplate(),i=St.installedInjectedWalletsTemplate(),s=[...i,...r].length>0,a=2*o.zv.RECOMMENDED_WALLET_AMOUNT;return n.dy`
${j.MOBILE_ICON}WalletConnect
${[...Array(a)].map(((e,r)=>{const i=t[r%t.length];return i?n.dy``:j.WALLET_PLACEHOLDER}))}
Select Wallet
${s?n.dy`
${j.WALLET_ICON}Other
${i} ${r}
`:null}${"Choose WalletConnect to see supported apps on your device"+(s?", or select from other options":"")}I don't have a wallet`}};Mt.styles=[g.globalCss,kt],Mt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-android-wallet-selection")],Mt);const Tt=n.iv`@keyframes slide{0%{transform:translateX(-50px)}100%{transform:translateX(200px)}}.w3m-placeholder,img{border-radius:50%;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);display:block;position:relative;overflow:hidden!important;background-color:var(--w3m-color-av-1);background-image:radial-gradient(at 66% 77%,var(--w3m-color-av-2) 0,transparent 50%),radial-gradient(at 29% 97%,var(--w3m-color-av-3) 0,transparent 50%),radial-gradient(at 99% 86%,var(--w3m-color-av-4) 0,transparent 50%),radial-gradient(at 29% 88%,var(--w3m-color-av-5) 0,transparent 50%);transform:translateZ(0)}.w3m-loader{width:50px;height:100%;background:linear-gradient(270deg,transparent 0,rgba(255,255,255,.4) 30%,transparent 100%);animation-name:slide;animation-duration:1.5s;transform:translateX(-50px);animation-iteration-count:infinite;animation-timing-function:linear;animation-delay:.55s}.w3m-small{width:24px;height:24px}.w3m-medium{width:60px;height:60px}`;var Nt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,Rt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?jt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Nt(t,r,o),o};let Lt=class extends n.oi{constructor(){super(),this.address=void 0,this.avatar=void 0,this.loading=!0,this.size="small",this.unsubscribeAccount=void 0,this.address=o.AccountCtrl.state.address,this.avatar=o.AccountCtrl.state.profileAvatar,this.loading=Boolean(o.AccountCtrl.state.profileLoading),this.unsubscribeAccount=o.AccountCtrl.subscribe((({address:e,profileAvatar:t,profileLoading:r})=>{this.address=e,this.avatar=t,this.loading=Boolean(r)}))}disconnectedCallback(){var e;null==(e=this.unsubscribeAccount)||e.call(this)}render(){const e={"w3m-placeholder":!0,"w3m-small":"small"===this.size,"w3m-medium":"medium"===this.size};return this.avatar?n.dy``:this.address?(J.generateAvatarColors(this.address),n.dy`
${this.loading?n.dy`
`:null}
`):null}};Lt.styles=[g.globalCss,Tt],Rt([(0,i.SB)()],Lt.prototype,"address",2),Rt([(0,i.SB)()],Lt.prototype,"avatar",2),Rt([(0,i.SB)()],Lt.prototype,"loading",2),Rt([(0,i.Cb)()],Lt.prototype,"size",2),Lt=Rt([(0,i.Mo)("w3m-avatar")],Lt);const Bt=n.iv`div{display:flex;align-items:center}w3m-token-image{width:28px;height:28px;margin-right:6px}`;var $t=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,Dt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ut(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&$t(t,r,o),o};let zt=class extends n.oi{constructor(){var e,t;super(),this.symbol=void 0,this.amount=void 0,this.unsubscribeAccount=void 0,this.symbol=null==(e=o.AccountCtrl.state.balance)?void 0:e.symbol,this.amount=null==(t=o.AccountCtrl.state.balance)?void 0:t.amount,this.unsubscribeAccount=o.AccountCtrl.subscribe((({balance:e})=>{this.symbol=e?.symbol,this.amount=e?.amount}))}disconnectedCallback(){var e;null==(e=this.unsubscribeAccount)||e.call(this)}render(){let e="_._";return"0.0"===this.amount?e="0":"string"==typeof this.amount&&this.amount.length>6?e=this.amount.substring(0,6):"string"==typeof this.amount&&(e=this.amount),n.dy`
${e} ${this.symbol}
`}};zt.styles=[g.globalCss,Bt],Dt([(0,i.SB)()],zt.prototype,"symbol",2),Dt([(0,i.SB)()],zt.prototype,"amount",2),zt=Dt([(0,i.Mo)("w3m-balance")],zt);const Wt=n.iv`:host{all:initial}svg{width:28px;height:20px;margin:-1px 3px 0 -5px}svg path{fill:var(--w3m-accent-fill-color)}button:disabled svg path{fill:var(--w3m-color-fg-3)}w3m-spinner{margin:0 10px 0 0}`;var Ft=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,qt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ht(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ft(t,r,o),o};let Vt=class extends n.oi{constructor(){super(),this.loading=!1,this.label="Connect Wallet",this.icon="show",this.modalUnsub=void 0,this.modalUnsub=o.jb.subscribe((e=>{e.open&&(this.loading=!0),e.open||(this.loading=!1)}))}disconnectedCallback(){var e;null==(e=this.modalUnsub)||e.call(this)}iconTemplate(){return"show"===this.icon?j.WALLET_CONNECT_ICON:null}onClick(){o.AccountCtrl.state.isConnected?this.onDisconnect():this.onConnect()}async onConnect(){this.loading=!0,o.uA.click({name:"CONNECT_BUTTON"}),await o.jb.open(),o.jb.state.open||(this.loading=!1)}async onDisconnect(){o.uA.click({name:"DISCONNECT_BUTTON"}),await o.Id.client().disconnect()}render(){return n.dy`${this.loading?n.dy`Connecting...`:n.dy`${this.iconTemplate()}${this.label}`}`}};Vt.styles=[g.globalCss,Wt],qt([(0,i.SB)()],Vt.prototype,"loading",2),qt([(0,i.Cb)()],Vt.prototype,"label",2),qt([(0,i.Cb)()],Vt.prototype,"icon",2),Vt=qt([(0,i.Mo)("w3m-connect-button")],Vt);const Gt=n.iv`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--w3m-accent-color);animation:loading 1s linear infinite}w3m-wallet-image{border-radius:var(--w3m-wallet-icon-large-border-radius);width:90px;height:90px}w3m-text{margin-bottom:40px}.w3m-error svg{stroke:var(--w3m-error-color)}.w3m-error use{display:none}.w3m-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.w3m-stale svg,.w3m-stale use{display:none}`;var Kt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Qt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Zt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Kt(t,r,o),o};let Yt=class extends n.oi{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var e,t;const r=null!=(t=null==(e=o.ThemeCtrl.state.themeVariables)?void 0:e["--w3m-wallet-icon-large-border-radius"])?t:g.getPreset("--w3m-wallet-icon-large-border-radius");let i=0;i=r.includes("%")?.88*parseInt(r,10):parseInt(r,10),i*=1.17;const s=317-1.57*i,a=425-1.8*i;return n.dy``}render(){const e={"w3m-error":this.isError,"w3m-stale":this.isStale};return n.dy`
${this.svgLoaderTemplate()}
${this.isError?"Connection declined":this.label}`}};Yt.styles=[g.globalCss,Gt],Qt([(0,i.Cb)()],Yt.prototype,"walletId",2),Qt([(0,i.Cb)()],Yt.prototype,"imageId",2),Qt([(0,i.Cb)()],Yt.prototype,"isError",2),Qt([(0,i.Cb)()],Yt.prototype,"isStale",2),Qt([(0,i.Cb)()],Yt.prototype,"label",2),Yt=Qt([(0,i.Mo)("w3m-connector-waiting")],Yt);var Jt=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,er=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Xt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Jt(t,r,o),o};let tr=class extends n.oi{constructor(){super(),this.isConnected=!1,this.label="Connect Wallet",this.icon="show",this.avatar="show",this.balance="hide",this.unsubscribeAccount=void 0,this.isConnected=o.AccountCtrl.state.isConnected,this.unsubscribeAccount=o.AccountCtrl.subscribe((({isConnected:e})=>{this.isConnected=e}))}disconnectedCallback(){var e;null==(e=this.unsubscribeAccount)||e.call(this)}render(){const{enableAccountView:e}=o.ConfigCtrl.state,t=this.balance,r=this.label,i=this.icon,s=this.avatar;return this.isConnected&&e?n.dy``:n.dy``}};er([(0,i.SB)()],tr.prototype,"isConnected",2),er([(0,i.Cb)()],tr.prototype,"label",2),er([(0,i.Cb)()],tr.prototype,"icon",2),er([(0,i.Cb)()],tr.prototype,"avatar",2),er([(0,i.Cb)()],tr.prototype,"balance",2),tr=er([(0,i.Mo)("w3m-core-button")],tr);const rr=n.iv`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.w3m-desktop-title,.w3m-mobile-title{display:flex;align-items:center}.w3m-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.w3m-desktop-title{margin-bottom:10px;padding:0 10px}.w3m-subtitle{display:flex;align-items:center}.w3m-subtitle:last-child path{fill:var(--w3m-color-fg-3)}.w3m-desktop-title svg,.w3m-mobile-title svg{margin-right:6px}.w3m-desktop-title path,.w3m-mobile-title path{fill:var(--w3m-accent-color)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let nr=class extends n.oi{render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=o.ConfigCtrl.state,r="ALL"!==e&&t,i=St.manualWalletsTemplate(),s=St.recomendedWalletsTemplate(),a=St.externalWalletsTemplate(),c=St.recentWalletTemplate();let l=[...St.installedInjectedWalletsTemplate(),c,...a,...i,...s];l=l.filter(Boolean);const u=l.length>4||r;let h=[];h=u?l.slice(0,3):l;const d=Boolean(h.length);return n.dy`
${j.MOBILE_ICON}Mobile
${j.SCAN_ICON}Scan with your wallet
${d?n.dy`
${j.DESKTOP_ICON}Desktop
${h} ${u?n.dy``:null}
`:null}`}};nr.styles=[g.globalCss,rr],nr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-desktop-wallet-selection")],nr);const ir=n.iv`div{background-color:var(--w3m-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--w3m-color-bg-3);text-align:center}a{color:var(--w3m-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let or=class extends n.oi{render(){const{termsOfServiceUrl:e,privacyPolicyUrl:t}=o.ConfigCtrl.state;return e??t?n.dy`
By connecting your wallet to this app, you agree to the app's ${e?n.dy`Terms of Service`:null} ${e&&t?"and":null} ${t?n.dy`Privacy Policy`:null}
`:null}};or.styles=[g.globalCss,ir],or=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-legal-notice")],or);const sr=n.iv`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let ar=class extends n.oi{onQrcode(){o.AV.push("Qrcode")}render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=o.ConfigCtrl.state,r="ALL"!==e&&t,i=St.manualWalletsTemplate(),s=St.recomendedWalletsTemplate(),a=St.externalWalletsTemplate(),c=St.recentWalletTemplate();let l=[...St.installedInjectedWalletsTemplate(),c,...a,...i,...s];l=l.filter(Boolean);const u=l.length>8||r;let h=[];h=u?l.slice(0,7):l;const d=Boolean(h.length);return n.dy`${d?n.dy`
${h} ${u?n.dy``:null}
`:null}`}};ar.styles=[g.globalCss,sr],ar=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-mobile-wallet-selection")],ar);const cr=n.iv`:host{all:initial}.w3m-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--w3m-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--w3m-overlay-background-color);backdrop-filter:var(--w3m-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.w3m-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.w3m-active{pointer-events:auto}.w3m-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) var(--w3m-container-border-radius) var(--w3m-container-border-radius);border:1px solid var(--w3m-color-overlay);overflow:hidden}.w3m-card{width:100%;position:relative;border-radius:var(--w3m-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-color-bg-1);color:var(--w3m-color-fg-1)}@media(max-width:600px){.w3m-container{max-width:440px;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) 0 0}.w3m-card{border-radius:var(--w3m-container-border-radius) var(--w3m-container-border-radius) 0 0}.w3m-overlay{align-items:flex-end}}@media(max-width:440px){.w3m-container{border:0}}`;var lr=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,hr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ur(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&lr(t,r,o),o};let dr=class extends n.oi{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=o.jb.subscribe((e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()}))}disconnectedCallback(){var e;null==(e=this.unsubscribeModal)||e.call(this)}get overlayEl(){return J.getShadowRootElement(this,".w3m-overlay")}get containerEl(){return J.getShadowRootElement(this,".w3m-container")}toggleBodyScroll(e){if(document.querySelector("body"))if(e){const e=document.getElementById("w3m-styles");e?.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(e){e.target===e.currentTarget&&o.jb.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout((async()=>{const e=J.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]};await Promise.all([(0,c.j)(this.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,(0,c.j)(this.containerEl,e,{delay:.1,duration:.2}).finished]),this.active=!0}),0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const e=J.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]};await Promise.all([(0,c.j)(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished,(0,c.j)(this.containerEl,e,{duration:.2}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",(e=>{var t;"Escape"===e.key?o.jb.close():"Tab"===e.key&&(null!=(t=e.target)&&t.tagName.includes("W3M-")||this.containerEl.focus())}),this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;null==(e=this.abortController)||e.abort(),this.abortController=void 0}render(){const e={"w3m-overlay":!0,"w3m-active":this.active};return n.dy`
${this.open?n.dy`
`:null}
`}};dr.styles=[g.globalCss,cr],hr([(0,i.SB)()],dr.prototype,"open",2),hr([(0,i.SB)()],dr.prototype,"active",2),dr=hr([(0,i.Mo)("w3m-modal")],dr);const pr=n.iv`:host{all:initial}w3m-network-image{margin-left:-6px;margin-right:6px;width:28px;height:28px}`;var fr=Object.defineProperty,mr=Object.getOwnPropertyDescriptor,gr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?mr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&fr(t,r,o),o};let wr=class extends n.oi{constructor(){super(),this.chainId="",this.label="",this.wrongNetwork=!1,this.unsubscribeNetwork=void 0;const{selectedChain:e}=o.OptionsCtrl.state;this.onSetChainData(e),this.unsubscribeNetwork=o.OptionsCtrl.subscribe((({selectedChain:e})=>{this.onSetChainData(e)}))}disconnectedCallback(){var e;null==(e=this.unsubscribeNetwork)||e.call(this)}onSetChainData(e){if(e){const{chains:t}=o.OptionsCtrl.state,r=t?.map((e=>e.id));this.chainId=e.id.toString(),this.wrongNetwork=!(null!=r&&r.includes(e.id)),this.label=this.wrongNetwork?"Wrong Network":e.name}}onClick(){o.uA.click({name:"NETWORK_BUTTON"}),o.jb.open({route:"SelectNetwork"})}render(){var e;const{chains:t}=o.OptionsCtrl.state,r=t&&t.length>1;return n.dy`${null!=(e=this.label)&&e.length?this.label:"Select Network"}`}};wr.styles=[g.globalCss,pr],gr([(0,i.SB)()],wr.prototype,"chainId",2),gr([(0,i.SB)()],wr.prototype,"label",2),gr([(0,i.SB)()],wr.prototype,"wrongNetwork",2),wr=gr([(0,i.Mo)("w3m-network-switch")],wr);const br=n.iv`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:1px;top:0;left:0}use{stroke:var(--w3m-accent-color);animation:loading 1s linear infinite}w3m-network-image{width:92px;height:92px}w3m-text{margin-bottom:40px}.w3m-error svg{stroke:var(--w3m-error-color)}.w3m-error use{display:none}.w3m-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}`;var vr=Object.defineProperty,yr=Object.getOwnPropertyDescriptor,xr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?yr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&vr(t,r,o),o};let Ar=class extends n.oi{constructor(){super(...arguments),this.chainId=void 0,this.isError=!1,this.label=""}svgLoaderTemplate(){return n.dy``}render(){const e={"w3m-error":this.isError};return n.dy`
${this.svgLoaderTemplate()}
${this.isError?"Switch declined":this.label}`}};Ar.styles=[g.globalCss,br],xr([(0,i.Cb)()],Ar.prototype,"chainId",2),xr([(0,i.Cb)()],Ar.prototype,"isError",2),xr([(0,i.Cb)()],Ar.prototype,"label",2),Ar=xr([(0,i.Mo)("w3m-network-waiting")],Ar);const Cr=n.iv`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}w3m-button{margin:0 5px}`;var Er=Object.defineProperty,Ir=Object.getOwnPropertyDescriptor,_r=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ir(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Er(t,r,o),o};let Pr=class extends n.oi{constructor(){super(...arguments),this.isMobile=!1,this.isInjected=!1,this.isInjectedInstalled=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){o.zv.isMobile()?o.AV.replace("MobileConnecting"):o.AV.replace("MobileQrcodeConnecting")}onInjected(){this.isInjectedInstalled?o.AV.replace("InjectedConnecting"):o.AV.replace("InstallWallet")}onDesktop(){o.AV.replace("DesktopConnecting")}onWeb(){o.AV.replace("WebConnecting")}render(){return n.dy`
${this.isRetry?n.dy``:null} ${this.isMobile?n.dy`Mobile`:null} ${this.isInjected?n.dy`Browser`:null} ${this.isDesktop?n.dy`Desktop`:null} ${this.isWeb?n.dy`Web`:null}
`}};Pr.styles=[g.globalCss,Cr],_r([(0,i.Cb)()],Pr.prototype,"isMobile",2),_r([(0,i.Cb)()],Pr.prototype,"isInjected",2),_r([(0,i.Cb)()],Pr.prototype,"isInjectedInstalled",2),_r([(0,i.Cb)()],Pr.prototype,"isDesktop",2),_r([(0,i.Cb)()],Pr.prototype,"isWeb",2),_r([(0,i.Cb)()],Pr.prototype,"isRetry",2),Pr=_r([(0,i.Mo)("w3m-platform-selection")],Pr);const Or=n.iv`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--w3m-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.w3m-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--w3m-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}.w3m-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--w3m-wallet-icon-border-radius)/ 2);border:1px solid var(--w3m-color-overlay)}.w3m-icons svg{width:21px;height:21px}.w3m-icons img:nth-child(1),.w3m-icons img:nth-child(2),.w3m-icons svg:nth-child(1),.w3m-icons svg:nth-child(2){margin-bottom:4px}w3m-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Sr=class extends n.oi{onClick(){o.AV.push("WalletExplorer")}render(){const{recomendedWallets:e}=o.ExplorerCtrl.state,t=[...e,...Y.manualWallets()].reverse().slice(0,4);return n.dy``}};Sr.styles=[g.globalCss,Or],Sr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-view-all-wallets-button")],Sr);const kr=n.iv`.w3m-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var Mr=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Nr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Tr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Mr(t,r,o),o};let jr=class extends n.oi{constructor(){super(),this.walletId="",this.imageId="",this.uri="",this.unwatchWcConnection=void 0,setTimeout((()=>{const{pairingUri:e}=o.WcConnectionCtrl.state;this.uri=e}),0),this.unwatchWcConnection=o.WcConnectionCtrl.subscribe((e=>{e.pairingUri&&(this.uri=e.pairingUri)}))}disconnectedCallback(){var e;null==(e=this.unwatchWcConnection)||e.call(this)}get overlayEl(){return J.getShadowRootElement(this,".w3m-qr-container")}render(){return n.dy`
${this.uri?n.dy``:n.dy``}
`}};jr.styles=[g.globalCss,kr],Nr([(0,i.Cb)()],jr.prototype,"walletId",2),Nr([(0,i.Cb)()],jr.prototype,"imageId",2),Nr([(0,i.SB)()],jr.prototype,"uri",2),jr=Nr([(0,i.Mo)("w3m-walletconnect-qr")],jr);const Rr=n.iv`.w3m-profile{display:flex;justify-content:space-between;align-items:flex-start;padding-top:20px}.w3m-connection-badge{background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);padding:6px 10px 6px 26px;position:relative;border-radius:28px}.w3m-connection-badge::before{content:'';position:absolute;width:10px;height:10px;left:10px;background-color:var(--w3m-success-color);border-radius:50%;top:50%;margin-top:-5px;box-shadow:0 1px 4px 1px var(--w3m-success-color),inset 0 0 0 1px var(--w3m-color-overlay)}.w3m-footer{display:flex;justify-content:space-between}w3m-address-text{margin-top:10px;display:block}.w3m-balance{border-top:1px solid var(--w3m-color-bg-2);padding:11px 20px}`;var Lr=Object.defineProperty,Br=Object.getOwnPropertyDescriptor,$r=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Br(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Lr(t,r,o),o};let Ur=class extends n.oi{constructor(){super(...arguments),this.loading=!1}async onDisconnect(){this.loading||(this.loading=!0,await o.Id.client().disconnect(),this.loading=!1)}async onCopyAddress(){var e;try{await navigator.clipboard.writeText(null!=(e=o.AccountCtrl.state.address)?e:""),o.ToastCtrl.openToast("Address copied","success")}catch{o.ToastCtrl.openToast("Failed to copy","error")}}render(){return n.dy`
Connected
`}};Ur.styles=[g.globalCss,Rr],$r([(0,i.SB)()],Ur.prototype,"loading",2),Ur=$r([(0,i.Mo)("w3m-account-view")],Ur);Object.defineProperty,Object.getOwnPropertyDescriptor;let Dr=class extends n.oi{viewTemplate(){return o.zv.isAndroid()?n.dy``:o.zv.isMobile()?n.dy``:n.dy``}render(){return n.dy`${this.viewTemplate()}`}};Dr.styles=[g.globalCss],Dr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-connect-wallet-view")],Dr);const zr=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var Wr=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,Hr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Fr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Wr(t,r,o),o};let qr=class extends n.oi{constructor(){super(),this.isError=!1,this.unwatchConnection=void 0,this.openDesktopApp(),this.unwatchConnection=o.WcConnectionCtrl.subscribe((e=>{this.isError=e.pairingError}))}disconnectedCallback(){var e;null==(e=this.unwatchConnection)||e.call(this)}onFormatAndRedirect(e){const{desktop:t,name:r}=o.zv.getWalletRouterData(),n=t?.native;if(n){const t=o.zv.formatNativeUrl(n,e,r);o.zv.openHref(t,"_self")}}openDesktopApp(){o.WcConnectionCtrl.setPairingError(!1);const{pairingUri:e}=o.WcConnectionCtrl.state,t=o.zv.getWalletRouterData();J.setRecentWallet(t),this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=o.zv.getWalletRouterData(),{isMobile:i,isInjected:s,isWeb:a}=J.getCachedRouterWalletPlatforms();return n.dy`${`Connection can continue loading if ${e} is not installed on your device`}Retry`}};qr.styles=[g.globalCss,zr],Hr([(0,i.SB)()],qr.prototype,"isError",2),qr=Hr([(0,i.Mo)("w3m-desktop-connecting-view")],qr);const Vr=n.iv`.w3m-info-text{margin:5px 0 15px;max-width:320px;text-align:center}.w3m-wallet-item{margin:0 -20px 0 0;padding-right:20px;display:flex;align-items:center;border-bottom:1px solid var(--w3m-color-bg-2)}.w3m-wallet-item:last-child{margin-bottom:-20px;border-bottom:0}.w3m-wallet-content{margin-left:20px;height:60px;display:flex;flex:1;align-items:center;justify-content:space-between}.w3m-footer-actions{display:flex;flex-direction:column;align-items:center;padding:20px 0;border-top:1px solid var(--w3m-color-bg-2)}w3m-wallet-image{display:block;width:40px;height:40px;border-radius:10px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Gr=class extends n.oi{onGet(e){o.zv.openHref(e,"_blank")}render(){const e=o.ExplorerCtrl.state.recomendedWallets.slice(0,5),t=Y.manualWallets().slice(0,5),r=e.length,i=t.length;return n.dy`${r?e.map((e=>n.dy`
${e.name}Get
`)):null} ${i?t.map((e=>n.dy`
${e.name}Get
`)):null}
`}};Gr.styles=[g.globalCss,Vr],Gr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-get-wallet-view")],Gr);const Kr=n.iv`.w3m-footer-actions{display:flex;justify-content:center}.w3m-footer-actions w3m-button{margin:0 5px}.w3m-info-container{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-bottom:20px}.w3m-info-container:last-child{margin-bottom:0}.w3m-info-text{margin-top:5px;text-align:center}.w3m-images svg{margin:0 2px 5px;width:55px;height:55px}.help-img-highlight{stroke:var(--w3m-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Zr=class extends n.oi{constructor(){super(...arguments),this.learnUrl="https://ethereum.org/en/wallets/"}onGet(){o.ConfigCtrl.state.enableExplorer?o.AV.push("GetWallet"):J.openWalletExplorerUrl()}onLearnMore(){o.zv.openHref(this.learnUrl,"_blank")}render(){return n.dy`
${j.HELP_CHART_IMG} ${j.HELP_PAINTING_IMG} ${j.HELP_ETH_IMG}
A home for your digital assetsA wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs.
${j.HELP_KEY_IMG} ${j.HELP_USER_IMG} ${j.HELP_LOCK_IMG}
One login for all of web3Log in to any app by connecting your wallet. Say goodbye to countless passwords!
${j.HELP_COMPAS_IMG} ${j.HELP_NOUN_IMG} ${j.HELP_DAO_IMG}
Your gateway to a new webWith your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more.
`}};Zr.styles=[g.globalCss,Kr],Zr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-help-view")],Zr);const Qr=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var Yr=Object.defineProperty,Jr=Object.getOwnPropertyDescriptor,Xr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Jr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Yr(t,r,o),o};let en=class extends n.oi{constructor(){super(),this.isError=!1,this.connector=o.Id.client().getConnectorById("injected"),this.openInjectedApp()}async openInjectedApp(){const{ready:e}=this.connector;e&&(this.isError=!1,await J.handleConnectorConnection("injected",(()=>{this.isError=!0})))}render(){const{name:e,id:t,image_id:r}=o.zv.getWalletRouterData(),{isMobile:i,isDesktop:s,isWeb:a}=J.getCachedRouterWalletPlatforms();return n.dy`Connection can be declined if multiple wallets are installed or previous request is still activeRetry`}};en.styles=[g.globalCss,Qr],Xr([(0,i.SB)()],en.prototype,"isError",2),en=Xr([(0,i.Mo)("w3m-injected-connecting-view")],en);const tn=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}w3m-button{margin-top:15px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let rn=class extends n.oi{onInstall(e){e&&o.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,homepage:i}=o.zv.getWalletRouterData();return n.dy`${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}Download`}};rn.styles=[g.globalCss,tn],rn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-install-wallet-view")],rn);const nn=n.iv`w3m-wallet-image{border-radius:var(--w3m-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}w3m-info-footer{display:flex;width:100%}.w3m-app-store{justify-content:space-between}.w3m-app-store w3m-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--w3m-wallet-icon-small-border-radius)}.w3m-app-store div{display:flex;align-items:center}.w3m-app-store w3m-button{margin-right:-10px}.w3m-note{flex-direction:column;align-items:center;padding:5px 0}.w3m-note w3m-text{text-align:center}w3m-platform-selection{margin-top:-15px}.w3m-note w3m-text{margin-top:15px}.w3m-note w3m-text span{color:var(--w3m-accent-color)}`;var on=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,an=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?sn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&on(t,r,o),o};let cn=class extends n.oi{constructor(){super(),this.isError=!1,this.unwatchConnection=void 0,this.openMobileApp(),this.unwatchConnection=o.WcConnectionCtrl.subscribe((e=>{this.isError=e.pairingError}))}disconnectedCallback(){var e;null==(e=this.unwatchConnection)||e.call(this)}onFormatAndRedirect(e,t=!1){const{mobile:r,name:n}=o.zv.getWalletRouterData(),i=r?.native,s=r?.universal;if(i&&!t){const t=o.zv.formatNativeUrl(i,e,n);o.zv.openHref(t,"_self")}else if(s){const t=o.zv.formatUniversalUrl(s,e,n);o.zv.openHref(t,"_self")}}openMobileApp(e=!1){o.WcConnectionCtrl.setPairingError(!1);const{pairingUri:t}=o.WcConnectionCtrl.state,r=o.zv.getWalletRouterData();J.setRecentWallet(r),this.onFormatAndRedirect(t,e)}onGoToAppStore(e){e&&o.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,app:i,mobile:s}=o.zv.getWalletRouterData(),{isWeb:a}=J.getCachedRouterWalletPlatforms(),c=i?.ios,l=s?.universal;return n.dy`Retry${l?n.dy`Still doesn't work? Try this alternate link`:null}
${`Get ${e}`}
App Store
`}};cn.styles=[g.globalCss,nn],an([(0,i.SB)()],cn.prototype,"isError",2),cn=an([(0,i.Mo)("w3m-mobile-connecting-view")],cn);const ln=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let un=class extends n.oi{render(){const{name:e,id:t,image_id:r}=o.zv.getWalletRouterData(),{isInjected:i,isDesktop:s,isWeb:a}=J.getCachedRouterWalletPlatforms();return n.dy`${`Scan this QR Code with your phone's camera or inside ${e} app`}`}};un.styles=[g.globalCss,ln],un=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-mobile-qr-connecting-view")],un);Object.defineProperty,Object.getOwnPropertyDescriptor;let hn=class extends n.oi{render(){return n.dy``}};hn.styles=[g.globalCss],hn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-qrcode-view")],hn);const dn=n.iv`div{display:grid;grid-template-columns:repeat(4,80px);margin:-5px -10px;justify-content:space-between}w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-info-footer w3m-text{text-align:center}`;var pn=Object.defineProperty,fn=Object.defineProperties,mn=Object.getOwnPropertyDescriptor,gn=Object.getOwnPropertyDescriptors,wn=Object.getOwnPropertySymbols,bn=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,yn=(e,t,r)=>t in e?pn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?mn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&pn(t,r,o),o};let An=class extends n.oi{constructor(){super(),this.connectedChains="ALL",this.isUnsupportedChains=!1,this.getConnectedChainIds()}async getConnectedChainIds(){this.connectedChains=await o.Id.client().getConnectedChainIds()}async onSelectChain(e){try{const{selectedChain:t,isPreferInjected:r}=o.OptionsCtrl.state,{isConnected:n}=o.AccountCtrl.state;n?t?.id===e.id?o.AV.reset("Account"):'"walletConnect"'===J.getWagmiWalletType()?(await o.Id.client().switchNetwork({chainId:e.id}),o.AV.reset("Account")):o.AV.push("SwitchNetwork",{SwitchNetwork:e}):r?(o.OptionsCtrl.setSelectedChain(e),o.jb.close()):(o.OptionsCtrl.setSelectedChain(e),o.AV.push("ConnectWallet"))}catch(e){console.error(e),o.ToastCtrl.openToast("Unsupported chain","error")}}isUnsuportedChainId(e){return("string"==typeof this.connectedChains&&"ALL"!==this.connectedChains||!(!Array.isArray(this.connectedChains)||this.connectedChains.includes(String(e))))&&(this.isUnsupportedChains=!0,!0)}render(){const{chains:e}=o.OptionsCtrl.state,t=e?.map((e=>((e,t)=>fn(e,gn(t)))(((e,t)=>{for(var r in t||(t={}))bn.call(t,r)&&yn(e,r,t[r]);if(wn)for(var r of wn(t))vn.call(t,r)&&yn(e,r,t[r]);return e})({},e),{unsupported:this.isUnsuportedChainId(e.id)}))),r=t?.sort(((e,t)=>Number(e.unsupported)-Number(t.unsupported)));return n.dy`
${r?.map((e=>n.dy`${e.name}`))}
${this.isUnsupportedChains?n.dy`Your connected wallet may not support some of the networks available for this dapp`:null}`}};An.styles=[g.globalCss,dn],xn([(0,i.SB)()],An.prototype,"connectedChains",2),xn([(0,i.SB)()],An.prototype,"isUnsupportedChains",2),An=xn([(0,i.Mo)("w3m-select-network-view")],An);const Cn=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}w3m-button{margin-top:15px}`;var En=Object.defineProperty,In=Object.getOwnPropertyDescriptor,_n=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?In(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&En(t,r,o),o};let Pn=class extends n.oi{constructor(){super(),this.isError=!1,this.onSwitchNetwork()}async onSwitchNetwork(){try{this.isError=!1;const e=o.zv.getSwitchNetworkRouterData();await o.Id.client().switchNetwork({chainId:e.id}),o.OptionsCtrl.setSelectedChain(e),o.AV.reset("Account")}catch{this.isError=!0}}render(){const{id:e,name:t}=o.zv.getSwitchNetworkRouterData();return n.dy`Switch can be declined if chain is not supported by a wallet or previous request is still activeTry Again`}};Pn.styles=[g.globalCss,Cn],_n([(0,i.SB)()],Pn.prototype,"isError",2),Pn=_n([(0,i.Mo)("w3m-switch-network-view")],Pn);const On=n.iv`w3m-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}w3m-modal-content::after,w3m-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}w3m-modal-content::before{box-shadow:0 -1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(var(--w3m-color-bg-1),rgba(255,255,255,0))}w3m-modal-content::after{box-shadow:0 1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--w3m-color-bg-1));top:calc(100% - 20px)}w3m-modal-content::-webkit-scrollbar{display:none}.w3m-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.w3m-empty,.w3m-loading{display:flex}.w3m-loading .w3m-placeholder-block{height:100%}.w3m-end-reached .w3m-placeholder-block{height:0;opacity:0}.w3m-empty .w3m-placeholder-block{opacity:1;height:100%}w3m-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var Sn=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,Mn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?kn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Sn(t,r,o),o};let Tn=class extends n.oi{constructor(){super(...arguments),this.loading=!o.ExplorerCtrl.state.wallets.listings.length,this.firstFetch=!o.ExplorerCtrl.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=J.debounce((e=>{e.length>=3?(this.firstFetch=!0,this.endReached=!1,this.search=e,o.ExplorerCtrl.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),o.ExplorerCtrl.resetSearch())}))}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;null==(e=this.intersectionObserver)||e.disconnect()}get placeholderEl(){return J.getShadowRootElement(this,".w3m-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver((([e])=>{e.isIntersecting&&(!this.search||!this.firstFetch)&&this.fetchWallets()})),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:e,search:t}=o.ExplorerCtrl.state,{listings:r,total:n}=this.search?t:e;return n<=40||r.length>=n}async fetchWallets(){const{wallets:e,search:t,injectedWallets:r}=o.ExplorerCtrl.state,{listings:n,total:i,page:s}=this.search?t:e;if(!this.endReached&&(this.firstFetch||i>40&&n.lengthJ.getWalletIcon(e))),n=r.map((e=>J.getWalletIcon(e)));await Promise.all([...t.map((async e=>J.preloadImage(e))),...n.map((async e=>J.preloadImage(e))),o.zv.wait(300)]),this.endReached=this.isLastPage()}catch(e){console.error(e),o.ToastCtrl.openToast(J.getErrorMessage(e),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(e){o.zv.isAndroid()?J.handleMobileLinking(e):J.goToConnectingView(e)}onSearchChange(e){const{value:t}=e.target;this.searchDebounce(t)}render(){const{wallets:e,search:t}=o.ExplorerCtrl.state,{listings:r}=this.search?t:e,i=this.loading&&!r.length,a=this.search.length>=3;let c=St.injectedWalletsTemplate(),l=St.manualWalletsTemplate(),u=St.recomendedWalletsTemplate(!0);a&&(c=c.filter((({values:e})=>J.caseSafeIncludes(e[0],this.search))),l=l.filter((({values:e})=>J.caseSafeIncludes(e[0],this.search))),u=u.filter((({values:e})=>J.caseSafeIncludes(e[0],this.search)))),c=c.filter((e=>!u.find((t=>J.caseSafeIncludes(e.values[0],t.values[0])))));const h=!(this.loading||r.length||c.length||u.length),d=Math.max(c.length,r.length),p={"w3m-loading":i,"w3m-end-reached":this.endReached||!this.loading,"w3m-empty":h};return n.dy`
${i?null:u} ${i?null:[...Array(d)].map(((e,t)=>n.dy`${l[t]} ${c[t]} ${r[t]?n.dy``:null}`))}
${h?n.dy`No results found`:null} ${!h&&this.loading?n.dy``:null}
`}};Tn.styles=[g.globalCss,On],Mn([(0,i.SB)()],Tn.prototype,"loading",2),Mn([(0,i.SB)()],Tn.prototype,"firstFetch",2),Mn([(0,i.SB)()],Tn.prototype,"search",2),Mn([(0,i.SB)()],Tn.prototype,"endReached",2),Tn=Mn([(0,i.Mo)("w3m-wallet-explorer-view")],Tn);const Nn=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var jn=Object.defineProperty,Rn=Object.getOwnPropertyDescriptor,Ln=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Rn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&jn(t,r,o),o};let Bn=class extends n.oi{constructor(){super(),this.isError=!1,this.unwatchConnection=void 0,this.openWebWallet(),this.unwatchConnection=o.WcConnectionCtrl.subscribe((e=>{this.isError=e.pairingError}))}disconnectedCallback(){var e;null==(e=this.unwatchConnection)||e.call(this)}onFormatAndRedirect(e){const{desktop:t,name:r}=o.zv.getWalletRouterData(),n=t?.universal;if(n){const t=o.zv.formatUniversalUrl(n,e,r);o.zv.openHref(t,"_blank")}}openWebWallet(){o.WcConnectionCtrl.setPairingError(!1);const{pairingUri:e}=o.WcConnectionCtrl.state,t=o.zv.getWalletRouterData();J.setRecentWallet(t),this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=o.zv.getWalletRouterData(),{isMobile:i,isInjected:s,isDesktop:a}=J.getCachedRouterWalletPlatforms(),c=o.zv.isMobile();return n.dy`${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};Bn.styles=[g.globalCss,Nn],Ln([(0,i.SB)()],Bn.prototype,"isError",2),Bn=Ln([(0,i.Mo)("w3m-web-connecting-view")],Bn)},3692:(e,t,r)=>{"use strict";var n;r.d(t,{Jb:()=>_,Ld:()=>P,YP:()=>I,dy:()=>E,sY:()=>W});const i=window,o=i.trustedTypes,s=o?o.createPolicy("lit-html",{createHTML:e=>e}):void 0,a="$lit$",c=`lit$${(Math.random()+"").slice(9)}$`,l="?"+c,u=`<${l}>`,h=document,d=()=>h.createComment(""),p=e=>null===e||"object"!=typeof e&&"function"!=typeof e,f=Array.isArray,m="[ \t\n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,b=/>/g,v=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),y=/'/g,x=/"/g,A=/^(?:script|style|textarea|title)$/i,C=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),E=C(1),I=C(2),_=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),O=new WeakMap,S=h.createTreeWalker(h,129,null,!1),k=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"":"",l=g;for(let t=0;t"===h[0]?(l=null!=i?i:g,d=-1):void 0===h[1]?d=-2:(d=l.lastIndex-h[2].length,s=h[1],l=void 0===h[3]?v:'"'===h[3]?x:y):l===x||l===y?l=v:l===w||l===b?l=g:(l=v,i=void 0);const f=l===v&&e[t+1].startsWith("/>")?" ":"";o+=l===g?r+u:d>=0?(n.push(s),r.slice(0,d)+a+r.slice(d)+c+f):r+c+(-2===d?(n.push(void 0),t):f)}const h=o+(e[r]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==s?s.createHTML(h):h,n]};class M{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,s=0;const u=e.length-1,h=this.parts,[p,f]=k(e,t);if(this.el=M.createElement(p,r),S.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=S.nextNode())&&h.length0){n.textContent=o?o.emptyScript:"";for(let r=0;rf(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==P&&p(this._$AH)?this._$AA.nextSibling.data=e:this.$(h.createTextNode(e)),this._$AH=e}g(e){var t;const{values:r,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=M.createElement(n.h,this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===i)this._$AH.v(r);else{const e=new N(i,this),t=e.u(this.options);e.v(r),this.$(t),this._$AH=e}}_$AC(e){let t=O.get(e.strings);return void 0===t&&O.set(e.strings,t=new M(e)),t}T(e){f(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new j(this.k(d()),this.k(d()),this,this.options)):r=t[n],r._$AI(i),n++;n2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=P}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=T(this,e,t,0),o=!p(e)||e!==this._$AH&&e!==_,o&&(this._$AH=e);else{const n=e;let s,a;for(e=i[0],s=0;s{var n,i;const o=null!==(n=null==r?void 0:r.renderBefore)&&void 0!==n?n:t;let s=o._$litPart$;if(void 0===s){const e=null!==(i=null==r?void 0:r.renderBefore)&&void 0!==i?i:null;o._$litPart$=s=new j(t.insertBefore(d(),e),e,void 0,null!=r?r:{})}return s._$AI(e),s}},7408:(e,t,r)=>{"use strict";r.d(t,{Mo:()=>n,Cb:()=>s,SB:()=>a});const n=e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(t){customElements.define(e,t)}}})(e,t),i=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(r){r.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}},o=(e,t,r)=>{t.constructor.createProperty(r,e)};function s(e){return(t,r)=>void 0!==r?o(e,t,r):i(e,t)}function a(e){return s({...e,state:!0})}var c;null===(c=window.HTMLSlotElement)||void 0===c||c.prototype.assignedElements},623:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var n=r(3692);class i{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const o=(s=class extends i{constructor(e){var t;if(super(e),1!==e.type||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var r,i;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(e))&&this.it.add(e);return this.render(t)}const o=e.element.classList;this.it.forEach((e=>{e in t||(o.remove(e),this.it.delete(e))}));for(const e in t){const r=!!t[e];r===this.it.has(e)||(null===(i=this.nt)||void 0===i?void 0:i.has(e))||(r?(o.add(e),this.it.add(e)):(o.remove(e),this.it.delete(e)))}return n.Jb}},(...e)=>({_$litDirective$:s,values:e}));var s},9392:(e,t,r)=>{"use strict";r.d(t,{oi:()=>C,iv:()=>c,dy:()=>A.dy,YP:()=>A.YP});const n=window,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&s.set(t,e))}return e}toString(){return this.cssText}}const c=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new a(r,e,o)},l=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new a("string"==typeof e?e:e+"",void 0,o))(t)})(e):e;var u;const h=window,d=h.trustedTypes,p=d?d.emptyScript:"",f=h.reactiveElementPolyfillSupport,m={toAttribute(e,t){switch(t){case Boolean:e=e?p:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},g=(e,t)=>t!==e&&(t==t||e==e),w={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:g},b="finalized";class v extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,r)=>{const n=this._$Ep(r,t);void 0!==n&&(this._$Ev.set(n,r),e.push(n))})),e}static createProperty(e,t=w){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r="symbol"==typeof e?Symbol():"__"+e,n=this.getPropertyDescriptor(e,r,t);void 0!==n&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||w}static finalize(){if(this.hasOwnProperty(b))return!1;this[b]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of t)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(l(e))}else void 0!==e&&t.push(l(e));return t}static _$Ep(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,r;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(r=e.hostConnected)||void 0===r||r.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{i?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const r=document.createElement("style"),i=n.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=t.cssText,e.appendChild(r)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=w){var n;const i=this.constructor._$Ep(e,r);if(void 0!==i&&!0===r.reflect){const o=(void 0!==(null===(n=r.converter)||void 0===n?void 0:n.toAttribute)?r.converter:m).toAttribute(t,r.type);this._$El=e,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var r;const n=this.constructor,i=n._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=n.getPropertyOptions(i),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(r=e.converter)||void 0===r?void 0:r.fromAttribute)?e.converter:m;this._$El=i,this[i]=o.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,r){let n=!0;void 0!==e&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||g)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(r)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}v[b]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:v}),(null!==(u=h.reactiveElementVersions)&&void 0!==u?u:h.reactiveElementVersions=[]).push("1.6.2");var y,x,A=r(3692);class C extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const r=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=r.firstChild),r}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,A.sY)(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return A.Jb}}C.finalized=!0,C._$litElement$=!0,null===(y=globalThis.litElementHydrateSupport)||void 0===y||y.call(globalThis,{LitElement:C});const E=globalThis.litElementPolyfillSupport;null==E||E({LitElement:C}),(null!==(x=globalThis.litElementVersions)&&void 0!==x?x:globalThis.litElementVersions=[]).push("3.3.2")},6828:(e,t,r)=>{"use strict";r.d(t,{sj:()=>h,CO:()=>p,Ld:()=>d}),Symbol();const n=Symbol(),i=Object.getPrototypeOf,o=new WeakMap,s=(e,t=!0)=>{o.set(e,t)},a=e=>"object"==typeof e&&null!==e,c=new WeakMap,l=new WeakSet,[u]=((e=Object.is,t=((e,t)=>new Proxy(e,t)),r=(e=>a(e)&&!l.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),u=(e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),h=new WeakMap,d=((e,t,r=u)=>{const n=h.get(e);if((null==n?void 0:n[0])===t)return n[1];const i=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return s(i,!0),h.set(e,[t,i]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(i,t))return;const n=Reflect.get(e,t),o={value:n,enumerable:!0,configurable:!0};if(l.has(n))s(n,!1);else if(n instanceof Promise)delete o.value,o.get=()=>r(n);else if(c.has(n)){const[e,t]=c.get(n);o.value=d(e,t(),r)}Object.defineProperty(i,t,o)})),i}),p=new WeakMap,f=[1,1],m=(s=>{if(!a(s))throw new Error("object required");const u=p.get(s);if(u)return u;let h=f[0];const g=new Set,w=(e,t=++f[0])=>{h!==t&&(h=t,g.forEach((r=>r(e,t))))};let b=f[1];const v=e=>(t,r)=>{const n=[...t];n[1]=[e,...n[1]],w(n,r)},y=new Map,x=e=>{var t;const r=y.get(e);r&&(y.delete(e),null==(t=r[1])||t.call(r))},A=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),C=t(A,{deleteProperty(e,t){const r=Reflect.get(e,t);x(t);const n=Reflect.deleteProperty(e,t);return n&&w(["delete",[t],r]),n},set(t,s,u,h){const d=Reflect.has(t,s),f=Reflect.get(t,s,h);if(d&&(e(f,u)||p.has(u)&&e(f,p.get(u))))return!0;var b;x(s),a(u)&&(u=(e=>e&&(o.has(e)?o.get(e):i(e)===Object.prototype||i(e)===Array.prototype))(b=u)&&b[n]||null||u);let A=u;if(u instanceof Promise)u.then((e=>{u.status="fulfilled",u.value=e,w(["resolve",[s],e])})).catch((e=>{u.status="rejected",u.reason=e,w(["reject",[s],e])}));else{!c.has(u)&&r(u)&&(A=m(u));const e=!l.has(A)&&c.get(A);e&&((e,t)=>{if(y.has(e))throw new Error("prop listener already exists");if(g.size){const r=t[3](v(e));y.set(e,[t,r])}else y.set(e,[t])})(s,e)}return Reflect.set(t,s,A,h),w(["set",[s],u,f]),!0}});p.set(s,C);const E=[A,(e=++f[1])=>(b===e||g.size||(b=e,y.forEach((([t])=>{const r=t[1](e);r>h&&(h=r)}))),h),d,e=>(g.add(e),1===g.size&&y.forEach((([e,t],r)=>{if(t)throw new Error("remove already exists");const n=e[3](v(r));y.set(r,[e,n])})),()=>{g.delete(e),0===g.size&&y.forEach((([e,t],r)=>{t&&(t(),y.set(r,[e]))}))})];return c.set(C,E),Reflect.ownKeys(s).forEach((e=>{const t=Object.getOwnPropertyDescriptor(s,e);"value"in t&&(C[e]=s[e],delete t.value,delete t.writable),Object.defineProperty(A,e,t)})),C}))=>[m,c,l,e,t,r,u,h,d,p,f])();function h(e={}){return u(e)}function d(e,t,r){const n=c.get(e);let i;n||console.warn("Please use proxy object");const o=[],s=n[3];let a=!1;const l=s((e=>{o.push(e),r?t(o.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,a&&t(o.splice(0))})))}));return a=!0,()=>{a=!1,l()}}function p(e,t){const r=c.get(e);r||console.warn("Please use proxy object");const[n,i,o]=r;return o(n,i(),t)}},1431:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}r.d(t,{T:()=>n})},5291:(e,t,r)=>{"use strict";r.d(t,{R:()=>b});var n=r(1431),i=r(1920);const o="0x82ad56cb";var s=r(9977),a=r(1973),c=r(6647),l=r(1826),u=r(6606),h=r(1786),d=r(6872),p=r(968),f=r(1019),m=r(3822),g=r(8583),w=r(3134);async function b(e,t){const{account:b,batch:v=Boolean(e.batch?.multicall),blockNumber:y,blockTag:x="latest",accessList:A,data:C,gas:E,gasPrice:I,maxFeePerGas:_,maxPriorityFeePerGas:P,nonce:O,to:S,value:k,...M}=t,T=b?(0,n.T)(b):void 0;try{(0,w.F)(t);const r=(y?(0,d.eC)(y):void 0)||x,n=e.chain?.formatters?.transactionRequest?.format||m.t,s=n({...(0,f.K)(M,{format:n}),from:T?.address,accessList:A,data:C,gas:E,gasPrice:I,maxFeePerGas:_,maxPriorityFeePerGas:P,nonce:O,to:S,value:k});if(v&&function({request:e}){const{data:t,to:r,...n}=e;return!(!t||t.startsWith(o)||!r||Object.values(n).filter((e=>void 0!==e)).length>0)}({request:s}))try{return await async function(e,t){const{batchSize:r=1024,wait:n=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:o,blockTag:s="latest",data:p,multicallAddress:f,to:m}=t;let w=f;if(!w){if(!e.chain)throw new a.pZ;w=(0,h.LI)({blockNumber:o,chain:e.chain,contract:"multicall3"})}const b=(o?(0,d.eC)(o):void 0)||s,{schedule:v}=(0,g.S)({id:`${e.uid}.${b}`,wait:n,shouldSplitBatch(e){const t=e.reduce(((e,{data:t})=>e+(t.length-2)),0);return t>2*r},fn:async t=>{const r=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),n=(0,u.R)({abi:i.F8,args:[r],functionName:"aggregate3"}),o=await e.request({method:"eth_call",params:[{data:n,to:w},b]});return(0,l.k)({abi:i.F8,args:[r],functionName:"aggregate3",data:o||"0x"})}}),[{returnData:y,success:x}]=await v({data:p,to:m});if(!x)throw new c.VQ({data:y});return"0x"===y?{data:void 0}:{data:y}}(e,{...s,blockNumber:y,blockTag:x})}catch(e){if(!(e instanceof a.pZ||e instanceof a.mm))throw e}const p=await e.request({method:"eth_call",params:r?[s,r]:[s]});return"0x"===p?{data:void 0}:{data:p}}catch(n){const i=function(e){if(!(e instanceof s.G))return;const t=e.walk();return"object"==typeof t.data?t.data.data:t.data}(n),{offchainLookup:o,offchainLookupSignature:a}=await Promise.resolve().then(r.bind(r,6663));if(i?.slice(0,10)===a&&S)return{data:await o(e,{data:i,to:S})};throw function(e,{docsPath:t,...r}){let n=e;return(0,p.B)(e)&&(n=(0,p.k)(e,r)),new c.cg(n,{docsPath:t,...r})}(n,{...t,account:T,chain:e.chain})}}},1920:(e,t,r)=>{"use strict";r.d(t,{$o:()=>a,Ei:()=>s,F8:()=>n,lD:()=>i,nZ:()=>o});const n=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],i=[{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],o=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],s=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]}],a=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},5554:(e,t,r)=>{"use strict";r.d(t,{$:()=>n,Up:()=>i,hZ:()=>o});const n={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},o={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},8617:(e,t,r)=>{"use strict";r.d(t,{Bd:()=>o,Zn:()=>i,ez:()=>n});const n={gwei:9,wei:18},i={ether:-9,wei:9},o={ether:-18,gwei:-9}},5555:(e,t,r)=>{"use strict";r.d(t,{CI:()=>C,FM:()=>f,Gy:()=>x,KY:()=>v,M4:()=>h,MX:()=>b,SM:()=>y,cO:()=>a,dh:()=>A,fM:()=>s,fs:()=>d,gr:()=>u,hn:()=>E,lC:()=>m,mv:()=>g,wM:()=>I,wb:()=>l,xB:()=>c,xL:()=>w,yP:()=>p});var n=r(1494),i=r(1756),o=r(9977);class s extends o.G{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class a extends o.G{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class c extends o.G{constructor({data:e,params:t,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.h)(t,{includeName:!0})})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}class l extends o.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class u extends o.G{constructor({expectedLength:e,givenLength:t,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class h extends o.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.d)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class d extends o.G{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class p extends o.G{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"})}}class f extends o.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class m extends o.G{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class g extends o.G{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class w extends o.G{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class b extends o.G{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class v extends o.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class y extends o.G{constructor({abiItem:e,data:t,params:r,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.h)(r,{includeName:!0})})`,`Data: ${t} (${i} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=r,this.size=i}}class x extends o.G{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.t)(e,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class A extends o.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class C extends o.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class E extends o.G{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class I extends o.G{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}},2960:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var n=r(9977);class i extends n.G{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},9977:(e,t,r)=>{"use strict";r.d(t,{G:()=>i});var n=r(3678);class i extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,n.bo)()});const r=t.cause instanceof i?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof i&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: https://viem.sh${o}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=o,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return o(this,e)}}function o(e,t){return t?.(e)?e:e.cause?o(e.cause,t):e}},1973:(e,t,r)=>{"use strict";r.d(t,{Bk:()=>s,Yl:()=>o,mm:()=>i,pZ:()=>a});var n=r(9977);class i extends n.G{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class o extends n.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class s extends n.G{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class a extends n.G{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}},6647:(e,t,r)=>{"use strict";r.d(t,{cg:()=>m,uq:()=>g,Lu:()=>w,Dk:()=>b,VQ:()=>v});var n=r(1431),i=r(5554),o=r(1856),s=r(1494),a=r(1344);function c({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map(((e,r)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,a.P)(t[r]):t[r]}`)).join(", ")})`}var l=r(8604),u=r(6665),h=r(6283),d=r(9977),p=r(4574),f=r(3678);class m extends d.G{constructor(e,{account:t,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:f,value:m}){const g=t?(0,n.T)(t):void 0,w=(0,p.xr)({from:g?.address,to:f,value:void 0!==m&&`${(0,u.d)(m)} ${i?.nativeCurrency.symbol||"ETH"}`,data:o,gas:s,gasPrice:void 0!==a&&`${(0,h.o)(a)} gwei`,maxFeePerGas:void 0!==c&&`${(0,h.o)(c)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,h.o)(l)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",w].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class g extends d.G{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:o,sender:a}){const u=(0,l.m)({abi:t,args:r,name:o}),h=u?c({abiItem:u,args:r,includeFunctionName:!1,includeName:!1}):void 0,d=u?(0,s.t)(u,{includeName:!0}):void 0,m=(0,p.xr)({address:n&&(0,f.CR)(n),function:d,args:h&&"()"!==h&&`${[...Array(o?.length??0).keys()].map((()=>" ")).join("")}${h}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",m].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=o,this.sender=a}}class w extends d.G{constructor({abi:e,data:t,functionName:r,message:n}){let a,l,u;if(t&&"0x"!==t){a=(0,o.p)({abi:e,data:t});const{abiItem:r,errorName:n,args:h}=a;if("Error"===n)u=h[0];else if("Panic"===n){const[e]=h;u=i.$[e]}else{const e=r?(0,s.t)(r,{includeName:!0}):void 0,t=r&&h?c({abiItem:r,args:h,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(n?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}else n&&(u=n);super(u&&"execution reverted"!==u?[`The contract function "${r}" reverted with the following reason:`,u].join("\n"):`The contract function "${r}" reverted.`,{metaMessages:l}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.reason=u,this.data=a}}class b extends d.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class v extends d.G{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},8309:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,m:()=>i});var n=r(9977);class i extends n.G{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class o extends n.G{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}},9466:(e,t,r)=>{"use strict";r.d(t,{Cd:()=>o,J5:()=>i,M6:()=>s});var n=r(9977);class i extends n.G{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class o extends n.G{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class s extends n.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},6054:(e,t,r)=>{"use strict";r.d(t,{C_:()=>h,G$:()=>a,Hh:()=>s,M_:()=>o,WF:()=>d,ZI:()=>c,cj:()=>g,cs:()=>m,dR:()=>p,pZ:()=>f,se:()=>u,vU:()=>l});var n=r(6283),i=r(9977);class o extends i.G{constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class s extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class a extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class l extends i.G{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class h extends i.G{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class d extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class p extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.o)(r)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class g extends i.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.message}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}},8822:(e,t,r)=>{"use strict";r.d(t,{Gg:()=>s,W5:()=>l,bs:()=>c,c9:()=>a});var n=r(1344),i=r(9977),o=r(3678);class s extends i.G{constructor({body:e,details:t,headers:r,status:i,url:s}){super("HTTP request failed.",{details:t,metaMessages:[i&&`Status: ${i}`,`URL: ${(0,o.Gr)(s)}`,e&&`Request body: ${(0,n.P)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=r,this.status=i,this.url=s}}class a extends i.G{constructor({body:e,details:t,url:r}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,o.Gr)(r)}`,`Request body: ${(0,n.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class c extends i.G{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,o.Gr)(r)}`,`Request body: ${(0,n.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class l extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,o.Gr)(t)}`,`Request body: ${(0,n.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}},2455:(e,t,r)=>{"use strict";r.d(t,{B:()=>c,GD:()=>b,I0:()=>C,KB:()=>m,LX:()=>l,Og:()=>p,PE:()=>y,Pv:()=>w,Ts:()=>x,XS:()=>h,ab:()=>v,gS:()=>g,ir:()=>I,nY:()=>u,pT:()=>f,s7:()=>a,u5:()=>A,x3:()=>E,yR:()=>d});var n=r(9977),i=r(8822);class o extends n.G{constructor(e,{code:t,docsPath:r,metaMessages:n,shortMessage:o}){super(o,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof i.bs?e.code:t??-1}}class s extends o{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class a extends o{constructor(e){super(e,{code:a.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends o{constructor(e){super(e,{code:c.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class l extends o{constructor(e){super(e,{code:l.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class u extends o{constructor(e){super(e,{code:u.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class h extends o{constructor(e){super(e,{code:h.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class d extends o{constructor(e){super(e,{code:d.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class p extends o{constructor(e){super(e,{code:p.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class f extends o{constructor(e){super(e,{code:f.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends o{constructor(e){super(e,{code:m.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class g extends o{constructor(e){super(e,{code:g.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class w extends o{constructor(e){super(e,{code:w.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends o{constructor(e){super(e,{code:b.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends s{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class y extends s{constructor(e){super(e,{code:y.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class x extends s{constructor(e){super(e,{code:x.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class A extends s{constructor(e){super(e,{code:A.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class C extends s{constructor(e){super(e,{code:C.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class E extends s{constructor(e){super(e,{code:E.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class I extends o{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},4574:(e,t,r)=>{"use strict";r.d(t,{Bh:()=>l,Yb:()=>u,mc:()=>h,mk:()=>c,xY:()=>a,xr:()=>s});var n=r(6665),i=r(6283),o=r(9977);function s(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),r=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`)).join("\n")}class a extends o.G{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class c extends o.G{constructor(e,{account:t,docsPath:r,chain:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:h,nonce:d,to:p,value:f}){const m=s({chain:o&&`${o?.name} (id: ${o?.id})`,from:t?.address,to:p,value:void 0!==f&&`${(0,n.d)(f)} ${o?.nativeCurrency.symbol||"ETH"}`,data:a,gas:c,gasPrice:void 0!==l&&`${(0,i.o)(l)} gwei`,maxFeePerGas:void 0!==u&&`${(0,i.o)(u)} gwei`,maxPriorityFeePerGas:void 0!==h&&`${(0,i.o)(h)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class l extends o.G{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:i}){let o="Transaction";r&&void 0!==i&&(o=`Transaction at block time "${r}" at index "${i}"`),e&&void 0!==i&&(o=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(o=`Transaction at block number "${t}" at index "${i}"`),n&&(o=`Transaction with hash "${n}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class u extends o.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class h extends o.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}},3678:(e,t,r)=>{"use strict";r.d(t,{CR:()=>n,Gr:()=>i,bo:()=>o});const n=e=>e,i=e=>e,o=()=>"viem@1.1.7"},558:(e,t,r)=>{"use strict";r.d(t,{r:()=>u});var n=r(5555),i=r(2221),o=r(1756),s=r(3283),a=r(6873),c=r(169),l=r(2546);function u(e,t){if("0x"===t&&e.length>0)throw new n.wb;if((0,o.d)(t)&&(0,o.d)(t)<32)throw new n.xB({data:t,params:e,size:(0,o.d)(t)});return function({data:e,params:t}){const r=[];let i=0;for(let s=0;s=(0,o.d)(e))throw new n.xB({data:e,params:t,size:(0,o.d)(e)});const a=t[s],{consumed:c,value:l}=h({data:e,param:a,position:i});r.push(l),i+=c}return r}({data:t,params:e})}function h({data:e,param:t,position:r}){const o=(0,l.S)(t.type);if(o){const[n,i]=o;return function(e,{param:t,length:r,position:n}){if(!r){const r=(0,c.ly)((0,s.tP)(e,n,n+32,{strict:!0})),i=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0}));let o=0;const a=[];for(let n=0;n!e)),i=n?[]:{};let o=0;if(d(t)){const a=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0}));for(let r=0;r48?(0,c.y_)(e,{signed:r}):(0,c.ly)(e,{signed:r})}}(u,{param:t});if("address"===t.type)return function(e){return{consumed:32,value:(0,i.x)((0,s.tP)(e,-20))}}(u);if("bool"===t.type)return function(e){return{consumed:32,value:(0,c.XA)(e)}}(u);throw new n.CI(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function d(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(d);const r=(0,l.S)(e.type);return!(!r||!d({...e,type:r[1]}))}},1856:(e,t,r)=>{"use strict";r.d(t,{p:()=>l});var n=r(5554),i=r(5555),o=r(3283),s=r(507),a=r(558),c=r(1494);function l({abi:e,data:t}){const r=(0,o.tP)(t,0,4);if("0x"===r)throw new i.wb;const l=[...e||[],n.Up,n.hZ].find((e=>"error"===e.type&&r===(0,s.o)((0,c.t)(e))));if(!l)throw new i.yP(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,a.r)(l.inputs,(0,o.tP)(t,4)):void 0,errorName:l.name}}},1826:(e,t,r)=>{"use strict";r.d(t,{k:()=>a});var n=r(5555),i=r(558),o=r(8604);const s="/docs/contract/decodeFunctionResult";function a({abi:e,args:t,functionName:r,data:a}){let c=e[0];if(r&&(c=(0,o.m)({abi:e,args:t,name:r}),!c))throw new n.xL(r,{docsPath:s});if("function"!==c.type)throw new n.xL(void 0,{docsPath:s});if(!c.outputs)throw new n.MX(c.name,{docsPath:s});const l=(0,i.r)(c.outputs,a);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},2546:(e,t,r)=>{"use strict";r.d(t,{E:()=>h,S:()=>f});var n=r(5555),i=r(2960),o=r(7451),s=r(9040),a=r(8795),c=r(1756),l=r(3283),u=r(6872);function h(e,t){if(e.length!==t.length)throw new n.fs({expectedLength:e.length,givenLength:t.length});const r=function({params:e,values:t}){const r=[];for(let n=0;n0?(0,s.zo)([t,e]):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,s.zo)(a.map((({encoded:e})=>e)))}}(t,{length:i,param:{...e,type:o}})}if("tuple"===e.type)return function(e,{param:t}){let r=!1;const n=[];for(let i=0;ie)))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,o.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,a.gc)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,a.gc)((0,u.C4)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int"))return function(e,{signed:t}){return{dynamic:!1,encoded:(0,u.eC)(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")});if(e.type.startsWith("bytes"))return function(e,{param:t}){const[r,i]=t.type.split("bytes");if(!i){const t=Math.ceil((0,c.d)(e)/32),r=[];for(let n=0;n{"use strict";r.d(t,{R:()=>l});var n=r(5555),i=r(9040),o=r(507),s=r(2546),a=r(1494),c=r(8604);function l({abi:e,args:t,functionName:r}){let l=e[0];if(r&&(l=(0,c.m)({abi:e,args:t,name:r}),!l))throw new n.xL(r,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==l.type)throw new n.xL(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const u=(0,a.t)(l),h=(0,o.o)(u),d="inputs"in l&&l.inputs?(0,s.E)(l.inputs,t??[]):void 0;return(0,i.SM)([h,d??"0x"])}},1494:(e,t,r)=>{"use strict";r.d(t,{h:()=>o,t:()=>i});var n=r(5555);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.wM(e.type);return`${e.name}(${o(e.inputs,{includeName:t})})`}function o(e,{includeName:t=!1}={}){return e?e.map((e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${o(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}},8604:(e,t,r)=>{"use strict";r.d(t,{m:()=>i});var n=r(7451);function i({abi:e,args:t=[],name:r}){const n=e.filter((e=>"name"in e&&e.name===r));if(0!==n.length){if(1===n.length)return n[0];for(const e of n)if("inputs"in e)if(t&&0!==t.length){if(e.inputs&&0!==e.inputs.length&&e.inputs.length===t.length&&t.every(((t,r)=>{const n="inputs"in e&&e.inputs[r];return!!n&&o(t,n)})))return e}else if(!e.inputs||0===e.inputs.length)return e;return n[0]}}function o(e,t){const r=typeof e,i=t.type;switch(i){case"address":return(0,n.U)(e);case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:return"tuple"===i&&"components"in t?Object.values(t.components).every(((t,r)=>o(Object.values(e)[r],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i)?"number"===r||"bigint"===r:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i)?"string"===r||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i)&&Array.isArray(e)&&e.every((e=>o(e,{...t,type:i.replace(/(\[[0-9]{0,}\])$/,"")})))}}},2221:(e,t,r)=>{"use strict";r.d(t,{K:()=>c,x:()=>a});var n=r(2960),i=r(1327),o=r(7871),s=r(7451);function a(e,t){const r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,o.w)((0,i.qX)(r),"bytes"),s=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(15&n[e>>1])>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());return`0x${s.join("")}`}function c(e,t){if(!(0,s.U)(e))throw new n.b({address:e});return a(e,t)}},7451:(e,t,r)=>{"use strict";r.d(t,{U:()=>i});const n=/^0x[a-fA-F0-9]{40}$/;function i(e){return n.test(e)}},6663:(e,t,r)=>{"use strict";r.d(t,{offchainLookup:()=>v,offchainLookupSignature:()=>w});var n=r(5291),i=r(1344),o=r(9977),s=r(3678);class a extends o.G{constructor({callbackSelector:e,cause:t,data:r,extraData:n,sender:i,urls:o}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",o&&[" Gateway URL(s):",...o.map((e=>` ${(0,s.Gr)(e)}`))],` Sender: ${i}`,` Data: ${r}`,` Callback selector: ${e}`,` Extra data: ${n}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class c extends o.G{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,s.Gr)(t)}`,`Response: ${(0,i.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class l extends o.G{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}var u=r(8822),h=r(1856),d=r(2546),p=r(2960),f=r(7451),m=r(9040),g=r(5493);const w="0x556f1830",b={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function v(e,{blockNumber:t,blockTag:r,data:o,to:s}){const{args:w}=(0,h.p)({data:o,abi:[b]}),[v,y,x,A,C]=w;try{if(!function(e,t){if(!(0,f.U)(e))throw new p.b({address:e});if(!(0,f.U)(t))throw new p.b({address:t});return e.toLowerCase()===t.toLowerCase()}(s,v))throw new l({sender:v,to:s});const o=await async function({data:e,sender:t,urls:r}){let n=new Error("An unknown error occurred.");for(let o=0;o{"use strict";r.d(t,{LI:()=>s,ax:()=>o,qg:()=>i});var n=r(1973);function i({chain:e,currentChainId:t}){if(!e)throw new n.Bk;if(t!==e.id)throw new n.Yl({chain:e,currentChainId:t})}function o(e,t){return{...e,formatters:t?.formatters,serializers:t?.serializers}}function s({blockNumber:e,chain:t,contract:r}){const i=t?.contracts?.[r];if(!i)throw new n.mm({chain:t,contract:{name:r}});if(e&&i.blockCreated&&i.blockCreated>e)throw new n.mm({blockNumber:e,chain:t,contract:{name:r,blockCreated:i.blockCreated}});return i.address}},9040:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(const r of e)t+=r.length;const r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}(e)}function i(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}r.d(t,{SM:()=>i,zo:()=>n})},5493:(e,t,r)=>{"use strict";function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}r.d(t,{v:()=>n})},8795:(e,t,r)=>{"use strict";r.d(t,{gc:()=>o,vk:()=>i});var n=r(8309);function i(e,{dir:t,size:r=32}={}){return"string"==typeof e?o(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.$({size:e.length,targetSize:r,type:"bytes"});const i=new Uint8Array(r);for(let n=0;n2*r)throw new n.$({size:Math.ceil(i.length/2),targetSize:r,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`}},1756:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(5493);function i(e){return(0,n.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},3283:(e,t,r)=>{"use strict";r.d(t,{tP:()=>s});var n=r(8309),i=r(5493),o=r(1756);function s(e,t,r,{strict:n}={}){return(0,i.v)(e,{strict:!1})?function(e,t,r,{strict:n}={}){a(e,t);const i=`0x${e.replace("0x","").slice(2*(t??0),2*(r??e.length))}`;return n&&c(i,t,r),i}(e,t,r,{strict:n}):function(e,t,r,{strict:n}={}){a(e,t);const i=e.slice(t,r);return n&&c(i,t,r),i}(e,t,r,{strict:n})}function a(e,t){if("number"==typeof t&&t>0&&t>(0,o.d)(e)-1)throw new n.m({offset:t,position:"start",size:(0,o.d)(e)})}function c(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,o.d)(e)!==r-t)throw new n.m({offset:r,position:"end",size:(0,o.d)(e)})}},6873:(e,t,r)=>{"use strict";function n(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;en})},169:(e,t,r)=>{"use strict";r.d(t,{XA:()=>l,Yf:()=>a,ly:()=>u,rR:()=>h,y_:()=>c});var n=r(9466),i=r(1756),o=r(6873),s=r(1327);function a(e,{size:t}){if((0,i.d)(e)>t)throw new n.M6({givenSize:(0,i.d)(e),maxSize:t})}function c(e,t={}){const{signed:r}=t;t.size&&a(e,{size:t.size});const n=BigInt(e);if(!r)return n;const i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function l(e,t={}){let r=e;if(t.size&&(a(r,{size:t.size}),r=(0,o.f)(r)),"0x00"===(0,o.f)(r))return!1;if("0x01"===(0,o.f)(r))return!0;throw new n.Cd(r)}function u(e,t={}){return Number(c(e,t))}function h(e,t={}){let r=(0,s.nr)(e);return t.size&&(a(r,{size:t.size}),r=(0,o.f)(r,{dir:"right"})),(new TextDecoder).decode(r)}},1327:(e,t,r)=>{"use strict";r.d(t,{O0:()=>l,nr:()=>u,qX:()=>h});var n=r(9977),i=r(5493),o=r(8795),s=r(169),a=r(6872);const c=new TextEncoder;function l(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){return u((0,a.eC)(e,t))}(e,t):"boolean"==typeof e?function(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),"number"==typeof t.size?((0,s.Yf)(r,{size:t.size}),(0,o.vk)(r,{size:t.size})):r}(e,t):(0,i.v)(e)?u(e,t):h(e,t)}function u(e,t={}){let r=e;t.size&&((0,s.Yf)(r,{size:t.size}),r=(0,o.vk)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);const a=new Uint8Array(i.length/2);for(let e=0;e{"use strict";r.d(t,{$G:()=>d,C4:()=>c,NC:()=>a,ci:()=>l,eC:()=>u});var n=r(9466),i=r(8795),o=r(169);const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e,t={}){return"number"==typeof e||"bigint"==typeof e?u(e,t):"string"==typeof e?d(e,t):"boolean"==typeof e?c(e,t):l(e,t)}function c(e,t={}){const r=`0x${Number(e)}`;return"number"==typeof t.size?((0,o.Yf)(r,{size:t.size}),(0,i.vk)(r,{size:t.size})):r}function l(e,t={}){let r="";for(let t=0;ta||s{"use strict";r.d(t,{B:()=>s,k:()=>a});var n=r(6054),i=r(8822),o=r(2455);function s(e){return e instanceof o.KB||e instanceof o.yR||e instanceof i.bs&&e.code===n.M_.code}function a(e,t){const r=e.details.toLowerCase();return n.Hh.nodeMessage.test(r)?new n.Hh({cause:e,maxFeePerGas:t?.maxFeePerGas}):n.G$.nodeMessage.test(r)?new n.G$({cause:e,maxFeePerGas:t?.maxFeePerGas}):n.ZI.nodeMessage.test(r)?new n.ZI({cause:e,nonce:t?.nonce}):n.vU.nodeMessage.test(r)?new n.vU({cause:e,nonce:t?.nonce}):n.se.nodeMessage.test(r)?new n.se({cause:e,nonce:t?.nonce}):n.C_.nodeMessage.test(r)?new n.C_({cause:e}):n.WF.nodeMessage.test(r)?new n.WF({cause:e,gas:t?.gas}):n.dR.nodeMessage.test(r)?new n.dR({cause:e,gas:t?.gas}):n.pZ.nodeMessage.test(r)?new n.pZ({cause:e}):n.cs.nodeMessage.test(r)?new n.cs({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):r.match(n.M_.nodeMessage)||"code"in e.cause&&e.cause?.code===n.M_.code?new n.M_({cause:e,message:e.cause.details||e.details}):new n.cj({cause:e.cause.cause})}},1019:(e,t,r)=>{"use strict";function n(e,{format:t}){return t?Object.keys(t({})).reduce(((t,r)=>(e?.hasOwnProperty(r)&&(t[r]=e[r]),t)),{}):{}}r.d(t,{K:()=>n})},5491:(e,t,r)=>{"use strict";function n(e,t){return({exclude:r,format:n})=>({format:e=>{const i=t(e);if(r)for(const e of r)delete i[e];return{...i,...n(e)}},type:e})}r.d(t,{$:()=>n})},3822:(e,t,r)=>{"use strict";r.d(t,{i:()=>o,t:()=>i});var n=r(6872);function i(e){return{...e,gas:void 0!==e.gas?(0,n.eC)(e.gas):void 0,gasPrice:void 0!==e.gasPrice?(0,n.eC)(e.gasPrice):void 0,maxFeePerGas:void 0!==e.maxFeePerGas?(0,n.eC)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:void 0!==e.maxPriorityFeePerGas?(0,n.eC)(e.maxPriorityFeePerGas):void 0,nonce:void 0!==e.nonce?(0,n.eC)(e.nonce):void 0,value:void 0!==e.value?(0,n.eC)(e.value):void 0}}const o=(0,r(5491).$)("transactionRequest",i)},507:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var n=r(3283),i=r(3693);const o=e=>"string"==typeof e?(0,n.tP)((0,i.F)(e),0,4):(0,n.tP)((0,i.J)(e),0,4)},3693:(e,t,r)=>{"use strict";r.d(t,{J:()=>l,F:()=>c});const n=/((function|event)\s)?(.*)(\((.*)\))/;function i(e){const t=e.match(n),r=t?.[2]||void 0,i=t?.[3];return{type:r,name:i,params:t?.[5]||void 0}}var o=r(1327),s=r(7871);const a=e=>(0,s.w)((0,o.O0)(e));function c(e){const t=function(e){return i(e).name}(e),r=function(e){const t=i(e).params,r=t?.split(",").map((e=>e.trim().split(" ")));return r?.map((e=>({type:e[0],name:"indexed"===e[1]?e[2]:e[1],..."indexed"===e[1]?{indexed:!0}:{}})))}(e)||[];return a(`${t}(${r.map((({type:e})=>e)).join(",")})`)}function l(e){return a(`${e.name}(${e.inputs.map((({type:e})=>e)).join(",")})`)}},7871:(e,t,r)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}r.d(t,{w:()=>L});const o={number:n,bool:function(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)},bytes:i,hash:function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)},exists:function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},output:function(e,t){i(e);const r=t.outputLen;if(e.length>a&s)}:{h:0|Number(e>>a&s),l:0|Number(e&s)}}const l=function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;ie<>>32-r,h=(e,t,r)=>t<>>32-r,d=(e,t,r)=>t<>>64-r,p=(e,t,r)=>e<>>64-r;if("object"==typeof globalThis&&"crypto"in globalThis&&globalThis.crypto,68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function f(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));class m{clone(){return this._cloneInto()}}const[g,w,b]=[[],[],[]],v=BigInt(0),y=BigInt(1),x=BigInt(2),A=BigInt(7),C=BigInt(256),E=BigInt(113);for(let e=0,t=y,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],g.push(2*(5*n+r)),w.push((e+1)*(e+2)/2%64);let i=v;for(let e=0;e<7;e++)t=(t<>A)*E)%C,t&x&&(i^=y<<(y<r>32?d(e,t,r):u(e,t,r),O=(e,t,r)=>r>32?p(e,t,r):h(e,t,r);class S extends m{constructor(e,t,r,n=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,o.number(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=P(o,s,1)^r[n],c=O(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=w[r],o=P(t,i,n),s=O(t,i,n),a=g[r];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=I[n],e[1]^=_[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){o.exists(this);const{blockLen:t,state:r}=this,n=(e=f(e)).length;for(let i=0;i=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return o.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(o.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new S(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}const k=(e,t,r)=>function(e){const t=t=>e().update(f(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}((()=>new S(t,e,r))),M=(k(6,144,28),k(6,136,32),k(6,104,48),k(6,72,64),k(1,144,28),k(1,136,32)),T=(k(1,104,48),k(1,72,64),(e,t,r)=>function(e){const t=(t,r)=>e(r).update(f(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(((n={})=>new S(t,e,void 0===n.dkLen?r:n.dkLen,!0))));T(31,168,16),T(31,136,32);var N=r(5493),j=r(1327),R=r(6872);function L(e,t){const r=t||"hex",n=M((0,N.v)(e,{strict:!1})?(0,j.O0)(e):e);return"bytes"===r?n:(0,R.NC)(n)}},8583:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});const n=new Map;function i({fn:e,id:t,shouldSplitBatch:r,wait:i=0}){const o=async()=>{const t=a();s();const r=t.map((({args:e})=>e));0!==r.length&&e(r).then((e=>{t.forEach((({pendingPromise:t},r)=>t.resolve?.([e[r],e])))})).catch((e=>{t.forEach((({pendingPromise:t})=>t.reject?.(e)))}))},s=()=>n.delete(t),a=()=>n.get(t)||[],c=e=>n.set(t,[...a(),e]);return{flush:s,async schedule(e){const t={},n=new Promise(((e,r)=>{t.resolve=e,t.reject=r})),s=r?.([...a().map((({args:e})=>e)),e]);return s&&o(),a().length>0?(c({args:e,pendingPromise:t}),n):(c({args:e,pendingPromise:t}),setTimeout(o,i),n)}}}},1344:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});const n=(e,t,r)=>JSON.stringify(e,((e,r)=>{const n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n}),r)},3134:(e,t,r)=>{"use strict";r.d(t,{F:()=>c});var n=r(1431),i=r(2960),o=r(6054),s=r(4574),a=r(7451);function c(e){const{account:t,gasPrice:r,maxFeePerGas:c,maxPriorityFeePerGas:l,to:u}=e,h=t?(0,n.T)(t):void 0;if(h&&!(0,a.U)(h.address))throw new i.b({address:h.address});if(u&&!(0,a.U)(u))throw new i.b({address:u});if(void 0!==r&&(void 0!==c||void 0!==l))throw new s.xY;if(c&&c>2n**256n-1n)throw new o.Hh({maxFeePerGas:c});if(l&&c&&l>c)throw new o.cs({maxFeePerGas:c,maxPriorityFeePerGas:l})}},6665:(e,t,r)=>{"use strict";r.d(t,{d:()=>o});var n=r(8617),i=r(263);function o(e,t="wei"){return(0,i.b)(e,n.ez[t])}},6283:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var n=r(8617),i=r(263);function o(e,t="wei"){return(0,i.b)(e,n.Zn[t])}},263:(e,t,r)=>{"use strict";function n(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[i,o]=[r.slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}r.d(t,{b:()=>n})}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=r(6729),t={id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0},n={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},i=r(1786),o=r(169),s=r(6872);r(5491);const a={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function c(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,o.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,o.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?a[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}function l(e){const t=e.transactions?.map((e=>"string"==typeof e?e:c(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}function u(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}const h={"0x0":"reverted","0x1":"success"};function d(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>u(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,o.ly)(e.transactionIndex):null,status:e.status?h[e.status]:null,type:e.type?a[e.type]||e.type:null}}var p=r(3822);const f=(0,i.ax)(t),m=(0,i.ax)(n);var g=Object.defineProperty,w=(e,t,r)=>(((e,t,r)=>{t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),b=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},v=(e,t,r)=>(b(e,t,"read from private field"),r?r.call(e):t.get(e)),y=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},x=(e,t,r,n)=>(b(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),A=(e,t,r)=>(b(e,t,"access private method"),r),C=class extends e{constructor({chains:e=[m,f],options:t}){super(),w(this,"chains"),w(this,"options"),w(this,"storage"),this.chains=e,this.options=t}getBlockExplorerUrls(e){const{default:t,...r}=e.blockExplorers??{};if(t)return[t.url,...Object.values(r).map((e=>e.url))]}isChainUnsupported(e){return!this.chains.some((t=>t.id===e))}setStorage(e){this.storage=e}},E=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured for connector "${t}".`),w(this,"name","ChainNotConfiguredForConnectorError")}},I=class extends Error{constructor(){super(...arguments),w(this,"name","ConnectorNotFoundError"),w(this,"message","Connector not found")}};function _(e){return"string"==typeof e?Number.parseInt(e,"0x"===e.trim().substring(0,2)?16:10):"bigint"==typeof e?Number(e):e}var P=r(2221),O=r(2455),S=r(1431);const k=256;let M,T=k;function N(e=11){if(!M||T+e>2*k){M="",T=0;for(let e=0;e"type"in e&&"constructor"===e.type));if(!n)throw new L.fM({docsPath:U});if(!("inputs"in n))throw new L.cO({docsPath:U});if(!n.inputs||0===n.inputs.length)throw new L.cO({docsPath:U});const i=(0,$.E)(n.inputs,t);return(0,B.SM)([r,i])}var z=r(9977);class W extends z.G{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n"),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}var F=r(4574),H=r(968),q=r(1019),V=r(3134),G=r(6665),K=r(6283);class Z extends z.G{constructor(e,{account:t,docsPath:r,chain:n,data:i,gas:o,gasPrice:s,maxFeePerGas:a,maxPriorityFeePerGas:c,nonce:l,to:u,value:h}){const d=(0,F.xr)({from:t?.address,to:u,value:void 0!==h&&`${(0,G.d)(h)} ${n?.nativeCurrency.symbol||"ETH"}`,data:i,gas:o,gasPrice:void 0!==s&&`${(0,K.o)(s)} gwei`,maxFeePerGas:void 0!==a&&`${(0,K.o)(a)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,K.o)(c)} gwei`,nonce:l});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",d].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}async function Q(e,t){const r=t.account??e.account;if(!r)throw new W({docsPath:"/docs/actions/public/estimateGas"});const n=(0,S.T)(r);try{const{accessList:r,blockNumber:i,blockTag:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:h,nonce:d,to:f,value:m,...g}="local"===n.type?await re(e,t):t,w=(i?(0,s.eC)(i):void 0)||o;(0,V.F)(t);const b=e.chain?.formatters?.transactionRequest?.format||p.t,v=b({...(0,q.K)(g,{format:b}),from:n.address,accessList:r,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:h,nonce:d,to:f,value:m}),y=await e.request({method:"eth_estimateGas",params:w?[v,w]:[v]});return BigInt(y)}catch(r){throw function(e,{docsPath:t,...r}){let n=e;return(0,H.B)(e)&&(n=(0,H.k)(e,r)),new Z(n,{docsPath:t,...r})}(r,{...t,account:n,chain:e.chain})}}class Y extends z.G{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}async function J(e,{blockHash:t,blockNumber:r,blockTag:n="latest",includeTransactions:i=!1}={}){const o=void 0!==r?(0,s.eC)(r):void 0;let a=null;if(a=t?await e.request({method:"eth_getBlockByHash",params:[t,i]}):await e.request({method:"eth_getBlockByNumber",params:[o||n,i]}),!a)throw new Y({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||l)(a)}async function X(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function ee(e,{address:t,blockTag:r="latest",blockNumber:n}){const i=await e.request({method:"eth_getTransactionCount",params:[t,n?(0,s.eC)(n):r]});return(0,o.ly)(i)}const te=1500000000n;async function re(e,t){const{account:r,gas:n,gasPrice:i,maxFeePerGas:o,maxPriorityFeePerGas:s,nonce:a}=t;if(!r)throw new W;const c=(0,S.T)(r),l=await J(e,{blockTag:"latest"}),u={...t,from:c.address};if(void 0===a&&(u.nonce=await ee(e,{address:c.address,blockTag:"pending"})),l.baseFeePerGas){if(void 0!==i)throw new z.G("Chain does not support legacy `gasPrice`.");if(void 0===o)u.maxPriorityFeePerGas=s??te,u.maxFeePerGas=120n*l.baseFeePerGas/100n+u.maxPriorityFeePerGas;else{if(void 0===s&&o{for(const r of e){const{name:e,type:n}=r,a=n,c=t[e],l=a.match(ue);if(l&&("number"==typeof c||"bigint"==typeof c)){const[e,t,r]=l;(0,s.eC)(c,{signed:"int"===t,size:parseInt(r)/8})}if("address"===a&&"string"==typeof c&&!(0,ae.U)(c))throw new se.b({address:c});const u=a.match(le);if(u){const[e,t]=u;if(t&&(0,ce.d)(c)!==parseInt(t))throw new L.KY({expectedSize:parseInt(t),givenSize:(0,ce.d)(c)})}const h=i[a];h&&o(h,c)}};if(i.EIP712Domain&&e&&o(i.EIP712Domain,e),"EIP712Domain"!==r){const e=i[r];o(e,t)}}var de=r(6606);const pe=e=>({addChain:t=>async function(e,{chain:t}){const{id:r,name:n,nativeCurrency:i,rpcUrls:o,blockExplorers:a}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,s.eC)(r),chainName:n,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:a?Object.values(a).map((({url:e})=>e)):void 0}]})}(e,t),deployContract:t=>function(e,{abi:t,args:r,bytecode:n,...i}){return ne(e,{...i,data:D({abi:t,args:r,bytecode:n})})}(e,t),getAddresses:()=>async function(e){return(await e.request({method:"eth_accounts"})).map((e=>(0,P.x)(e)))}(e),getChainId:()=>R(e),getPermissions:()=>async function(e){return await e.request({method:"wallet_getPermissions"})}(e),requestAddresses:()=>async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,P.K)(e)))}(e),requestPermissions:t=>async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}(e,t),sendTransaction:t=>ne(e,t),signMessage:t=>async function(e,{account:t=e.account,message:r}){if(!t)throw new W({docsPath:"/docs/actions/wallet/signMessage"});const n=(0,S.T)(t);if("local"===n.type)return n.signMessage({message:r});const i="string"==typeof r?(0,s.$G)(r):r.raw instanceof Uint8Array?(0,s.NC)(r.raw):r.raw;return e.request({method:"personal_sign",params:[i,n.address]})}(e,t),signTypedData:t=>async function(e,{account:t=e.account,domain:r,message:n,primaryType:i,types:o}){if(!t)throw new W({docsPath:"/docs/actions/wallet/signTypedData"});const s=(0,S.T)(t),a={EIP712Domain:["string"==typeof r?.name&&{name:"name",type:"string"},r?.version&&{name:"version",type:"string"},"number"==typeof r?.chainId&&{name:"chainId",type:"uint256"},r?.verifyingContract&&{name:"verifyingContract",type:"address"},r?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...o};if(he({domain:r,message:n,primaryType:i,types:a}),"local"===s.type)return s.signTypedData({domain:r,primaryType:i,types:a,message:n});const c=(0,oe.P)({domain:r??{},primaryType:i,types:a,message:n},((e,t)=>(0,ie.v)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[s.address,c]})}(e,t),switchChain:t=>async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,s.eC)(t)}]})}(e,t),watchAsset:t=>async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}(e,t),writeContract:t=>async function(e,{abi:t,address:r,args:n,dataSuffix:i,functionName:o,...s}){const a=(0,de.R)({abi:t,args:n,functionName:o});return await ne(e,{data:`${a}${i?i.replace("0x",""):""}`,to:r,...s})}(e,t)});function fe({account:e,chain:t,transport:r,key:n="wallet",name:i="Wallet Client",pollingInterval:o}){const s={...j({chain:t,key:n,name:i,pollingInterval:o,transport:e=>r({...e,retryCount:0}),type:"walletClient"}),account:e?(0,S.T)(e):void 0};return{...s,...pe(s)}}var me=r(8822);async function ge(e){return new Promise((t=>setTimeout(t,e)))}function we(e,{delay:t=100,retryCount:r=2,shouldRetry:n=(()=>!0)}={}){return new Promise(((i,o)=>{const s=async({count:a=0}={})=>{try{const t=await e();i(t)}catch(e){if(a{const r="function"==typeof t?t({count:a,error:e}):t;r&&await ge(r),s({count:a+1})})({error:e});o(e)}};s()}))}const be=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof me.Gg&&e.status)&&403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status;function ve(e,{retryDelay:t=150,retryCount:r=3}={}){return async n=>we((async()=>{try{return await e(n)}catch(e){const t=e;switch(t.code){case O.s7.code:throw new O.s7(t);case O.B.code:throw new O.B(t);case O.LX.code:throw new O.LX(t);case O.nY.code:throw new O.nY(t);case O.XS.code:throw new O.XS(t);case O.yR.code:throw new O.yR(t);case O.Og.code:throw new O.Og(t);case O.pT.code:throw new O.pT(t);case O.KB.code:throw new O.KB(t);case O.gS.code:throw new O.gS(t);case O.Pv.code:throw new O.Pv(t);case O.GD.code:throw new O.GD(t);case O.ab.code:throw new O.ab(t);case O.PE.code:throw new O.PE(t);case O.Ts.code:throw new O.Ts(t);case O.u5.code:throw new O.u5(t);case O.I0.code:throw new O.I0(t);case O.x3.code:throw new O.x3(t);default:if(e instanceof z.G)throw e;throw new O.ir(t)}}}),{delay:({count:e,error:r})=>{if(r&&r instanceof me.Gg){const e=r?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<!be(e)})}function ye({key:e,name:t,request:r,retryCount:n=3,retryDelay:i=150,timeout:o,type:s},a){return{config:{key:e,name:t,request:r,retryCount:n,retryDelay:i,timeout:o,type:s},request:ve(r,{retryCount:n,retryDelay:i}),value:a}}function xe(e,t={}){const{key:r="custom",name:n="Custom Provider",retryDelay:i}=t;return({retryCount:o})=>ye({key:r,name:n,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:i,type:"custom"})}var Ae,Ce=class extends C{constructor({chains:e,options:t}={}){const r={shimDisconnect:!0,getProvider(){if("undefined"==typeof window)return;const e=window.ethereum;return e?.providers?e.providers[0]:e},...t};super({chains:e,options:r}),w(this,"id","injected"),w(this,"name"),w(this,"ready"),y(this,Ae,void 0),w(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),w(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,P.K)(e[0])})})),w(this,"onChainChanged",(e=>{const t=_(e),r=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:r}})})),w(this,"onDisconnect",(async e=>{1013===e.code&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}));const n=r.getProvider();if("string"==typeof r.name)this.name=r.name;else if(n){const e=function(e){if(!e)return"Injected";const t=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isStatus?"Status":e.isTalisman?"Talisman":e.isTally?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0;if(e.providers?.length){const r=new Set;let n=1;for(const i of e.providers){let e=t(i);e||(e=`Unknown Wallet #${n}`,n+=1),r.add(e)}const i=[...r];return i.length?i:i[0]??"Injected"}return t(e)??"Injected"}(n);r.name?this.name=r.name(e):this.name="string"==typeof e?e:e[0]}else this.name="Injected";this.ready=!!n}async connect({chainId:e}={}){try{const t=await this.getProvider();if(!t)throw new I;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const r=await t.request({method:"eth_requestAccounts"}),n=(0,P.K)(r[0]);let i=await this.getChainId(),o=this.isChainUnsupported(i);return e&&i!==e&&(i=(await this.switchChain(e)).id,o=this.isChainUnsupported(i)),this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:n,chain:{id:i,unsupported:o}}}catch(e){if(this.isUserRejectedRequestError(e))throw new O.ab(e);if(-32002===e.code)throw new O.pT(e);throw e}}async disconnect(){const e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){const e=await this.getProvider();if(!e)throw new I;const t=await e.request({method:"eth_accounts"});return(0,P.K)(t[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new I;return e.request({method:"eth_chainId"}).then(_)}async getProvider(){const e=this.options.getProvider();return e&&x(this,Ae,e),v(this,Ae)}async getWalletClient({chainId:e}={}){const[t,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return fe({account:r,chain:n,transport:xe(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;if(!await this.getProvider())throw new I;return!!await this.getAccount()}catch{return!1}}async switchChain(e){const t=await this.getProvider();if(!t)throw new I;const r=(0,s.eC)(e);try{return await Promise.all([t.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]}),new Promise((t=>this.on("change",(({chain:r})=>{r?.id===e&&t()}))))]),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${r}`,network:`${r}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(n){const i=this.chains.find((t=>t.id===e));if(!i)throw new E({chainId:e,connectorId:this.id});if(4902===n.code||4902===n?.data?.originalError?.code)try{if(await t.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:i.name,nativeCurrency:i.nativeCurrency,rpcUrls:[i.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(i)}]}),await this.getChainId()!==e)throw new O.ab(new Error("User rejected switch after adding network."));return i}catch(e){throw new O.ab(e)}if(this.isUserRejectedRequestError(n))throw new O.ab(n);throw new O.x3(n)}}async watchAsset({address:e,decimals:t=18,image:r,symbol:n}){const i=await this.getProvider();if(!i)throw new I;return i.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:r,symbol:n}}})}isUserRejectedRequestError(e){return 4001===e.code}};Ae=new WeakMap;var Ee=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Ie=(e,t,r)=>(Ee(e,t,"read from private field"),r?r.call(e):t.get(e)),_e=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Pe=(e,t,r,n)=>(Ee(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Oe=r(1920),Se=r(6647),ke=r(1826),Me=r(6873),Te=r(1327),Ne=r(7871);function je(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,ie.v)(t)?t:null}function Re(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,s.ci)(t);const r=e.split(".");for(let e=r.length-1;e>=0;e-=1){const n=je(r[e]),i=n?(0,Te.O0)(n):(0,Ne.w)((0,Te.qX)(r[e]),"bytes");t=(0,Ne.w)((0,B.zo)([t,i]),"bytes")}return(0,s.ci)(t)}function Le(e){const t=new Uint8Array(32).fill(0);return e?je(e)||(0,Ne.w)((0,Te.qX)(e)):(0,s.ci)(t)}function Be(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const r=new Uint8Array((0,Te.qX)(t).byteLength+2);let n=0;const i=t.split(".");for(let e=0;e255&&(t=(0,Te.qX)(`[${Le(i[e]).slice(2)}]`)),r[n]=t.length,r.set(t,n+1),n+=t.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}const $e=3;function Ue(e,{abi:t,address:r,args:n,docsPath:i,functionName:o,sender:s}){const{code:a,data:c,message:l,shortMessage:u}=e instanceof Se.VQ?e:e instanceof z.G?e.walk((e=>"data"in e)):{};let h=e;return e instanceof L.wb?h=new Se.Dk({functionName:o}):a===$e&&(c||l||u)&&(h=new Se.Lu({abi:t,data:"object"==typeof c?c.data:c,functionName:o,message:u??l})),new Se.uq(h,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:o,sender:s})}var De=r(5291);async function ze(e,{abi:t,address:r,args:n,functionName:i,...o}){const s=(0,de.R)({abi:t,args:n,functionName:i});try{const{data:a}=await(0,De.R)(e,{data:s,to:r,...o});return(0,ke.k)({abi:t,args:n,functionName:i,data:a||"0x"})}catch(e){throw Ue(e,{abi:t,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}class We extends z.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class Fe extends z.G{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class He extends z.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class qe extends z.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const Ve=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,Ge=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,Ke=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Ze=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;function Qe(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Ye({uri:e,gatewayUrls:t}){const r=Ke.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=Qe(t?.ipfs,"https://ipfs.io"),i=Qe(t?.arweave,"https://arweave.net"),o=e.match(Ve),{protocol:s,subpath:a,target:c,subtarget:l=""}=o?.groups||{},u="ipns:/"===s||"ipns/"===a,h="ipfs:/"===s||"ipfs/"===a||Ge.test(e);if(e.startsWith("http")&&!u&&!h){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((u||h)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if("ar:/"===s&&c)return{uri:`${i}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=e.replace(Ze,"");if(d.startsWith("{const r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e}))}}(r);if(i)return r;throw new He({uri:t})}async function et(e,{blockNumber:t,blockTag:r,name:n,key:o,universalResolverAddress:a}){let c=a;if(!c){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=(0,i.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const l=await ze(e,{address:c,abi:Oe.lD,functionName:"resolve",args:[(0,s.NC)(Be(n)),(0,de.R)({abi:Oe.nZ,functionName:"text",args:[Re(n),o]})],blockNumber:t,blockTag:r});if("0x"===l[0])return null;const u=(0,ke.k)({abi:Oe.nZ,functionName:"text",data:l[0]});return""===u?null:u}var tt=r(5554);function rt(e,{method:t}){const r={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:n,status:i,transport:o})=>{"success"===i&&t===e&&(r[n]=o.request)})),t=>r[t]||e.request}class nt extends z.G{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}var it=r(3693);const ot=e=>"string"==typeof e?(0,it.F)(e):(0,it.J)(e);var st=r(1494),at=r(8604);function ct({abi:e,eventName:t,args:r}){let n=e[0];if(t&&(n=(0,at.m)({abi:e,args:r,name:t}),!n))throw new L.mv(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==n.type)throw new L.mv(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const i=(0,st.t)(n),o=ot(i);let s=[];if(r&&"inputs"in n){const e=n.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(r)?r:Object.values(r).length>0?e?.map((e=>r[e.name]))??[]:[];t.length>0&&(s=e?.map(((e,r)=>Array.isArray(t[r])?t[r].map(((n,i)=>lt({param:e,value:t[r][i]}))):t[r]?lt({param:e,value:t[r]}):null))??[])}return[o,...s]}function lt({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,Ne.w)((0,Te.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new nt(e.type);return(0,$.E)([e],[t])}async function ut(e,{address:t,abi:r,args:n,eventName:i,fromBlock:o,strict:a,toBlock:c}){const l=rt(e,{method:"eth_newFilter"}),u=i?ct({abi:r,args:n,eventName:i}):void 0,h=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof o?(0,s.eC)(o):o,toBlock:"bigint"==typeof c?(0,s.eC)(c):c,topics:u}]});return{abi:r,args:n,eventName:i,id:h,request:l(h),strict:a,type:"event"}}async function ht(e,{address:t,args:r,event:n,fromBlock:i,strict:o,toBlock:a}={}){const c=rt(e,{method:"eth_newFilter"});let l=[];n&&(l=ct({abi:[n],eventName:n.name,args:r}));const u=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof i?(0,s.eC)(i):i,toBlock:"bigint"==typeof a?(0,s.eC)(a):a,...l.length?{topics:l}:{}}]});return{abi:n?[n]:void 0,args:r,eventName:n?n.name:void 0,id:u,request:c(u),strict:o,type:"event"}}async function dt(e){const t=rt(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}const pt=new Map,ft=new Map;const mt=e=>`blockNumber.${e}`;async function gt(e,{maxAge:t=e.pollingInterval}={}){const r=await async function(e,{cacheKey:t,maxAge:r=1/0}){const n=function(e){const t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),r=t(e,pt),n=t(e,ft);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}(t),i=n.response.get();if(i&&r>0&&(new Date).getTime()-i.created.getTime()e.request({method:"eth_blockNumber"})),{cacheKey:mt(e.uid),maxAge:t});return BigInt(r)}var wt=r(558);const bt="/docs/contract/decodeEventLog";function vt({abi:e,data:t,strict:r,topics:n}){const i=r??!0,[o,...s]=n;if(!o)throw new L.FM({docsPath:bt});const a=e.find((e=>"event"===e.type&&o===ot((0,st.t)(e))));if(!a||!("name"in a)||"event"!==a.type)throw new L.lC(o,{docsPath:bt});const{name:c,inputs:l}=a,u=l?.some((e=>!("name"in e&&e.name)));let h=u?[]:{};const d=l.filter((e=>"indexed"in e&&e.indexed));if(s.length>0)for(let e=0;e!("indexed"in e&&e.indexed)));if(p.length>0)if(t&&"0x"!==t)try{const e=(0,wt.r)(p,t);if(e)if(u)h=[...h,...e];else for(let t=0;t0?h:void 0}}function yt({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,wt.r)([e],t)||[])[0]}async function xt(e,{filter:t}){const r="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map((e=>{if("string"==typeof e)return e;try{const{eventName:n,args:i}="abi"in t&&t.abi?vt({abi:t.abi,data:e.data,topics:e.topics,strict:r}):{eventName:void 0,args:void 0};return u(e,{args:i,eventName:n})}catch(r){let n,i;if(r instanceof L.SM||r instanceof L.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,i=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return u(e,{args:i?[]:{},eventName:n})}})).filter(Boolean)}async function At(e,{address:t,blockHash:r,fromBlock:n,toBlock:i,event:o,args:a,strict:c}={}){const l=c??!1;let h,d=[];return o&&(d=ct({abi:[o],eventName:o.name,args:a})),h=r?await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:"bigint"==typeof n?(0,s.eC)(n):n,toBlock:"bigint"==typeof i?(0,s.eC)(i):i}]}),h.map((e=>{try{const{eventName:t,args:r}=o?vt({abi:[o],data:e.data,topics:e.topics,strict:l}):{eventName:void 0,args:void 0};return u(e,{args:r,eventName:t})}catch(t){let r,n;if(t instanceof L.SM||t instanceof L.Gy){if(l)return;r=t.abiItem.name,n=t.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return u(e,{args:n?[]:{},eventName:r})}})).filter(Boolean)}async function Ct(e,{blockHash:t,blockNumber:r,blockTag:n="latest",hash:i,index:o}){const a=void 0!==r?(0,s.eC)(r):void 0;let l=null;if(i?l=await e.request({method:"eth_getTransactionByHash",params:[i]}):t?l=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,s.eC)(o)]}):(a||n)&&(l=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||n,(0,s.eC)(o)]})),!l)throw new F.Bh({blockHash:t,blockNumber:r,blockTag:n,hash:i,index:o});return(e.chain?.formatters?.transaction?.format||c)(l)}async function Et(e,{hash:t}){const r=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!r)throw new F.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||d)(r)}async function It(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}const _t="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";async function Pt(e,{address:t,hash:r,signature:n,...i}){const o=(0,ie.v)(n)?n:(0,s.NC)(n);try{const{data:n}=await(0,De.R)(e,{data:D({abi:Oe.$o,args:[t,r,o],bytecode:_t}),...i});return a=n??"0x0",c="0x1",function(e,t){if(e.length!==t.length)return!1;for(let r=0;r`${t} ${e}`)).join(",")})`;return r}({primaryType:e,types:t}));return(0,Ne.w)(r)}function Tt({primaryType:e,types:t},r=new Set){const n=e.match(/^\w*/u),i=n?.[0];if(r.has(i)||void 0===t[i])return r;r.add(i);for(const e of t[i])Tt({primaryType:e.type,types:t},r);return r}function Nt({types:e,name:t,type:r,value:n}){if(void 0!==e[r])return[{type:"bytes32"},(0,Ne.w)(kt({data:n,primaryType:r,types:e}))];if("bytes"===r)return n="0x"+((n.length%2?"0":"")+n.slice(2)),[{type:"bytes32"},(0,Ne.w)(n)];if("string"===r)return[{type:"bytes32"},(0,Ne.w)((0,s.NC)(n))];if(r.lastIndexOf("]")===r.length-1){const i=r.slice(0,r.lastIndexOf("[")),o=n.map((r=>Nt({name:t,type:i,types:e,value:r})));return[{type:"bytes32"},(0,Ne.w)((0,$.E)(o.map((([e])=>e)),o.map((([,e])=>e))))]}return[{type:r},n]}BigInt(0),BigInt(1),BigInt(2),Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const jt=new Map,Rt=new Map;let Lt=0;function Bt(e,t,r){const n=++Lt,i=()=>jt.get(e)||[],o=()=>{const t=Rt.get(e);1===i().length&&t&&t(),(()=>{const t=i();jt.set(e,t.filter((e=>e.id!==n)))})()},s=i();if(jt.set(e,[...s,{id:n,fns:t}]),s&&s.length>0)return o;const a={};for(const e in t)a[e]=(...t)=>{const r=i();0!==r.length&&r.forEach((r=>r.fns[e]?.(...t)))};const c=r(a);return"function"==typeof c&&Rt.set(e,c),o}function $t(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let i=!0;const o=()=>i=!1;return(async()=>{let s;t&&(s=await e({unpoll:o}));const a=await(r?.(s))??n;await ge(a);const c=async()=>{i&&(await e({unpoll:o}),await ge(n),c())};c()})(),o}function Ut(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:s,pollingInterval:a=e.pollingInterval}){let c;return(void 0!==s?s:"webSocket"!==e.transport.type)?Bt((0,oe.P)(["watchBlockNumber",e.uid,t,r,a]),{onBlockNumber:n,onError:i},(n=>$t((async()=>{try{const t=await gt(e,{maxAge:0});if(c){if(t===c)return;if(t-c>1&&r)for(let e=c+1n;ec)&&(n.onBlockNumber(t,c),c=t)}catch(e){n.onError?.(e)}}),{emitOnBegin:t,interval:a}))):(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{const{unsubscribe:s}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!t)return;const r=(0,o.y_)(e.result?.number);n(r,c),c=r},onError(e){i?.(e)}});r=s,t||r()}catch(e){i?.(e)}})(),r})()}const Dt=e=>({call:t=>(0,De.R)(e,t),createBlockFilter:()=>async function(e){const t=rt(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}(e),createContractEventFilter:t=>ut(e,t),createEventFilter:t=>ht(e,t),createPendingTransactionFilter:()=>dt(e),estimateContractGas:t=>async function(e,{abi:t,address:r,args:n,functionName:i,...o}){const s=(0,de.R)({abi:t,args:n,functionName:i});try{return await Q(e,{data:s,to:r,...o})}catch(e){const s=o.account?(0,S.T)(o.account):void 0;throw Ue(e,{abi:t,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:s?.address})}}(e,t),estimateGas:t=>Q(e,t),getBalance:t=>async function(e,{address:t,blockNumber:r,blockTag:n="latest"}){const i=r?(0,s.eC)(r):void 0,o=await e.request({method:"eth_getBalance",params:[t,i||n]});return BigInt(o)}(e,t),getBlock:t=>J(e,t),getBlockNumber:t=>gt(e,t),getBlockTransactionCount:t=>async function(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){const i=void 0!==r?(0,s.eC)(r):void 0;let a;return a=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[i||n]}),(0,o.ly)(a)}(e,t),getBytecode:t=>async function(e,{address:t,blockNumber:r,blockTag:n="latest"}){const i=void 0!==r?(0,s.eC)(r):void 0,o=await e.request({method:"eth_getCode",params:[t,i||n]});if("0x"!==o)return o}(e,t),getChainId:()=>R(e),getEnsAddress:t=>async function(e,{blockNumber:t,blockTag:r,name:n,universalResolverAddress:o}){let a=o;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=(0,i.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const i=await ze(e,{address:a,abi:Oe.lD,functionName:"resolve",args:[(0,s.NC)(Be(n)),(0,de.R)({abi:Oe.Ei,functionName:"addr",args:[Re(n)]})],blockNumber:t,blockTag:r});if("0x"===i[0])return null;const o=(0,ke.k)({abi:Oe.Ei,functionName:"addr",data:i[0]});return"0x00"===(0,Me.f)(o)?null:o}catch(e){if(e instanceof Se.uq){const t=e.cause?.reason;if(t?.includes("Wildcard on non-extended resolvers is not supported"))return null}throw e}}(e,t),getEnsAvatar:t=>async function(e,{blockNumber:t,blockTag:r,gatewayUrls:n,name:i,universalResolverAddress:o}){const s=await et(e,{blockNumber:t,blockTag:r,key:"avatar",name:i,universalResolverAddress:o});if(!s)return null;try{return await async function(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?async function(e,{gatewayUrls:t,record:r}){const n=function(e){e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[t,r,n]=e.split("/"),[i,o]=t.split(":"),[s,a]=r.split(":");if(!i||"eip155"!==i.toLowerCase())throw new Fe({reason:"Only EIP-155 supported"});if(!o)throw new Fe({reason:"Chain ID not found"});if(!a)throw new Fe({reason:"Contract address not found"});if(!n)throw new Fe({reason:"Token ID not found"});if(!s)throw new Fe({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:s.toLowerCase(),contractAddress:a,tokenID:n}}(r),i=await async function(e,{nft:t}){if("erc721"===t.namespace)return ze(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return ze(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new qe({namespace:t.namespace})}(e,{nft:n}),{uri:o,isOnChain:s,isEncoded:a}=Ye({uri:i,gatewayUrls:t});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){const e=a?atob(o.replace("data:application/json;base64,","")):o;return Xe({uri:Je(JSON.parse(e)),gatewayUrls:t})}let c=n.tokenID;return"erc1155"===n.namespace&&(c=c.replace("0x","").padStart(64,"0")),async function({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then((e=>e.json()));return await Xe({gatewayUrls:e,uri:Je(r)})}catch{throw new He({uri:t})}}({gatewayUrls:t,uri:o.replace(/(?:0x)?{id}/,c)})}(e,{gatewayUrls:t,record:r}):Xe({uri:r,gatewayUrls:t})}(e,{record:s,gatewayUrls:n})}catch{return null}}(e,t),getEnsName:t=>async function(e,{address:t,blockNumber:r,blockTag:n,universalResolverAddress:o}){let a=o;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=(0,i.LI)({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}const c=`${t.toLowerCase().substring(2)}.addr.reverse`;try{return(await ze(e,{address:a,abi:[{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],functionName:"reverse",args:[(0,s.NC)(Be(c))],blockNumber:r,blockTag:n}))[0]}catch(e){if(e instanceof Se.uq&&e.cause.reason===tt.$[50])return null;throw e}}(e,t),getEnsResolver:t=>async function(e,{blockNumber:t,blockTag:r,name:n,universalResolverAddress:o}){let a=o;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=(0,i.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[c]=await ze(e,{address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,s.NC)(Be(n))],blockNumber:t,blockTag:r});return c}(e,t),getEnsText:t=>et(e,t),getFeeHistory:t=>async function(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){const o=r?(0,s.eC)(r):void 0;return{baseFeePerGas:(a=await e.request({method:"eth_feeHistory",params:[(0,s.eC)(t),o||n,i]})).baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:a.gasUsedRatio,oldestBlock:BigInt(a.oldestBlock),reward:a.reward?.map((e=>e.map((e=>BigInt(e)))))};var a}(e,t),getFilterChanges:e=>xt(0,e),getFilterLogs:e=>async function(e,{filter:t}){const r=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map((e=>{try{const{eventName:n,args:i}="abi"in t&&t.abi?vt({abi:t.abi,data:e.data,topics:e.topics,strict:r}):{eventName:void 0,args:void 0};return u(e,{args:i,eventName:n})}catch(r){let n,i;if(r instanceof L.SM||r instanceof L.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,i=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return u(e,{args:i?[]:{},eventName:n})}})).filter(Boolean)}(0,e),getGasPrice:()=>X(e),getLogs:t=>At(e,t),getStorageAt:t=>async function(e,{address:t,blockNumber:r,blockTag:n="latest",slot:i}){const o=void 0!==r?(0,s.eC)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,o||n]})}(e,t),getTransaction:t=>Ct(e,t),getTransactionConfirmations:t=>async function(e,{hash:t,transactionReceipt:r}){const[n,i]=await Promise.all([gt(e),t?Ct(e,{hash:t}):void 0]),o=r?.blockNumber||i?.blockNumber;return o?n-o+1n:0n}(e,t),getTransactionCount:t=>ee(e,t),getTransactionReceipt:t=>Et(e,t),multicall:t=>async function(e,t){const{allowFailure:r=!0,batchSize:n,blockNumber:o,blockTag:s,contracts:a,multicallAddress:c}=t,l=n??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),u=a;let h=c;if(!h){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");h=(0,i.LI)({blockNumber:o,chain:e.chain,contract:"multicall3"})}const d=[[]];let p=0,f=0;for(let e=0;e0&&f>l&&(p++,f=(e.length-2)/2,d[p]=[]),d[p]=[...d[p],{allowFailure:!0,callData:e,target:n}]}catch(e){const s=Ue(e,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:o});if(!r)throw s;d[p]=[...d[p],{allowFailure:!0,callData:"0x",target:n}]}}return(await Promise.all(d.map((t=>ze(e,{abi:Oe.F8,address:h,args:[t],blockNumber:o,blockTag:s,functionName:"aggregate3"}))))).flat().map((({returnData:e,success:t},n)=>{const i=d.flat(),{callData:o}=i[n],{abi:s,address:a,functionName:c,args:l}=u[n];try{if("0x"===o)throw new L.wb;if(!t)throw new Se.VQ({data:e});const n=(0,ke.k)({abi:s,data:e,functionName:c});return r?{result:n,status:"success"}:n}catch(e){const t=Ue(e,{abi:s,address:a,args:l,docsPath:"/docs/contract/multicall",functionName:c});if(!r)throw t;return{error:t,result:void 0,status:"failure"}}}))}(e,t),readContract:t=>ze(e,t),simulateContract:t=>async function(e,{abi:t,address:r,args:n,dataSuffix:i,functionName:o,...s}){const a=s.account?(0,S.T)(s.account):void 0,c=(0,de.R)({abi:t,args:n,functionName:o});try{const{data:a}=await(0,De.R)(e,{batch:!1,data:`${c}${i?i.replace("0x",""):""}`,to:r,...s});return{result:(0,ke.k)({abi:t,args:n,functionName:o,data:a||"0x"}),request:{abi:t,address:r,args:n,functionName:o,...s}}}catch(e){throw Ue(e,{abi:t,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:o,sender:a?.address})}}(e,t),verifyMessage:t=>async function(e,{address:t,message:r,signature:n,...i}){const o=function(e,t){const r="string"==typeof e?(0,Te.qX)(e):e.raw instanceof Uint8Array?e.raw:(0,Te.O0)(e.raw),n=(0,Te.qX)(`Ethereum Signed Message:\n${r.length}`);return(0,Ne.w)((0,B.zo)([n,r]),void 0)}(r);return Pt(e,{address:t,hash:o,signature:n,...i})}(e,t),verifyTypedData:t=>async function(e,{address:t,signature:r,message:n,primaryType:i,types:o,domain:s,...a}){return Pt(e,{address:t,hash:Ot({message:n,primaryType:i,types:o,domain:s}),signature:r,...a})}(e,t),uninstallFilter:e=>It(0,e),waitForTransactionReceipt:t=>async function(e,{confirmations:t=1,hash:r,onReplaced:n,pollingInterval:i=e.pollingInterval,timeout:o}){const s=(0,oe.P)(["waitForTransactionReceipt",e.uid,r]);let a,c,l,u=!1;return new Promise(((h,d)=>{o&&setTimeout((()=>d(new F.mc({hash:r}))),o);const p=Bt(s,{onReplaced:n,resolve:h,reject:d},(n=>{const o=Ut(e,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(i){if(u)return;let s=i;const h=async e=>{o(),e(),p()};try{if(l){if(s-l.blockNumber+1nn.resolve(l)))}if(a||(u=!0,await we((async()=>{a=await Ct(e,{hash:r}),a.blockNumber&&(s=a.blockNumber)}),{delay:({count:e})=>200*~~(1<0&&s-l.blockNumber+1nn.resolve(l)))}catch(r){if(a&&(r instanceof F.Bh||r instanceof F.Yb)){c=a;const r=(await J(e,{blockNumber:s,includeTransactions:!0})).transactions.find((({from:e,nonce:t})=>e===c.from&&t===c.nonce));if(!r)return;if(l=await Et(e,{hash:r.hash}),s-l.blockNumber+1n{n.onReplaced?.({reason:i,replacedTransaction:c,transaction:r,transactionReceipt:l}),n.resolve(l)}))}else h((()=>n.reject(r)))}}});return o}))}))}(e,t),watchBlocks:t=>function(e,{blockTag:t="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:o,includeTransactions:s=!1,poll:a,pollingInterval:c=e.pollingInterval}){let u;return(void 0!==a?a:"webSocket"!==e.transport.type)?Bt((0,oe.P)(["watchBlocks",e.uid,r,n,s,c]),{onBlock:i,onError:o},(i=>$t((async()=>{try{const n=await J(e,{blockTag:t,includeTransactions:s});if(n.number&&u?.number){if(n.number===u.number)return;if(n.number-u.number>1&&r)for(let t=u?.number+1n;tu.number)&&(i.onBlock(n,u),u=n)}catch(e){i.onError?.(e)}}),{emitOnBegin:n,interval:c}))):(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{const{unsubscribe:n}=await e.transport.subscribe({params:["newHeads"],onData(r){if(!t)return;const n=(e.chain?.formatters?.block?.format||l)(r.result);i(n,u),u=n},onError(e){o?.(e)}});r=n,t||r()}catch(e){o?.(e)}})(),r})()}(e,t),watchBlockNumber:t=>Ut(e,t),watchContractEvent:t=>function(e,{abi:t,address:r,args:n,batch:i=!0,eventName:o,onError:s,onLogs:a,pollingInterval:c=e.pollingInterval,strict:l}){const u=(0,oe.P)(["watchContractEvent",r,n,i,e.uid,o,c]),h=l??!1;return Bt(u,{onLogs:a,onError:s},(s=>{let a,l,u=!1;const d=$t((async()=>{if(u)try{let c;if(l)c=await xt(0,{filter:l});else{const i=await gt(e);c=a&&a!==i?await At(e,{address:r,args:n,fromBlock:a+1n,toBlock:i,event:(0,at.m)({abi:t,name:o})}):[],a=i}if(0===c.length)return;i?s.onLogs(c):c.forEach((e=>s.onLogs([e])))}catch(e){s.onError?.(e)}else{try{l=await ut(e,{abi:t,address:r,args:n,eventName:o,strict:h})}catch{}u=!0}}),{emitOnBegin:!0,interval:c});return async()=>{l&&await It(0,{filter:l}),d()}}))}(e,t),watchEvent:t=>function(e,{address:t,args:r,batch:n=!0,event:i,onError:o,onLogs:s,pollingInterval:a=e.pollingInterval,strict:c}){const l=(0,oe.P)(["watchEvent",t,r,n,e.uid,i,a]),u=c??!1;return Bt(l,{onLogs:s,onError:o},(o=>{let s,c,l=!1;const h=$t((async()=>{if(l)try{let a;if(c)a=await xt(0,{filter:c});else{const n=await gt(e);a=s&&s!==n?await At(e,{address:t,args:r,fromBlock:s+1n,toBlock:n,event:i}):[],s=n}if(0===a.length)return;n?o.onLogs(a):a.forEach((e=>o.onLogs([e])))}catch(e){o.onError?.(e)}else{try{c=await ht(e,{address:t,args:r,event:i,strict:u})}catch{}l=!0}}),{emitOnBegin:!0,interval:a});return async()=>{c&&await It(0,{filter:c}),h()}}))}(e,t),watchPendingTransactions:t=>function(e,{batch:t=!0,onError:r,onTransactions:n,poll:i,pollingInterval:o=e.pollingInterval}){return(void 0!==i?i:"webSocket"!==e.transport.type)?Bt((0,oe.P)(["watchPendingTransactions",e.uid,t,o]),{onTransactions:n,onError:r},(r=>{let n;const i=$t((async()=>{try{if(!n)try{return void(n=await dt(e))}catch(e){throw i(),e}const o=await xt(0,{filter:n});if(0===o.length)return;t?r.onTransactions(o):o.forEach((e=>r.onTransactions([e])))}catch(e){r.onError?.(e)}}),{emitOnBegin:!0,interval:o});return async()=>{n&&await It(0,{filter:n}),i()}})):(()=>{let t=!0,i=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const r=e.result;n([r])},onError(e){r?.(e)}});i=o,t||i()}catch(e){r?.(e)}})(),i})()}(e,t)});function zt({batch:e,chain:t,key:r="public",name:n="Public Client",transport:i,pollingInterval:o}){const s={batch:e,...j({chain:t,key:r,name:n,pollingInterval:o,transport:i,type:"publicClient"})};return{...s,...Dt(s)}}function Wt(e,t={}){const{key:r="fallback",name:n="Fallback",rank:i=!1,retryCount:o,retryDelay:s}=t;return({chain:t,pollingInterval:a=4e3,timeout:c})=>{let l=e,u=()=>{};const h=ye({key:r,name:n,async request({method:e,params:r}){const n=async(i=0)=>{const o=l[i]({chain:t,retryCount:0,timeout:c});try{const t=await o.request({method:e,params:r});return u({method:e,params:r,response:t,transport:o,status:"success"}),t}catch(t){if(u({error:t,method:e,params:r,transport:o,status:"error"}),be(t))throw t;if(i===l.length-1)throw t;return n(i+1)}};return n()},retryCount:o,retryDelay:s,type:"fallback"},{onResponse:e=>u=e,transports:l.map((e=>e({chain:t,retryCount:0})))});if(i){const e="object"==typeof i?i:{};!function({chain:e,interval:t=4e3,onTransports:r,sampleCount:n=10,timeout:i=1e3,transports:o,weights:s={}}){const{stability:a=.7,latency:c=.3}=s,l=[],u=async()=>{const s=await Promise.all(o.map((async t=>{const r=t({chain:e,retryCount:0,timeout:i}),n=Date.now();let o,s;try{await r.request({method:"net_listening"}),s=1}catch{s=0}finally{o=Date.now()}return{latency:o-n,success:s}})));l.push(s),l.length>n&&l.shift();const h=Math.max(...l.map((e=>Math.max(...e.map((({latency:e})=>e)))))),d=o.map(((e,t)=>{const r=l.map((e=>e[t].latency)),n=1-r.reduce(((e,t)=>e+t),0)/r.length/h,i=l.map((e=>e[t].success)),o=i.reduce(((e,t)=>e+t),0)/i.length;return 0===o?[0,t]:[c*n+a*o,t]})).sort(((e,t)=>t[0]-e[0]));r(d.map((([,e])=>o[e]))),await ge(t),u()};u()}({chain:t,interval:e.interval??a,onTransports:e=>l=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:l,weights:e.weights})}return h}}class Ft extends z.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var Ht=r(8583);function qt(e,{errorInstance:t,timeout:r,signal:n}){return new Promise(((i,o)=>{(async()=>{let s;try{const a=new AbortController;r>0&&(s=setTimeout((()=>{n?a.abort():o(t)}),r)),i(await e({signal:a?.signal}))}catch(e){"AbortError"===e.name&&o(t),o(e)}finally{clearTimeout(s)}})()}))}let Vt=0;const Gt=new Map;async function Kt(e){const t=new URL(e),n=t.toString();let i=Gt.get(n);if(i)return i;const{schedule:o}=(0,Ht.S)({id:n,fn:async()=>{let e=await Promise.resolve().then(r.bind(r,5289));e=e.default?.constructor?e.default:e.WebSocket;const o=new e(t),s=new Map,a=new Map,c=({data:e})=>{const t=JSON.parse(e),r="eth_subscription"===t.method,n=r?t.params.subscription:t.id,i=r?a:s,o=i.get(n);o&&o({data:e}),r||i.delete(n)},l=()=>{Gt.delete(n),o.removeEventListener("close",l),o.removeEventListener("message",c)};return o.addEventListener("close",l),o.addEventListener("message",c),o.readyState===e.CONNECTING&&await new Promise(((e,t)=>{o&&(o.onopen=e,o.onerror=t)})),i=Object.assign(o,{requests:s,subscriptions:a}),Gt.set(n,i),[i]}}),[s,[a]]=await o();return a}const Zt={http:async function(e,{body:t,fetchOptions:r={},timeout:n=1e4}){const{headers:i,method:o,signal:s}=r;try{const a=await qt((async({signal:a})=>await fetch(e,{...r,body:Array.isArray(t)?(0,oe.P)(t.map((e=>({jsonrpc:"2.0",id:Vt++,...e})))):(0,oe.P)({jsonrpc:"2.0",id:Vt++,...t}),headers:{...i,"Content-Type":"application/json"},method:o||"POST",signal:s||(n>0?a:void 0)})),{errorInstance:new me.W5({body:t,url:e}),timeout:n,signal:!0});let c;if(c=a.headers.get("Content-Type")?.startsWith("application/json")?await a.json():await a.text(),!a.ok)throw new me.Gg({body:t,details:(0,oe.P)(c.error)||a.statusText,headers:a.headers,status:a.status,url:e});return c}catch(r){if(r instanceof me.Gg)throw r;if(r instanceof me.W5)throw r;throw new me.Gg({body:t,details:r.message,url:e})}},webSocket:function(e,{body:t,onResponse:r}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new me.c9({body:t,url:e.url,details:"Socket is closed."});const n=Vt++,i=({data:o})=>{const s=JSON.parse(o);"number"==typeof s.id&&n!==s.id||(r?.(s),"eth_subscribe"===t.method&&"string"==typeof s.result&&e.subscriptions.set(s.result,i),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(n,i),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:n})),e},webSocketAsync:async function(e,{body:t,timeout:r=1e4}){return qt((()=>new Promise((r=>Zt.webSocket(e,{body:t,onResponse:r})))),{errorInstance:new me.W5({body:t,url:e.url}),timeout:r})}};var Qt=r(8617);function Yt(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;const i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(n=r.getItem(e))?n:null;return o instanceof Promise?o.then(i):i(o)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}const Jt=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then:e=>Jt(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>Jt(t)(e)}}},Xt=e=>{let t;const r=new Set,n=(e,n)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=n?n:"object"!=typeof i)?i:Object.assign({},t,i),r.forEach((r=>r(t,e)))}},i=()=>t,o={setState:n,getState:i,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(n,i,o),o};var er=r(263);function tr(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,n]of e)if(!Object.is(n,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;ne[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e>--c&1}const h=2**31,d=h>>>1,p=h-1;let f=0;for(let e=0;e<31;e++)f=f<<1|u();let m=[],g=0,w=h;for(;;){let e=Math.floor(((f-g+1)*i-1)/w),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|u(),s=s<<1^d,a=(a^d)<<1|d|1;g=s,w=1+a-s}let b=n-4;return m.map((t=>{switch(t-b){case 3:return b+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return b+256+(e[a++]<<8|e[a++]);case 1:return b+e[a++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,r)=>t[e.charCodeAt(0)]=r));let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,s=0,a=0;i=8&&(n[o++]=a>>(s-=8));return n}(e)))}function nr(e){return 1&e?~e>>1:e>>1}function ir(e,t){let r=Array(e);for(let n=0,i=0;n{let t=or(e);if(t.length)return t}))}function ar(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(ur(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(hr(r,e))}return t.flat()}function cr(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function lr(e,t,r){let n=Array(e).fill().map((()=>[]));for(let i=0;in[t].push(e)));return n}function ur(e,t){let r=1+t(),n=t(),i=cr(t);return lr(i.length,1+e,t).flatMap(((e,t)=>{let[o,...s]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*n;return[o+t*r,s.map((e=>e+i))]}))}))}function hr(e,t){return lr(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}var dr=rr("AEgSbwjEDVYByQKaAQsBOQDpATQAngDUAHsAoABoANQAagCNAEQAhABMAHIAOwA9ACsANgAmAGIAHgAvACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGAAeABMAFwAXAA0ADgAWAA8AFAAVBFsF1QEXE0o3xAXUALIArkABaACmAgPGAK6AMDAwMAE/qAYK7P4HQAblMgVYBVkAPSw5Afa3EgfJwgAPA8meNALGCjACjqIChtk/j2+KAsXMAoPzASDgCgDyrgFCAi6OCkCQAOQA4woWABjVuskNDD6eBBx4AP4COhi+D+wKBirqBgSCaA0cBy4ArABqku+mnIAAXAaUJAbqABwAPAyUFvyp/Mo8INAIvCoDshQ8APcubKQAon4ZABgEJtgXAR4AuhnOBPsKIE04CZgJiR8cVlpM5INDABQADQAWAA9sVQAiAA8ASO8W2T30OVnKluYvChEeX05ZPe0AFAANABYAD2wgXUCYAMPsABwAOgzGFryp/AHauQVcBeMC0KACxLEKTR2kZhR0Gm5M9gC8DmgC4gAMLjSKF8qSAoF8ARMcAL4OaALiAAwuAUlQJpJMCwMt/AUpCthqGK4B2EQAciwSeAIyFiIDKCi6OGwAOuIB9iYAyA7MtgEcZIIAsgYABgCK1EoFHNZsGACoKNIBogAAAAAAKy4DnABoAQoaPu43dQQZGACrAcgCIgDgLBJ0OvRQsTOiKDVJBfsoBVoFWbC5BWo7XkITO1hCmHuUZmCh+QwUA8YIJvJ4JASkTAJUVAJ2HKwoAZCkpjZcA0YYBIRiCgDSBqxAMCQHKgI6XgBsAWIgcgCEHhoAlgFKuAAoahgBsMYDOC4iRFQBcFoGZgJmAPJKGAMqAgYASkIArABeAHQALLYGCPTwGo6AAAAKIgAqALQcSAHSAdwIDDKXeYHpAAsAEgA1AD4AOTR3etTBEGAQXQJNCkxtOxUMAq0PpwvmERYM0irM09kANKoH7ANUB+wDVANUB+wH7ANUB+wDVANUA1QDVBwL8BvUwRBgD0kEbgWPBYwE1wiEJkoRggcpCNNUDnQfHEgDRgD9IyZJHTuUMwwlQ0wNTQQH/TZDbKh9OQNIMaxU9pCjA8wyUDltAh5yEqEAKw90HTW2Tn96SHGhCkxPr7WASWNOaAK/Oqk/+QoiCZRvvHdPBj4QGCeiEPQMMAGyATgN6kvVBO4GOATGH3oZFg/KlZkIoi3aDOom4C6egFcj8iqABepL8TzaC0pRZQ9WC2IJ4DpggUsDHgEKIogK2g02CGoQ8ArGaA3iEUIHNgPSSZcAogb+Cw4dMhWyJg1iqQsGOXQG+BrzC4wmrBMmevkF0BoeBkoBJhr8AMwu5IWtWi5cGU9cBgALIiPEFKVQHQ0iQLR4RRoYBxIlpgKOQ21KhFEzHpAh8zw6DWMuEFF5B/I8AhlMC348m0aoRQsRzz6KPUUiRkwpBDJ8LCwniAnMD4IMtnxvAVYJHgmuDG4TLhEUN8IINgcWKpchJxIIHkaSYJcE9JwD8BPOAwgFPAk+BxADshwqEysVJgUKgSHUAvA20i6wAoxWfQEUBcgPIh/cEE1H3Q7mCJgCYgOAJegAKhUeABQimAhAYABcj9VTAi7ICMRqaSNxA2QU5F4RcAeODlQHpBwwFbwc3nDFXgiGBSigrAlYAXIJlgFcBOAIBjVYjJ0gPmdQi1UYmCBeQTxd+QIuDGIVnES6h3UCiA9oEhgBMgFwBzYM/gJ0EeoRaBCSCOiGATWyM/U6IgRMIYAgDgokA0xsywskJvYM9WYBoBJfAwk0OnfrZ6hgsyEX+gcWMsJBXSHuC49PygyZGr4YP1QrGeEHvAPwGvAn50FUBfwDoAAQOkoz6wS6C2YIiAk8AEYOoBQH1BhnCm6MzQEuiAG0lgNUjoACbIwGNAcIAGQIhAV24gAaAqQIoAACAMwDVAA2AqoHmgAWAII+AToDJCwBHuICjAOQCC7IAZIsAfAmBBjADBIA9DRuRwLDrgKAZ2afBdpVAosCRjIBSiIEAktETgOsbt4A2ABIBhDcRAESqEfIF+BAAdxsKADEAPgAAjIHAj4BygHwagC0AVwLLgmfsLIBSuYmAIAAEmgB1AKGANoAMgB87gFQAEoFVvYF0AJMRgEOLhUoVF4BuAMcATABCgB2BsiKosYEHARqB9ACEBgV3gLvKweyAyLcE8pCwgK921IAMhMKNQqkCqNgWF0wAy5vPU0ACx+lPsQ/SwVOO1A7VTtQO1U7UDtVO1A7VTtQO1UDlLzfvN8KaV9CYegMow3RRMU6RhPYYE5gLxPFLbQUvhXLJVMZOhq5JwIl4VUGDwEt0GYtCCk0che5ADwpZYM+Y4MeLQpIHORTjlT1LRgArkufM6wNqRsSRD0FRHXqYicWCwofAmR+AmI/WEqsWDcdAqH0AmiVAmYGAp+BOBgIAmY4AmYjBGsEfAN/EAN+jzkDOXQUOX86ICACbBoCMjM4BwJtxAJtq+yHMGRCKAFkANsA3gBHAgeVDIoA+wi/AAqyAncsAnafPAJ5SEACeLcaWdhFq0bwAnw8AnrFAn0GAnztR/1IemAhACgSSVVKWBIUSskC0P4C0MlLJAOITAOH40TCkS8C8p5dAAMDq0vLTCoiAMxNSU2sAos8AorVvhgEGkBkArQCjjQCjlk9lH4CjtYCjll1UbFTMgdS0VSCApP4ApMJAOYAGVUbVaxVzQMsGCmSgzLeeGNFODYCl5wC769YHqUAViIClowClnmZAKZZqVoGfkoAOAKWsgKWS1xBXM4CmcgCmWFcx10EFgKcmDm/OpoCnBMCn5gCnrWHABoMLicMAp3uAp6PALI6YTFh7AKe0AKgawGmAp6cHAKeS6JjxWQkIigCJ6wCJnsCoPgCoEnUAqYsAqXLAqf8AHoCp+9oeWiuAABGahlqzgKs4AKsqwKtZAKs/wJXGgJV2QKx3tQDH0tslAKyugoCsuUUbN1tYG1FXAMlygK2WTg8bo0DKUICuFsCuUQSArkndHAzcN4CvRYDLa8DMg4CvoVx/wMzbgK+F3Mfc0wCw8gCwwFzf3RIMkJ03QM8pAM8lwM9vALFeQLGRALGDYYCyGZOAshBAslMAskrAmSaAt3PeHZeeKt5IkvNAxigZv8CYfEZ8JUhewhej164DgLPaALPaSxIUM/wEJwAw6oCz3ABJucDTg9+SAIC3CQC24cC0kwDUlkDU1wA/gNViYCGPMgT6l1CcoLLg4oC2sQC2duEDYRGpzkDhqIALANkC4ZuVvYAUgLfYgLetXB0AuIs7REB8y0kAfSYAfLPhALr8ALpbXYC6vYC6uEA9kQBtgLuhgLrmZanlwAC7jwDhd2YdnDdcZ4C8wAAZgOOE5mQAvcQA5FrA5KEAveVAvnWAvhjmhmaqLg0mxsDnYAC/vcBGAA2nxmfsAMFigOmZwOm1gDOwgMGZ6GFogIGAwxGAQwBHAdqBl62ZAIAuARovA6IHrAKABRyNgAgAzASSgOGfAFgJB4AjOwAHgDmoAScjgi0BhygwgCoBRK86h4+PxZ5BWk4P0EsQiJCtV9yEl+9AJbGBTMAkE0am7o7J2AzErrQDjAYxxiKyfcFWAVZBVgFWQVkBVkFWAVZBVgFWQVYBVkFWAVZRxYI2IZoAwMDCmVe6iwEygOyBjC8vAC8BKi8AOhBKhazBUc+aj5xQkBCt192OF/pAFgSM6wAjP/MbMv9puhGez4nJAUsFyg3Nn5u32vB8hnDLGoBbNdvMRgFYAVrycLJuQjQSlwBAQEKfV5+jL8AND+CAAQW0gbmriQGAIzEDAMCDgDlZh4+JSBLQrJCvUI5JF8oYDcoOSQJwj4KRT9EPnk+gj5xPnICikK9SkM8X8xPUGtOCy1sVTBrDG8gX+E0OxwJaJwKYyQsPR4nQqxCvSzMAsv9X8oPIC8KCQoAACN+nt9rOy5LGMmsya0JZsLMzQphQWAP5hCkEgCTjh5GQiYbqm06zjkKND9EPnFCQBwICx5NSG1cLS5a4rwTCn7uHixCQBxeCUsKDzRVREM4BTtEnC0KghwuQkAb9glUIyQZMTIBBo9i8F8KcmTKYAxgLiRvAERgGjoDHB9gtAcDbBFmT2BOEgIAZOhgFmCWYH5gtGBMYJJpFhgGtg/cVqq8WwtDF6wBvCzOwgMgFgEdBB8BegJtMDGWU4EBiwq5SBsA5SR0jwvLDqdN6wGcAoidUAVBYAD4AD4LATUXWHsMpg0lILuwSABQDTUAFhO4NVUC0wxLZhEcANlPBnYECx9bADIAtwKbKAsWcKwzOaAaAVwBhwn9A9ruEAarBksGugAey1aqWwq7YhOKCy1ADrwBvAEjA0hbKSkpIR8gIi0TJwciDY4AVQJvWJFKlgJvIA9ySAHUdRDPUiEaqrFN6wcSBU1gAPgAPgsBewAHJW0LiAymOTEuyLBXDgwAYL0MAGRKaFAiIhzAADIAtwKbKC08D88CkRh8ULxYyXRzjtilnA72mhU+G+0S2hIHDxwByAk7EJQGESwNNwwAPAC0zwEDAKUA4gCbizAAFQBcG8cvbXcrDsIRAzwlRNTiHR8MG34CfATCC6vxbQA4Oi4Opzkuz6IdB7wKABA7Ls8SGgB9rNsdD7wbSBzOoncfAT4qYB0C7KAJBE3z5R9mDL0M+wg9Cj8ABcELPgJMDbwIvQ09CT0KvS7PoisOvAaYAhwPjBriBBwLvBY8AKELPBC8BRihe90AO2wMPQACpwm9BRzR9QYFB2/LBnwAB7wSXBISvQECAOsCAAB1FVwHFswV/HAXvBg8AC68AuyovAAevAJWISuAAAG8AALkFT0VvCvso7zJqDwEAp8nTAACXADn3hm8CaVcD7/FAPUafAiiBQv/cQDfvKe8GNwavKOMeXMG/KmchAASvAcbDAADlABtvAcAC7ynPAIaPLsIopzLDvwHwak8AOF8L7dtvwNJAAPsABW8AAb8AAm8AGmMABq8AA68Axi8jmoV/AABXAAObAAuTB8ABrwAF7wIIgANSwC6vCcAA7wADpwq7ACyWwAcHAAbvAAB7AqiAAXHCxYV3AAHnABCvAEDAGm8AAt8AB28AAi8CaIABcsAbqAZ1gCSCCIABcsAATwAB9wAHZwIIgAGmwAJfAAbLABtHADmvIEACFwACDwAFLwAaPwJIgAGywDjjAAJPAuiDsX7YAAHPABunUBJAEgACrwFAAM8AAmuAzgABxwAGXwAAgym/AAKHAAKPAAJ/KfsBrwACRwAAwwAEDwBABQ8ABFsAA+MAA3sAA28ABkMBxYcABU8AG6cFrQBvAC7ABM8BABpLAsA4UwAAjwABFMAF3wFHAAG0QAYvB8BfClTADpGALAJBw4McwApK3EBpQYIXwJtJA0ACghwTG1gK4oggRVjLjcDogq1AALZABcC/ARvAXdzSFMVIgNQAhY/AS0GBHRHvnxTe0EAKgAyAvwAVAvcAHyRLQEsAHfmDhIzRwJLAFgGAAJRAQiLzQB5PAQhpgBbANcWAJZpOCCMAM5ssgDQ1RcJw3Z0HBlXHgrSAYmRrCNUVE5JEz3DivoAgB04QSos4RKYUABzASosMSlDGhADMVYE+MbvAExm3QBrAnICQBF7Osh4LzXWBhETIAUVCK6v/xPNACYAAQIbAIYAiQCONgDjALQA1QCdPQC7AKsApgChAOcAnwDTAJwA4AEBAPwAwAB6AFsAywDNAPwA1wDrAIkAogEqAOMA2ADVBAIIKzTT09PTtb/bzM/NQjEWAUsBVS5GAVMBYgFhAVQBRUpCRGcMAUwUBgkEMzcMBwAgDSQmKCs3OTk8PDw9Pg0/HVBQUFBSUlFSKFNUVlVVHFxgYF9hYCNlZ29ucXFxcXFxc3Nzc3Nzc3Nzc3N1dXZ1dFsAPesAQgCTAHEAKwBf8QCHAFAAUAAwAm/oAIT+8fEAXQCM6wCYAEgAWwBd+PipAH4AfgBiAE8AqgAdAK8AfAI5AjwA9QDgAPcA9wDhAPgA4gDiAOEA3wAoAnQBSgE5ATcBTQE3ATcBNwEyATEBMQExARUBURAAKgkBAEwYCxcEFhcPAIcAjwCfAEoAYxkCKgBvAGgAkAMOAyArAxpCP0gqAIoCSADAAlACnQC5Ao8CjwKPAo8CjwKPAoQCjwKPAo8CjwKPAo8CjgKOApECmQKQAo8CjwKNAo0CjQKNAosCjgJuAc0CkAKYAo8CjwKOF3oMAPcGA5gCWgIzGAFNETYC2xILLBQBRzgUTpIBdKU9AWJaAP4DOkgA/wCSKh4ZkGsAKmEAagAvAIoDlcyM8K+FWwa7LA/DEgKe1nUrCwQkWwGzAN5/gYB/gX+Cg4N/hIeFf4aJh4GIg4mDin+Lf4x/jYuOf49/kIORf5J/k3+Uf5WElomXg5h/AIMloQCEBDwEOQQ7BD4EPARCBD8EOgRABEIEQQQ9BD8EQgCkA4gAylIA0AINAPdbAPcBGgD3APUA9QD2APXVhSRmvwD3APUA9QD2APUdAIpbAPcAigEaAPcAigLtAPcAitWFJGa/HQD4WwEaAPcA9wD1APUA9gD1APgA9QD1APYA9dWFJGa/HQCKWwEaAPcAigD3AIoC7QD3AIrVhSRmvx0CRAE3AksBOgJMwgOfAu0Dn9WFJGa/HQCKWwEaA58AigOfAIoC7QOfAIrVhSRmvx0EMQCKBDIAigeOMm4hLQCKAT9vBCQA/gDHWwMAVVv/FDMDAIoDPtkASgMAigMAl2dBtv/TrfLzakaPh3aztmIuZQrR3ER2n5Yo+qNR2jK/aP/V04UK1njIJXLgkab9PjOxyJDVbIN3R/FZLoZVl2kYFQIZ7V6LpRqGDt9OdDohnJKp5yX/HLj0voPpLrneDaN11t5W3sSM4ALscgSw8fyWLVkKa/cNcQmjYOgTLZUgOLi2F05g4TR0RfgZ4PBdntxdV3qvdxQt8DeaMMgjJMgwUxYN3tUNpUNx21AvwADDAIa0+raTWaoBXmShAl5AThpMi282o+WzOKMlxjHj7a+DI6AM6VI9w+xyh3Eyg/1XvPmbqjeg2MGXugHt8wW03DQMRTd5iqqOhjLvyOCcKtViGwAHVLyl86KqvxVX7MxSW8HLq6KCrLpB8SspAOHO9IuOwCh9poLoMEha9CHCxlRAXJNDobducWjqhFHqCkzjTM2V9CHslwq4iU19IxqhIFZMve15lDTiMVZIPdADXGxTqzSTv0dDWyk1ht430yvaYCy9qY0MQ3cC5c1uw4mHcTGkMHTAGC99TkNXFAiLQgw9ZWhwKJjGCe+J5FIaMpYhhyUnEgfrF3zEtzn40DdgCIJUJfZ0mo3eXsDwneJ8AYCr7Vx2eHFnt2H6ZEyAHs9JoQ4Lzh5zBoGOGwAz37NOPuqSNmZf51hBEovtpm2T1wI79OBWDyvCFYkONqAKGVYgIL0F+uxTcMLSPtFbiNDbBPFgip8MGDmLLHbSyGXdCMO6f7teiW9EEmorZ+75KzanZwvUySgjoUQBTfHlOIerJs6Y9wLlgDw18AB1ne0tZRNgGjcrqHbtubSUooEpy4hWpDzTSrmvqw0H9AoXQLolMt9eOM+l9RitBB1OBnrdC1XL4yLFyXqZSgZhv7FnnDEXLUeffb4nVDqYTLY6X7gHVaK4ZZlepja2Oe6OhLDI/Ve5SQTCmJdH3HJeb14cw99XsBQAlDy5s5kil2sGezZA3tFok2IsNja7QuFgM30Hff3NGSsSVFYZLOcTBOvlPx8vLhjJrSI7xrNMA/BOzpBIJrdR1+v+zw4RZ7ry6aq4/tFfvPQxQCPDsXlcRvIZYl+E5g3kJ+zLMZon0yElBvEOQTh6SaAdIO6BwdqJqfvgU+e8Y65FQhdiHkZMVt9/39N2jGd26J6cNjq8cQIyp6RonRPgVn2fl89uRDcQ27GacaN0MPrcNyRlbUWelKfDfyrNVVGBG5sjd3jXzTx06ywyzuWn5jbvEfPPCTbpClkgEu9oPLKICxU5HuDe3jA1XnvU85IYYhaEtOU1YVWYhEFsa4/TQj3rHdsU2da2eVbF8YjSI0m619/8bLMZu3xildwqM7zf1cjn4Whx0PSYXcY5bR7wEQfGC7CTOXwZdmsdTO8q3uGm7Rh/RfCWwpzBHCAaVfjxgibL5vUeL0pH6bzDmI9yCXKC/okkmbc28OJvI87L/bjFzpq0DHepw4kT1Od+fL7cyuFaRgfaUWB2++TCFvz11J0leEtrGkpccfX9z2LY39sph4PBHCjNOOkd0ybUm+ZzS8GkFbqMpq8uiX2yHpa0jllTLfGTDBMYR6FT5FWLLDPMkYxt1Q0eyMvxJWztDjy0m6VvZPvamrFXjHmPpU6WxrZqH6WW//I37RwvqPQhPz8I3RPuXAk1C94ZprQWm9iGM/KgiGDO6SV9sjp+Jmk4TBajMNJ5zzWZ1k1jrteQQBp9C2dOvmbIeeEME8y573Q8TgGe+ZCzutM45gYLBzYm2LNvgq2kebAbMpHRDSyh6dQ27GbsAAdCqQVVXWC1C+zpwBM2Lr4eqtobmmu1vJEDlIQR1iN8CUWpztq50z7FFQBn3SKViX6wSqzVQCoYvAjByjeSa+h1PRnYWvBinTDB9cHt4eqDsPS4jcD3FwXJKT0RQsl8EvslI2SFaz2OtmYLFV8FwgvWroZ3fKmh7btewX9tfL2upXsrsqpLJzpzNGyNlnuZyetg7DIOxQTMBR7dqlrTlZ6FWi1g4j1NSjA2j1Yd7fzTH6k9LxCyUCneAKYCU581bnvKih6KJTeTeCX4Zhme/QIz7w2o+AdSgtLAkdrLS9nfweYEqrMLsrGGSWXtgWamAWp6+x6GM/Z8jNw3BqPNQ39hrzYLECn3tPvh/LqKbRSCiDGauDKBBj/kGbpnM1Bb/my8hv4NWStclkwjfl57y4oNDgw1JAG9VOti3QVVoSziMEsSdfEjaCPIDb7SgpLXykQsM+nbqbt97I0mIlzWv0uqFobLMAq8Rd9pszUBKxFhBPwOjf//gVOz2r7URJ2OnpviCXv9iz3a4X/YLBYbXoYwxBv/Kq0a5s4utQHzoTerJ7PmFW/no/ZAsid/hRIV82tD+Qabh5F1ssIM8Ri3chu0PuPD3sSJRMjDoxLAbwUbroiPAz/V52e8s3DIixxlO7OrvhMj3qfzA0kKxzwicr5wJmZwJxTXgrwYsqhRvpgC2Nfdyd+TYYxJSZgk+gk2g9KyHSlwQVAyPtWWgvVGyVBqsU2LpDlLNosSAtolC1uBKt5pQZLhAxTjeGCWIC/HVpagc5rRwkgpCHKEsjA8d+scp8aiMewwQBhp5dYTV5t/Nvl+HbDMu8F3S0psPyZb1bSnqlHPFUnMQeQqSqwDBT23fJO9gO3aVaa1icrXU0PKwlMM5K+iL3ATcVq2fFWKk0irCTF4LDVDG4gUpkyplq6efcZS+WDR1woApjD18x+2JQR9oOXzuA7uy4b+/91WsJd/tSd1QcAH8PVPXApieA37B7YXPhDPH1azP3PKR+HfHmOoDYLeuKsIi/ssSsdYs62qJo14Hw1P2N/6zpr8F3FTWmJ4ysAVcl84Iv/tl///Z8FaAWbBQbyMNDZjrZ2JwdRjtd1jOeNumSodFtr4/Zf45iRJf/8HSW+KIB/+GlKu8Rv1BPLr/4duoL+kFPRqrstEr41gfJupoJRf4hcYDWX93FOcfEBiIivxtjtV8g7mvOReiamYWKE7vfPbv3v2L9Kwq3cIDFGLyhyfOGuf/9vA5muH6Pjg7B4SUj2ydDXra9fSBI+DrsNHA6l51wfHssJb+11TfNk7B8OleUe3Y+ZmHboMFHdv7FFP2cfISFyeAQR0sk/Xv62HBTdW4HmnGSLFk/cqyWVVFJkdIIa+4hos3JRHcqLoRKM5h2Qtk1RZtzISMtlXTfTqIc77YsCCgQD0r61jtxskCctwJOtjE/pL8wC4LBD4AZFjh2wzzFCrT/PNqW0/DeBbkfMfzVm9yy06WiF+1mTdNNEAytVtohBKg3brWd2VQa+aF+cQ0mW5CvbwOlWCT07liX226PjiVLwFCRs/Ax2/u+ZNPjrNFIWIPf5GjHyUKp60OeXe9F01f7IaPf/SDTvyDAf7LSWWejtiZcsqtWZjrdn6A2MqBwnSeKhrZOlUMmgMionmiCIvXqKZfmhGZ1MwD3uMF4n9KJcfWLA3cL5pq48tm5NDYNh3SS/TKUtmFSlQR89MR4+kxcqJgpGbhm9gXneDELkyqAN5nitmIzTscKeJRXqd64RiaOALR2d295NWwbjHRNG2AU5oR9OS2oJg/5CY6BFPc1JvD2Mxdhp2/MZdI8dLePxiP4KRIp8VXmqfg+jqd/RNG7GNuq1U2SiI4735Bdc0MVFx6mH5UOWEa5HuhYykd6t4M1gYLVS8m1B+9bUqi5DziQq7qT8d94cxB6AB4WqMCOF/zPPtRSZUUaMSsvHOWxGASufywTX8ogy6HgUf9p+Z30wUEosl8qgmwm6o2AV6nO9HKQjRHpN6SUegI5pvR61RLnUJ1lqCtmfcsRQutEizVpAaPXN7xMp5UQ5OSZK6tniCK9CpyMd7LjR6+MxfoMEDPpWdf2p2m5N3KO4QMxf+V7vGdYjemQczQ+m2MGIkFNYDMf0Yop2eSx81sP36WHUczqEhKysp2iJSYAvfgJjinKwToPvRKb+HBi+7cJ96S5ngfLOXaHAFRLkulo4TnXTFO51gX0TCCo4ZUHdbpdgkMEwUZAPjh6M+hA8DzycbtxAgH3uD6i0nN1aTiIuQ4BYCE9dEHHwAmINU+4YEWx4EC3OZwFGfYZMPLScVlb+BAAJeARUh+gdWA3/gRqCrf1jecgqeFf1MdzrrP4SVlGm5mMihSP+zYYksAB7O+SBPwNQqSNMiLnkviY/klwgcRmvqtCqeWeA0gjuir4CMZqmw/ntP6M+l0pdN8/P9xI53aP7x/zavJbbKOz8VzO/nXxIr1tjparMnqd6iWdByHKw4lF4p/u57Yv07WeZPDnRl7wgmDVZZ44fQsjdYO/gmXQ+940PRGst8UMQApFC4OOV22e4N+lVOPyFLAOj4t8R3PFw/FjbSWy0ELuAFReNkee8ORcBOT2NPDcs7OfpUmzvn/F9Czk9o9naMyVYy/j8I5qVFmQDFcptBp65J/+sJA3w/j6y/eqUkKxTsf0CZjtNdRSBEmJ2tmfgmJbqpcsSagk+Ul9qdyV+NnqFBIJZFCB1XwPvWGDBOjVUmpWGHsWA5uDuMgLUNKZ4vlq5qfzY1LnRhCc/mh5/EX+hzuGdDy5aYYx4BAdwTTeZHcZpl3X0YyuxZFWNE6wFNppYs3LcFJePOyfKZ8KYb7dmRyvDOcORLPH0sytC6mH1US3JVj6paYM1GEr+CUmyHRnabHPqLlh6Kl0/BWd3ebziDfvpRQpPoR7N+LkUeYWtQ6Rn5v5+NtNeBPs2+DKDlzEVR5aYbTVPrZekJsZ9UC9qtVcP99thVIt1GREnN8zXP8mBfzS+wKYym8fcW6KqrE702Zco+hFQAEIR7qimo7dd7wO8B7R+QZPTuCWm1UAwblDTyURSbd85P4Pz+wBpQyGPeEpsEvxxIZkKsyfSOUcfE3UqzMFwZKYijb7sOkzpou+tC4bPXey5GI1GUAg9c3vLwIwAhcdPHRsYvpAfzkZHWY20vWxxJO0lvKfj6sG2g/pJ1vd/X2EBZkyEjLN4nUZOpOO7MewyHCrxQK8d5aF7rCeQlFX+XksK6l6z971BPuJqwdjj68ULOj9ZTDdOLopMdOLL0PFSS792SXE/EC9EDnIXZGYhr52aQb+9b2zEdBSnpkxAdBUkwJDqGCpZk/HkRidjdp0zKv/Cm52EenmfeKX6HkLUJgMbTTxxIZkIeL/6xuAaAAHbA7mONVduTHNX/UJj1nJEaI7f3HlUyiqKn7VfBE+bdb4HWln1HPJx001Ulq1tOxFf8WZEARvq5Da1+pE7fPVxLntGACz3nkoLsKcPdUqdCwwiyWkmXTd5+bv3j7HaReRt3ESn783Ew3SWsvkEjKtbocNksbrLmV+GVZn1+Uneo35MT1/4r8fngQX5/ptORfgmWfF6KSB/ssJmUSijXxQqUpzkANEkSkYgYj560OOjJr6uqckFuO15TRNgABEwNDjus1V3q2huLPYERMCLXUNmJJpbMrUQsSO7Qnxta55TvPWL6gWmMOvFknqETzqzFVO8SVkovEdYatypLGmDy9VWfgAc0KyIChiOhbd7UlbAeVLPZyEDp4POXKBwN/KP5pT6Cyqs6yaI00vXMn1ubk9OWT9Q/O2t/C25qlnO/zO0xcBzpMBCAB8vsdsh3U8fnPX1XlPEWfaYJxKVaTUgfCESWl4CCkIyjE6iQ5JFcwU6S4/IH0/Agacp8d5Gzq2+GzPnJ7+sqk40mfFQpKrDbAKwLlr3ONEati2k/ycLMSUu7V/7BBkDlNyXoN9tvqXCbbMc4SSQXgC/DBUY9QjtrCtQ+susEomCq8xcNJNNMWCH31GtlTw2BdCXkJBjT+/QNWlBWwQ5SWCh1LdQ99QVii/DyTxjSR6rmdap3l3L3aiplQpPYlrzNm9er88fXd2+ao+YdUNjtqmxiVxmyYPzJxl67OokDcTezEGqldkGgPbRdXA+fGcuZVkembZByo7J1dMnkGNjwwCny+FNcVcWvWYL9mg8oF7jACVWI3bA64EXpdM8bSIEVIAs5JJH+LHXgnCsgcMGPZyAAVBncvbLiexzg9YozcytjPXVlAbQAC7Tc4S0C8QN4LlAGjj4pQAVWrwkaDoUYGxxvkCWKRRHkdzJB5zpREleBDL1oDKEvAqmkDibVC4kTqF89YO6laUjgtJPebBfzr16tg4t10GmN1sJ5vezk2sUOq8blCn5mPZyT3ltaDcddKupQjqusNM9wtFVD0ABzv17fZDn7GPT1nkCtdcgYejcK1qOcTGtPxnCX1rErEjVWCnEJv5HaOAUjgpiKQjUKkQi64D5g2COgwas8FcgIl0Pw95H9dWxE3QG0VbMNffh6BPlAojLDf4es2/5Xfq7hw5NGcON2g8Qsy2UQm94KddKyy3kdJxWgpNaEc15xcylbLC3vnT26u8qS90qc2MU8LdOJc5VPF5KnSpXIhnj1eJJ/jszjZ01oR6JDFJRoeTPO/wh4IPFbdG9KljuSzeuI92p8JF/bpgDE8wG86/W2EBKgPrmzdLijxssQn8mM44ky/KLGOJcrSwXIpZa/Z3v7W6HCRk7ewds99LTsUW1LbeJytw8Q/BFZVZyfO9BUHOCe2suuEkO8DU4fLX0IQSQ2TdOkKXDtPf3sNV9tYhYFueuPRhfQlEEy+aYM/MCz7diDNmFSswYYlZZPmKr2Q5AxLsSVEqqBtn6hVl1BCFOFExnqnIsmyY/NA8jXnDaNzr7Zv3hu+I1Mf/PJjk0gALN2G8ABzdf9FNvWHvZHhv6xIoDCXf964MxG92vGZtx/LYU5PeZqgly8tT5tGeQGeJzMMsJc5p+a5Rn2PtEhiRzo/5Owjy1n0Lzx3ev8GHQmeWb8vagG6O5Qk5nrZuQTiKODI4UqL0LLAusS2Ve7j1Ivdxquu1BR9Rc4QkOiUPwQXJv6du2E8i5pDhVoQpUhyMWGUT2O2YODIhjAfI71gxep5r5zAY7GBUZpy51hAw0pcCCrhOmU8Wp6ujQTdZQsCjtq6SHX8QAMNiPCIIkoxhHEZPgsBcOlP4aErJZPhF7qvx6gHrn8hEwPwYbx8YmT/n7lbcmTip1v8kgsrIjFTAlvLY4Nuil0KDmgz3svYs0ZJ3O3Is/vSx4xpxF1e2VAtZE8dJxGYEIhCSuPvCjP54l/NSNDnwlKvAW8mG+AQkgp7a87Igh26uKMFGD0PoPHTSvoWxiHuk+su8XkQiHIjeYKl/RdcOHpxhQH3zHCNE3aARm83Bl6zGxU/vMltlVPQhubcqhW4RYkl6uXk5JdP/QpzaKFpw2M8zvysv2qj7xaQECuu2akM0Cssj/uB9+wDR7uA6XOnLNaoczalHoMj33eiiu+DRaFsUmlmUZuh9bjDY4INMNSSAivSh03uJvny4Gj+D+neudoa7iJi7c4VFlZ/J5gUR82308zSNAt/ZroBXDWw0fV3eVPAn3aX0mtJabF6RsUZmL+Ehn+wn51/4QipMjD+6y64t7bjL6bjENan2prQ4h7++hBJ9NXvX8CUocJqMC937IasLzm5K0qwXeFMAimMHkEIQIQI2LrQ9sLBfXuyp66zWvlsh74GPv7Xpabj993pRNNDuFud5oIcn/92isbADXdpRPbjmbCNOrwRbxGZx2XmYNGMiV5kjF4IKyxCBvKier9U4uVoheCdmk83rp5G0PihAm2fAtczI4b9BWqX+nrZTrJX5kSwQddi93NQrXG+Cl3eBGNkM77VBsMpEolhXex1MVvMkZN9fG59GGbciH11FEXaY1MxrArovaSjE/lUUqBg2cZBNmiWbvzCHCPJ4RVGFK2dTbObM1m+gJyEX53fa7u3+TZpm74mNEzWbkVL4vjNwfL9uzRCu1cgbrNx5Yv5dDruNrIOgwIk+UZWwJfdbu/WHul6PMmRflVCIzd7B37Pgm/Up/NuCiQW7RXyafevN3AL6ycciCc4ZPlTRzEu+aURGlUBOJbUEsheX7PPyrrhdUt5JAG12EEEZpY/N3Vhbl5uLAfT0CbC2XmpnryFkxZmBTs5prvEeuf0bn73i3O82WTiQtJWEPLsBXnQmdnKhB06NbbhLtlTZYJMxDMJpFeajSNRDB2v61BMUHqXggUwRJ19m6p5zl51v11q34T74lTXdJURuV6+bg2D6qpfGnLy7KGLuLZngobM4pIouz4+n0/UzFKxDgLM4h+fUwKZozQ9UGrHjcif51Ruonz7oIVZ56xWtZS8z7u5zay6J2LD4gCYh2RXoBRLDKsUlZ80R8kmoxlJiL8aZCy2wCAonnucFxCLT1HKoMhbPKt34D97EXPPh0joO93iJVF1Uruew61Qoy3ZUVNX9uIJDt9AQWKLLo+mSzmTibyLHq0D6hhzpvgUgI6ekyVEL3FD+Fi5R3A8MRHPXspN1VyKkfRlC+OGiNgPC4NREZpFETgVmdXrQ2TxChuS3aY+Ndc7CiYv5+CmzfiqeZrWIQJW/C4RvjbGUoJFf1K6ZdR2xL/bG4kVq1+I4jQWX+26YUijpp+lpN7o5c6ZodXJCF56UkFGsqz44sIg8jrdWvbjRCxi2Bk0iyM3a7ecAV93zB6h1Ei38c0s6+8nrbkopArccGP8vntQe1bFeEh2nJIFOHX/k3/UHb5PtKGpnzbkmnRETMX+9X/QduLZWw/feklW/kH/JnzToJe9Kgu9Hct1UGbH5BPCLo4OOtQnZonW0xnyCcdtKyPQ/sbLiSTYJdSx4sJqWLMnfn6fIqPB3WAgk00J+fCOkomPHqtS67pf0mFmKoItYZUlJu6BihSZ8qve8+/X+LX1MhQXF95AshfUleCtmdn6l6QFXzLg2sgLn1oyVFuZecv7fzsIHzoRlAGp0gwYDOn1S4qabWvB5xUaE+Svw4KmjWtxdnuQbI32dw87D4N95u8qQRJTSQg0wLxOLkxSrPMLEn1UIhNKjAa9VLs3WLaXGrtCIt8bKY2AQP/ZdyRU6zT/E8qP2ltyBE2CCZPgWgEYDoJJO4n92y61ylNaSFXKohJhLjkfvYWm592539sIpmBNLlDo1bExFBfmHJJ0lFEiC/fj8v42OoMC9Mo3whIoWvyHfq6Uacqq55mzFf/EGC+NP/gHjhd6urc6R0hES27VXux7UY8CGKPohplWIZtTrFSaPWslCWy78E22Pw8fvReSUZx/txqLtHrFqg1DY/Eus6Iq1heZdrdcqE0/c971Bz1HW/XNXHsXpUIbI4kHdOfCc6T5zHZzvzQJB0ggMFL6IGPAilU9bj/ASdPk6fNvNtZqPuwEDhMBtBnhCexo6D6VAGIOPvJPPV523Y8R8a9vCqZbswSZKzOT1291BsUbmUWehtbb1fdRX9hiJKXvwr1QX6GjnZMgyMvnwOo2Dr24amr7FqEAbVeJAjRNOceM2EQ1Mna9fInqPJ5mh5X8CzT1aDOv08An0blz0fF5Gq4mS2cwq5glwIOlY5nznE8X4j/UdZ3FJsVIXte1JH0A7iibuPfazStM5O/Vo3KXIpXBeGORV0M9XDXFvsYZUHGvFCUubWzTw248EHE0cpQM2zNg6rjavreq3NHCAWsoZ7wvVy7l5gvtKRmIj1MnvfWEm0yFnGcuOq192350a5WefpfKCcX3Sn+AgHU+qnpstNtddbdVebagJU390lq9ko4aI9rqdaWXYG8tv5O/ZQHSqDRYHC6zfH10l5z++opso7aOSaIczlQ13iAzXvLdEu0V7kwNUZ1c8Y8aq7SeIEe5p902FlNkW8DnwHyueHchbK8vVFJfmr9mz7P8nUSccl1ULaoWMRSI1ls32kvlK0h46h3J25Yd9AzfcJbp9qYF/SEt3H5j69mMdcsNxZcAzT/A89ov3tglTX54y/EwjMfuoDoxPwLJDm5I7q6F9Kp469yNy1zSxz0N4HbRRBj9xFFuogvBspv7DXUNIsGxTINEQfmctb42XImWAODgARNo7dfcTqFKq6aTfivmvunLmzP9f8yLsJvXD3JbcPcDGNriMAcjzeDTNr65t8YB5tsnFDFLa0Uwmd2OvUdkLMX9TsAUYUfooSv47sw5J88j7CpahRjjO3/UhOXjTS39W5YZAel2KTbQd1h7INOw9P23GW7GDAe4agIUFHP48MZr7ubq0efFmmtwYMyk7D0r1oeG/CGOODgb9Ur+JMHxkwzPbtCX2ZnENQuI0RN5SyTIZuoY4XS9Rd/tPe3vNAZGSHM/YYwqs9xkkENx0O+eC2YVW1cwOJ3ckE890nbQeHLKlW15L0P0W2VliyYrfNr0nrIYddoRyGaCtj4OYd2MT7ebApqZOAQIaSHJM4mphhfjNjtnjg6YRyx9qM2FT3xOiYIMqXPFWdzhSgFF8ItocqVV09CmIoO8k6U/oJB7++wSX/YksxfPXHyjSgAGZOj1aKEq9fSvXBqtp2wu8/FxEf5AxapAD06pPGuLVUYLdgEzHR8wqRGYEwiUO9MyYbgswstuLYhwYFpSVKOdzAihZ9LuHtD598EGhINU9xc9xhL+QgTLAstmPIvvm2xyRw/WTUPXkP3ZHu6GyPmj5xFH9/QGpkglKXRVUBgVmLOJx8uZO2AstxQYocZH2JhORlxawj66BAXUEs7K/gPxINIRAFyK3WLuyq9oBTF9wEbnmCot82WjIg7CPNwYK3KrZMrKAz5yFszg4wCVLJVnIL8+OYA0xRDH8cHQjQUiQ2i1mr/be32k/3Xej9sdf3iuGvZHyLFSJvPSqz/wltnxumTJYKZsrWXtx/Rmu39jjV9lFaJttfFn57/No2h/unsJmMHbrnZ8csxkp5HQ4xR1s0HH+t3Iz82a3iQWTUDGq/+l2W3TUYLE8zNdL8Y+5oXaIH/Y2UUcX67cXeN4WvENZjz4+8q7vjhowOI3rSjFhGZ6KzwmU7+5nFV+kGWAZ5z2UWvzq0TK0pk1hPwAN4jbw//1CApRvIaIjhSGhioY6TUmsToek9cF9XjJdHvLPcyyCV3lbR5Jiz/ts46ay2F820VjTXvllElwrGzKcNSyvQlWDXdwrUINXmHorAM3fE19ngLZmgeUaCJLsSITf2VcfAOuWwX7mTPdP8Zb/04KqRniufCpwnDUk7sP0RX6cud/sanFMagnzKInSRVey0YzlVSOtA/AjrofmSH6RYbJQ8b4NDeTkIGc6247+Mnbez/qhJ9GAv9fGNFercPnnrf285Qgs+UqThLRgflcAKFuqWhLzZaR4QqvSwa3xe0LPkqj9xJWub195r7NrrR0e78FR+0mRBNMPsraqZctAUVAJfYKehTDV1MGGQSeDsOK9J3sbUuKRIS/WilX/64CBms9jCZocBlsBSZaIAjWm/SUZ8daWL2a/cJFyUOFqE3Epc2RWbtjNyPwOGpWtzu32kUooUqsJud7IV4E8rstUBXM7tGEtBx99x60g1duhyvxeKJSl8s5E34HTMmADT0836aEdg5Dv9rVyCz8i2REOmiz6wtIVFN0HsjAoN37SrY0bV1Ms8CRUILhvZvvRaDzoVCaSI0u8EPuTe4b7OPowgRGODl22UBBmHSTUY8e4DyL+Bc7bngo+2T8HtNvzyATSL5iJZgFPKpmUyZv54vVL90+/RQGATUmNKnrIvcJMYON9fl83naW5sf6hRkbbTC9RUEE6XADwjgA46wWfUQ+QWZl0J4PVTWAln/YfAz/SV3q3J9+yCYDleruoN5uoc/wT2f4YONGTb6zTGq3V+3JqzmCOjwebKln+fExVLN7sqtqfMnsKVXWbb2Ai5m3D/fCTgX7oKYzTZvj+m28XnDqPbXuP4MyWdmPezcesdrh7rCzA7BWdObiuyDEKjjzBbQ0qnuwjliz+b+j7aPMKlkXyIznV3tGzAfYwIbzGGt098oh4eq3ruDjdgHtjxfFCjHrjjRbHajoz/YOY4raojPFQ910GIlBV7hq47UDgpyajBxQUmD8NctiLV1rTSLAEsQDLTeRKcmPBMVMFF0SPBBhZ5oXoxtD3lMhuAQXmA+57OcciczVW9e9zwSIAHS+FJmvfXMJGF1dMBsIUMaPjvgaVqUc3p32qVCMQYFEiRLzlVSOGMCmv/HJIxAHe3mL/XnoZ1IkWLeRZfgyByjnDbbeRK5KL7bYHSVJZ9UFq+yCiNKeRUaYjgbC3hVUvfJAhy/QNl/JqLKVvGMk9ZcfyGidNeo/VTxK9vUpodzfQI9Z2eAre4nmrkzgxKSnT5IJ1D69oHuUS5hp7pK9IAWuNrAOtOH0mAuwCrY8mXAtVXUeaNK3OXr6PRvmWg4VQqFSy+a1GZfFYgdsJELG8N0kvqmzvwZ02Plf5fH9QTy6br0oY/IDsEA+GBf9pEVWCIuBCjsup3LDSDqI+5+0IKSUFr7A96A2f0FbcU9fqljdqvsd8sG55KcKloHIFZem2Wb6pCLXybnVSB0sjCXzdS8IKvE");const pr=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),fr=4;function mr(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function gr(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let r=[];for(let n=0;n>24&255}function vr(e){return 16777215&e}const yr=new Map(sr(wr).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),xr=new Set(or(wr)),Ar=new Map,Cr=new Map;for(let[e,t]of ar(wr)){if(!xr.has(e)&&2==t.length){let[r,n]=t,i=Cr.get(r);i||(i=new Map,Cr.set(r,i)),i.set(n,e)}Ar.set(e,t.reverse())}const Er=44032,Ir=4352,_r=4449,Pr=4519,Or=28,Sr=21*Or,kr=Er+19*Sr,Mr=Ir+19,Tr=_r+21,Nr=Pr+Or;function jr(e){return e>=Er&&e=Ir&&e=_r&&tPr&&t0&&i(Pr+r)}else{let e=Ar.get(n);e?r.push(...e):i(n)}if(!r.length)break;n=r.pop()}if(n&&t.length>1){let e=br(t[0]);for(let r=1;r0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=s):r.push(s),i=e;else{let o=Rr(n,s);o>=0?n=o:0==i&&0==e?(t.push(n),n=s):(r.push(s),i=e)}}return n>=0&&t.push(n,...r),t}(Lr(e))}const Ur=65039,Dr=".",zr=1,Wr=45;function Fr(){return new Set(or(dr))}const Hr=new Map(ar(dr)),qr=Fr(),Vr=Fr(),Gr=new Set(or(dr).map((function(e){return this[e]}),[...Vr])),Kr=Fr(),Zr=(Fr(),sr(dr));function Qr(){return new Set([or(dr).map((e=>Zr[e])),or(dr)].flat(2))}const Yr=dr(),Jr=cr((e=>{let t=cr(dr).map((e=>e+96));if(t.length){let r=e>=Yr;t[0]-=32,t=gr(t),r&&(t=`Restricted[${t}]`);let n=Qr(),i=Qr(),o=[...n,...i].sort(((e,t)=>e-t));return{N:t,P:n,M:!dr(),R:r,V:new Set(o)}}})),Xr=Fr(),en=new Map;[...Xr,...Fr()].sort(((e,t)=>e-t)).map(((e,t,r)=>{let n=dr(),i=r[t]=n?r[t-n]:{V:[],M:new Map};i.V.push(e),Xr.has(e)||en.set(e,i)}));for(let{V:e,M:t}of new Set(en.values())){let r=[];for(let t of e){let e=Jr.filter((e=>e.V.has(t))),n=r.find((({G:t})=>e.some((e=>t.has(e)))));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),e.forEach((e=>n.G.add(e)))}let n=r.flatMap((({G:e})=>[...e]));for(let{G:e,V:i}of r){let r=new Set(n.filter((t=>!e.has(t))));for(let e of i)t.set(e,r)}}let tn=new Set,rn=new Set;for(let e of Jr)for(let t of e.V)(tn.has(t)?rn:tn).add(t);for(let e of tn)en.has(e)||rn.has(e)||en.set(e,zr);const nn=new Set([...tn,...Br(tn)]),on=or(dr),sn=function e(t){let r=cr((()=>{let t=or(dr).map((e=>on[e]));if(t.length)return e(t)})).sort(((e,t)=>t.Q.size-e.Q.size)),n=dr(),i=n%3;n=n/3|0;let o=1&n;return n>>=1,{B:r,V:i,F:o,S:1&n,C:2&n,Q:new Set(t)}}([]);class an extends Array{get is_emoji(){return!0}}function cn(e,t=mr){let r=[];var n;n=e[0],Vr.has(n)&&r.push("◌");let i=0,o=e.length;for(let n=0;n0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}function dn(e){return Kr.has(e)}function pn(e,t){let r=0;return e.split(Dr).map((e=>{let n,i=function(e){let t=[];for(let r=0,n=e.length;r1||i.is_emoji;if(!a&&i.every((e=>e<128)))n=i,hn(n),function(e){if(e.length>=4&&e[2]==Wr&&e[3]==Wr)throw new Error("invalid label extension")}(n),e="ASCII";else if(a&&(o.emoji=!0,i=r.flatMap((e=>e.is_emoji?[]:e))),n=r.flatMap((e=>!t&&e.is_emoji?e.filter((e=>e!=Ur)):e)),hn(n),i.length){if(Vr.has(n[0]))throw gn("leading combining mark");for(let e=1;ee.V.has(r)));if(!e.length)throw t===Jr?fn(r):mn(t[0],r);if(t=e,1==e.length)break}return t}(t);!function(e,t){let{V:r,M:n}=e;for(let n of t)if(!r.has(n))throw mn(e,n);if(n){let e=Br(t);for(let t=1,r=e.length;tfr)throw new Error(`non-spacing marks: too many ${un(cn(e.slice(t-1,n)))} (${n-t}/${fr})`);t=n}}}(o,i),function(e,t){let r,n=[];for(let e of t){let t=en.get(e);if(t===zr)return;if(t){let n=t.M.get(e);if(r=r?r.filter((e=>n.has(e))):[...n],!r.length)return}else n.push(e)}if(r)for(let t of r)if(n.every((e=>t.V.has(e))))throw new Error(`whole-script confusable: ${e.N}/${t.N}`)}(o,t),e=o.N}else e="Emoji"}o.type=e}catch(e){o.error=e}return o.output=n,o}))}function fn(e){return new Error(`disallowed character: ${ln(e)}`)}function mn(e,t){let r=ln(t),n=Jr.find((e=>e.P.has(t)));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function gn(e){return new Error(`illegal placement: ${e}`)}function wn(e,t){let r,n,i=sn,o=[],s=e.length;for(t&&(t.length=0);s;){let a=e[--s];if(i=i.B.find((e=>e.Q.has(a))),!i)break;if(i.S)n=a;else if(i.C&&a===n)break;o.push(a),i.F&&(o.push(Ur),s>0&&e[s-1]==Ur&&s--),i.V&&(r=bn(o,i),t&&t.push(...e.slice(s).reverse()),e.length=s)}return r}function bn(e,t){let r=an.from(e);return 2==t.V&&r.splice(1,1),r}function vn(e){return function(e){return(t=pn(e)).map((({input:e,error:r,output:n})=>{if(r){let n=r.message;throw new Error(1==t.length?n:`Invalid label ${un(cn(e))}: ${n}`)}return gr(n)})).join(Dr);var t}(e)}var yn=class extends Error{constructor({activeChain:e,targetChain:t}){super(`Chain mismatch: Expected "${t}", received "${e}".`),this.name="ChainMismatchError"}},xn=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured${t?` for connector "${t}"`:""}.`),this.name="ChainNotConfigured"}},An=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},Cn=class extends Error{constructor(){super(...arguments),this.name="ConfigChainsNotFound",this.message="No chains were found on the wagmi config. Some functions that require a chain may not work."}},En=class extends Error{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}},In=(e,{find:t,replace:r})=>e&&t(e)?r(e):"object"!=typeof e?e:Array.isArray(e)?e.map((e=>In(e,{find:t,replace:r}))):e instanceof Object?Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:In(i,{find:t,replace:r})})),{}):e;function _n(e){const t=JSON.parse(e);return In(t,{find:e=>"string"==typeof e&&e.startsWith("#bigint."),replace:e=>BigInt(e.replace("#bigint.",""))})}function Pn(e){return"number"==typeof e?e:"wei"===e?0:Math.abs(Qt.Bd[e])}function On(e,t){return e.slice(0,t).join(".")||"."}function Sn(e,t){const{length:r}=e;for(let n=0;n{const n="bigint"==typeof r?`#bigint.${r.toString()}`:r;return t?.(e,n)||n}),n),r??void 0)}var Mn={getItem:e=>"",setItem:(e,t)=>null,removeItem:e=>null};function Tn({deserialize:e=_n,key:t="wagmi",serialize:r=kn,storage:n}){return{...n,getItem:(r,i=null)=>{const o=n.getItem(`${t}.${r}`);try{return o?e(o):i}catch(e){return console.warn(e),i}},setItem:(e,i)=>{if(null===i)n.removeItem(`${t}.${e}`);else try{n.setItem(`${t}.${e}`,r(i))}catch(e){console.error(e)}},removeItem:e=>n.removeItem(`${t}.${e}`)}}var Nn,jn,Rn,Ln,Bn,$n="store";function Un(){if(!Bn)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return Bn}async function Dn({chainId:e,connector:t}){const r=Un(),n=r.connector;if(n&&t.id===n.id)throw new An;try{r.setState((e=>({...e,status:"connecting"})));const n=await t.connect({chainId:e});return r.setLastUsedConnector(t.id),r.setState((e=>({...e,connector:t,chains:t?.chains,data:n,status:"connected"}))),r.storage.setItem("connected",!0),{...n,connector:t}}catch(e){throw r.setState((e=>({...e,status:e.connector?"connected":"disconnected"}))),e}}async function zn(){const e=Un();e.connector&&await e.connector.disconnect(),e.clearState(),e.storage.removeItem("connected")}Nn=new WeakMap,jn=new WeakMap,Rn=new WeakSet,Ln=function(){const e=e=>{this.setState((t=>({...t,data:{...t.data,...e}})))},t=()=>{this.clearState()},r=e=>{this.setState((t=>({...t,error:e})))};this.store.subscribe((({connector:e})=>e),((n,i)=>{i?.off?.("change",e),i?.off?.("disconnect",t),i?.off?.("error",r),n&&(n.on?.("change",e),n.on?.("disconnect",t),n.on?.("error",r))}));const{publicClient:n,webSocketPublicClient:i}=this.args;("function"==typeof n||"function"==typeof i)&&this.store.subscribe((({data:e})=>e?.chain?.id),(e=>{this.setState((t=>({...t,publicClient:this.getPublicClient({chainId:e}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:e})})))}))};var Wn=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],Fn=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function Hn({chainId:e}={}){const t=Un();return e&&t.getPublicClient({chainId:e})||t.publicClient}async function qn({chainId:e}={}){const t=Un();return await(t.connector?.getWalletClient?.({chainId:e}))||null}async function Vn({address:e,account:t,chainId:r,abi:n,args:i,functionName:o,blockNumber:s,blockTag:a}){return Hn({chainId:r}).readContract({abi:n,address:e,account:t,functionName:o,args:i,blockNumber:s,blockTag:a})}async function Gn({contracts:e,blockNumber:t,blockTag:r,...n}){const{allowFailure:i=!0}=n;try{const n=Hn(),o=e.reduce(((e,t,r)=>{const i=t.chainId??n.chain.id;return{...e,[i]:[...e[i]||[],{contract:t,index:r}]}}),{}),s=()=>Object.entries(o).map((([e,n])=>async function({chainId:e,contracts:t,blockNumber:r,blockTag:n,...i}){const o=Hn({chainId:e});if(!o.chains)throw new Cn;if(e&&o.chain.id!==e)throw new xn({chainId:e});return o.multicall({allowFailure:i.allowFailure??!0,blockNumber:r,blockTag:n,contracts:t})}({allowFailure:i,chainId:parseInt(e),contracts:n.map((({contract:e})=>e)),blockNumber:t,blockTag:r}))),a=(await Promise.all(s())).flat(),c=Object.values(o).flatMap((e=>e.map((({index:e})=>e))));return a.reduce(((e,t,r)=>(e&&(e[c[r]]=t),e)),[])}catch(n){if(n instanceof Se.uq)throw n;const o=()=>e.map((e=>Vn({...e,blockNumber:t,blockTag:r})));return i?(await Promise.allSettled(o())).map((e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"})):await Promise.all(o())}}async function Kn({address:e,chainId:t,formatUnits:r,token:n}){const i=Un(),s=Hn({chainId:t});if(n){const i=async({abi:i})=>{const o={abi:i,address:n,chainId:t},[s,a,c]=await Gn({allowFailure:!1,contracts:[{...o,functionName:"balanceOf",args:[e]},{...o,functionName:"decimals"},{...o,functionName:"symbol"}]});return{decimals:a,formatted:(0,er.b)(s??"0",Pn(r??a)),symbol:c,value:s}};try{return await i({abi:Wn})}catch(e){if(e instanceof Se.uq){const{symbol:e,...t}=await i({abi:Fn});return{symbol:(0,o.rR)((0,Me.f)(e,{dir:"right"})),...t}}throw e}}const a=[...i.publicClient.chains||[],...i.chains??[]],c=await s.getBalance({address:e}),l=a.find((e=>e.id===s.chain.id));return{decimals:l?.nativeCurrency.decimals??18,formatted:(0,er.b)(c??"0",Pn(r??18)),symbol:l?.nativeCurrency.symbol??"ETH",value:c}}function Zn(){const{data:e,connector:t,status:r}=Un();switch(r){case"connected":return{address:e?.account,connector:t,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:r};case"reconnecting":return{address:e?.account,connector:t,isConnected:!!e?.account,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:r};case"connecting":return{address:e?.account,connector:t,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:r};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:r}}}function Qn(){const e=Un(),t=e.data?.chain?.id,r=e.chains??[],n=[...e.publicClient?.chains||[],...r].find((e=>e.id===t))??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:t?{...n,...e.data?.chain,id:t}:void 0,chains:r}}async function Yn({domain:e,message:t,primaryType:r,types:n}){const i=await qn();if(!i)throw new I;const{chainId:o}=e;return o&&ni({chainId:o}),i.signTypedData({message:t,primaryType:r,types:n,domain:e})}async function Jn({chainId:e}){const{connector:t}=Un();if(!t)throw new I;if(!t.switchChain)throw new En({connector:t});return t.switchChain(e)}function Xn(e,{selector:t=(e=>e)}={}){return Un().subscribe((({data:e,connector:r,status:n})=>t({address:e?.account,connector:r,status:n})),(()=>e(Zn())),{equalityFn:tr})}function ei(e,{selector:t=(e=>e)}={}){const r=Un().subscribe((({data:e,chains:r})=>t({chainId:e?.chain?.id,chains:r})),(()=>e(Qn())),{equalityFn:tr});return r}async function ti({name:e,chainId:t}){const r=Hn({chainId:t});return await r.getEnsAvatar({name:vn(e)})}async function ri({address:e,chainId:t}){return Hn({chainId:t}).getEnsName({address:(0,P.K)(e)})}function ni({chainId:e}){const{chain:t,chains:r}=Qn(),n=t?.id;if(n&&e!==n)throw new yn({activeChain:r.find((e=>e.id===n))?.name??`Chain ${n}`,targetChain:r.find((t=>t.id===e))?.name??`Chain ${e}`})}var ii,oi,si,ai,ci,li,ui,hi,di,pi,fi,mi,gi,wi,bi,vi,yi,xi,Ai,Ci,Ei="eip155",Ii="requestedChains",_i="wallet_addEthereumChain",Pi=class extends C{constructor(e){super({...e,options:{isNewChainsStale:!0,...e.options}}),y(this,si),y(this,ci),y(this,ui),y(this,di),y(this,fi),y(this,gi),y(this,bi),y(this,yi),y(this,Ai),w(this,"id","walletConnect"),w(this,"name","WalletConnect"),w(this,"ready",!0),y(this,ii,void 0),y(this,oi,void 0),w(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,P.K)(e[0])})})),w(this,"onChainChanged",(e=>{const t=Number(e),r=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:r}})})),w(this,"onDisconnect",(()=>{A(this,gi,wi).call(this,[]),this.emit("disconnect")})),w(this,"onDisplayUri",(e=>{this.emit("message",{type:"display_uri",data:e})})),w(this,"onConnect",(()=>{this.emit("connect",{})})),A(this,si,ai).call(this)}async connect({chainId:e,pairingTopic:t}={}){try{let r=e;if(!r){const e=this.storage?.getItem("store"),t=e?.state?.data?.chain?.id;r=t&&!this.isChainUnsupported(t)?t:this.chains[0]?.id}if(!r)throw new Error("No chains found on connector.");const n=await this.getProvider();A(this,di,pi).call(this);const i=A(this,ui,hi).call(this);if(n.session&&i&&await n.disconnect(),!n.session||i){const e=this.chains.filter((e=>e.id!==r)).map((e=>e.id));this.emit("message",{type:"connecting"}),await n.connect({pairingTopic:t,chains:[r],optionalChains:e}),A(this,gi,wi).call(this,this.chains.map((({id:e})=>e)))}const o=await n.enable(),s=(0,P.K)(o[0]),a=await this.getChainId();return{account:s,chain:{id:a,unsupported:this.isChainUnsupported(a)}}}catch(e){if(/user rejected/i.test(e?.message))throw new O.ab(e);throw e}}async disconnect(){const e=await this.getProvider();try{await e.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{A(this,fi,mi).call(this),A(this,gi,wi).call(this,[])}}async getAccount(){const{accounts:e}=await this.getProvider();return(0,P.K)(e[0])}async getChainId(){const{chainId:e}=await this.getProvider();return e}async getProvider({chainId:e}={}){return v(this,ii)||await A(this,si,ai).call(this),e&&await this.switchChain(e),v(this,ii)}async getWalletClient({chainId:e}={}){const[t,r]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),n=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return fe({account:r,chain:n,transport:xe(t)})}async isAuthorized(){try{const[e,t]=await Promise.all([this.getAccount(),this.getProvider()]),r=A(this,ui,hi).call(this);if(!e)return!1;if(r&&t.session){try{await t.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){const t=this.chains.find((t=>t.id===e));if(!t)throw new O.x3(new Error("chain not found on connector."));try{const r=await this.getProvider(),n=A(this,yi,xi).call(this),i=A(this,Ai,Ci).call(this);if(!n.includes(e)&&i.includes(_i)){await r.request({method:_i,params:[{chainId:(0,s.eC)(t.id),blockExplorerUrls:[t.blockExplorers?.default?.url],chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:[...t.rpcUrls.default.http]}]});const n=A(this,bi,vi).call(this);n.push(e),A(this,gi,wi).call(this,n)}return await r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,s.eC)(e)}]}),t}catch(e){if(/user rejected request/i.test("string"==typeof e?e:e?.message))throw new O.ab(e);throw new O.x3(e)}}};ii=new WeakMap,oi=new WeakMap,si=new WeakSet,ai=async function(){return v(this,oi)||"undefined"==typeof window||x(this,oi,A(this,ci,li).call(this)),v(this,oi)},ci=new WeakSet,li=async function(){const{default:e,OPTIONAL_EVENTS:t,OPTIONAL_METHODS:n}=await Promise.resolve().then(r.bind(r,9328)),[i,...o]=this.chains.map((({id:e})=>e));if(i){const{projectId:r,showQrModal:s=!0,qrModalOptions:a,metadata:c}=this.options;x(this,ii,await e.init({showQrModal:s,qrModalOptions:a,projectId:r,optionalMethods:n,optionalEvents:t,chains:[i],optionalChains:o,rpcMap:Object.fromEntries(this.chains.map((e=>[e.id,e.rpcUrls.default.http[0]]))),metadata:c}))}},ui=new WeakSet,hi=function(){if(A(this,Ai,Ci).call(this).includes(_i))return!1;if(!this.options.isNewChainsStale)return!1;const e=A(this,bi,vi).call(this),t=this.chains.map((({id:e})=>e)),r=A(this,yi,xi).call(this);return!(r.length&&!r.some((e=>t.includes(e)))||t.every((t=>e.includes(t))))},di=new WeakSet,pi=function(){v(this,ii)&&(A(this,fi,mi).call(this),v(this,ii).on("accountsChanged",this.onAccountsChanged),v(this,ii).on("chainChanged",this.onChainChanged),v(this,ii).on("disconnect",this.onDisconnect),v(this,ii).on("session_delete",this.onDisconnect),v(this,ii).on("display_uri",this.onDisplayUri),v(this,ii).on("connect",this.onConnect))},fi=new WeakSet,mi=function(){v(this,ii)&&(v(this,ii).removeListener("accountsChanged",this.onAccountsChanged),v(this,ii).removeListener("chainChanged",this.onChainChanged),v(this,ii).removeListener("disconnect",this.onDisconnect),v(this,ii).removeListener("session_delete",this.onDisconnect),v(this,ii).removeListener("display_uri",this.onDisplayUri),v(this,ii).removeListener("connect",this.onConnect))},gi=new WeakSet,wi=function(e){this.storage?.setItem(Ii,e)},bi=new WeakSet,vi=function(){return this.storage?.getItem(Ii)??[]},yi=new WeakSet,xi=function(){if(!v(this,ii))return[];const e=v(this,ii).session?.namespaces[Ei]?.chains?.map((e=>parseInt(e.split(":")[1]||"")));return e??[]},Ai=new WeakSet,Ci=function(){if(!v(this,ii))return[];const e=v(this,ii).session?.namespaces[Ei]?.methods;return e??[]};class Oi{constructor(e,t){this.wagmi={},this.chains=[],this.namespace="eip155",this.disconnect=zn,this.getAccount=Zn,this.watchAccount=Xn,this.fetchBalance=Kn,this.getNetwork=Qn,this.watchNetwork=ei,this.switchNetwork=Jn,this.fetchEnsName=ri,this.fetchEnsAvatar=ti,this.wagmi=e,this.chains=t}getWalletConnectConnector(){const e=this.wagmi.connectors.find((e=>"walletConnect"===e.id));if(!e)throw new Error("WalletConnectConnector is required");return e}async connectWalletConnectProvider(e,t){return await e.getProvider(),new Promise((r=>{e.once("message",(e=>{"display_uri"===e.type&&(t(e.data),r())}))}))}getConnectorById(e){const t=this.wagmi.connectors.find((t=>t.id===e));if(!t)throw new Error(`Connector for id ${e} was not found`);return t}getConnectors(){return this.wagmi.connectors.filter((e=>!e.id.includes("walletConnect")))}async connectWalletConnect(e,t){const r=this.getWalletConnectConnector(),n={connector:r};return t&&(n.chainId=t),Promise.all([Dn(n),this.connectWalletConnectProvider(r,e)])}async connectConnector(e,t){const r={connector:this.getConnectorById(e)};return t&&(r.chainId=t),await Dn(r)}isInjectedProviderInstalled(){return typeof window.ethereum<"u"}safeCheckInjectedProvider(e){var t;try{const r=String(e);return Boolean(null==(t=window.ethereum)?void 0:t[r])}catch(e){return console.error(e),!1}}async getConnectedChainIds(){var e,t,r;const n=null==(t=null==(e=(await this.getWalletConnectConnector().getProvider()).signer)?void 0:e.session)?void 0:t.namespaces,i=null==(r=n?.[this.namespace])?void 0:r.methods;if(null!=i&&i.includes("wallet_addEthereumChain"))return"ALL";if(n){const e=[];return Object.keys(n).forEach((t=>{t.includes(this.namespace)&&e.push(...n[t].accounts)})),e?.map((e=>e.split(":")[1]))}return"ALL"}}function Si({projectId:e}){return function({rpc:e}){return function(t){const r=e(t);return r&&""!==r.http?{chain:{...t,rpcUrls:{...t.rpcUrls,default:{http:[r.http]}}},rpcUrls:{http:[r.http],webSocket:r.webSocket?[r.webSocket]:void 0}}:null}}({rpc:t=>{var r;return[1,3,4,5,10,42,56,69,97,100,137,280,324,420,42161,42220,43114,80001,421611,421613,1313161554,1313161555].includes(t.id)?{http:`https://rpc.walletconnect.com/v1/?chainId=eip155:${t.id}&projectId=${e}`}:{http:t.rpcUrls.default.http[0],webSocket:null==(r=t.rpcUrls.default.webSocket)?void 0:r[0]}}})}function ki({chains:e,projectId:t}){return[new Pi({chains:e,options:{projectId:t,showQrModal:!1}}),new Ce({chains:e,options:{shimDisconnect:!0}})]}var Mi=r(1475);class Ti{constructor(e,t){this.openModal=Mi.jb.open,this.closeModal=Mi.jb.close,this.subscribeModal=Mi.jb.subscribe,this.setTheme=Mi.ThemeCtrl.setThemeConfig,this.setDefaultChain=Mi.OptionsCtrl.setSelectedChain,this.subscribeEvents=Mi.uA.subscribe,Mi.ThemeCtrl.setThemeConfig(e),Mi.Id.setEthereumClient(t),Mi.ConfigCtrl.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(r.bind(r,8416));const e=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",e),Mi.OptionsCtrl.setIsUiLoaded(!0)}}}const Ni=[{safeNetworkIdentifier:"mainnet",chain:{id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}},{safeNetworkIdentifier:"goerli",chain:{id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}},{safeNetworkIdentifier:"arbitrum",chain:{id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}},{chain:{id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io/"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}},{safeNetworkIdentifier:"optimism",chain:{id:10,name:"Optimism",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}}},{chain:{id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0}},{chain:{id:324,name:"zkSync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]},public:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://explorer.zksync.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}}}},{chain:{id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}},{chain:{id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}}}}],ji={selectedAccount:null,signedByAccount:null,messageSignature:null,paymentDetails:null,signatureRequested:!1,transactionRequested:!1,transactionHashSubmitted:!1,lastOrderStatus:"",elements:{divPrepare:document.getElementById("prepare"),divError:document.getElementById("message-error"),divSuccess:document.getElementById("success"),divTransactionHash:document.getElementById("pretix-eth-transaction-hash"),aOrderDetailURL:document.getElementById("pretix-order-detail-url"),aNetworkData:document.getElementById("pretix-data-chain-info"),buttonConnect:document.getElementById("btn-connect"),submittedTransactionHash:document.getElementById("pretix-eth-submitted-transaction-hash"),paymentNetworkName:document.getElementById("payment-network-id")},selectors:{paymentSteps:document.querySelectorAll(".pretix-eth-payment-steps")},chains:[],web3Modal:null};function Ri(){return ji.elements.buttonConnect.getAttribute("data-transaction-details-url")}async function Li(e=!1){if(!e&&null!==ji.paymentDetails)return ji.paymentDetails;const t=await(Zn()?.address),r=Ri(),n=await fetch(r+"?"+new URLSearchParams({sender_address:t}));if(n.status>=400)throw"Failed to fetch order details. If this problem persists, please contact the organizer directly.";return await n.json()}function Bi(e){e+="=";const t=decodeURIComponent(document.cookie).split(";");for(let r=0;r{const e=`https://safe-transaction-${ji.safeNetworkIdentifier}.safe.global/api/v1/safes/${ji.selectedAccount}`;return(await fetch(e)).ok};if(!await t())return $i("This version of the crypto payment plugin only supports Safe wallet (on supported networks) and EOA wallets. Please connect another wallet."),void(ji.signatureRequested=!1);const r=await Yn(e),n=new URL(window.location.origin+window.__validateSignatureUrl);n.searchParams.append("signature",r),n.searchParams.append("sender",ji.selectedAccount);const i=Bi("pretix_csrftoken"),o=await fetch(n.href,{headers:{"Content-Type":"application/x-www-form-urlencoded","X-CSRF-TOKEN":i,"HTTP-X-CSRFTOKEN":i},method:"GET"});if(ji.messageSignature=r,ji.signedByAccount=ji.selectedAccount,!o.ok)return $i("EIP1271 error: unable to verify signature; your wallet may not be supported."),void(ji.signatureRequested=!1);await Wi()}else{const t=await Yn(e);ji.messageSignature=t,ji.signedByAccount=ji.selectedAccount,await Wi()}}}()}catch(e){$i(e),ji.signatureRequested=!1}}();else $i("Please wait for other payments from your wallet to be confirmed before submitting another transaction.");else $i("It seems that you have paid for this order already.")}()}catch(e){$i(e,!0)}}async function Wi(){try{await async function(){if(!0!==ji.transactionRequested)if(ji.transactionRequested=!0,ji.paymentDetails=await Li(),null!==ji.paymentDetails.erc20_contract_address){const e=ji.paymentDetails.erc20_contract_address,t=await Vn({abi:Wn,address:e,functionName:"balanceOf",args:[ji.selectedAccount]});if(BigInt(t)"name"in e&&e.name===i)),chainId:n},result:v}}(i);r=o.request}return{hash:await t.writeContract({...r,chain:null})}}({abi:Wn,address:e,functionName:"transfer",args:[ji.paymentDetails.recipient_address,ji.paymentDetails.amount]});await Fi(t)}catch(e){$i(e)}}else{Ui("send-transaction");try{const{hash:e}=await async function({accessList:e,account:t,chainId:r,data:n,gas:i,gasPrice:o,maxFeePerGas:s,maxPriorityFeePerGas:a,mode:c,nonce:l,to:u,value:h}){const d=await qn({chainId:r});if(!d)throw new I;let p;return r&&ni({chainId:r}),p="prepared"===c?{account:t,accessList:e,chain:null,data:n,gas:i,gasPrice:o,maxFeePerGas:s,maxPriorityFeePerGas:a,nonce:l,to:u,value:h}:await async function({accessList:e,account:t,chainId:r,data:n,gas:i,gasPrice:o,maxFeePerGas:s,maxPriorityFeePerGas:a,nonce:c,to:l,value:u,walletClient:h}){const d=Hn({chainId:r}),p=h??await qn({chainId:r});if(!p)throw new I;r&&ni({chainId:r});const f=(l&&!(0,ae.U)(l)?await async function({chainId:e,name:t}){const r=Hn({chainId:e}),n=await r.getEnsAddress({name:vn(t)});try{return"0x0000000000000000000000000000000000000000"===n?null:n?(0,P.K)(n):null}catch(e){return null}}({name:l}):l)||void 0;if(f&&!(0,ae.U)(f))throw new Error("Invalid address");return{accessList:e,account:t,data:n,gas:void 0===i?await d.estimateGas({accessList:e,account:p.account,data:n,gas:i??void 0,gasPrice:o,maxFeePerGas:s,maxPriorityFeePerGas:a,nonce:c,to:f,value:u}):i||void 0,gasPrice:o,maxFeePerGas:s,maxPriorityFeePerGas:a,mode:"prepared",nonce:c,to:f,value:u,...r?{chainId:r}:{}}}({accessList:e,account:t,chainId:r,data:n,gas:i||null,gasPrice:o,maxFeePerGas:s,maxPriorityFeePerGas:a,nonce:l,to:u,value:h}),{hash:await d.sendTransaction({...p,chain:null})}}({to:ji.paymentDetails.recipient_address,value:ji.paymentDetails.amount});await Fi(e)}catch(e){$i(e)}}else console.log("Transaction was already submitted.")}()}catch(e){$i(e,!0)}}async function Fi(e){try{await async function(e){const t=await(async e=>{try{const t=`https://safe-transaction-${ji.safeNetworkIdentifier}.safe.global/api/v1/multisig-transactions/${e}`;if((await fetch(t)).ok)return t}catch(e){return}})(e),r=Bi("pretix_csrftoken"),n=Ri();let i=new URLSearchParams({signedMessage:ji.messageSignature,transactionHash:e,selectedAccount:ji.signedByAccount,csrfmiddlewaretoken:r});t&&i.append("safeAppTransactionUrl",t),fetch(n,{headers:{"Content-Type":"application/x-www-form-urlencoded","X-CSRF-TOKEN":r,"HTTP-X-CSRFTOKEN":r},method:"POST",body:i}).then((async r=>{r.ok?(function(e,t){ji.transactionHashSubmitted=!0;const r=ji.elements.aNetworkData.getAttribute("data-chain-id");ji.elements.divTransactionHash.innerHTML=t||function(e,t){const r=Ni.filter((t=>t.chain.id===parseInt(e)));let n;r&&(n=r[0].chain);const i=n?.blockExplorers?.etherscan?.url;return i?''+t+"":t}(r,e),Ui(),ji.elements.divSuccess.style.display="block"}(e,t),await async function(){for(;;)await Di(),await new Promise((e=>setTimeout(e,5e3)))}()):$i("There was an error processing your payment, please contact support. Your payment was sent in transaction "+e+".",!1)}))}(e)}catch(e){$i(e,!0)}}!async function(){const e=ji.elements.buttonConnect.getAttribute("data-chain-id"),t=document.getElementById("web3modal").getAttribute("data-walletconnect-id");document.title="Pretix Payment";const r=Ni.filter((t=>t.chain.id===parseInt(e)));if(r.length<1)return void $i("Invalid chain ID");const{publicClient:n}=function(e,t,{batch:r={multicall:{wait:32}},pollingInterval:n=4e3,rank:i,retryCount:o,retryDelay:s,stallTimeout:a}={}){if(!e.length)throw new Error("must have at least one chain");let c=[];const l={},u={};for(const r of e){let e=!1;for(const n of t){const t=n(r);t&&(e=!0,c.some((({id:e})=>e===r.id))||(c=[...c,t.chain]),l[r.id]=[...l[r.id]||[],...t.rpcUrls.http],t.rpcUrls.webSocket&&(u[r.id]=[...u[r.id]||[],...t.rpcUrls.webSocket]))}if(!e)throw new Error([`Could not find valid provider configuration for chain "${r.name}".\n`,"You may need to add `jsonRpcProvider` to `configureChains` with the chain's RPC URLs.","Read more: https://wagmi.sh/core/providers/jsonRpc"].join("\n"))}return{chains:c,publicClient:({chainId:t})=>{const u=c.find((e=>e.id===t))??e[0],h=l[u.id];if(!h||!h[0])throw new Error(`No providers configured for chain "${u.id}"`);const d=zt({batch:r,chain:u,transport:Wt(h.map((e=>function(e,t={}){const{batch:r,fetchOptions:n,key:i="http",name:o="HTTP JSON-RPC",retryDelay:s}=t;return({chain:a,retryCount:c,timeout:l})=>{const{batchSize:u=1e3,wait:h=0}="object"==typeof r?r:{},d=t.retryCount??c,p=l??t.timeout??1e4,f=e||a?.rpcUrls.default.http[0];if(!f)throw new Ft;return ye({key:i,name:o,async request({method:t,params:i}){const o={method:t,params:i},{schedule:s}=(0,Ht.S)({id:`${e}`,wait:h,shouldSplitBatch:e=>e.length>u,fn:e=>Zt.http(f,{body:e,fetchOptions:n,timeout:p})}),[{error:a,result:c}]=await(async e=>r?s(e):[await Zt.http(f,{body:e,fetchOptions:n,timeout:p})])(o);if(a)throw new me.bs({body:o,error:a,url:f});return c},retryCount:d,retryDelay:s,timeout:p,type:"http"},{url:e})}}(e,{timeout:a}))),{rank:i,retryCount:o,retryDelay:s}),pollingInterval:n});return Object.assign(d,{chains:c})},webSocketPublicClient:({chainId:t})=>{const l=c.find((e=>e.id===t))??e[0],h=u[l.id];if(!h||!h[0])return;const d=zt({batch:r,chain:l,transport:Wt(h.map((e=>function(e,t={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:i}=t;return({chain:o,retryCount:s,timeout:a})=>{const c=t.retryCount??s,l=a??t.timeout??1e4,u=e||o?.rpcUrls.default.webSocket?.[0];if(!u)throw new Ft;return ye({key:r,name:n,async request({method:e,params:t}){const r={method:e,params:t},n=await Kt(u),{error:i,result:o}=await Zt.webSocketAsync(n,{body:r,timeout:l});if(i)throw new me.bs({body:r,error:i,url:u});return o},retryCount:c,retryDelay:i,timeout:l,type:"webSocket"},{getSocket:()=>Kt(u),async subscribe({params:e,onData:t,onError:r}){const n=await Kt(u),{result:i}=await new Promise(((i,o)=>Zt.webSocket(n,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return o(e.error),void r?.(e.error);"number"!=typeof e.id?"eth_subscription"===e.method&&t(e.params):i(e)}})));return{subscriptionId:i,unsubscribe:async()=>new Promise((e=>Zt.webSocket(n,{body:{method:"eth_unsubscribe",params:[i]},onResponse:e})))}}})}}(e,{timeout:a}))),{rank:i,retryCount:o,retryDelay:s}),pollingInterval:n});return Object.assign(d,{chains:c})}}}([r[0].chain],[Si({projectId:t})]),i=function(e){const t=new class{constructor({autoConnect:e=!1,connectors:t=[new Ce],publicClient:r,storage:n=Tn({storage:"undefined"!=typeof window?window.localStorage:Mn}),logger:i={warn:console.warn},webSocketPublicClient:o}){_e(this,Rn),this.publicClients=new Map,this.webSocketPublicClients=new Map,_e(this,Nn,void 0),_e(this,jn,void 0),this.args={autoConnect:e,connectors:t,logger:i,publicClient:r,storage:n,webSocketPublicClient:o};let s,a="disconnected";if(e)try{const e=n.getItem($n),t=e?.state?.data;a=t?.account?"reconnecting":"connecting",s=t?.chain?.id}catch(e){}const c="function"==typeof t?t():t;var l,u,h,d;c.forEach((e=>e.setStorage(n))),this.store=(d=((e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((e,t)=>(r,n,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,c=new Set;let l;try{l=o.getStorage()}catch(e){}if(!l)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)}),n,i);const u=Jt(o.serialize),h=()=>{const e=o.partialize({...n()});let t;const r=u({state:e,version:o.version}).then((e=>l.setItem(o.name,e))).catch((e=>{t=e}));if(t)throw t;return r},d=i.setState;i.setState=(e,t)=>{d(e,t),h()};const p=e(((...e)=>{r(...e),h()}),n,i);let f;const m=()=>{var e;if(!l)return;s=!1,a.forEach((e=>e(n())));const t=(null==(e=o.onRehydrateStorage)?void 0:e.call(o,n()))||void 0;return Jt(l.getItem.bind(l))(o.name).then((e=>{if(e)return o.deserialize(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return e.state;if(o.migrate)return o.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return f=o.merge(e,null!=(t=n())?t:p),r(f,!0),h()})).then((()=>{null==t||t(f,void 0),s=!0,c.forEach((e=>e(f)))})).catch((e=>{null==t||t(void 0,e)}))};return i.persist={setOptions:e=>{o={...o,...e},e.getStorage&&(l=e.getStorage())},clearStorage:()=>{null==l||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),f||p})(e,t)):((e,t)=>(r,n,i)=>{let o={storage:Yt((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,c=new Set;let l=o.storage;if(!l)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)}),n,i);const u=()=>{const e=o.partialize({...n()});return l.setItem(o.name,{state:e,version:o.version})},h=i.setState;i.setState=(e,t)=>{h(e,t),u()};const d=e(((...e)=>{r(...e),u()}),n,i);let p;const f=()=>{var e,t;if(!l)return;s=!1,a.forEach((e=>{var t;return e(null!=(t=n())?t:d)}));const i=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=n())?e:d))||void 0;return Jt(l.getItem.bind(l))(o.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return e.state;if(o.migrate)return o.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return p=o.merge(e,null!=(t=n())?t:d),r(p,!0),u()})).then((()=>{null==i||i(p,void 0),p=n(),s=!0,c.forEach((e=>e(p)))})).catch((e=>{null==i||i(void 0,e)}))};return i.persist={setOptions:e=>{o={...o,...e},e.storage&&(l=e.storage)},clearStorage:()=>{null==l||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>f(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},o.skipHydration||f(),p||d})(e,t))((()=>({connectors:c,publicClient:this.getPublicClient({chainId:s}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:s})})),{name:$n,storage:n,partialize:t=>({...e&&{data:{account:t?.data?.account,chain:t?.data?.chain}},chains:t?.chains}),version:2}),(h=(e,t,r)=>{const n=r.subscribe;return r.subscribe=(e,t,i)=>{let o=e;if(t){const n=(null==i?void 0:i.equalityFn)||Object.is;let s=e(r.getState());o=r=>{const i=e(r);if(!n(s,i)){const e=s;t(s=i,e)}},(null==i?void 0:i.fireImmediately)&&t(s,s)}return n(o)},d(e,t,r)})?Xt(h):Xt),this.storage=n,Pe(this,jn,n?.getItem("wallet")),(l=Rn,u=Ln,Ee(this,l,"access private method"),u).call(this),e&&"undefined"!=typeof window&&setTimeout((async()=>await this.autoConnect()),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){return this.data?.chain?.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const t="function"==typeof e?e(this.store.getState()):e;this.store.setState(t,!0)}clearState(){this.setState((e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"})))}async destroy(){this.connector&&await(this.connector.disconnect?.()),Pe(this,Nn,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(Ie(this,Nn))return;Pe(this,Nn,!0),this.setState((e=>({...e,status:e.data?.account?"reconnecting":"connecting"})));const e=Ie(this,jn)?[...this.connectors].sort((e=>e.id===Ie(this,jn)?-1:1)):this.connectors;let t=!1;for(const r of e){if(!r.ready||!r.isAuthorized)continue;if(!await r.isAuthorized())continue;const e=await r.connect();this.setState((t=>({...t,connector:r,chains:r?.chains,data:e,status:"connected"}))),t=!0;break}return t||this.setState((e=>({...e,data:void 0,status:"disconnected"}))),Pe(this,Nn,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const t="function"==typeof e?e():e;t.forEach((e=>e.setStorage(this.args.storage))),this.setState((e=>({...e,connectors:t})))}getPublicClient({chainId:e}={}){let t=this.publicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.publicClients.get(e??-1),t)return t;const{publicClient:r}=this.args;return t="function"==typeof r?r({chainId:e}):r,this.publicClients.set(e??-1,t),t}setPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState((e=>({...e,publicClient:this.getPublicClient({chainId:t})})))}getWebSocketPublicClient({chainId:e}={}){let t=this.webSocketPublicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.webSocketPublicClients.get(e??-1),t)return t;const{webSocketPublicClient:r}=this.args;return t="function"==typeof r?r({chainId:e}):r,t&&this.webSocketPublicClients.set(e??-1,t),t}setWebSocketPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState((e=>({...e,webSocketPublicClient:this.getWebSocketPublicClient({chainId:t})})))}setLastUsedConnector(e=null){this.storage?.setItem("wallet",e)}}(e);return Bn=t,t}({autoConnect:!0,connectors:[...ki({projectId:t,version:2,chains:[r[0].chain]})],publicClient:n}),o=new Oi(i,r);let s;ji.web3Modal=new Ti({projectId:t},o),ji.safeNetworkIdentifier=r[0].safeNetworkIdentifier,Xn((async e=>{if("connecting"===s&&"connected"===e.status)try{await zi()}catch(e){$i(e)}s=e.status})),ei((()=>{Ui("prepare")})),ji.elements.divPrepare.style.display="block",document.getElementById("spinner").style.display="none",ji.elements.buttonConnect.addEventListener("click",(async()=>{try{await async function(){try{if((await Zn()).isConnected)return!0;await ji.web3Modal.openModal()}catch(e){throw console.error(e,"Sign in failed"),e}return!1}()&&await zi()}catch(e){$i(error)}}))}()})()})(); \ No newline at end of file diff --git a/pretix_eth/static/pretix_eth/web3modal/package.json b/pretix_eth/static/pretix_eth/web3modal/package.json index f82cc346..0c66855a 100644 --- a/pretix_eth/static/pretix_eth/web3modal/package.json +++ b/pretix_eth/static/pretix_eth/web3modal/package.json @@ -10,10 +10,9 @@ "author": "", "license": "ISC", "dependencies": { - "@wagmi/core": "^1.3.2", - "@web3modal/ethereum": "^2.6.1", - "@web3modal/html": "^2.6.1", - "viem": "^1.1.6", + "@wagmi/core": "1.4.13", + "@web3modal/wagmi1": "^4.0.0-544a28f1", + "viem": "1.21.4", "webpack": "^5.75.0" }, "devDependencies": { diff --git a/pretix_eth/static/pretix_eth/web3modal/src/chains.js b/pretix_eth/static/pretix_eth/web3modal/src/chains.js index 4ac18273..f1ba8062 100644 --- a/pretix_eth/static/pretix_eth/web3modal/src/chains.js +++ b/pretix_eth/static/pretix_eth/web3modal/src/chains.js @@ -1,4 +1,5 @@ -import { arbitrum, arbitrumGoerli, mainnet, goerli, optimism, optimismGoerli, sepolia, zkSync, polygonZkEvm } from "@wagmi/core/chains"; +// import { arbitrum, arbitrumGoerli, mainnet, goerli, optimism, optimismGoerli, sepolia, zkSync, polygonZkEvm } from "@wagmi/core/chains"; +import { arbitrum, arbitrumGoerli, mainnet, goerli, optimism, optimismGoerli, sepolia, zkSync, polygonZkEvm } from "viem/chains"; // Safe is only supported on certain networks there doesn't seem to be any smart way to detect if a network is supported (it doesn't follow https://github.com/ethereum-lists/chains ?), so this has to be manually configured // Safe documentation: https://github.com/safe-global/safe-docs/blob/main/learn/safe-core/safe-core-api/available-services.md diff --git a/pretix_eth/static/pretix_eth/web3modal/src/core.js b/pretix_eth/static/pretix_eth/web3modal/src/core.js index 22f431b3..743e22a1 100644 --- a/pretix_eth/static/pretix_eth/web3modal/src/core.js +++ b/pretix_eth/static/pretix_eth/web3modal/src/core.js @@ -1,6 +1,6 @@ "use strict"; -import { signTypedData, erc20ABI, getAccount, getNetwork, switchNetwork, sendTransaction, readContract, prepareWriteContract, writeContract, getPublicClient } from "@wagmi/core"; +import { signTypedData, erc20ABI, getAccount, getNetwork, switchNetwork, sendTransaction, readContract, writeContract, getPublicClient } from "@wagmi/core"; import { getTransactionDetailsURL, showError, resetErrorMessage, displayOnlyId, @@ -9,6 +9,22 @@ import { } from './interface.js'; import { runPeriodicCheck } from './periodic_check.js'; +function validate_txhash(addr) { + return /^0x([A-Fa-f0-9]{64})$/.test(addr); +} + +const checkResult = (result) => { + try { + const parsed = JSON.parse(result); + + if (parsed.error) { + throw parsed.error; + } + } catch (e) { + + } +} + /* * Called on "Connect wallet and pay" button click and every chain/account change * @@ -102,6 +118,8 @@ async function sign() { const signature = await signTypedData(message); + // For some ungodly reason wagmi doesn't error out on some errors - have to check the return value for errors to avoid any issues + checkResult(signature); // Validate signature on the backend before proceeding: const url = new URL(window.location.origin + window.__validateSignatureUrl); @@ -124,7 +142,7 @@ async function sign() { if (response.ok) { await submitTransaction(); } else { - showError('EIP1271 error: unable to verify signature; your wallet may not be supported.') + showError('EIP1271 validation error: unable to verify signature; your wallet may not be supported.') GlobalPretixEthState.signatureRequested = false; @@ -133,6 +151,9 @@ async function sign() { } else { const signature = await signTypedData(message) + // For some ungodly reason wagmi doesn't error out on some errors - have to check the return value for errors to avoid any issues + checkResult(signature); + GlobalPretixEthState.messageSignature = signature; GlobalPretixEthState.signedByAccount = GlobalPretixEthState.selectedAccount; @@ -182,14 +203,20 @@ async function submitTransaction() { displayOnlyId("send-transaction"); try { - const { hash } = await writeContract({ + const result = await writeContract({ abi: erc20ABI, address: daiContractAddress, functionName: 'transfer', args: [GlobalPretixEthState.paymentDetails['recipient_address'], GlobalPretixEthState.paymentDetails['amount']] }) - await submitSignature(hash); + const valid = validate_txhash(result.hash); + + if (!valid) throw 'Invalid transaction hash'; + + checkResult(result); + + await submitSignature(result.hash); } catch (e) { showError(e); } @@ -197,12 +224,16 @@ async function submitTransaction() { displayOnlyId("send-transaction"); try { - const { hash } = await sendTransaction({ + const result = await sendTransaction({ to: GlobalPretixEthState.paymentDetails['recipient_address'], value: GlobalPretixEthState.paymentDetails['amount'] }); - await submitSignature(hash); + const valid = validate_txhash(result.hash); + + if (!valid) throw 'Invalid transaction hash'; + + await submitSignature(result.hash); } catch (e) { showError(e); } diff --git a/pretix_eth/static/pretix_eth/web3modal/src/interface.js b/pretix_eth/static/pretix_eth/web3modal/src/interface.js index 7b7777ee..f9617400 100644 --- a/pretix_eth/static/pretix_eth/web3modal/src/interface.js +++ b/pretix_eth/static/pretix_eth/web3modal/src/interface.js @@ -46,7 +46,7 @@ async function signIn() { return true; } - await GlobalPretixEthState.web3Modal.openModal() + await GlobalPretixEthState.web3Modal.open() } catch (e) { console.error(e, 'Sign in failed') diff --git a/pretix_eth/static/pretix_eth/web3modal/src/web3modal.js b/pretix_eth/static/pretix_eth/web3modal/src/web3modal.js index b661fd3f..dfe03986 100644 --- a/pretix_eth/static/pretix_eth/web3modal/src/web3modal.js +++ b/pretix_eth/static/pretix_eth/web3modal/src/web3modal.js @@ -1,11 +1,10 @@ "use strict"; -import { configureChains, createConfig, watchAccount, watchNetwork } from "@wagmi/core"; -import { EthereumClient, w3mConnectors, w3mProvider } from '@web3modal/ethereum' -import { Web3Modal } from "@web3modal/html"; +import { watchAccount, watchNetwork } from "@wagmi/core"; +import { createWeb3Modal, defaultWagmiConfig } from '@web3modal/wagmi1/react' import { showError, GlobalPretixEthState, signIn, displayOnlyId, getCookie } from './interface.js'; import { makePayment } from './core.js'; -import chains from "./chains.js"; +import chainsInfo from "./chains.js"; async function init() { const desiredChainID = GlobalPretixEthState.elements.buttonConnect.getAttribute("data-chain-id"); @@ -14,7 +13,7 @@ async function init() { // Some wallets read the page title and presents it to the user in the wallet - the pretix generated one looks confusing, so we override it before instantiating web3modal document.title = 'Pretix Payment'; - const desiredChain = chains.filter(chainInfo => chainInfo.chain.id === parseInt(desiredChainID)); + const desiredChain = chainsInfo.filter(chainInfo => chainInfo.chain.id === parseInt(desiredChainID)); if (desiredChain.length < 1) { showError('Invalid chain ID'); @@ -22,27 +21,19 @@ async function init() { return; } - const { publicClient } = configureChains([desiredChain[0].chain], [w3mProvider({ projectId: walletConnectProjectId })]) - - const wagmiClient = createConfig({ - autoConnect: true, - connectors: [ - ...w3mConnectors({ - projectId: - walletConnectProjectId, - version: 2, - chains: [desiredChain[0].chain] - }) - ], - publicClient, - }); + const metadata = { + name: 'Pretix Payment Plugin', + description: 'Pretix Payment Plugin', + url: window.location.origin, + icons: ['https://avatars.githubusercontent.com/u/37784886'] + } + const chains = [desiredChain[0].chain, desiredChain[0].chain]; + const wagmiConfig = defaultWagmiConfig({ chains, projectId: walletConnectProjectId, appName: metadata.name }) + + GlobalPretixEthState.web3Modal = createWeb3Modal({ + wagmiConfig, projectId: walletConnectProjectId, chains, themeMode: 'light' + }) - // Web3Modal and Ethereum Client - const ethereumClient = new EthereumClient(wagmiClient, desiredChain); - GlobalPretixEthState.web3Modal = new Web3Modal( - { projectId: walletConnectProjectId }, - ethereumClient - ); GlobalPretixEthState.safeNetworkIdentifier = desiredChain[0].safeNetworkIdentifier; let lastAccountStatus; diff --git a/pretix_eth/static/pretix_eth/web3modal/yarn.lock b/pretix_eth/static/pretix_eth/web3modal/yarn.lock new file mode 100644 index 00000000..cbf82740 --- /dev/null +++ b/pretix_eth/static/pretix_eth/web3modal/yarn.lock @@ -0,0 +1,3924 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@adraffy/ens-normalize@1.10.0": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" + integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== + +"@babel/parser@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b" + integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== + +"@babel/runtime@^7.17.2", "@babel/runtime@^7.23.4": + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.8.tgz#8ee6fe1ac47add7122902f257b8ddf55c898f650" + integrity sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw== + dependencies: + regenerator-runtime "^0.14.0" + +"@coinbase/wallet-sdk@^3.6.6": + version "3.7.2" + resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-3.7.2.tgz#7a89bd9e3a06a1f26d4480d8642af33fb0c7e3aa" + integrity sha512-lIGvXMsgpsQWci/XOMQIJ2nIZ8JUy/L+bvC0wkRaYarr0YylwpXrJ2gRM3hCXPS477pkyO7N/kSiAoRgEXUdJQ== + dependencies: + "@metamask/safe-event-emitter" "2.0.0" + "@solana/web3.js" "^1.70.1" + bind-decorator "^1.0.11" + bn.js "^5.1.1" + buffer "^6.0.3" + clsx "^1.1.0" + eth-block-tracker "6.1.0" + eth-json-rpc-filters "5.1.0" + eth-rpc-errors "4.0.2" + json-rpc-engine "6.1.0" + keccak "^3.0.1" + preact "^10.5.9" + qs "^6.10.3" + rxjs "^6.6.3" + sha.js "^2.4.11" + stream-browserify "^3.0.0" + util "^0.12.4" + +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + +"@ioredis/commands@^1.1.1": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11" + integrity sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg== + +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/source-map@^0.3.3": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" + integrity sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.22" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz#72a621e5de59f5f1ef792d0793a82ee20f645e4c" + integrity sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0", "@lit-labs/ssr-dom-shim@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.2.tgz#d693d972974a354034454ec1317eb6afd0b00312" + integrity sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g== + +"@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.6.3.tgz#25b4eece2592132845d303e091bad9b04cdcfe03" + integrity sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ== + dependencies: + "@lit-labs/ssr-dom-shim" "^1.0.0" + +"@lit/reactive-element@^2.0.0": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.0.3.tgz#29d7d4ee8d9b00804be957cc6937577eb4d3db63" + integrity sha512-e067EuTNNgOHm1tZcc0Ia7TCzD/9ZpoPegHKgesrGK6pSDRGkGDAQbYuQclqLPIoJ9eC8Kb9mYtGryWcM5AywA== + dependencies: + "@lit-labs/ssr-dom-shim" "^1.1.2" + +"@metamask/safe-event-emitter@2.0.0", "@metamask/safe-event-emitter@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz#af577b477c683fad17c619a78208cede06f9605c" + integrity sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q== + +"@metamask/utils@^3.0.1": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-3.6.0.tgz#b218b969a05ca7a8093b5d1670f6625061de707d" + integrity sha512-9cIRrfkWvHblSiNDVXsjivqa9Ak0RYo/1H6tqTqTbAx+oBK2Sva0lWDHxGchOqA7bySGUJKAWSNJvH6gdHZ0gQ== + dependencies: + "@types/debug" "^4.1.7" + debug "^4.3.4" + semver "^7.3.8" + superstruct "^1.0.3" + +"@motionone/animation@^10.15.1", "@motionone/animation@^10.17.0": + version "10.17.0" + resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.17.0.tgz#7633c6f684b5fee2b61c405881b8c24662c68fca" + integrity sha512-ANfIN9+iq1kGgsZxs+Nz96uiNcPLGTXwfNo2Xz/fcJXniPYpaz/Uyrfa+7I5BPLxCP82sh7quVDudf1GABqHbg== + dependencies: + "@motionone/easing" "^10.17.0" + "@motionone/types" "^10.17.0" + "@motionone/utils" "^10.17.0" + tslib "^2.3.1" + +"@motionone/dom@^10.16.2", "@motionone/dom@^10.16.4": + version "10.17.0" + resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.17.0.tgz#519dd78aab0750a94614c69a82da5290cd617383" + integrity sha512-cMm33swRlCX/qOPHWGbIlCl0K9Uwi6X5RiL8Ma6OrlJ/TP7Q+Np5GE4xcZkFptysFjMTi4zcZzpnNQGQ5D6M0Q== + dependencies: + "@motionone/animation" "^10.17.0" + "@motionone/generators" "^10.17.0" + "@motionone/types" "^10.17.0" + "@motionone/utils" "^10.17.0" + hey-listen "^1.0.8" + tslib "^2.3.1" + +"@motionone/easing@^10.17.0": + version "10.17.0" + resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.17.0.tgz#d66cecf7e3ee30104ad00389fb3f0b2282d81aa9" + integrity sha512-Bxe2wSuLu/qxqW4rBFS5m9tMLOw+QBh8v5A7Z5k4Ul4sTj5jAOfZG5R0bn5ywmk+Fs92Ij1feZ5pmC4TeXA8Tg== + dependencies: + "@motionone/utils" "^10.17.0" + tslib "^2.3.1" + +"@motionone/generators@^10.17.0": + version "10.17.0" + resolved "https://registry.yarnpkg.com/@motionone/generators/-/generators-10.17.0.tgz#878d292539c41434c13310d5f863a87a94e6e689" + integrity sha512-T6Uo5bDHrZWhIfxG/2Aut7qyWQyJIWehk6OB4qNvr/jwA/SRmixwbd7SOrxZi1z5rH3LIeFFBKK1xHnSbGPZSQ== + dependencies: + "@motionone/types" "^10.17.0" + "@motionone/utils" "^10.17.0" + tslib "^2.3.1" + +"@motionone/svelte@^10.16.2": + version "10.16.4" + resolved "https://registry.yarnpkg.com/@motionone/svelte/-/svelte-10.16.4.tgz#5daf117cf5b2576fc6dd487c5e0500938a742470" + integrity sha512-zRVqk20lD1xqe+yEDZhMYgftsuHc25+9JSo+r0a0OWUJFocjSV9D/+UGhX4xgJsuwB9acPzXLr20w40VnY2PQA== + dependencies: + "@motionone/dom" "^10.16.4" + tslib "^2.3.1" + +"@motionone/types@^10.15.1", "@motionone/types@^10.17.0": + version "10.17.0" + resolved "https://registry.yarnpkg.com/@motionone/types/-/types-10.17.0.tgz#179571ce98851bac78e19a1c3974767227f08ba3" + integrity sha512-EgeeqOZVdRUTEHq95Z3t8Rsirc7chN5xFAPMYFobx8TPubkEfRSm5xihmMUkbaR2ErKJTUw3347QDPTHIW12IA== + +"@motionone/utils@^10.15.1", "@motionone/utils@^10.17.0": + version "10.17.0" + resolved "https://registry.yarnpkg.com/@motionone/utils/-/utils-10.17.0.tgz#cc0ba8acdc6848ff48d8c1f2d0d3e7602f4f942e" + integrity sha512-bGwrki4896apMWIj9yp5rAS2m0xyhxblg6gTB/leWDPt+pb410W8lYWsxyurX+DH+gO1zsQsfx2su/c1/LtTpg== + dependencies: + "@motionone/types" "^10.17.0" + hey-listen "^1.0.8" + tslib "^2.3.1" + +"@motionone/vue@^10.16.2": + version "10.16.4" + resolved "https://registry.yarnpkg.com/@motionone/vue/-/vue-10.16.4.tgz#07d09e3aa5115ca0bcc0076cb9e5322775277c09" + integrity sha512-z10PF9JV6SbjFq+/rYabM+8CVlMokgl8RFGvieSGNTmrkQanfHn+15XBrhG3BgUfvmTeSeyShfOHpG0i9zEdcg== + dependencies: + "@motionone/dom" "^10.16.4" + tslib "^2.3.1" + +"@noble/curves@1.2.0", "@noble/curves@~1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== + dependencies: + "@noble/hashes" "1.3.2" + +"@noble/curves@^1.2.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.3.0.tgz#01be46da4fd195822dab821e72f71bf4aeec635e" + integrity sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA== + dependencies: + "@noble/hashes" "1.3.3" + +"@noble/hashes@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + +"@noble/hashes@1.3.3", "@noble/hashes@^1.3.2", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.2": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" + integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== + +"@parcel/watcher-android-arm64@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.0.tgz#9c93763794153e4f76920994a423b6ea3257059d" + integrity sha512-+fPtO/GsbYX1LJnCYCaDVT3EOBjvSFdQN9Mrzh9zWAOOfvidPWyScTrHIZHHfJBvlHzNA0Gy0U3NXFA/M7PHUA== + +"@parcel/watcher-darwin-arm64@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.0.tgz#2c79c2abde16aa24cac67e555b60802fd13fe210" + integrity sha512-T/At5pansFuQ8VJLRx0C6C87cgfqIYhW2N/kBfLCUvDhCah0EnLLwaD/6MW3ux+rpgkpQAnMELOCTKlbwncwiA== + +"@parcel/watcher-darwin-x64@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.0.tgz#23d82f198c5d033f047467c68d7c335f3df49b46" + integrity sha512-vZMv9jl+szz5YLsSqEGCMSllBl1gU1snfbRL5ysJU03MEa6gkVy9OMcvXV1j4g0++jHEcvzhs3Z3LpeEbVmY6Q== + +"@parcel/watcher-freebsd-x64@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.0.tgz#7310cc86abc27dacd57624bcdba1f0ba092e76df" + integrity sha512-dHTRMIplPDT1M0+BkXjtMN+qLtqq24sLDUhmU+UxxLP2TEY2k8GIoqIJiVrGWGomdWsy5IO27aDV1vWyQ6gfHA== + +"@parcel/watcher-linux-arm-glibc@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.0.tgz#c31b76e695027eeb1078d3d6f1d641d0b900c335" + integrity sha512-9NQXD+qk46RwATNC3/UB7HWurscY18CnAPMTFcI9Y8CTbtm63/eex1SNt+BHFinEQuLBjaZwR2Lp+n7pmEJPpQ== + +"@parcel/watcher-linux-arm64-glibc@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.0.tgz#56e09b86e9d8a4096f606be118b588da6e965080" + integrity sha512-QuJTAQdsd7PFW9jNGaV9Pw+ZMWV9wKThEzzlY3Lhnnwy7iW23qtQFPql8iEaSFMCVI5StNNmONUopk+MFKpiKg== + +"@parcel/watcher-linux-arm64-musl@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.4.0.tgz#27ffd5ca5f510ecd638f9ad22e2e813049db54e7" + integrity sha512-oyN+uA9xcTDo/45bwsd6TFHa7Lc7hKujyMlvwrCLvSckvWogndCEoVYFNfZ6JJ2KNL/6fFiGPcbjp8jJmEh5Ng== + +"@parcel/watcher-linux-x64-glibc@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.0.tgz#44cbbb1e5884a1ca900655f47a0775218318f934" + integrity sha512-KphV8awJmxU3q52JQvJot0QMu07CIyEjV+2Tb2ZtbucEgqyRcxOBDMsqp1JNq5nuDXtcCC0uHQICeiEz38dPBQ== + +"@parcel/watcher-linux-x64-musl@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.0.tgz#4c33993618c8d5113722852806239cb80360494b" + integrity sha512-7jzcOonpXNWcSijPpKD5IbC6xC7yTibjJw9jviVzZostYLGxbz8LDJLUnLzLzhASPlPGgpeKLtFUMjAAzM+gSA== + +"@parcel/watcher-wasm@2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-wasm/-/watcher-wasm-2.3.0.tgz#73b66c6fbd2a3326ae86a1ec77eab7139d0dd725" + integrity sha512-ejBAX8H0ZGsD8lSICDNyMbSEtPMWgDL0WFCt/0z7hyf5v8Imz4rAM8xY379mBsECkq/Wdqa5WEDLqtjZ+6NxfA== + dependencies: + is-glob "^4.0.3" + micromatch "^4.0.5" + napi-wasm "^1.1.0" + +"@parcel/watcher-win32-arm64@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.0.tgz#2a172fd2fda95fe5389298ca3e70b5a96316162a" + integrity sha512-NOej2lqlq8bQNYhUMnOD0nwvNql8ToQF+1Zhi9ULZoG+XTtJ9hNnCFfyICxoZLXor4bBPTOnzs/aVVoefYnjIg== + +"@parcel/watcher-win32-ia32@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.0.tgz#279225b2ebe1fadd3c5137c9b2365ad422656904" + integrity sha512-IO/nM+K2YD/iwjWAfHFMBPz4Zqn6qBDqZxY4j2n9s+4+OuTSRM/y/irksnuqcspom5DjkSeF9d0YbO+qpys+JA== + +"@parcel/watcher-win32-x64@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.0.tgz#93e0bd0ad1bda2c9a688764b9b30b71dc5b72a71" + integrity sha512-pAUyUVjfFjWaf/pShmJpJmNxZhbMvJASUpdes9jL6bTEJ+gDxPRSpXTIemNyNsb9AtbiGXs9XduP1reThmd+dA== + +"@parcel/watcher@^2.3.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.4.0.tgz#2d3c4ef8832a5cdfdbb76b914f022489933e664f" + integrity sha512-XJLGVL0DEclX5pcWa2N9SX1jCGTDd8l972biNooLFtjneuGqodupPQh6XseXIBBeVIMaaJ7bTcs3qGvXwsp4vg== + dependencies: + detect-libc "^1.0.3" + is-glob "^4.0.3" + micromatch "^4.0.5" + node-addon-api "^7.0.0" + optionalDependencies: + "@parcel/watcher-android-arm64" "2.4.0" + "@parcel/watcher-darwin-arm64" "2.4.0" + "@parcel/watcher-darwin-x64" "2.4.0" + "@parcel/watcher-freebsd-x64" "2.4.0" + "@parcel/watcher-linux-arm-glibc" "2.4.0" + "@parcel/watcher-linux-arm64-glibc" "2.4.0" + "@parcel/watcher-linux-arm64-musl" "2.4.0" + "@parcel/watcher-linux-x64-glibc" "2.4.0" + "@parcel/watcher-linux-x64-musl" "2.4.0" + "@parcel/watcher-win32-arm64" "2.4.0" + "@parcel/watcher-win32-ia32" "2.4.0" + "@parcel/watcher-win32-x64" "2.4.0" + +"@safe-global/safe-apps-provider@^0.18.1": + version "0.18.2" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-provider/-/safe-apps-provider-0.18.2.tgz#336f3f4bb6ebbad9354e6551687491efc73991bc" + integrity sha512-yHHAcppwE7aIUWEeZiYAClQzZCdP5l0Kbd0CBlhKAsTcqZnx4Gh3G3G3frY5LlWcGzp9qmQ5jv+J1GBpaZLDgw== + dependencies: + "@safe-global/safe-apps-sdk" "^9.0.0" + events "^3.3.0" + +"@safe-global/safe-apps-sdk@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-8.1.0.tgz#d1d0c69cd2bf4eef8a79c5d677d16971926aa64a" + integrity sha512-XJbEPuaVc7b9n23MqlF6c+ToYIS3f7P2Sel8f3cSBQ9WORE4xrSuvhMpK9fDSFqJ7by/brc+rmJR/5HViRr0/w== + dependencies: + "@safe-global/safe-gateway-typescript-sdk" "^3.5.3" + viem "^1.0.0" + +"@safe-global/safe-apps-sdk@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-9.0.0.tgz#56635663f5a73773c5929d9c45ffea2b75dab69b" + integrity sha512-fEqmQBU3JqTjORSl3XYrcaxdxkUqeeM39qsQjqCzzTHioN8DEfg3JCLq6EBoXzcKTVOYi8SPzLV7KJccdDw+4w== + dependencies: + "@safe-global/safe-gateway-typescript-sdk" "^3.5.3" + viem "^1.6.0" + +"@safe-global/safe-gateway-typescript-sdk@^3.5.3": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.14.0.tgz#9581c524c1ea4956555f40761eb6b4007392aa82" + integrity sha512-/dqU66RvHw50n+7x3nwnJedq8V6iLQyoWitNdjx5cFTBmae+rpP+LvHq+LqZfXJVkB1qNytMdjFjdyES0t79gQ== + +"@scure/base@~1.1.0", "@scure/base@~1.1.2": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.5.tgz#1d85d17269fe97694b9c592552dd9e5e33552157" + integrity sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ== + +"@scure/bip32@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.2.tgz#90e78c027d5e30f0b22c1f8d50ff12f3fb7559f8" + integrity sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA== + dependencies: + "@noble/curves" "~1.2.0" + "@noble/hashes" "~1.3.2" + "@scure/base" "~1.1.2" + +"@scure/bip39@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" + integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== + dependencies: + "@noble/hashes" "~1.3.0" + "@scure/base" "~1.1.0" + +"@solana/buffer-layout@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" + integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== + dependencies: + buffer "~6.0.3" + +"@solana/web3.js@^1.70.1": + version "1.89.1" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.89.1.tgz#52df6820f2d088c4558aa359af40580a03d10ec9" + integrity sha512-t9TTLtPQxtQB3SAf/5E8xPXfVDsC6WGOsgKY02l2cbe0HLymT7ynE8Hu48Lk5qynHCquj6nhISfEHcjMkYpu/A== + dependencies: + "@babel/runtime" "^7.23.4" + "@noble/curves" "^1.2.0" + "@noble/hashes" "^1.3.2" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.0" + node-fetch "^2.7.0" + rpc-websockets "^7.5.1" + superstruct "^0.14.2" + +"@stablelib/aead@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/aead/-/aead-1.0.1.tgz#c4b1106df9c23d1b867eb9b276d8f42d5fc4c0c3" + integrity sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg== + +"@stablelib/binary@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/binary/-/binary-1.0.1.tgz#c5900b94368baf00f811da5bdb1610963dfddf7f" + integrity sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q== + dependencies: + "@stablelib/int" "^1.0.1" + +"@stablelib/bytes@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/bytes/-/bytes-1.0.1.tgz#0f4aa7b03df3080b878c7dea927d01f42d6a20d8" + integrity sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ== + +"@stablelib/chacha20poly1305@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/chacha20poly1305/-/chacha20poly1305-1.0.1.tgz#de6b18e283a9cb9b7530d8767f99cde1fec4c2ee" + integrity sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA== + dependencies: + "@stablelib/aead" "^1.0.1" + "@stablelib/binary" "^1.0.1" + "@stablelib/chacha" "^1.0.1" + "@stablelib/constant-time" "^1.0.1" + "@stablelib/poly1305" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/chacha@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/chacha/-/chacha-1.0.1.tgz#deccfac95083e30600c3f92803a3a1a4fa761371" + integrity sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/constant-time@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/constant-time/-/constant-time-1.0.1.tgz#bde361465e1cf7b9753061b77e376b0ca4c77e35" + integrity sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg== + +"@stablelib/ed25519@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-1.0.3.tgz#f8fdeb6f77114897c887bb6a3138d659d3f35996" + integrity sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg== + dependencies: + "@stablelib/random" "^1.0.2" + "@stablelib/sha512" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/hash@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/hash/-/hash-1.0.1.tgz#3c944403ff2239fad8ebb9015e33e98444058bc5" + integrity sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg== + +"@stablelib/hkdf@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/hkdf/-/hkdf-1.0.1.tgz#b4efd47fd56fb43c6a13e8775a54b354f028d98d" + integrity sha512-SBEHYE16ZXlHuaW5RcGk533YlBj4grMeg5TooN80W3NpcHRtLZLLXvKyX0qcRFxf+BGDobJLnwkvgEwHIDBR6g== + dependencies: + "@stablelib/hash" "^1.0.1" + "@stablelib/hmac" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/hmac@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/hmac/-/hmac-1.0.1.tgz#3d4c1b8cf194cb05d28155f0eed8a299620a07ec" + integrity sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA== + dependencies: + "@stablelib/constant-time" "^1.0.1" + "@stablelib/hash" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/int@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/int/-/int-1.0.1.tgz#75928cc25d59d73d75ae361f02128588c15fd008" + integrity sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w== + +"@stablelib/keyagreement@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/keyagreement/-/keyagreement-1.0.1.tgz#4612efb0a30989deb437cd352cee637ca41fc50f" + integrity sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg== + dependencies: + "@stablelib/bytes" "^1.0.1" + +"@stablelib/poly1305@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/poly1305/-/poly1305-1.0.1.tgz#93bfb836c9384685d33d70080718deae4ddef1dc" + integrity sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA== + dependencies: + "@stablelib/constant-time" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" + integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/sha256@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/sha256/-/sha256-1.0.1.tgz#77b6675b67f9b0ea081d2e31bda4866297a3ae4f" + integrity sha512-GIIH3e6KH+91FqGV42Kcj71Uefd/QEe7Dy42sBTeqppXV95ggCcxLTk39bEr+lZfJmp+ghsR07J++ORkRELsBQ== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/hash" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/sha512@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/sha512/-/sha512-1.0.1.tgz#6da700c901c2c0ceacbd3ae122a38ac57c72145f" + integrity sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/hash" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/wipe@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" + integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== + +"@stablelib/x25519@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.3.tgz#13c8174f774ea9f3e5e42213cbf9fc68a3c7b7fd" + integrity sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw== + dependencies: + "@stablelib/keyagreement" "^1.0.1" + "@stablelib/random" "^1.0.2" + "@stablelib/wipe" "^1.0.1" + +"@types/connect@^3.4.33": + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/debug@^4.1.7": + version "4.1.12" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.12.tgz#a155f21690871953410df4b6b6f53187f0500917" + integrity sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ== + dependencies: + "@types/ms" "*" + +"@types/eslint-scope@^3.7.3": + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "8.56.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.2.tgz#1c72a9b794aa26a8b94ad26d5b9aa51c8a6384bb" + integrity sha512-uQDwm1wFHmbBbCZCqAlq6Do9LYwByNZHWzXppSnay9SuwJ+VRbjkbLABer54kcPnMSlG6Fdiy2yaFXm/z9Z5gw== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + +"@types/html-minifier-terser@^6.0.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#4fc33a00c1d0c16987b1a20cf92d20614c55ac35" + integrity sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg== + +"@types/json-schema@*", "@types/json-schema@^7.0.8": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/ms@*": + version "0.7.34" + resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433" + integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== + +"@types/node@*": + version "20.11.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.5.tgz#be10c622ca7fcaa3cf226cf80166abc31389d86e" + integrity sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w== + dependencies: + undici-types "~5.26.4" + +"@types/node@^12.12.54": + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + +"@types/trusted-types@^2.0.2": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11" + integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw== + +"@types/ws@^7.4.4": + version "7.4.7" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" + integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== + dependencies: + "@types/node" "*" + +"@vue/compiler-core@3.4.15": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.4.15.tgz#be20d1bbe19626052500b48969302cb6f396d36e" + integrity sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw== + dependencies: + "@babel/parser" "^7.23.6" + "@vue/shared" "3.4.15" + entities "^4.5.0" + estree-walker "^2.0.2" + source-map-js "^1.0.2" + +"@vue/compiler-dom@3.4.15": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.4.15.tgz#753f5ed55f78d33dff04701fad4d76ff0cf81ee5" + integrity sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ== + dependencies: + "@vue/compiler-core" "3.4.15" + "@vue/shared" "3.4.15" + +"@vue/compiler-sfc@3.4.15": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.4.15.tgz#4e5811e681955fcec886cebbec483f6ae463a64b" + integrity sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA== + dependencies: + "@babel/parser" "^7.23.6" + "@vue/compiler-core" "3.4.15" + "@vue/compiler-dom" "3.4.15" + "@vue/compiler-ssr" "3.4.15" + "@vue/shared" "3.4.15" + estree-walker "^2.0.2" + magic-string "^0.30.5" + postcss "^8.4.33" + source-map-js "^1.0.2" + +"@vue/compiler-ssr@3.4.15": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.4.15.tgz#a910a5b89ba4f0a776e40b63d69bdae2f50616cf" + integrity sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw== + dependencies: + "@vue/compiler-dom" "3.4.15" + "@vue/shared" "3.4.15" + +"@vue/reactivity@3.4.15": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.4.15.tgz#ad9d9b83f5398d2e8660ad5cfc0f171e7679a9a1" + integrity sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w== + dependencies: + "@vue/shared" "3.4.15" + +"@vue/runtime-core@3.4.15": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.4.15.tgz#f81e2fd2108ea41a6d5c61c2462b11dfb754fdf0" + integrity sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw== + dependencies: + "@vue/reactivity" "3.4.15" + "@vue/shared" "3.4.15" + +"@vue/runtime-dom@3.4.15": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.4.15.tgz#108ef86aa7334ead5d6b9c56a7d93679e1e45406" + integrity sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw== + dependencies: + "@vue/runtime-core" "3.4.15" + "@vue/shared" "3.4.15" + csstype "^3.1.3" + +"@vue/server-renderer@3.4.15": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.4.15.tgz#34438f998e6f6370fac78883a75efe136631957f" + integrity sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw== + dependencies: + "@vue/compiler-ssr" "3.4.15" + "@vue/shared" "3.4.15" + +"@vue/shared@3.4.15": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.4.15.tgz#e7d2ea050c667480cb5e1a6df2ac13bcd03a8f30" + integrity sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g== + +"@wagmi/connectors@3.1.11": + version "3.1.11" + resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-3.1.11.tgz#98c3a73555bd4c96e562b0258bb2c770fa37b621" + integrity sha512-wzxp9f9PtSUFjDUP/QDjc1t7HON4D8wrVKsw35ejdO8hToDpx1gU9lwH/47Zo/1zExGezQc392sjoHSszYd7OA== + dependencies: + "@coinbase/wallet-sdk" "^3.6.6" + "@safe-global/safe-apps-provider" "^0.18.1" + "@safe-global/safe-apps-sdk" "^8.1.0" + "@walletconnect/ethereum-provider" "2.11.0" + "@walletconnect/legacy-provider" "^2.0.0" + "@walletconnect/modal" "2.6.2" + "@walletconnect/utils" "2.11.0" + abitype "0.8.7" + eventemitter3 "^4.0.7" + +"@wagmi/core@1.4.13": + version "1.4.13" + resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-1.4.13.tgz#8a29bb0370141d48232e3d0b60011dbd8f91a37d" + integrity sha512-ytMCvXbBOgfDu9Qw67279wq/jNEe7EZLjLyekX7ROnvHRADqFr3lwZI6ih41UmtRZAmXAx8Ghyuqy154EjB5mQ== + dependencies: + "@wagmi/connectors" "3.1.11" + abitype "0.8.7" + eventemitter3 "^4.0.7" + zustand "^4.3.1" + +"@walletconnect/core@2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.11.0.tgz#3a4e301077b2f858fd916b7a20b5b984d1afce63" + integrity sha512-2Tjp5BCevI7dbmqo/OrCjX4tqgMqwJNQLlQAlphqPfvwlF9+tIu6pGcVbSN3U9zyXzWIZCeleqEaWUeSeET4Ew== + dependencies: + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/jsonrpc-ws-connection" "1.0.14" + "@walletconnect/keyvaluestorage" "^1.1.1" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/relay-auth" "^1.0.4" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.11.0" + "@walletconnect/utils" "2.11.0" + events "^3.3.0" + isomorphic-unfetch "3.1.0" + lodash.isequal "4.5.0" + uint8arrays "^3.1.0" + +"@walletconnect/crypto@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@walletconnect/crypto/-/crypto-1.0.3.tgz#7b8dd4d7e2884fe3543c7c07aea425eef5ef9dd4" + integrity sha512-+2jdORD7XQs76I2Odgr3wwrtyuLUXD/kprNVsjWRhhhdO9Mt6WqVzOPu0/t7OHSmgal8k7SoBQzUc5hu/8zL/g== + dependencies: + "@walletconnect/encoding" "^1.0.2" + "@walletconnect/environment" "^1.0.1" + "@walletconnect/randombytes" "^1.0.3" + aes-js "^3.1.2" + hash.js "^1.1.7" + tslib "1.14.1" + +"@walletconnect/encoding@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@walletconnect/encoding/-/encoding-1.0.2.tgz#cb3942ad038d6a6bf01158f66773062dd25724da" + integrity sha512-CrwSBrjqJ7rpGQcTL3kU+Ief+Bcuu9PH6JLOb+wM6NITX1GTxR/MfNwnQfhLKK6xpRAyj2/nM04OOH6wS8Imag== + dependencies: + is-typedarray "1.0.0" + tslib "1.14.1" + typedarray-to-buffer "3.1.5" + +"@walletconnect/environment@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@walletconnect/environment/-/environment-1.0.1.tgz#1d7f82f0009ab821a2ba5ad5e5a7b8ae3b214cd7" + integrity sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg== + dependencies: + tslib "1.14.1" + +"@walletconnect/ethereum-provider@2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.11.0.tgz#feb90368d8b2608d7d120ac8feeb3e26eac8c709" + integrity sha512-YrTeHVjuSuhlUw7SQ6xBJXDuJ6iAC+RwINm9nVhoKYJSHAy3EVSJZOofMKrnecL0iRMtD29nj57mxAInIBRuZA== + dependencies: + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "^1.0.13" + "@walletconnect/jsonrpc-types" "^1.0.3" + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/modal" "^2.6.2" + "@walletconnect/sign-client" "2.11.0" + "@walletconnect/types" "2.11.0" + "@walletconnect/universal-provider" "2.11.0" + "@walletconnect/utils" "2.11.0" + events "^3.3.0" + +"@walletconnect/events@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@walletconnect/events/-/events-1.0.1.tgz#2b5f9c7202019e229d7ccae1369a9e86bda7816c" + integrity sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ== + dependencies: + keyvaluestorage-interface "^1.0.0" + tslib "1.14.1" + +"@walletconnect/heartbeat@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz#afaa3a53232ae182d7c9cff41c1084472d8f32e9" + integrity sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q== + dependencies: + "@walletconnect/events" "^1.0.1" + "@walletconnect/time" "^1.0.2" + tslib "1.14.1" + +"@walletconnect/jsonrpc-http-connection@^1.0.4", "@walletconnect/jsonrpc-http-connection@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.7.tgz#a6973569b8854c22da707a759d241e4f5c2d5a98" + integrity sha512-qlfh8fCfu8LOM9JRR9KE0s0wxP6ZG9/Jom8M0qsoIQeKF3Ni0FyV4V1qy/cc7nfI46SLQLSl4tgWSfLiE1swyQ== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.1" + cross-fetch "^3.1.4" + tslib "1.14.1" + +"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.13", "@walletconnect/jsonrpc-provider@^1.0.6": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" + integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/safe-json" "^1.0.2" + tslib "1.14.1" + +"@walletconnect/jsonrpc-types@1.0.3", "@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" + integrity sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw== + dependencies: + keyvaluestorage-interface "^1.0.0" + tslib "1.14.1" + +"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.4", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" + integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== + dependencies: + "@walletconnect/environment" "^1.0.1" + "@walletconnect/jsonrpc-types" "^1.0.3" + tslib "1.14.1" + +"@walletconnect/jsonrpc-ws-connection@1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" + integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.2" + events "^3.3.0" + ws "^7.5.1" + +"@walletconnect/keyvaluestorage@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz#dd2caddabfbaf80f6b8993a0704d8b83115a1842" + integrity sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA== + dependencies: + "@walletconnect/safe-json" "^1.0.1" + idb-keyval "^6.2.1" + unstorage "^1.9.0" + +"@walletconnect/legacy-client@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@walletconnect/legacy-client/-/legacy-client-2.0.0.tgz#9f2c09694789fd4b6c5d68d6423b44bac55aed30" + integrity sha512-v5L7rYk9loVnfvUf0mF+76bUPFaU5/Vh7mzL6/950CD/yoGdzYZ3Kj+L7mkC6HPMEGeQsBP1+sqBuiVGZ/aODA== + dependencies: + "@walletconnect/crypto" "^1.0.3" + "@walletconnect/encoding" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.4" + "@walletconnect/legacy-types" "^2.0.0" + "@walletconnect/legacy-utils" "^2.0.0" + "@walletconnect/safe-json" "^1.0.1" + "@walletconnect/window-getters" "^1.0.1" + "@walletconnect/window-metadata" "^1.0.1" + detect-browser "^5.3.0" + query-string "^6.13.5" + +"@walletconnect/legacy-modal@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@walletconnect/legacy-modal/-/legacy-modal-2.0.0.tgz#d0fab01a1337a8f5d88cdb1430cbef2d46072bbf" + integrity sha512-jckNd8lMhm4X7dX9TDdxM3bXKJnaqkRs6K2Mo5j6GmbIF9Eyx40jZ5+q457RVxvM6ciZEDT5s1wBHWdWoOo+9Q== + dependencies: + "@walletconnect/legacy-types" "^2.0.0" + "@walletconnect/legacy-utils" "^2.0.0" + copy-to-clipboard "^3.3.3" + preact "^10.12.0" + qrcode "^1.5.1" + +"@walletconnect/legacy-provider@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@walletconnect/legacy-provider/-/legacy-provider-2.0.0.tgz#08e2db1e4c234743b2f30422bc8100bc42e8fc44" + integrity sha512-A8xPebMI1A+50HbWwTpFCbwP7G+1NGKdTKyg8BUUg3h3Y9JucpC1W6w/x0v1Xw7qFEqQnz74LoIN/A3ytH9xrQ== + dependencies: + "@walletconnect/jsonrpc-http-connection" "^1.0.4" + "@walletconnect/jsonrpc-provider" "^1.0.6" + "@walletconnect/legacy-client" "^2.0.0" + "@walletconnect/legacy-modal" "^2.0.0" + "@walletconnect/legacy-types" "^2.0.0" + "@walletconnect/legacy-utils" "^2.0.0" + +"@walletconnect/legacy-types@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@walletconnect/legacy-types/-/legacy-types-2.0.0.tgz#224278ae2874c6a2ca805c2d1d062a511dcf7227" + integrity sha512-sOVrA7HUdbI1OwKyPOQU0/DdvTSVFlsXWpAk2K2WvP2erTkBWPMTJq6cv2BmKdoJ3p6gLApT7sd+jHi3OF71uw== + dependencies: + "@walletconnect/jsonrpc-types" "^1.0.2" + +"@walletconnect/legacy-utils@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@walletconnect/legacy-utils/-/legacy-utils-2.0.0.tgz#e3a637c00783f9cd2ae139b640f82223ab78ed9d" + integrity sha512-CPWxSVVXw0kgNCxvU126g4GiV3mzXmC8IPJ15twE46aJ1FX+RHEIfAzFMFz2F2+fEhBxL63A7dwNQKDXorRPcQ== + dependencies: + "@walletconnect/encoding" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.4" + "@walletconnect/legacy-types" "^2.0.0" + "@walletconnect/safe-json" "^1.0.1" + "@walletconnect/window-getters" "^1.0.1" + "@walletconnect/window-metadata" "^1.0.1" + detect-browser "^5.3.0" + query-string "^6.13.5" + +"@walletconnect/logger@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@walletconnect/logger/-/logger-2.0.1.tgz#7f489b96e9a1ff6bf3e58f0fbd6d69718bf844a8" + integrity sha512-SsTKdsgWm+oDTBeNE/zHxxr5eJfZmE9/5yp/Ku+zJtcTAjELb3DXueWkDXmE9h8uHIbJzIb5wj5lPdzyrjT6hQ== + dependencies: + pino "7.11.0" + tslib "1.14.1" + +"@walletconnect/modal-core@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.6.2.tgz#d73e45d96668764e0c8668ea07a45bb8b81119e9" + integrity sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA== + dependencies: + valtio "1.11.2" + +"@walletconnect/modal-ui@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz#fa57c087c57b7f76aaae93deab0f84bb68b59cf9" + integrity sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA== + dependencies: + "@walletconnect/modal-core" "2.6.2" + lit "2.8.0" + motion "10.16.2" + qrcode "1.5.3" + +"@walletconnect/modal@2.6.2", "@walletconnect/modal@^2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" + integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== + dependencies: + "@walletconnect/modal-core" "2.6.2" + "@walletconnect/modal-ui" "2.6.2" + +"@walletconnect/randombytes@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@walletconnect/randombytes/-/randombytes-1.0.3.tgz#e795e4918367fd1e6a2215e075e64ab93e23985b" + integrity sha512-35lpzxcHFbTN3ABefC9W+uBpNZl1GC4Wpx0ed30gibfO/y9oLdy1NznbV96HARQKSBV9J9M/rrtIvf6a23jfYw== + dependencies: + "@walletconnect/encoding" "^1.0.2" + "@walletconnect/environment" "^1.0.1" + randombytes "^2.1.0" + tslib "1.14.1" + +"@walletconnect/relay-api@^1.0.9": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.9.tgz#f8c2c3993dddaa9f33ed42197fc9bfebd790ecaf" + integrity sha512-Q3+rylJOqRkO1D9Su0DPE3mmznbAalYapJ9qmzDgK28mYF9alcP3UwG/og5V7l7CFOqzCLi7B8BvcBUrpDj0Rg== + dependencies: + "@walletconnect/jsonrpc-types" "^1.0.2" + tslib "1.14.1" + +"@walletconnect/relay-auth@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz#0b5c55c9aa3b0ef61f526ce679f3ff8a5c4c2c7c" + integrity sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ== + dependencies: + "@stablelib/ed25519" "^1.0.2" + "@stablelib/random" "^1.0.1" + "@walletconnect/safe-json" "^1.0.1" + "@walletconnect/time" "^1.0.2" + tslib "1.14.1" + uint8arrays "^3.0.0" + +"@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.2.tgz#7237e5ca48046e4476154e503c6d3c914126fa77" + integrity sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA== + dependencies: + tslib "1.14.1" + +"@walletconnect/sign-client@2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.11.0.tgz#de10f976cc1b8ab04b7f7c27f6a298e4e083ab25" + integrity sha512-H2ukscibBS+6WrzQWh+WyVBqO5z4F5et12JcwobdwgHnJSlqIoZxqnUYYWNCI5rUR5UKsKWaUyto4AE9N5dw4Q== + dependencies: + "@walletconnect/core" "2.11.0" + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.11.0" + "@walletconnect/utils" "2.11.0" + events "^3.3.0" + +"@walletconnect/time@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@walletconnect/time/-/time-1.0.2.tgz#6c5888b835750ecb4299d28eecc5e72c6d336523" + integrity sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g== + dependencies: + tslib "1.14.1" + +"@walletconnect/types@2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.11.0.tgz#474a009c56faa9ef4063b76ed84415c801dc9f1e" + integrity sha512-AB5b1lrEbCGHxqS2vqfCkIoODieH+ZAUp9rA1O2ftrhnqDJiJK983Df87JhYhECsQUBHHfALphA8ydER0q+9sw== + dependencies: + "@walletconnect/events" "^1.0.1" + "@walletconnect/heartbeat" "1.2.1" + "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/keyvaluestorage" "^1.1.1" + "@walletconnect/logger" "^2.0.1" + events "^3.3.0" + +"@walletconnect/universal-provider@2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.11.0.tgz#89053c2360b5ce766c213ca4e33bb4ce4976b0be" + integrity sha512-zgJv8jDvIMP4Qse/D9oIRXGdfoNqonsrjPZanQ/CHNe7oXGOBiQND2IIeX+tS0H7uNA0TPvctljCLiIN9nw4eA== + dependencies: + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "^1.0.2" + "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/logger" "^2.0.1" + "@walletconnect/sign-client" "2.11.0" + "@walletconnect/types" "2.11.0" + "@walletconnect/utils" "2.11.0" + events "^3.3.0" + +"@walletconnect/utils@2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.11.0.tgz#31c95151c823022077883dda61800cdea71879b7" + integrity sha512-hxkHPlTlDQILHfIKXlmzgNJau/YcSBC3XHUSuZuKZbNEw3duFT6h6pm3HT/1+j1a22IG05WDsNBuTCRkwss+BQ== + dependencies: + "@stablelib/chacha20poly1305" "1.0.1" + "@stablelib/hkdf" "1.0.1" + "@stablelib/random" "^1.0.2" + "@stablelib/sha256" "1.0.1" + "@stablelib/x25519" "^1.0.3" + "@walletconnect/relay-api" "^1.0.9" + "@walletconnect/safe-json" "^1.0.2" + "@walletconnect/time" "^1.0.2" + "@walletconnect/types" "2.11.0" + "@walletconnect/window-getters" "^1.0.1" + "@walletconnect/window-metadata" "^1.0.1" + detect-browser "5.3.0" + query-string "7.1.3" + uint8arrays "^3.1.0" + +"@walletconnect/window-getters@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@walletconnect/window-getters/-/window-getters-1.0.1.tgz#f36d1c72558a7f6b87ecc4451fc8bd44f63cbbdc" + integrity sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q== + dependencies: + tslib "1.14.1" + +"@walletconnect/window-metadata@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz#2124f75447b7e989e4e4e1581d55d25bc75f7be5" + integrity sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA== + dependencies: + "@walletconnect/window-getters" "^1.0.1" + tslib "1.14.1" + +"@web3modal/common@4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/common/-/common-4.0.0-544a28f1.tgz#c350a3756f3a1c3b90f1653d5feb404472f18013" + integrity sha512-94GkgQITHI50km3zRKOqplgPOb7odJlVG3w2FiXVB7w9MafnItm3eTVVhLK4p2Bhyo1MA3NswiROjNhxH/w6MQ== + dependencies: + dayjs "1.11.10" + +"@web3modal/common@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@web3modal/common/-/common-4.0.0-alpha.0.tgz#1db7889aa611c53fdaf720aac94b657e6628f5c3" + integrity sha512-jA0CUPaXSAZ6s7+Fk26GhsPvgEqV3BKO6Fbby9hMiU6p+/X4/ImAhIEvR52XIvW8o2tnJJsZyNW9DBcAUtK3eQ== + dependencies: + dayjs "1.11.10" + +"@web3modal/core@4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/core/-/core-4.0.0-544a28f1.tgz#bc323dcf361df8d27aab392a164f6fddf7f6c12b" + integrity sha512-jzxqizfqKzWO+48wXvQFyJgHcEcpXFwVfkS7KMX9xW2X9m7x5uKT5gZCy8b/3t7stqZy5P4zf24hJDFAHjyTEA== + dependencies: + "@web3modal/common" "4.0.0-544a28f1" + "@web3modal/wallet" "4.0.0-544a28f1" + valtio "1.11.2" + +"@web3modal/core@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@web3modal/core/-/core-4.0.0-alpha.0.tgz#04f99f81e1715dedfa03cc9eeb6874722df20e25" + integrity sha512-XdhO/Dq/qjdFnYNGfScTmQcS46+k8kE0TM62xLrJx2xPS8DcnJ7CfbHQikzhV1YI3+UZ7BbkZGTddGcU/Yze7g== + dependencies: + "@web3modal/common" "4.0.0-alpha.0" + "@web3modal/wallet" "4.0.0-alpha.0" + valtio "1.11.2" + +"@web3modal/polyfills@4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/polyfills/-/polyfills-4.0.0-544a28f1.tgz#1dab01958f8eba67fb39039d849d0731c672cac1" + integrity sha512-oM0IL/7bUQlsimfZqAssq0/vbJDvDdm2vRiHLrDyQXt1jl3LPgZEkksAbHVY/5VomoHcY+0APsN4U0fPsq6Exg== + dependencies: + buffer "6.0.3" + +"@web3modal/polyfills@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@web3modal/polyfills/-/polyfills-4.0.0-alpha.0.tgz#e3de794a5f7000df74ba1e650cde98e771324efc" + integrity sha512-IgFZZgHr/WPd9OgyAoyo5MAfC7y88lmFfjtD9cRb489f8gBNmKOfJSHs1oN88eufhXUoD61B8roI61OXKcKGyw== + dependencies: + buffer "6.0.3" + +"@web3modal/scaffold-react@4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/scaffold-react/-/scaffold-react-4.0.0-544a28f1.tgz#db544fb3d9f4010d7ef68e231f3ed49929946588" + integrity sha512-UU3zK6yXMsOAeMu13KXZOKa8CnYvzq/53I08ZQsCr5LUNUKS52bR4fwAp2t9hP6dQqBbvBhmgvjaGR2e+JYFHQ== + dependencies: + "@web3modal/scaffold" "4.0.0-544a28f1" + +"@web3modal/scaffold-utils@4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/scaffold-utils/-/scaffold-utils-4.0.0-544a28f1.tgz#1fbe459d92197911c0e868fc03b36b275b3ca006" + integrity sha512-1YO0eHJncyLJq+8jVs9/+bw5sIavK3bU1SGRSVwkKpuwpoP2jiI8n3h2zTLi7WbjZ6y3QmqjRVpJRBYii7qZ2g== + dependencies: + "@web3modal/polyfills" "4.0.0-544a28f1" + "@web3modal/scaffold" "4.0.0-544a28f1" + valtio "1.11.2" + +"@web3modal/scaffold-utils@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@web3modal/scaffold-utils/-/scaffold-utils-4.0.0-alpha.0.tgz#46b4f0ed04bb2077f25f45d68aae7ea319924f6c" + integrity sha512-BbATufj74lj7/vMp1jd7M+YEwc78wjfAGxRwcj4M0t5tt8sZI+sWxAxcXXTW3NVpKiTcA98RPGLRTA2zzbqweg== + dependencies: + "@web3modal/polyfills" "4.0.0-alpha.0" + "@web3modal/scaffold" "4.0.0-alpha.0" + valtio "1.11.2" + +"@web3modal/scaffold-vue@4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/scaffold-vue/-/scaffold-vue-4.0.0-544a28f1.tgz#1711927a4b6a430a40e3f9501f61a8177cf9ca2b" + integrity sha512-e/3qazP9hj/FrNiSyD262QhlegARXDVrvRJP3k0wGyfsnwIDEFaJv8cmwGs1U84N74YtzX/C0+MIaRr8a/CzhQ== + dependencies: + "@web3modal/scaffold" "4.0.0-544a28f1" + +"@web3modal/scaffold@4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/scaffold/-/scaffold-4.0.0-544a28f1.tgz#c89c1e350542a6f6f76c4193bf1c0e88c74ad5b6" + integrity sha512-IsjPk8LLnLCT1nxZeknXvrJA4A/ZB3t28hn/gN22rcVI/YELe+3LXwJbfA0zUTHuuaP6ai5QRL0C8zmJj4yUsg== + dependencies: + "@web3modal/common" "4.0.0-544a28f1" + "@web3modal/core" "4.0.0-544a28f1" + "@web3modal/ui" "4.0.0-544a28f1" + lit "3.1.0" + +"@web3modal/scaffold@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@web3modal/scaffold/-/scaffold-4.0.0-alpha.0.tgz#548a95bd94581927b5490e65de55e10f656fcea5" + integrity sha512-UyLqoYsdB9J87HDN+c/4+xW+82bulfgQfe9/i/o2LoVF+cwkXI56YNVRUCVcyWLKq6k7GavEtp/xmxHn6DhS/A== + dependencies: + "@web3modal/common" "4.0.0-alpha.0" + "@web3modal/core" "4.0.0-alpha.0" + "@web3modal/ui" "4.0.0-alpha.0" + lit "3.1.0" + +"@web3modal/siwe@3.6.0-544a28f1": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@web3modal/siwe/-/siwe-4.0.0-alpha.0.tgz#3e87604f65fc636f0b13837394257747e04281fc" + integrity sha512-oeCrjCYTU1HLFOzHlSU3FOKlYddttwO6gNXOTQKI8IvqPcou39K2CFhR8XWJmxk21aC9sEdelbb2AJCSH3+80A== + dependencies: + "@web3modal/core" "4.0.0-alpha.0" + "@web3modal/scaffold-utils" "4.0.0-alpha.0" + optionalDependencies: + react ">=17" + react-dom ">=17" + vue ">=3" + +"@web3modal/ui@4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/ui/-/ui-4.0.0-544a28f1.tgz#549bab9cfc810d835ddbbfa16954a265ef8912ed" + integrity sha512-1S4lLwLCrt5wgmczzRYcD7+0RRg3Cr2KsoXMoInm7g54mzZHfBRHHJbP2MZf2n4S//LusP0nPU1DsW3lI1vmBw== + dependencies: + lit "3.1.0" + qrcode "1.5.3" + +"@web3modal/ui@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@web3modal/ui/-/ui-4.0.0-alpha.0.tgz#2d9e0a08cc034f2f688bf4a5ab5157037a9a4a77" + integrity sha512-TRCMrAhwVKD7YiPvtCq4yNysCwziZi/JAgK8aUgjjegUMsKk8JkmibCM1rheZmLWlDTy4/tglgb/ls9kLx3epg== + dependencies: + lit "3.1.0" + qrcode "1.5.3" + +"@web3modal/wagmi1@^4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/wagmi1/-/wagmi1-4.0.0-544a28f1.tgz#1a7f786c763d5e1c0cf258cca4faf49fa7e2cd96" + integrity sha512-Y3glkXBAHA/Vc3Lof2hfZX5pyG2OP23pns5HxRdmAQuP6mTDLKv1ZrVnu3M4ePnpEB5mULC+2KGzZqOoZ6zcZw== + dependencies: + "@web3modal/polyfills" "4.0.0-544a28f1" + "@web3modal/scaffold" "4.0.0-544a28f1" + "@web3modal/scaffold-react" "4.0.0-544a28f1" + "@web3modal/scaffold-utils" "4.0.0-544a28f1" + "@web3modal/scaffold-vue" "4.0.0-544a28f1" + optionalDependencies: + "@web3modal/siwe" "3.6.0-544a28f1" + react ">=17" + react-dom ">=17" + vue ">=3" + +"@web3modal/wallet@4.0.0-544a28f1": + version "4.0.0-544a28f1" + resolved "https://registry.yarnpkg.com/@web3modal/wallet/-/wallet-4.0.0-544a28f1.tgz#df7f0eddc926a87de6bb26fd34b2529e00e76e84" + integrity sha512-CH7Iv2wLUzp2kvL5x9hGoCBgp6tteUm1fjzMdMuJEpmcRSnGlrwNzl87/M0NF9wo8xE0ifB9O5YglDMGEtscBQ== + dependencies: + zod "3.22.4" + +"@web3modal/wallet@4.0.0-alpha.0": + version "4.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@web3modal/wallet/-/wallet-4.0.0-alpha.0.tgz#b4e4be49bbc423784fc460b07f27b529ead7ee53" + integrity sha512-rkKP9Ntcr63RtfXoINQK6Zx4l/BRAHbEuxLlfaAYsyJnR7TFNeGEfV6QB7axKVE0d/LVMl7JbSsr6jZj4mc9hA== + dependencies: + zod "3.22.4" + +"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" + integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + +"@webassemblyjs/helper-buffer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" + integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== + +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== + +"@webassemblyjs/helper-wasm-section@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" + integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + +"@webassemblyjs/wasm-edit@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" + integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-opt" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + "@webassemblyjs/wast-printer" "1.11.6" + +"@webassemblyjs/wasm-gen@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" + integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wasm-opt@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" + integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + +"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" + integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wast-printer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" + integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== + +"@webpack-cli/info@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== + +"@webpack-cli/serve@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +abitype@0.8.7: + version "0.8.7" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.8.7.tgz#e4b3f051febd08111f486c0cc6a98fa72d033622" + integrity sha512-wQ7hV8Yg/yKmGyFpqrNZufCxbszDe5es4AZGYPBitocfSqXtjrTG9JMWFcc4N30ukl2ve48aBTwt7NJxVQdU3w== + +abitype@0.9.8: + version "0.9.8" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.8.tgz#1f120b6b717459deafd213dfbf3a3dd1bf10ae8c" + integrity sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ== + +acorn-import-assertions@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== + +acorn@^8.11.3, acorn@^8.7.1, acorn@^8.8.2: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + +aes-js@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" + integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== + +agentkeepalive@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" + integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== + dependencies: + humanize-ms "^1.2.1" + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@^3.1.3, anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +async-mutex@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.2.6.tgz#0d7a3deb978bc2b984d5908a2038e1ae2e54ff40" + integrity sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw== + dependencies: + tslib "^2.0.0" + +atomic-sleep@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" + integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== + +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + +base-x@^3.0.2: + version "3.0.9" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" + integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bigint-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" + integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== + dependencies: + bindings "^1.3.0" + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +bind-decorator@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/bind-decorator/-/bind-decorator-1.0.11.tgz#e41bc06a1f65dd9cec476c91c5daf3978488252f" + integrity sha512-yzkH0uog6Vv/vQ9+rhSKxecnqGUZHYncg7qS7voz3Q76+TAi1SGiOKk2mlOvusQnFz9Dc4BC/NMkeXu11YgjJg== + +bindings@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bn.js@^5.1.1, bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + +borsh@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" + integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== + dependencies: + bn.js "^5.2.0" + bs58 "^4.0.0" + text-encoding-utf-8 "^1.0.2" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browserslist@^4.14.5: + version "4.22.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b" + integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== + dependencies: + caniuse-lite "^1.0.30001565" + electron-to-chromium "^1.4.601" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + +bs58@^4.0.0, bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +bufferutil@^4.0.1: + version "4.0.8" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.8.tgz#1de6a71092d65d7766c4d8a522b261a6e787e8ea" + integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== + dependencies: + node-gyp-build "^4.3.0" + +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" + integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== + dependencies: + function-bind "^1.1.2" + get-intrinsic "^1.2.1" + set-function-length "^1.1.1" + +camel-case@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" + integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== + dependencies: + pascal-case "^3.1.2" + tslib "^2.0.3" + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +caniuse-lite@^1.0.30001565: + version "1.0.30001579" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz#45c065216110f46d6274311a4b3fcf6278e0852a" + integrity sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA== + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@^3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + +citty@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/citty/-/citty-0.1.5.tgz#fe37ceae5dc764af75eb2fece99d2bf527ea4e50" + integrity sha512-AS7n5NSc0OQVMV9v6wt3ByujNIrne0/cTjiC2MYqhvao57VNfiuVksTSr2p17nVOhEr2KtqiAkGwHcgMC/qUuQ== + dependencies: + consola "^3.2.3" + +clean-css@^5.2.2: + version "5.3.3" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.3.tgz#b330653cd3bd6b75009cc25c714cae7b93351ccd" + integrity sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg== + dependencies: + source-map "~0.6.0" + +clipboardy@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-4.0.0.tgz#e73ced93a76d19dd379ebf1f297565426dffdca1" + integrity sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w== + dependencies: + execa "^8.0.1" + is-wsl "^3.1.0" + is64bit "^2.0.0" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +clsx@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== + +cluster-key-slot@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz#88ddaa46906e303b5de30d3153b7d9fe0a0c19ac" + integrity sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA== + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^2.0.14: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + +commander@^2.20.0, commander@^2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + +consola@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" + integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== + +cookie-es@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-1.0.0.tgz#4759684af168dfc54365b2c2dda0a8d7ee1e4865" + integrity sha512-mWYvfOLrfEc996hlKcdABeIiPHUPC6DM2QYZdGGOvhOTbA3tjm2eBwqlJpoFdjC89NI4Qt6h0Pu06Mp+1Pj5OQ== + +copy-to-clipboard@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz#55ac43a1db8ae639a4bd99511c148cdd1b83a1b0" + integrity sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA== + dependencies: + toggle-selection "^1.0.6" + +cross-fetch@^3.1.4: + version "3.1.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== + dependencies: + node-fetch "^2.6.12" + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +css-select@^4.1.3: + version "4.3.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" + integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== + dependencies: + boolbase "^1.0.0" + css-what "^6.0.1" + domhandler "^4.3.1" + domutils "^2.8.0" + nth-check "^2.0.1" + +css-what@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + +csstype@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" + integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== + +dayjs@1.11.10: + version "1.11.10" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" + integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== + +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== + +decode-uri-component@^0.2.0, decode-uri-component@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== + +define-data-property@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== + dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + +defu@^6.1.3, defu@^6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.4.tgz#4e0c9cf9ff68fe5f3d7f2765cc1a012dfdcb0479" + integrity sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg== + +delay@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" + integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== + +denque@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" + integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== + +destr@^2.0.1, destr@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.2.tgz#8d3c0ee4ec0a76df54bc8b819bca215592a8c218" + integrity sha512-65AlobnZMiCET00KaFFjUefxDX0khFA/E4myqZ7a6Sq1yZtR8+FVIvilVX66vF2uobSumxooYZChiRPCKNqhmg== + +detect-browser@5.3.0, detect-browser@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.3.0.tgz#9705ef2bddf46072d0f7265a1fe300e36fe7ceca" + integrity sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w== + +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== + +dijkstrajs@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz#4c8dbdea1f0f6478bff94d9c49c784d623e4fc23" + integrity sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA== + +dom-converter@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" + integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== + dependencies: + utila "~0.4" + +dom-serializer@^1.0.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" + integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" + integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== + dependencies: + domelementtype "^2.2.0" + +domutils@^2.5.2, domutils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + +dot-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" + integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +duplexify@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" + integrity sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw== + dependencies: + end-of-stream "^1.4.1" + inherits "^2.0.3" + readable-stream "^3.1.1" + stream-shift "^1.0.0" + +electron-to-chromium@^1.4.601: + version "1.4.642" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.642.tgz#eb380fa8b58e515c641d642ba452fa2c453c2e4f" + integrity sha512-M4+u22ZJGpk4RY7tne6W+APkZhnnhmAH48FNl8iEFK2lEgob+U5rUQsIqQhvAwCXYpfd3H20pHK/ENsCvwTbsA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encode-utf8@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + +end-of-stream@^1.4.1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enhanced-resolve@^5.15.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + +entities@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +envinfo@^7.7.3: + version "7.11.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.11.0.tgz#c3793f44284a55ff8c82faf1ffd91bc6478ea01f" + integrity sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg== + +es-module-lexer@^1.2.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz#41ea21b43908fe6a287ffcbe4300f790555331f5" + integrity sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w== + +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +estree-walker@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + +eth-block-tracker@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-6.1.0.tgz#0481f97bbb88a100b9d45806fe7e37af741cbefc" + integrity sha512-K9SY8+/xMBi4M5HHTDdxnpEqEEGjbNpzHFqvxyjMZej8InV/B+CkFRKM6W+uvrFJ7m8Zd1E0qUkseU3vdIDFYQ== + dependencies: + "@metamask/safe-event-emitter" "^2.0.0" + "@metamask/utils" "^3.0.1" + json-rpc-random-id "^1.0.1" + pify "^3.0.0" + +eth-json-rpc-filters@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eth-json-rpc-filters/-/eth-json-rpc-filters-5.1.0.tgz#f0c2aeaec2a45e2dc6ca1b9843d8e85447821427" + integrity sha512-fos+9xmoa1A2Ytsc9eYof17r81BjdJOUcGcgZn4K/tKdCCTb+a8ytEtwlu1op5qsXFDlgGmstTELFrDEc89qEQ== + dependencies: + "@metamask/safe-event-emitter" "^2.0.0" + async-mutex "^0.2.6" + eth-query "^2.1.2" + json-rpc-engine "^6.1.0" + pify "^5.0.0" + +eth-query@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" + integrity sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA== + dependencies: + json-rpc-random-id "^1.0.0" + xtend "^4.0.1" + +eth-rpc-errors@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.2.tgz#11bc164e25237a679061ac05b7da7537b673d3b7" + integrity sha512-n+Re6Gu8XGyfFy1it0AwbD1x0MUzspQs0D5UiPs1fFPCr6WAwZM+vbIhXheBFrpgosqN9bs5PqlB4Q61U/QytQ== + dependencies: + fast-safe-stringify "^2.0.6" + +eth-rpc-errors@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz#6ddb6190a4bf360afda82790bb7d9d5e724f423a" + integrity sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg== + dependencies: + fast-safe-stringify "^2.0.6" + +eventemitter3@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +events@^3.2.0, events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +execa@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + +eyes@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-redact@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.3.0.tgz#7c83ce3a7be4898241a46560d51de10f653f7634" + integrity sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ== + +fast-safe-stringify@^2.0.6: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + +fast-stable-stringify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" + integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== + +fastest-levenshtein@^1.0.12: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" + integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== + dependencies: + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + +get-port-please@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/get-port-please/-/get-port-please-3.1.2.tgz#502795e56217128e4183025c89a48c71652f4e49" + integrity sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ== + +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +h3@^1.10.0, h3@^1.8.2: + version "1.10.0" + resolved "https://registry.yarnpkg.com/h3/-/h3-1.10.0.tgz#55ac36deb6e250ada5ff1940b6324bc6acc4085f" + integrity sha512-Tw1kcIC+AeimwRmviiObaD5EB430Yt+lTgOxLJxNr96Vd/fGRu04EF7aKfOAcpwKCI+U2JlbxOLhycD86p3Ciw== + dependencies: + cookie-es "^1.0.0" + defu "^6.1.3" + destr "^2.0.2" + iron-webcrypto "^1.0.0" + radix3 "^1.1.0" + ufo "^1.3.2" + uncrypto "^0.1.3" + unenv "^1.8.0" + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" + integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg== + dependencies: + get-intrinsic "^1.2.2" + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hasown@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + dependencies: + function-bind "^1.1.2" + +he@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hey-listen@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" + integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== + +html-minifier-terser@^6.0.2: + version "6.1.0" + resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab" + integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw== + dependencies: + camel-case "^4.1.2" + clean-css "^5.2.2" + commander "^8.3.0" + he "^1.2.0" + param-case "^3.0.4" + relateurl "^0.2.7" + terser "^5.10.0" + +html-webpack-plugin@^5.5.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz#50a8fa6709245608cb00e811eacecb8e0d7b7ea0" + integrity sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw== + dependencies: + "@types/html-minifier-terser" "^6.0.0" + html-minifier-terser "^6.0.2" + lodash "^4.17.21" + pretty-error "^4.0.0" + tapable "^2.0.0" + +htmlparser2@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + +http-shutdown@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/http-shutdown/-/http-shutdown-1.2.2.tgz#41bc78fc767637c4c95179bc492f312c0ae64c5f" + integrity sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw== + +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== + dependencies: + ms "^2.0.0" + +idb-keyval@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/idb-keyval/-/idb-keyval-6.2.1.tgz#94516d625346d16f56f3b33855da11bfded2db33" + integrity sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg== + +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + +ioredis@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.3.2.tgz#9139f596f62fc9c72d873353ac5395bcf05709f7" + integrity sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA== + dependencies: + "@ioredis/commands" "^1.1.1" + cluster-key-slot "^1.1.0" + debug "^4.3.4" + denque "^2.1.0" + lodash.defaults "^4.2.0" + lodash.isarguments "^3.1.0" + redis-errors "^1.2.0" + redis-parser "^3.0.0" + standard-as-callback "^2.1.0" + +iron-webcrypto@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/iron-webcrypto/-/iron-webcrypto-1.0.0.tgz#e3b689c0c61b434a0a4cb82d0aeabbc8b672a867" + integrity sha512-anOK1Mktt8U1Xi7fCM3RELTuYbnFikQY5VtrDj7kPgpejV7d43tWKhzgioO0zpkazLEL/j/iayRqnJhrGfqUsg== + +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-callable@^1.1.3: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@^2.13.0: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + +is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + +is-typed-array@^1.1.3: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== + dependencies: + which-typed-array "^1.1.11" + +is-typedarray@1.0.0, is-typedarray@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== + +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" + +is64bit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is64bit/-/is64bit-2.0.0.tgz#198c627cbcb198bbec402251f88e5e1a51236c07" + integrity sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw== + dependencies: + system-architecture "^0.1.0" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +isomorphic-unfetch@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" + integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== + dependencies: + node-fetch "^2.6.1" + unfetch "^4.2.0" + +isomorphic-ws@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + +isows@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.3.tgz#93c1cf0575daf56e7120bab5c8c448b0809d0d74" + integrity sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg== + +jayson@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.1.0.tgz#60dc946a85197317f2b1439d672a8b0a99cea2f9" + integrity sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A== + dependencies: + "@types/connect" "^3.4.33" + "@types/node" "^12.12.54" + "@types/ws" "^7.4.4" + JSONStream "^1.3.5" + commander "^2.20.3" + delay "^5.0.0" + es6-promisify "^5.0.0" + eyes "^0.1.8" + isomorphic-ws "^4.0.1" + json-stringify-safe "^5.0.1" + uuid "^8.3.2" + ws "^7.4.5" + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jiti@^1.21.0: + version "1.21.0" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d" + integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q== + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-rpc-engine@6.1.0, json-rpc-engine@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz#bf5ff7d029e1c1bf20cb6c0e9f348dcd8be5a393" + integrity sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ== + dependencies: + "@metamask/safe-event-emitter" "^2.0.0" + eth-rpc-errors "^4.0.2" + +json-rpc-random-id@^1.0.0, json-rpc-random-id@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" + integrity sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +jsonc-parser@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" + integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== + +keccak@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.4.tgz#edc09b89e633c0549da444432ecf062ffadee86d" + integrity sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + +keyvaluestorage-interface@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz#13ebdf71f5284ad54be94bd1ad9ed79adad515ff" + integrity sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g== + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +listhen@^1.5.5: + version "1.5.6" + resolved "https://registry.yarnpkg.com/listhen/-/listhen-1.5.6.tgz#8dc8cdccef225e39c69bcc6f6bd704447b499b51" + integrity sha512-gTpEJhT5L85L0bFgmu+Boqu5rP4DwDtEb4Exq5gdQUxWRwx4jbzdInZkmyLONo5EwIcQB0k7ZpWlpCDPdL77EQ== + dependencies: + "@parcel/watcher" "^2.3.0" + "@parcel/watcher-wasm" "2.3.0" + citty "^0.1.5" + clipboardy "^4.0.0" + consola "^3.2.3" + defu "^6.1.4" + get-port-please "^3.1.2" + h3 "^1.10.0" + http-shutdown "^1.2.2" + jiti "^1.21.0" + mlly "^1.4.2" + node-forge "^1.3.1" + pathe "^1.1.1" + std-env "^3.7.0" + ufo "^1.3.2" + untun "^0.1.3" + uqr "^0.1.2" + +lit-element@^3.3.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.3.3.tgz#10bc19702b96ef5416cf7a70177255bfb17b3209" + integrity sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA== + dependencies: + "@lit-labs/ssr-dom-shim" "^1.1.0" + "@lit/reactive-element" "^1.3.0" + lit-html "^2.8.0" + +lit-element@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.0.3.tgz#18239840a7c1a6a6e09c6ed3b5cd3db0512ebf15" + integrity sha512-2vhidmC7gGLfnVx41P8UZpzyS0Fb8wYhS5RCm16cMW3oERO0Khd3EsKwtRpOnttuByI5rURjT2dfoA7NlInCNw== + dependencies: + "@lit-labs/ssr-dom-shim" "^1.1.2" + "@lit/reactive-element" "^2.0.0" + lit-html "^3.1.0" + +lit-html@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" + integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== + dependencies: + "@types/trusted-types" "^2.0.2" + +lit-html@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.1.1.tgz#50c2e74a2074f85fc9816676ac11cf0c96f257c3" + integrity sha512-x/EwfGk2D/f4odSFM40hcGumzqoKv0/SUh6fBO+1Ragez81APrcAMPo1jIrCDd9Sn+Z4CT867HWKViByvkDZUA== + dependencies: + "@types/trusted-types" "^2.0.2" + +lit@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" + integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== + dependencies: + "@lit/reactive-element" "^1.6.0" + lit-element "^3.3.0" + lit-html "^2.8.0" + +lit@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lit/-/lit-3.1.0.tgz#76429b85dc1f5169fed499a0f7e89e2e619010c9" + integrity sha512-rzo/hmUqX8zmOdamDAeydfjsGXbbdtAFqMhmocnh2j9aDYqbu0fjXygjCa0T99Od9VQ/2itwaGrjZz/ZELVl7w== + dependencies: + "@lit/reactive-element" "^2.0.0" + lit-element "^4.0.0" + lit-html "^3.1.0" + +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash.defaults@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== + +lodash.isarguments@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + integrity sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg== + +lodash.isequal@4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + +lodash@^4.17.20, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +loose-envify@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + +lru-cache@^10.0.2: + version "10.1.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.1.0.tgz#2098d41c2dc56500e6c88584aa656c84de7d0484" + integrity sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +magic-string@^0.30.5: + version "0.30.5" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9" + integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +micromatch@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.27: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + +minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +mlly@^1.2.0, mlly@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.5.0.tgz#8428a4617d54cc083d3009030ac79739a0e5447a" + integrity sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ== + dependencies: + acorn "^8.11.3" + pathe "^1.1.2" + pkg-types "^1.0.3" + ufo "^1.3.2" + +motion@10.16.2: + version "10.16.2" + resolved "https://registry.yarnpkg.com/motion/-/motion-10.16.2.tgz#7dc173c6ad62210a7e9916caeeaf22c51e598d21" + integrity sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ== + dependencies: + "@motionone/animation" "^10.15.1" + "@motionone/dom" "^10.16.2" + "@motionone/svelte" "^10.16.2" + "@motionone/types" "^10.15.1" + "@motionone/utils" "^10.15.1" + "@motionone/vue" "^10.16.2" + +mri@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.0.0: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multiformats@^9.4.2: + version "9.9.0" + resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" + integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== + +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + +napi-wasm@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" + integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-addon-api@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.0.tgz#71f609369379c08e251c558527a107107b5e0fdb" + integrity sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g== + +node-fetch-native@^1.4.0, node-fetch-native@^1.4.1, node-fetch-native@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.1.tgz#f95c74917d3cebc794cdae0cd2a9c7594aad0cb4" + integrity sha512-bW9T/uJDPAJB2YNYEpWzE54U5O3MQidXsOyTfnbKYtTtFexRvGzb1waphBN4ZwP6EcIvYYEOwW0b72BpAqydTw== + +node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +node-forge@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + +node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.0.tgz#3fee9c1731df4581a3f9ead74664369ff00d26dd" + integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og== + +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.2.0.tgz#224cdd22c755560253dd71b83a1ef2f758b2e955" + integrity sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg== + dependencies: + path-key "^4.0.0" + +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + +object-inspect@^1.9.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + +ofetch@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.3.3.tgz#588cb806a28e5c66c2c47dd8994f9059a036d8c0" + integrity sha512-s1ZCMmQWXy4b5K/TW9i/DtiN8Ku+xCiHcjQ6/J/nDdssirrQNOoB165Zu8EqLMA2lln1JUth9a0aW9Ap2ctrUg== + dependencies: + destr "^2.0.1" + node-fetch-native "^1.4.0" + ufo "^1.3.0" + +on-exit-leak-free@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" + integrity sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg== + +once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +param-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" + integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + +pascal-case@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" + integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +pathe@^1.1.0, pathe@^1.1.1, pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== + +pify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" + integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== + +pino-abstract-transport@v0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz#4b54348d8f73713bfd14e3dc44228739aa13d9c0" + integrity sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ== + dependencies: + duplexify "^4.1.2" + split2 "^4.0.0" + +pino-std-serializers@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz#1791ccd2539c091ae49ce9993205e2cd5dbba1e2" + integrity sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q== + +pino@7.11.0: + version "7.11.0" + resolved "https://registry.yarnpkg.com/pino/-/pino-7.11.0.tgz#0f0ea5c4683dc91388081d44bff10c83125066f6" + integrity sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg== + dependencies: + atomic-sleep "^1.0.0" + fast-redact "^3.0.0" + on-exit-leak-free "^0.2.0" + pino-abstract-transport v0.5.0 + pino-std-serializers "^4.0.0" + process-warning "^1.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.1.0" + safe-stable-stringify "^2.1.0" + sonic-boom "^2.2.1" + thread-stream "^0.15.1" + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +pkg-types@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.3.tgz#988b42ab19254c01614d13f4f65a2cfc7880f868" + integrity sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A== + dependencies: + jsonc-parser "^3.2.0" + mlly "^1.2.0" + pathe "^1.1.0" + +pngjs@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" + integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== + +postcss@^8.4.33: + version "8.4.33" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.33.tgz#1378e859c9f69bf6f638b990a0212f43e2aaa742" + integrity sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.0.2" + +preact@^10.12.0, preact@^10.5.9: + version "10.19.3" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.19.3.tgz#7a7107ed2598a60676c943709ea3efb8aaafa899" + integrity sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ== + +pretty-error@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6" + integrity sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw== + dependencies: + lodash "^4.17.20" + renderkid "^3.0.0" + +process-warning@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" + integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== + +proxy-compare@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/proxy-compare/-/proxy-compare-2.5.1.tgz#17818e33d1653fbac8c2ec31406bce8a2966f600" + integrity sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA== + +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +qrcode@1.5.3, qrcode@^1.5.1: + version "1.5.3" + resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.3.tgz#03afa80912c0dccf12bc93f615a535aad1066170" + integrity sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg== + dependencies: + dijkstrajs "^1.0.1" + encode-utf8 "^1.0.3" + pngjs "^5.0.0" + yargs "^15.3.1" + +qs@^6.10.3: + version "6.11.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" + integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== + dependencies: + side-channel "^1.0.4" + +query-string@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328" + integrity sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg== + dependencies: + decode-uri-component "^0.2.2" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + +query-string@^6.13.5: + version "6.14.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" + integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== + dependencies: + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + +quick-format-unescaped@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" + integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== + +radix3@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/radix3/-/radix3-1.1.0.tgz#9745df67a49c522e94a33d0a93cf743f104b6e0d" + integrity sha512-pNsHDxbGORSvuSScqNJ+3Km6QAVqk8CfsCBIEoDgpqLrkD2f3QM4I7d1ozJJ172OmIcoUcerZaNWqtLkRXTV3A== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +react-dom@>=17: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== + dependencies: + loose-envify "^1.1.0" + scheduler "^0.23.0" + +react@>=17: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== + dependencies: + loose-envify "^1.1.0" + +readable-stream@^3.1.1, readable-stream@^3.5.0, readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +real-require@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.1.0.tgz#736ac214caa20632847b7ca8c1056a0767df9381" + integrity sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg== + +rechoir@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" + integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== + dependencies: + resolve "^1.9.0" + +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + +redis-errors@^1.0.0, redis-errors@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/redis-errors/-/redis-errors-1.2.0.tgz#eb62d2adb15e4eaf4610c04afe1529384250abad" + integrity sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w== + +redis-parser@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-3.0.0.tgz#b66d828cdcafe6b4b8a428a7def4c6bcac31c8b4" + integrity sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A== + dependencies: + redis-errors "^1.0.0" + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +relateurl@^0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + integrity sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog== + +renderkid@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-3.0.0.tgz#5fd823e4d6951d37358ecc9a58b1f06836b6268a" + integrity sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg== + dependencies: + css-select "^4.1.3" + dom-converter "^0.2.0" + htmlparser2 "^6.1.0" + lodash "^4.17.21" + strip-ansi "^6.0.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve@^1.20.0, resolve@^1.9.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +rpc-websockets@^7.5.1: + version "7.9.0" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.9.0.tgz#a3938e16d6f134a3999fdfac422a503731bf8973" + integrity sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw== + dependencies: + "@babel/runtime" "^7.17.2" + eventemitter3 "^4.0.7" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + +rxjs@^6.6.3: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-stable-stringify@^2.1.0: + version "2.4.3" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" + integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== + +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== + dependencies: + loose-envify "^1.1.0" + +schema-utils@^3.1.1, schema-utils@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +semver@^7.3.8: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + +serialize-javascript@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + +set-function-length@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.0.tgz#2f81dc6c16c7059bda5ab7c82c11f03a515ed8e1" + integrity sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w== + dependencies: + define-data-property "^1.1.1" + function-bind "^1.1.2" + get-intrinsic "^1.2.2" + gopd "^1.0.1" + has-property-descriptors "^1.0.1" + +sha.js@^2.4.11: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +sonic-boom@^2.2.1: + version "2.8.0" + resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611" + integrity sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg== + dependencies: + atomic-sleep "^1.0.0" + +source-list-map@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + +split2@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" + integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== + +standard-as-callback@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/standard-as-callback/-/standard-as-callback-2.1.0.tgz#8953fc05359868a77b5b9739a665c5977bb7df45" + integrity sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A== + +std-env@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== + +stream-browserify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" + integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== + dependencies: + inherits "~2.0.4" + readable-stream "^3.5.0" + +stream-shift@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" + integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== + +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + +superstruct@^0.14.2: + version "0.14.2" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b" + integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== + +superstruct@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-1.0.3.tgz#de626a5b49c6641ff4d37da3c7598e7a87697046" + integrity sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +system-architecture@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/system-architecture/-/system-architecture-0.1.0.tgz#71012b3ac141427d97c67c56bc7921af6bff122d" + integrity sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA== + +tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser-webpack-plugin@^5.3.7: + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + dependencies: + "@jridgewell/trace-mapping" "^0.3.20" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.26.0" + +terser@^5.10.0, terser@^5.26.0: + version "5.27.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.27.0.tgz#70108689d9ab25fef61c4e93e808e9fd092bf20c" + integrity sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +text-encoding-utf-8@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" + integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== + +thread-stream@^0.15.1: + version "0.15.2" + resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-0.15.2.tgz#fb95ad87d2f1e28f07116eb23d85aba3bc0425f4" + integrity sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA== + dependencies: + real-require "^0.1.0" + +"through@>=2.2.7 <3": + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toggle-selection@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" + integrity sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +tslib@1.14.1, tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.0.0, tslib@^2.0.3, tslib@^2.3.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + +typedarray-to-buffer@3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +ufo@^1.3.0, ufo@^1.3.1, ufo@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.2.tgz#c7d719d0628a1c80c006d2240e0d169f6e3c0496" + integrity sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA== + +uint8arrays@^3.0.0, uint8arrays@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" + integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== + dependencies: + multiformats "^9.4.2" + +uncrypto@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/uncrypto/-/uncrypto-0.1.3.tgz#e1288d609226f2d02d8d69ee861fa20d8348ef2b" + integrity sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +unenv@^1.8.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.9.0.tgz#469502ae85be1bd3a6aa60f810972b1a904ca312" + integrity sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g== + dependencies: + consola "^3.2.3" + defu "^6.1.3" + mime "^3.0.0" + node-fetch-native "^1.6.1" + pathe "^1.1.1" + +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + +unstorage@^1.9.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.10.1.tgz#bf8cc00a406e40a6293e893da9807057d95875b0" + integrity sha512-rWQvLRfZNBpF+x8D3/gda5nUCQL2PgXy2jNG4U7/Rc9BGEv9+CAJd0YyGCROUBKs9v49Hg8huw3aih5Bf5TAVw== + dependencies: + anymatch "^3.1.3" + chokidar "^3.5.3" + destr "^2.0.2" + h3 "^1.8.2" + ioredis "^5.3.2" + listhen "^1.5.5" + lru-cache "^10.0.2" + mri "^1.2.0" + node-fetch-native "^1.4.1" + ofetch "^1.3.3" + ufo "^1.3.1" + +untun@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/untun/-/untun-0.1.3.tgz#5d10dee37a3a5737ff03d158be877dae0a0e58a6" + integrity sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ== + dependencies: + citty "^0.1.5" + consola "^3.2.3" + pathe "^1.1.1" + +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +uqr@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/uqr/-/uqr-0.1.2.tgz#5c6cd5dcff9581f9bb35b982cb89e2c483a41d7d" + integrity sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +use-sync-external-store@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" + integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== + +utf-8-validate@^5.0.2: + version "5.0.10" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== + dependencies: + node-gyp-build "^4.3.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +util@^0.12.4: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + +utila@~0.4: + version "0.4.0" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + integrity sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +valtio@1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.11.2.tgz#b8049c02dfe65620635d23ebae9121a741bb6530" + integrity sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw== + dependencies: + proxy-compare "2.5.1" + use-sync-external-store "1.2.0" + +viem@1.21.4, viem@^1.0.0, viem@^1.6.0: + version "1.21.4" + resolved "https://registry.yarnpkg.com/viem/-/viem-1.21.4.tgz#883760e9222540a5a7e0339809202b45fe6a842d" + integrity sha512-BNVYdSaUjeS2zKQgPs+49e5JKocfo60Ib2yiXOWBT6LuVxY1I/6fFX3waEtpXvL1Xn4qu+BVitVtMh9lyThyhQ== + dependencies: + "@adraffy/ens-normalize" "1.10.0" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" + "@scure/bip32" "1.3.2" + "@scure/bip39" "1.2.1" + abitype "0.9.8" + isows "1.0.3" + ws "8.13.0" + +vue@>=3: + version "3.4.15" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.4.15.tgz#91f979844ffca9239dff622ba4c79c5d5524b88c" + integrity sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ== + dependencies: + "@vue/compiler-dom" "3.4.15" + "@vue/compiler-sfc" "3.4.15" + "@vue/runtime-dom" "3.4.15" + "@vue/server-renderer" "3.4.15" + "@vue/shared" "3.4.15" + +watchpack@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +webpack-cli@^5.0.1: + version "5.1.4" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" + integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^2.1.1" + "@webpack-cli/info" "^2.0.2" + "@webpack-cli/serve" "^2.0.5" + colorette "^2.0.14" + commander "^10.0.1" + cross-spawn "^7.0.3" + envinfo "^7.7.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^3.1.1" + rechoir "^0.8.0" + webpack-merge "^5.7.3" + +webpack-manifest-plugin@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/webpack-manifest-plugin/-/webpack-manifest-plugin-5.0.0.tgz#084246c1f295d1b3222d36e955546433ca8df803" + integrity sha512-8RQfMAdc5Uw3QbCQ/CBV/AXqOR8mt03B6GJmRbhWopE8GzRfEpn+k0ZuWywxW+5QZsffhmFDY1J6ohqJo+eMuw== + dependencies: + tapable "^2.0.0" + webpack-sources "^2.2.0" + +webpack-merge@^5.7.3: + version "5.10.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" + integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== + dependencies: + clone-deep "^4.0.1" + flat "^5.0.2" + wildcard "^2.0.0" + +webpack-nano@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/webpack-nano/-/webpack-nano-1.1.1.tgz#63fb3973a6b6267163cc9f641241987f80f7d7ab" + integrity sha512-3dypjHtWQylpgsYmaovsUgFmXmDBoArq8aNMvDjmhVRpaA8MQsYxMiXgsp09GYL3n5y+1PfscytrFW3IXknlIQ== + dependencies: + chalk "^4.1.0" + import-local "^3.0.2" + rechoir "^0.7.0" + yargs-parser "^20.2.1" + +webpack-sources@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.1.tgz#570de0af163949fe272233c2cefe1b56f74511fd" + integrity sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA== + dependencies: + source-list-map "^2.0.1" + source-map "^0.6.1" + +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@^5.75.0: + version "5.89.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.89.0.tgz#56b8bf9a34356e93a6625770006490bf3a7f32dc" + integrity sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.0" + "@webassemblyjs/ast" "^1.11.5" + "@webassemblyjs/wasm-edit" "^1.11.5" + "@webassemblyjs/wasm-parser" "^1.11.5" + acorn "^8.7.1" + acorn-import-assertions "^1.9.0" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.15.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.7" + watchpack "^2.4.0" + webpack-sources "^3.2.3" + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" + integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== + +which-typed-array@^1.1.11, which-typed-array@^1.1.2: + version "1.1.13" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" + integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.4" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wildcard@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@8.13.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" + integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== + +ws@^7.4.5, ws@^7.5.1: + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + +ws@^8.5.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" + integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== + +xtend@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^20.2.1: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs@^15.3.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + +zod@3.22.4: + version "3.22.4" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff" + integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg== + +zustand@^4.3.1: + version "4.5.0" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.0.tgz#141354af56f91de378aa6c4b930032ab338f3ef0" + integrity sha512-zlVFqS5TQ21nwijjhJlx4f9iGrXSL0o/+Dpy4txAP22miJ8Ti6c1Ol1RLNN98BMib83lmDH/2KmLwaNXpjrO1A== + dependencies: + use-sync-external-store "1.2.0" diff --git a/pretix_eth/templates/pretix_eth/web3modal.html b/pretix_eth/templates/pretix_eth/web3modal.html index d7edf839..a2517447 100644 --- a/pretix_eth/templates/pretix_eth/web3modal.html +++ b/pretix_eth/templates/pretix_eth/web3modal.html @@ -5,7 +5,7 @@
- +