Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
www
/
tuitioncoin.org
/
wallet
/
static
/
js
/
Filename :
443.8deab6bb.chunk.js
back
Copy
/*! For license information please see 443.8deab6bb.chunk.js.LICENSE.txt */ (self.webpackChunkwallet_connect=self.webpackChunkwallet_connect||[]).push([[443],{8984:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;const n=r(7190),i=r(4174),s=r(6527),o=r(5173),a=r(1004),u=r(1293),c=r(7742),l=r(8851),h=r(5491);class d{constructor(t){var e,r,n;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const o=t.linkAPIUrl||i.LINK_API_URL;let l;if(l=t.uiConstructor?t.uiConstructor:t=>new a.WalletSDKUI(t),"undefined"===typeof t.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this._overrideIsCoinbaseBrowser=null!==(r=t.overrideIsCoinbaseBrowser)&&void 0!==r&&r,t.diagnosticLogger&&t.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");t.eventListener?this._diagnosticLogger={log:t.eventListener.onEvent}:this._diagnosticLogger=t.diagnosticLogger,this._reloadOnDisconnect=null===(n=t.reloadOnDisconnect)||void 0===n||n;const f=new URL(o),p=`${f.protocol}//${f.host}`;this._storage=new s.ScopedLocalStorage(`-walletlink:${p}`),this._storage.setItem("version",d.VERSION),this.walletExtension||this.coinbaseBrowser||(this._relayEventManager=new c.WalletSDKRelayEventManager,this._relay=new u.WalletSDKRelay({linkAPIUrl:o,version:h.LIB_VERSION,darkMode:!!t.darkMode,uiConstructor:l,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect}),this.setAppInfo(t.appName,t.appLogoUrl),t.headlessMode||this._relay.attachUI())}makeWeb3Provider(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const r=this.walletExtension;if(r)return this.isCipherProvider(r)||r.setProviderInfo(t,e),!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 t||i.setConnectDisabled(!0),new o.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(i),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:e,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(t,e){var r;this._appName=t||"DApp",this._appLogoUrl=e||(0,l.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 t;const e=this.walletExtension;e?e.close():null===(t=this._relay)||void 0===t||t.resetAndReload()}getQrUrl(){var t,e;return null!==(e=null===(t=this._relay)||void 0===t?void 0:t.getQRCodeUrl())&&void 0!==e?e:null}getCoinbaseWalletLogo(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:240;return(0,n.walletLogo)(t,e)}get walletExtension(){var t;return null!==(t=window.coinbaseWalletExtension)&&void 0!==t?t:window.walletLinkExtension}get coinbaseBrowser(){var t,e;try{const r=null!==(t=window.ethereum)&&void 0!==t?t:null===(e=window.top)||void 0===e?void 0:e.ethereum;if(!r)return;return"isCoinbaseBrowser"in r&&r.isCoinbaseBrowser?r:void 0}catch(r){return}}isCipherProvider(t){return"boolean"===typeof t.isCipher&&t.isCipher}}e.CoinbaseWalletSDK=d,d.VERSION=h.LIB_VERSION},7190:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.walletLogo=void 0;e.walletLogo=(t,e)=>{let r;switch(t){case"standard":default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' 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=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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`}}},9073:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.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}"},2147:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseAppSteps=e.CoinbaseWalletSteps=e.ConnectItem=e.ConnectContent=void 0;const i=n(r(1638)),s=r(7866),o=r(7840),a=r(8851),u=r(5491),c=r(4100),l=n(r(7119)),h=n(r(485)),d=r(1398),f=n(r(41)),p=n(r(2872)),y=r(5241),g=r(968),m=r(8939),b=n(r(9073)),v={"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:l.default,steps:S}},_=t=>"light"===t?"#FFFFFF":"#0A0B0D";function w(t){let{title:e,description:r,icon:n,selected:o,theme:a,onClick:u}=t;return(0,s.h)("div",{onClick:u,class:(0,i.default)("-cbwsdk-connect-item",a,{selected:o})},(0,s.h)("div",null,(0,s.h)("img",{src:n,alt:e})),(0,s.h)("div",{class:"-cbwsdk-connect-item-copy-wrapper"},(0,s.h)("h3",{class:"-cbwsdk-connect-item-title"},e),(0,s.h)("p",{class:"-cbwsdk-connect-item-description"},r)))}function E(t){let{theme:e}=t;return(0,s.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,s.h)("li",{class:(0,i.default)("-cbwsdk-wallet-steps-item",e)},(0,s.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,s.h)("li",{class:(0,i.default)("-cbwsdk-wallet-steps-item",e)},(0,s.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,s.h)("span",null,"Tap ",(0,s.h)("strong",null,"Scan")," "),(0,s.h)("span",{class:(0,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,s.h)(d.QRCodeIcon,{fill:_(e)})))))}function S(t){let{theme:e}=t;return(0,s.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,s.h)("li",{class:(0,i.default)("-cbwsdk-wallet-steps-item",e)},(0,s.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase app")),(0,s.h)("li",{class:(0,i.default)("-cbwsdk-wallet-steps-item",e)},(0,s.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,s.h)("span",null,"Tap ",(0,s.h)("strong",null,"More")),(0,s.h)("span",{class:(0,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,s.h)(y.StatusDotIcon,{fill:_(e)})),(0,s.h)("span",{class:"-cbwsdk-wallet-steps-pad-left"},"then ",(0,s.h)("strong",null,"Scan")),(0,s.h)("span",{class:(0,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,s.h)(d.QRCodeIcon,{fill:_(e)})))))}e.ConnectContent=function(t){const{theme:e}=t,[r,n]=(0,o.useState)("coinbase-wallet-app"),l=(0,o.useCallback)((t=>{n(t)}),[]),h=(0,a.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection,t.version,t.chainId);if(!r)return null;const d=v[r].steps,y="coinbase-app"===r;return(0,s.h)("div",{"data-testid":"connect-content",class:(0,i.default)("-cbwsdk-connect-content",e)},(0,s.h)("style",null,b.default),(0,s.h)("div",{class:"-cbwsdk-connect-content-header"},(0,s.h)("h2",{class:(0,i.default)("-cbwsdk-connect-content-heading",e)},"Scan to connect with one of our mobile apps"),t.onCancel&&(0,s.h)("button",{type:"button",class:"-cbwsdk-cancel-button",onClick:t.onCancel},(0,s.h)(c.CloseIcon,{fill:"light"===e?"#0A0B0D":"#FFFFFF"}))),(0,s.h)("div",{class:"-cbwsdk-connect-content-layout"},(0,s.h)("div",{class:"-cbwsdk-connect-content-column-left"},(0,s.h)("div",null,Object.entries(v).map((t=>{let[n,i]=t;return(0,s.h)(w,{key:n,title:i.title,description:i.description,icon:i.icon,selected:r===n,onClick:()=>l(n),theme:e})}))),y&&(0,s.h)("div",{class:(0,i.default)("-cbwsdk-connect-content-update-app",e)},"Don\u2019t see a ",(0,s.h)("strong",null,"Scan")," option? Update your Coinbase app to the latest version and try again.")),(0,s.h)("div",{class:"-cbwsdk-connect-content-column-right"},(0,s.h)("div",{class:"-cbwsdk-connect-content-qr-wrapper"},(0,s.h)(g.QRCode,{content:h,width:200,height:200,fgColor:"#000",bgColor:"transparent",image:{svg:(_=r,"coinbase-app"===_?f.default:p.default),width:25,height:25}}),(0,s.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:u.LIB_VERSION}),(0,s.h)("input",{type:"hidden",value:h})),(0,s.h)(d,{theme:e}),!t.isConnected&&(0,s.h)("div",{"data-testid":"connecting-spinner",class:(0,i.default)("-cbwsdk-connect-content-qr-connecting",e)},(0,s.h)(m.Spinner,{size:36,color:"dark"===e?"#FFF":"#000"}),(0,s.h)("p",null,"Connecting...")))));var _},e.ConnectItem=w,e.CoinbaseWalletSteps=E,e.CoinbaseAppSteps=S},8725:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.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}"},5807:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectDialog=void 0;const i=n(r(1638)),s=r(7866),o=r(7840),a=r(2147),u=r(4987),c=n(r(8725));e.ConnectDialog=t=>{const{isOpen:e,darkMode:r}=t,[n,l]=(0,o.useState)(!e),[h,d]=(0,o.useState)(!e);(0,o.useEffect)((()=>{const t=[window.setTimeout((()=>{d(!e)}),10)];return e?l(!1):t.push(window.setTimeout((()=>{l(!0)}),360)),()=>{t.forEach(window.clearTimeout)}}),[t.isOpen]);const f=r?"dark":"light";return(0,s.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,s.h)("style",null,c.default),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-backdrop",f,h&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,s.h)("div",{class:"-cbwsdk-connect-dialog"},(0,s.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-box",h&&"-cbwsdk-connect-dialog-box-hidden")},t.connectDisabled?null:(0,s.h)(a.ConnectContent,{theme:f,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection,chainId:t.chainId,onCancel:t.onCancel}),(0,s.h)(u.TryExtensionContent,{theme:f}))))}},4949:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const n=r(7866),i=r(4848),s=r(5807);e.LinkFlow=class{constructor(t){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=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$,this.chainId$=t.chainId$}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",t.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((t=>{this.isConnected!==t&&(this.isConnected=t,this.render())}))),this.subscriptions.add(this.chainId$.subscribe((t=>{this.chainId!==t&&(this.chainId=t,this.render())})))}detach(){var t;this.root&&(this.subscriptions.unsubscribe(),(0,n.render)(null,this.root),null===(t=this.root.parentElement)||void 0===t||t.removeChild(this.root))}setConnectDisabled(t){this.connectDisabled=t}open(t){this.isOpen=!0,this.onCancel=t.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const t=this.extensionUI$.subscribe((()=>{this.root&&(0,n.render)((0,n.h)(s.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(t)}}},968:function(t,e,r){"use strict";var n=r(8381).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;const s=r(7866),o=r(7840),a=i(r(4262));e.QRCode=t=>{const[e,r]=(0,o.useState)("");return(0,o.useEffect)((()=>{var e,i;const s=new a.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(e=t.width)&&void 0!==e?e:256,height:null!==(i=t.height)&&void 0!==i?i:256,padding:0,image:t.image}),o=n.from(s.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${o}`)})),e?(0,s.h)("img",{src:e,alt:"QR Code"}):null}},1845:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},2111:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const i=n(r(1638)),s=r(7866),o=r(7840),a=n(r(1845));function u(t){return"coinbase-app"===t?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0LjY3NCAxOC44NThjLTIuMDQ1IDAtMy42NDgtMS43MjItMy42NDgtMy44NDVzMS42NTktMy44NDUgMy42NDgtMy44NDVjMS44MjQgMCAzLjMxNyAxLjM3NyAzLjU5MyAzLjIxNGgzLjcwM2MtLjMzMS0zLjk2LTMuNDgyLTcuMDU5LTcuMjk2LTcuMDU5LTQuMDM0IDAtNy4zNSAzLjQ0My03LjM1IDcuNjkgMCA0LjI0NiAzLjI2IDcuNjkgNy4zNSA3LjY5IDMuODcgMCA2Ljk2NS0zLjEgNy4yOTYtNy4wNTloLTMuNzAzYy0uMjc2IDEuODM2LTEuNzY5IDMuMjE0LTMuNTkzIDMuMjE0WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0wIDEwLjY3OGMwLTMuNzExIDAtNS41OTYuNzQyLTcuMDIzQTYuNTMyIDYuNTMyIDAgMCAxIDMuNjU1Ljc0MkM1LjA4MiAwIDYuOTY3IDAgMTAuNjc4IDBoNy45MzhjMy43MTEgMCA1LjU5NiAwIDcuMDIzLjc0MmE2LjUzMSA2LjUzMSAwIDAgMSAyLjkxMyAyLjkxM2MuNzQyIDEuNDI3Ljc0MiAzLjMxMi43NDIgNy4wMjN2Ny45MzhjMCAzLjcxMSAwIDUuNTk2LS43NDIgNy4wMjNhNi41MzEgNi41MzEgMCAwIDEtMi45MTMgMi45MTNjLTEuNDI3Ljc0Mi0zLjMxMi43NDItNy4wMjMuNzQyaC03LjkzOGMtMy43MTEgMC01LjU5NiAwLTcuMDIzLS43NDJhNi41MzEgNi41MzEgMCAwIDEtMi45MTMtMi45MTNDMCAyNC4yMTIgMCAyMi4zODQgMCAxOC42MTZ2LTcuOTM4WiIgZmlsbD0iIzAwNTJGRiIvPjxwYXRoIGQ9Ik0xNC42ODQgMTkuNzczYy0yLjcyNyAwLTQuODY0LTIuMjk1LTQuODY0LTUuMTI2IDAtMi44MzEgMi4yMS01LjEyNyA0Ljg2NC01LjEyNyAyLjQzMiAwIDQuNDIyIDEuODM3IDQuNzkgNC4yODVoNC45MzhjLS40NDItNS4yOC00LjY0My05LjQxMS05LjcyOC05LjQxMS01LjM4IDAtOS44MDIgNC41OS05LjgwMiAxMC4yNTMgMCA1LjY2MiA0LjM0OCAxMC4yNTMgOS44MDIgMTAuMjUzIDUuMTU5IDAgOS4yODYtNC4xMzIgOS43MjgtOS40MTFoLTQuOTM4Yy0uMzY4IDIuNDQ4LTIuMzU4IDQuMjg0LTQuNzkgNC4yODRaIiBmaWxsPSIjZmZmIi8+PC9zdmc+":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"}e.Snackbar=class{constructor(t){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=t.darkMode}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",t.appendChild(this.root),this.render()}presentItem(t){const e=this.nextItemKey++;return this.items.set(e,t),this.render(),()=>{this.items.delete(e),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,s.render)((0,s.h)("div",null,(0,s.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((t=>{let[r,n]=t;return(0,s.h)(e.SnackbarInstance,Object.assign({},n,{key:r}))})))),this.root)}};e.SnackbarContainer=t=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,s.h)("style",null,a.default),(0,s.h)("div",{class:"-cbwsdk-snackbar"},t.children));e.SnackbarInstance=t=>{let{autoExpand:e,message:r,menuItems:n,appSrc:a}=t;const[c,l]=(0,o.useState)(!0),[h,d]=(0,o.useState)(null!==e&&void 0!==e&&e);(0,o.useEffect)((()=>{const t=[window.setTimeout((()=>{l(!1)}),1),window.setTimeout((()=>{d(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}}));return(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",c&&"-cbwsdk-snackbar-instance-hidden",h&&"-cbwsdk-snackbar-instance-expanded")},(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{d(!h)}},(0,s.h)("img",{src:u(a),class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},r),(0,s.h)("div",{class:"-gear-container"},!h&&(0,s.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,s.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),n&&n.length>0&&(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},n.map(((t,e)=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:t.onClick,key:e},(0,s.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,s.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},t.info))))))}},1097:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},8939:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;const i=r(7866),s=n(r(1097));e.Spinner=t=>{var e;const r=null!==(e=t.size)&&void 0!==e?e:64,n=t.color||"#000";return(0,i.h)("div",{class:"-cbwsdk-spinner"},(0,i.h)("style",null,s.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}})))}},1225:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.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}"},4987:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TryExtensionContent=void 0;const i=n(r(1638)),s=r(7866),o=r(7840),a=r(5055),u=r(6920),c=r(733),l=n(r(1225));e.TryExtensionContent=function(t){let{theme:e}=t;const[r,n]=(0,o.useState)(!1),h=(0,o.useCallback)((()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}),[]),d=(0,o.useCallback)((()=>{r?window.location.reload():(h(),n(!0))}),[h,r]);return(0,s.h)("div",{class:(0,i.default)("-cbwsdk-try-extension",e)},(0,s.h)("style",null,l.default),(0,s.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,s.h)("h3",{class:(0,i.default)("-cbwsdk-try-extension-heading",e)},"Or try the Coinbase Wallet browser extension"),(0,s.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,s.h)("button",{class:(0,i.default)("-cbwsdk-try-extension-cta",e),onClick:d},r?"Refresh":"Install"),(0,s.h)("div",null,!r&&(0,s.h)(a.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:"light"===e?"#0052FF":"#588AF5"})))),(0,s.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,s.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,s.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,s.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,s.h)("span",{class:(0,i.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,s.h)(u.LaptopIcon,{fill:"light"===e?"#0A0B0D":"#FFFFFF"}))),(0,s.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,s.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,s.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,s.h)("span",{class:(0,i.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,s.h)(c.SafeIcon,{fill:"light"===e?"#0A0B0D":"#FFFFFF"}))),(0,s.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")))))}},5055:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrowLeftIcon=void 0;const n=r(7866);e.ArrowLeftIcon=function(t){return(0,n.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t),(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"}))}},4100:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CloseIcon=void 0;const n=r(7866);e.CloseIcon=function(t){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"},t),(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"}))}},6920:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LaptopIcon=void 0;const n=r(7866);e.LaptopIcon=function(t){return(0,n.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(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"}))}},1398:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QRCodeIcon=void 0;const n=r(7866);e.QRCodeIcon=function(t){return(0,n.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t),(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"}))}},41:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default='\n <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M50 100C77.6142 100 100 77.6142 100 50C100 22.3858 77.6142 0 50 0C22.3858 0 0 22.3858 0 50C0 77.6142 22.3858 100 50 100Z" fill="white"/>\n <path d="M50.512 94C74.2907 94 93.5673 74.5244 93.5673 50.5C93.5673 26.4756 74.2907 7 50.512 7C26.7332 7 7.45667 26.4756 7.45667 50.5C7.45667 74.5244 26.7332 94 50.512 94Z" fill="#0052FF"/>\n <path d="M50.6248 65.4335C42.3697 65.4335 35.8996 58.7469 35.8996 50.5C35.8996 42.2531 42.5928 35.5664 50.6248 35.5664C57.9873 35.5664 64.0111 40.9157 65.1267 48.0481H80.0749C78.7363 32.6688 66.0191 20.6328 50.6248 20.6328C34.3379 20.6328 20.9514 34.0062 20.9514 50.5C20.9514 66.9936 34.1148 80.3671 50.6248 80.3671C66.2422 80.3671 78.7363 68.331 80.0749 52.9516H65.1267C64.0111 60.0841 57.9873 65.4335 50.6248 65.4335Z" fill="white"/>\n </svg>\n'},2872:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='\n <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n <circle cx="50" cy="50" r="50" fill="white"/>\n <circle cx="49.9996" cy="49.9996" r="43.6363" fill="#1B53E4"/>\n <circle cx="49.9996" cy="49.9996" r="43.6363" stroke="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M19.3379 49.9484C19.3379 66.8508 33.04 80.553 49.9425 80.553C66.8449 80.553 80.5471 66.8508 80.5471 49.9484C80.5471 33.0459 66.8449 19.3438 49.9425 19.3438C33.04 19.3438 19.3379 33.0459 19.3379 49.9484ZM44.0817 40.0799C41.8725 40.0799 40.0817 41.8708 40.0817 44.0799V55.8029C40.0817 58.012 41.8725 59.8029 44.0817 59.8029H55.8046C58.0138 59.8029 59.8046 58.012 59.8046 55.8029V44.0799C59.8046 41.8708 58.0138 40.0799 55.8046 40.0799H44.0817Z" fill="white"/>\n </svg>\n'},733:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SafeIcon=void 0;const n=r(7866);e.SafeIcon=function(t){return(0,n.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(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"}))}},5241:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusDotIcon=void 0;const n=r(7866);e.StatusDotIcon=function(t){return(0,n.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t),(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"}))}},7119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMTQuMDM3IDE4LjkyNmMtMi43NSAwLTQuOTA3LTIuMjA1LTQuOTA3LTQuOTI2IDAtMi43MiAyLjIzLTQuOTI2IDQuOTA3LTQuOTI2YTQuODY2IDQuODY2IDAgMCAxIDQuODMzIDQuMTE4aDQuOTgyYy0uNDQ2LTUuMDczLTQuNjg0LTkuMDQ0LTkuODE1LTkuMDQ0QzguNjEgNC4xNDggNC4xNDkgOC41NiA0LjE0OSAxNHM0LjM4NyA5Ljg1MiA5Ljg5IDkuODUyYzUuMjA0IDAgOS4zNjgtMy45NyA5LjgxNC05LjA0M0gxOC44N2E0Ljg2NiA0Ljg2NiAwIDAgMS00LjgzMyA0LjExN1oiIGZpbGw9IiNmZmYiLz48L3N2Zz4="},485:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMjMuODUyIDE0QTkuODM0IDkuODM0IDAgMCAxIDE0IDIzLjg1MiA5LjgzNCA5LjgzNCAwIDAgMSA0LjE0OCAxNCA5LjgzNCA5LjgzNCAwIDAgMSAxNCA0LjE0OCA5LjgzNCA5LjgzNCAwIDAgMSAyMy44NTIgMTRaIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTExLjE4NSAxMi41MDRjMC0uNDU2IDAtLjcxLjA5OC0uODYyLjA5OC0uMTUyLjE5Ni0uMzA0LjM0My0uMzU1LjE5Ni0uMTAyLjM5Mi0uMTAyLjg4MS0uMTAyaDIuOTg2Yy40OSAwIC42ODYgMCAuODgyLjEwMi4xNDYuMTAxLjI5My4yMDMuMzQyLjM1NS4wOTguMjAzLjA5OC40MDYuMDk4Ljg2MnYyLjk5MmMwIC40NTcgMCAuNzEtLjA5OC44NjMtLjA5OC4xNTItLjE5NS4zMDQtLjM0Mi4zNTUtLjE5Ni4xMDEtLjM5Mi4xMDEtLjg4Mi4xMDFoLTIuOTg2Yy0uNDkgMC0uNjg1IDAtLjg4LS4xMDEtLjE0OC0uMTAyLS4yOTUtLjIwMy0uMzQ0LS4zNTUtLjA5OC0uMjAzLS4wOTgtLjQwNi0uMDk4LS44NjN2LTIuOTkyWiIgZmlsbD0iIzAwNTJGRiIvPjwvc3ZnPg=="},5974:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientMessagePublishEvent=e.ClientMessageSetSessionConfig=e.ClientMessageGetSessionConfig=e.ClientMessageIsLinked=e.ClientMessageHostSession=void 0,e.ClientMessageHostSession=function(t){return Object.assign({type:"HostSession"},t)},e.ClientMessageIsLinked=function(t){return Object.assign({type:"IsLinked"},t)},e.ClientMessageGetSessionConfig=function(t){return Object.assign({type:"GetSessionConfig"},t)},e.ClientMessageSetSessionConfig=function(t){return Object.assign({type:"SetSessionConfig"},t)},e.ClientMessagePublishEvent=function(t){return Object.assign({type:"PublishEvent"},t)}},3237:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},473:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const n=r(4848),i=r(1430);var s;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(s=e.ConnectionState||(e.ConnectionState={}));e.RxWebSocket=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new n.BehaviorSubject(s.DISCONNECTED),this.incomingDataSubject=new n.Subject,this.url=t.replace(/^http/,"ws")}connect(){return this.webSocket?(0,n.throwError)(new Error("webSocket object is not null")):new n.Observable((t=>{let e;try{this.webSocket=e=new this.WebSocketClass(this.url)}catch(r){return void t.error(r)}this.connectionStateSubject.next(s.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error(`websocket error ${e.code}: ${e.reason}`)),this.connectionStateSubject.next(s.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(s.CONNECTED)},e.onmessage=t=>{this.incomingDataSubject.next(t.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:t}=this;if(t){this.clearWebSocket(),this.connectionStateSubject.next(s.DISCONNECTED);try{t.close()}catch(e){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((t=>{let e;try{e=JSON.parse(t)}catch(r){return(0,n.empty)()}return(0,n.of)(e)})))}sendData(t){const{webSocket:e}=this;if(!e)throw new Error("websocket is not connected");e.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}},5029:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isServerMessageFail=void 0,e.isServerMessageFail=function(t){return t&&"Fail"===t.type&&"number"===typeof t.id&&"string"===typeof t.sessionId&&"string"===typeof t.error}},631:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKConnection=void 0;const n=r(4848),i=r(1430),s=r(1841),o=r(7322),a=r(5974),u=r(3237),c=r(473),l=r(5029);e.WalletSDKConnection=class{constructor(t,e,r,a){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;this.sessionId=t,this.sessionKey=e,this.diagnostic=a,this.subscriptions=new n.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,o.IntNumber)(1),this.connectedSubject=new n.BehaviorSubject(!1),this.linkedSubject=new n.BehaviorSubject(!1),this.sessionConfigSubject=new n.ReplaySubject(1);const h=new c.RxWebSocket(r+"/rpc",l);this.ws=h,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((e=>{var r;return null===(r=this.diagnostic)||void 0===r?void 0:r.log(u.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:s.Session.hash(t)})})),(0,i.skip)(1),(0,i.filter)((t=>t===c.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((t=>!this.destroyed)),(0,i.flatMap)((t=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((t=>(0,n.iif)((()=>t===c.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((t=>this.sendIsLinked())),(0,i.tap)((t=>this.sendGetSessionConfig())),(0,i.map)((t=>!0))),(0,n.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((t=>(0,n.of)(!1)))).subscribe((t=>this.connectedSubject.next(t)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((t=>(0,n.iif)((()=>t===c.ConnectionState.CONNECTED),(0,n.timer)(0,1e4))))).subscribe((t=>0===t?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((t=>"h"===t))).subscribe((t=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["IsLinkedOK","Linked"].includes(t.type)))).subscribe((e=>{var r;const n=e;null===(r=this.diagnostic)||void 0===r||r.log(u.EVENTS.LINKED,{sessionIdHash:s.Session.hash(t),linked:n.linked,type:e.type,onlineGuests:n.onlineGuests}),this.linkedSubject.next(n.linked||n.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["GetSessionConfigOK","SessionConfigUpdated"].includes(t.type)))).subscribe((e=>{var r;const n=e;null===(r=this.diagnostic)||void 0===r||r.log(u.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:s.Session.hash(t),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 t;if(this.destroyed)throw new Error("instance is destroyed");null===(t=this.diagnostic)||void 0===t||t.log(u.EVENTS.STARTED_CONNECTING,{sessionIdHash:s.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var t;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(t=this.diagnostic)||void 0===t||t.log(u.EVENTS.DISCONNECTED,{sessionIdHash:s.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,i.filter)((t=>{if("Event"!==t.type)return!1;const e=t;return"string"===typeof e.sessionId&&"string"===typeof e.eventId&&"string"===typeof e.event&&"string"===typeof e.data})),(0,i.map)((t=>t)))}setSessionMetadata(t,e){const r=(0,a.ClientMessageSetSessionConfig)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[t]:e}});return this.onceConnected$.pipe((0,i.flatMap)((t=>this.makeRequest(r))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to set session metadata")})))}publishEvent(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=(0,a.ClientMessagePublishEvent)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:t,data:e,callWebhook:r});return this.onceLinked$.pipe((0,i.flatMap)((t=>this.makeRequest(n))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to publish event");return t.eventId})))}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(t){}}makeRequest(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;const r=t.id;try{this.sendData(t)}catch(s){return(0,n.throwError)(s)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(e,(0,n.throwError)(new Error(`request ${r} timed out`))),(0,i.filter)((t=>t.id===r)),(0,i.take)(1))}authenticate(){const t=(0,a.ClientMessageHostSession)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(t).pipe((0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to authentcate")})))}sendIsLinked(){const t=(0,a.ClientMessageIsLinked)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,a.ClientMessageGetSessionConfig)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},4174:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LINK_API_URL=void 0,e.LINK_API_URL="https://www.walletlink.org"},8116:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getErrorCode=e.serializeError=e.standardErrors=e.standardErrorMessage=e.standardErrorCodes=void 0;const n=r(9401),i=r(2489),s=r(5491);e.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},n.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},n.errorCodes.provider),{unsupportedChain:4902}))})),e.standardErrorMessage=function(t){return void 0!==t?(0,n.getMessageFromCode)(t):"Unknown error"},e.standardErrors=Object.freeze(Object.assign(Object.assign({},n.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},n.ethErrors.provider),{unsupportedChain:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return n.ethErrors.provider.custom({code:e.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${t}. Try adding the chain using wallet_addEthereumChain first.`})}}))})),e.serializeError=function(t,r){const o=(0,n.serializeError)(function(t){return"string"===typeof t?{message:t,code:e.standardErrorCodes.rpc.internal}:(0,i.isErrorResponse)(t)?Object.assign(Object.assign({},t),{message:t.errorMessage,code:t.errorCode,data:{method:t.method,result:t.result}}):t}(t),{shouldIncludeStack:!0}),a=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");a.searchParams.set("version",s.LIB_VERSION),a.searchParams.set("code",o.code.toString());const u=function(t,e){var r;const n=null===(r=t)||void 0===r?void 0:r.method;if(n)return n;return void 0===e?void 0:"string"===typeof e?e:Array.isArray(e)?e.length>0?e[0].method:void 0:e.method}(o.data,r);return u&&a.searchParams.set("method",u),a.searchParams.set("message",o.message),Object.assign(Object.assign({},o),{docUrl:a.href})},e.getErrorCode=function(t){var e;return"number"===typeof t?t:function(t){return"object"===typeof t&&null!==t&&("number"===typeof t.code||"number"===typeof t.errorCode)}(t)?null!==(e=t.code)&&void 0!==e?e:t.errorCode:void 0}},4443:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const n=r(8984),i=r(5173);var s=r(8984);Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return s.CoinbaseWalletSDK}});var o=r(5173);Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return o.CoinbaseWalletProvider}}),e.default=n.CoinbaseWalletSDK,"undefined"!==typeof window&&(window.CoinbaseWalletSDK=n.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=n.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},6527:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScopedLocalStorage=void 0;e.ScopedLocalStorage=class{constructor(t){this.scope=t}setItem(t,e){localStorage.setItem(this.scopedKey(t),e)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),e=[];for(let r=0;r<localStorage.length;r++){const n=localStorage.key(r);"string"===typeof n&&n.startsWith(t)&&e.push(n)}e.forEach((t=>localStorage.removeItem(t)))}scopedKey(t){return`${this.scope}:${t}`}}},9859:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;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}'},8113:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.injectCssReset=void 0;const i=n(r(9859));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},5173:function(t,e,r){"use strict";var n=r(8381).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=void 0;const s=i(r(6946)),o=i(r(4787)),a=r(3237),u=r(8116),c=r(1841),l=r(559),h=r(5927),d=r(2489),f=r(8851),p=i(r(764)),y=r(7160),g=r(7672),m=r(2669),b="DefaultChainId",v="DefaultJsonRpcUrl";class _ extends s.default{constructor(t){var e,r;super(),this._filterPolyfill=new y.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=t.chainId,this._jsonRpcUrlFromOpts=t.jsonRpcUrl,this._overrideIsMetaMask=t.overrideIsMetaMask,this._relayProvider=t.relayProvider,this._storage=t.storage,this._relayEventManager=t.relayEventManager,this.diagnostic=t.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this.isCoinbaseBrowser=null!==(r=t.overrideIsCoinbaseBrowser)&&void 0!==r&&r,this.qrUrl=t.qrUrl;const n=this.getChainId(),i=(0,f.prepend0x)(n.toString(16));this.emit("connect",{chainIdStr:i});const s=this._storage.getItem(l.LOCAL_STORAGE_ADDRESSES_KEY);if(s){const t=s.split(" ");""!==t[0]&&(this._addresses=t.map((t=>(0,f.ensureAddressString)(t))),this.emit("accountsChanged",t))}this._subscriptionManager.events.on("notification",(t=>{this.emit("message",{type:t.method,data:t.params})})),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",(t=>{var e;if(t.origin===location.origin&&t.source===window&&"walletLinkMessage"===t.data.type){if("dappChainSwitched"===t.data.data.action){const r=t.data.data.chainId,n=null!==(e=t.data.data.jsonRpcUrl)&&void 0!==e?e:this.jsonRpcUrl;this.updateProviderInfo(n,Number(r))}"addressChanged"===t.data.data.action&&this._setAddresses([t.data.data.address])}}))}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,f.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var t;return null!==(t=this._storage.getItem(v))&&void 0!==t?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem(v,t)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(t,e){this.isCoinbaseBrowser||(this._chainIdFromOpts=e,this._jsonRpcUrlFromOpts=t),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(t,e){this.jsonRpcUrl=t;const r=this.getChainId();this._storage.setItem(b,e.toString(10));!((0,f.ensureIntNumber)(e)!==r)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(t,e,r,n,i,s){const o=await this.initializeRelay();return!!(await o.watchAsset(t,e,r,n,i,null===s||void 0===s?void 0:s.toString()).promise).result}async addEthereumChain(t,e,r,n,i,s){var o,a;if((0,f.ensureIntNumber)(t)===this.getChainId())return!1;const u=await this.initializeRelay(),c=u.inlineAddEthereumChain(t.toString());this._isAuthorized()||c||await u.requestEthereumAccounts().promise;const l=await u.addEthereumChain(t.toString(),e,i,r,n,s).promise;return!0===(null===(o=l.result)||void 0===o?void 0:o.isApproved)&&this.updateProviderInfo(e[0],t),!0===(null===(a=l.result)||void 0===a?void 0:a.isApproved)}async switchEthereumChain(t){const e=await this.initializeRelay(),r=await e.switchEthereumChain(t.toString(10),this.selectedAddress||void 0).promise;if((0,d.isErrorResponse)(r)&&r.errorCode)throw r.errorCode===u.standardErrorCodes.provider.unsupportedChain?u.standardErrors.provider.unsupportedChain(t):u.standardErrors.provider.custom({message:r.errorMessage,code:r.errorCode});const n=r.result;n.isApproved&&n.rpcUrl.length>0&&this.updateProviderInfo(n.rpcUrl,t)}setAppInfo(t,e){this.initializeRelay().then((r=>r.setAppInfo(t,e)))}async enable(){var t;return null===(t=this.diagnostic)||void 0===t||t.log(a.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(t,e){try{const r=this._send(t,e);if(r instanceof Promise)return r.catch((e=>{throw(0,u.serializeError)(e,t)}))}catch(r){throw(0,u.serializeError)(r,t)}}_send(t,e){if("string"===typeof t){const r={jsonrpc:"2.0",id:0,method:t,params:Array.isArray(e)?e:void 0!==e?[e]:[]};return this._sendRequestAsync(r).then((t=>t.result))}if("function"===typeof e){const r=t,n=e;return this._sendAsync(r,n)}if(Array.isArray(t)){return t.map((t=>this._sendRequest(t)))}const r=t;return this._sendRequest(r)}async sendAsync(t,e){try{return this._sendAsync(t,e).catch((e=>{throw(0,u.serializeError)(e,t)}))}catch(r){return Promise.reject((0,u.serializeError)(r,t))}}async _sendAsync(t,e){if("function"!==typeof e)throw new Error("callback is required");if(Array.isArray(t)){const r=e;return void this._sendMultipleRequestsAsync(t).then((t=>r(null,t))).catch((t=>r(t,null)))}const r=e;return this._sendRequestAsync(t).then((t=>r(null,t))).catch((t=>r(t,null)))}async request(t){try{return this._request(t).catch((e=>{throw(0,u.serializeError)(e,t.method)}))}catch(e){return Promise.reject((0,u.serializeError)(e,t.method))}}async _request(t){if(!t||"object"!==typeof t||Array.isArray(t))throw u.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});const{method:e,params:r}=t;if("string"!==typeof e||0===e.length)throw u.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});if(void 0!==r&&!Array.isArray(r)&&("object"!==typeof r||null===r))throw u.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});const n=void 0===r?[]:r,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:e,params:n,jsonrpc:"2.0",id:i})).result}async scanQRCode(t){var e;const r=await this.initializeRelay(),n=await r.scanQRCode((0,f.ensureRegExpString)(t)).promise;if("string"!==typeof n.result)throw(0,u.serializeError)(null!==(e=n.errorMessage)&&void 0!==e?e:"result was not a string",h.Web3Method.scanQRCode);return n.result}async genericRequest(t,e){var r;const n=await this.initializeRelay(),i=await n.genericRequest(t,e).promise;if("string"!==typeof i.result)throw(0,u.serializeError)(null!==(r=i.errorMessage)&&void 0!==r?r:"result was not a string",h.Web3Method.generic);return i.result}async selectProvider(t){var e;const r=await this.initializeRelay(),n=await r.selectProvider(t).promise;if("string"!==typeof n.result)throw(0,u.serializeError)(null!==(e=n.errorMessage)&&void 0!==e?e:"result was not a string",h.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(t){const e={jsonrpc:"2.0",id:t.id},{method:r}=t;if(e.result=this._handleSynchronousMethods(t),void 0===e.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 e}_setAddresses(t,e){if(!Array.isArray(t))throw new Error("addresses is not an array");const r=t.map((t=>(0,f.ensureAddressString)(t)));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(t){return new Promise(((e,r)=>{try{const n=this._handleSynchronousMethods(t);if(void 0!==n)return e({jsonrpc:"2.0",id:t.id,result:n});const i=this._handleAsynchronousFilterMethods(t);if(void 0!==i)return void i.then((r=>e(Object.assign(Object.assign({},r),{id:t.id})))).catch((t=>r(t)));const s=this._handleSubscriptionMethods(t);if(void 0!==s)return void s.then((r=>e({jsonrpc:"2.0",id:t.id,result:r.result}))).catch((t=>r(t)))}catch(n){return r(n)}this._handleAsynchronousMethods(t).then((r=>r&&e(Object.assign(Object.assign({},r),{id:t.id})))).catch((t=>r(t)))}))}_sendMultipleRequestsAsync(t){return Promise.all(t.map((t=>this._sendRequestAsync(t))))}_handleSynchronousMethods(t){const{method:e}=t,r=t.params||[];switch(e){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(t){const{method:e}=t,r=t.params||[];switch(e){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(t,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(t){const{method:e}=t,r=t.params||[];switch(e){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(t){switch(t.method){case g.JSONRPCMethod.eth_subscribe:case g.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(t)}}_isKnownAddress(t){try{const e=(0,f.ensureAddressString)(t);return this._addresses.map((t=>(0,f.ensureAddressString)(t))).includes(e)}catch(e){}return!1}_ensureKnownAddress(t){var e;if(!this._isKnownAddress(t))throw null===(e=this.diagnostic)||void 0===e||e.log(a.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(t){const e=t.from?(0,f.ensureAddressString)(t.from):this.selectedAddress;if(!e)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(e);return{fromAddress:e,toAddress:t.to?(0,f.ensureAddressString)(t.to):null,weiValue:null!=t.value?(0,f.ensureBN)(t.value):new o.default(0),data:t.data?(0,f.ensureBuffer)(t.data):n.alloc(0),nonce:null!=t.nonce?(0,f.ensureIntNumber)(t.nonce):null,gasPriceInWei:null!=t.gasPrice?(0,f.ensureBN)(t.gasPrice):null,maxFeePerGas:null!=t.maxFeePerGas?(0,f.ensureBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:null!=t.maxPriorityFeePerGas?(0,f.ensureBN)(t.maxPriorityFeePerGas):null,gasLimit:null!=t.gas?(0,f.ensureBN)(t.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw u.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw u.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(t,e,r,n){this._ensureKnownAddress(e);try{const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(t,e,r,n).promise).result}}catch(i){if("string"===typeof i.message&&i.message.match(/(denied|rejected)/i))throw u.standardErrors.provider.userRejectedRequest("User denied message signature");throw i}}async _ethereumAddressFromSignedMessage(t,e,r){const n=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await n.ethereumAddressFromSignedMessage(t,e,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,f.hexStringFromIntNumber)(this.getChainId())}getChainId(){const t=this._storage.getItem(b);if(!t)return(0,f.ensureIntNumber)(this._chainIdFromOpts);const e=parseInt(t,10);return(0,f.ensureIntNumber)(e)}async _eth_requestAccounts(){var t;if(null===(t=this.diagnostic)||void 0===t||t.log(a.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 e;try{const t=await this.initializeRelay();e=await t.requestEthereumAccounts().promise}catch(r){if("string"===typeof r.message&&r.message.match(/(denied|rejected)/i))throw u.standardErrors.provider.userRejectedRequest("User denied account authorization");throw r}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(t){this._requireAuthorization();const e=(0,f.ensureAddressString)(t[0]),r=(0,f.ensureBuffer)(t[1]);return this._signEthereumMessage(r,e,!1)}_eth_ecRecover(t){const e=(0,f.ensureBuffer)(t[0]),r=(0,f.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,r,!1)}_personal_sign(t){this._requireAuthorization();const e=(0,f.ensureBuffer)(t[0]),r=(0,f.ensureAddressString)(t[1]);return this._signEthereumMessage(e,r,!0)}_personal_ecRecover(t){const e=(0,f.ensureBuffer)(t[0]),r=(0,f.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,r,!0)}async _eth_signTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await t.signEthereumTransaction(e).promise).result}}catch(r){if("string"===typeof r.message&&r.message.match(/(denied|rejected)/i))throw u.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw r}}async _eth_sendRawTransaction(t){const e=(0,f.ensureBuffer)(t[0]),r=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await r.submitEthereumTransaction(e,this.getChainId()).promise).result}}async _eth_sendTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await t.signAndSubmitEthereumTransaction(e).promise).result}}catch(r){if("string"===typeof r.message&&r.message.match(/(denied|rejected)/i))throw u.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw r}}async _eth_signTypedData_v1(t){this._requireAuthorization();const e=(0,f.ensureParsedJSONObject)(t[0]),r=(0,f.ensureAddressString)(t[1]);this._ensureKnownAddress(r);const n=p.default.hashForSignTypedDataLegacy({data:e}),i=JSON.stringify(e,null,2);return this._signEthereumMessage(n,r,!1,i)}async _eth_signTypedData_v3(t){this._requireAuthorization();const e=(0,f.ensureAddressString)(t[0]),r=(0,f.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const n=p.default.hashForSignTypedData_v3({data:r}),i=JSON.stringify(r,null,2);return this._signEthereumMessage(n,e,!1,i)}async _eth_signTypedData_v4(t){this._requireAuthorization();const e=(0,f.ensureAddressString)(t[0]),r=(0,f.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const n=p.default.hashForSignTypedData_v4({data:r}),i=JSON.stringify(r,null,2);return this._signEthereumMessage(n,e,!1,i)}async _cbwallet_arbitrary(t){const e=t[0],r=t[1];if("string"!==typeof r)throw new Error("parameter must be a string");if("object"!==typeof e||null===e)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(e,r)}}async _wallet_addEthereumChain(t){var e,r,n,i;const s=t[0];if(0===(null===(e=s.rpcUrls)||void 0===e?void 0:e.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!s.chainName||""===s.chainName.trim())throw u.standardErrors.rpc.invalidParams("chainName is a required field");if(!s.nativeCurrency)throw u.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const o=parseInt(s.chainId,16);return await this.addEthereumChain(o,null!==(r=s.rpcUrls)&&void 0!==r?r:[],null!==(n=s.blockExplorerUrls)&&void 0!==n?n:[],s.chainName,null!==(i=s.iconUrls)&&void 0!==i?i:[],s.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(t){const e=t[0];return await this.switchEthereumChain(parseInt(e.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(t){const e=Array.isArray(t)?t[0]:t;if(!e.type)throw u.standardErrors.rpc.invalidParams("Type is required");if("ERC20"!==(null===e||void 0===e?void 0:e.type))throw u.standardErrors.rpc.invalidParams(`Asset of type '${e.type}' is not supported`);if(!(null===e||void 0===e?void 0:e.options))throw u.standardErrors.rpc.invalidParams("Options are required");if(!(null===e||void 0===e?void 0:e.options.address))throw u.standardErrors.rpc.invalidParams("Address is required");const r=this.getChainId(),{address:n,symbol:i,image:s,decimals:o}=e.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(e.type,n,i,o,s,r)}}_eth_uninstallFilter(t){const e=(0,f.ensureHexString)(t[0]);return this._filterPolyfill.uninstallFilter(e)}async _eth_newFilter(t){const e=t[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(e)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(t){const e=(0,f.ensureHexString)(t[0]);return this._filterPolyfill.getFilterChanges(e)}_eth_getFilterLogs(t){const e=(0,f.ensureHexString)(t[0]);return this._filterPolyfill.getFilterLogs(e)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then((t=>(t.setAccountsCallback(((t,e)=>this._setAddresses(t,e))),t.setChainCallback(((t,e)=>{this.updateProviderInfo(e,parseInt(t,10))})),t.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=t,t)))}}e.CoinbaseWalletProvider=_},7160:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const n=r(7322),i=r(8851),s={jsonrpc:"2.0",id:0};function o(t){return{fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function a(t){const e={fromBlock:c(t.fromBlock),toBlock:c(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function u(t){if(void 0===t||"latest"===t||"pending"===t)return"latest";if("earliest"===t)return(0,n.IntNumber)(0);if((0,i.isHexString)(t))return(0,i.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function c(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},s),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},s),{result:[]})}e.FilterPolyfill=class{constructor(t){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,n.IntNumber)(1),this.provider=t}async newFilter(t){const e=o(t),r=this.makeFilterId(),n=await this.setInitialCursorPosition(r,e.fromBlock);return console.log(`Installing new log filter(${r}):`,e,"initial cursor position:",n),this.logFilters.set(r,e),this.setFilterTimeout(r),(0,i.hexStringFromIntNumber)(r)}async newBlockFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.blockFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}uninstallFilter(t){const e=(0,i.intNumberFromHexString)(t);return console.log(`Uninstalling filter (${e})`),this.deleteFilter(e),!0}getFilterChanges(t){const e=(0,i.intNumberFromHexString)(t);return this.timeouts.has(e)&&this.setFilterTimeout(e),this.logFilters.has(e)?this.getLogFilterChanges(e):this.blockFilters.has(e)?this.getBlockFilterChanges(e):this.pendingTransactionFilters.has(e)?this.getPendingTransactionFilterChanges(e):Promise.resolve(l())}async getFilterLogs(t){const e=(0,i.intNumberFromHexString)(t),r=this.logFilters.get(e);return r?this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_getLogs",params:[a(r)]})):l()}makeFilterId(){return(0,n.IntNumber)(++this.nextFilterId)}sendAsyncPromise(t){return new Promise(((e,r)=>{this.provider.sendAsync(t,((t,n)=>t?r(t):Array.isArray(n)||null==n?r(new Error(`unexpected response received: ${JSON.stringify(n)}`)):void e(n)))}))}deleteFilter(t){console.log(`Deleting filter (${t})`),this.logFilters.delete(t),this.blockFilters.delete(t),this.pendingTransactionFilters.delete(t),this.cursors.delete(t),this.timeouts.delete(t)}async getLogFilterChanges(t){const e=this.logFilters.get(t),r=this.cursors.get(t);if(!r||!e)return l();const o=await this.getCurrentBlockHeight(),u="latest"===e.toBlock?o:e.toBlock;if(r>o)return h();if(r>e.toBlock)return h();console.log(`Fetching logs from ${r} to ${u} for filter ${t}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_getLogs",params:[a(Object.assign(Object.assign({},e),{fromBlock:r,toBlock:u}))]}));if(Array.isArray(c.result)){const e=c.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),s=Math.max(...e);if(s&&s>r){const e=(0,n.IntNumber)(s+1);console.log(`Moving cursor position for filter (${t}) from ${r} to ${e}`),this.cursors.set(t,e)}}return c}async getBlockFilterChanges(t){const e=this.cursors.get(t);if(!e)return l();const r=await this.getCurrentBlockHeight();if(e>r)return h();console.log(`Fetching blocks from ${e} to ${r} for filter (${t})`);const o=(await Promise.all((0,i.range)(e,r+1).map((t=>this.getBlockHashByNumber((0,n.IntNumber)(t)))))).filter((t=>!!t)),a=(0,n.IntNumber)(e+o.length);return console.log(`Moving cursor position for filter (${t}) from ${e} to ${a}`),this.cursors.set(t,a),Object.assign(Object.assign({},s),{result:o})}async getPendingTransactionFilterChanges(t){return Promise.resolve(h())}async setInitialCursorPosition(t,e){const r=await this.getCurrentBlockHeight(),n="number"===typeof e&&e>r?e:r;return this.cursors.set(t,n),n}setFilterTimeout(t){const e=this.timeouts.get(t);e&&window.clearTimeout(e);const r=window.setTimeout((()=>{console.log(`Filter (${t}) timed out`),this.deleteFilter(t)}),3e5);this.timeouts.set(t,r)}async getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(t),!1]}));return e.result&&"string"===typeof e.result.hash?(0,i.ensureHexString)(e.result.hash):null}},e.filterFromParam=o},7672:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONRPCMethod=void 0,function(t){t.eth_accounts="eth_accounts",t.eth_coinbase="eth_coinbase",t.net_version="net_version",t.eth_chainId="eth_chainId",t.eth_uninstallFilter="eth_uninstallFilter",t.eth_requestAccounts="eth_requestAccounts",t.eth_sign="eth_sign",t.eth_ecRecover="eth_ecRecover",t.personal_sign="personal_sign",t.personal_ecRecover="personal_ecRecover",t.eth_signTransaction="eth_signTransaction",t.eth_sendRawTransaction="eth_sendRawTransaction",t.eth_sendTransaction="eth_sendTransaction",t.eth_signTypedData_v1="eth_signTypedData_v1",t.eth_signTypedData_v2="eth_signTypedData_v2",t.eth_signTypedData_v3="eth_signTypedData_v3",t.eth_signTypedData_v4="eth_signTypedData_v4",t.eth_signTypedData="eth_signTypedData",t.cbWallet_arbitrary="walletlink_arbitrary",t.wallet_addEthereumChain="wallet_addEthereumChain",t.wallet_switchEthereumChain="wallet_switchEthereumChain",t.wallet_watchAsset="wallet_watchAsset",t.eth_subscribe="eth_subscribe",t.eth_unsubscribe="eth_unsubscribe",t.eth_newFilter="eth_newFilter",t.eth_newBlockFilter="eth_newBlockFilter",t.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",t.eth_getFilterChanges="eth_getFilterChanges",t.eth_getFilterLogs="eth_getFilterLogs"}(e.JSONRPCMethod||(e.JSONRPCMethod={}))},2669:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const n=r(6140),i=r(8503),s=()=>{};e.SubscriptionManager=class{constructor(t){const e=new n.PollingBlockTracker({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:r,middleware:s}=i({blockTracker:e,provider:t});this.events=r,this.subscriptionMiddleware=s}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,s,s),e}destroy(){this.subscriptionMiddleware.destroy()}}},1004:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKUI=void 0;const n=r(4949),i=r(2111),s=r(8113);e.WalletSDKUI=class{constructor(t){this.standalone=null,this.attached=!1,this.appSrc=null,this.snackbar=new i.Snackbar({darkMode:t.darkMode}),this.linkFlow=new n.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,linkAPIUrl:t.linkAPIUrl,connected$:t.connected$,chainId$:t.chainId$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const t=document.documentElement,e=document.createElement("div");e.className="-cbwsdk-css-reset",t.appendChild(e),this.linkFlow.attach(e),this.snackbar.attach(e),this.attached=!0,(0,s.injectCssReset)()}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(t){}watchAsset(t){}switchEthereumChain(t){}requestEthereumAccounts(t){this.linkFlow.open({onCancel:t.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(t){}signEthereumTransaction(t){}submitEthereumTransaction(t){}ethereumAddressFromSignedMessage(t){}showConnecting(t){let e;return e=t.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",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:t.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:t.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]},this.snackbar.presentItem(e)}setAppSrc(t){this.appSrc=t}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(t){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(t){this.standalone=t}isStandalone(){var t;return null!==(t=this.standalone)&&void 0!==t&&t}}},1149:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelayMessageType=void 0,function(t){t.SESSION_ID_REQUEST="SESSION_ID_REQUEST",t.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",t.LINKED="LINKED",t.UNLINKED="UNLINKED",t.WEB3_REQUEST="WEB3_REQUEST",t.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",t.WEB3_RESPONSE="WEB3_RESPONSE"}(e.RelayMessageType||(e.RelayMessageType={}))},1841:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;const n=r(3760),i=r(8851),s="session:id",o="session:secret",a="session:linked";class u{constructor(t,e,r,s){this._storage=t,this._id=e||(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=!!s}static load(t){const e=t.getItem(s),r=t.getItem(a),n=t.getItem(o);return e&&n?new u(t,e,n,"1"===r):null}static hash(t){return(new n.sha256).update(t).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked()}save(){return this._storage.setItem(s,this._id),this._storage.setItem(o,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(a,this._linked?"1":"0")}}e.Session=u},1293:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,r,n){var i,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelay=void 0;const u=a(r(9552)),c=r(4848),l=r(1430),h=r(3237),d=r(631),f=r(8116),p=r(7322),y=r(8851),g=o(r(1920)),m=r(1841),b=r(559),v=r(5927),_=r(8047),w=r(2882),E=r(2489),S=r(7814);class x extends b.WalletSDKRelayAbstract{constructor(t){var e;super(),this.accountsCallback=null,this.chainCallback=null,this.dappDefaultChainSubject=new c.BehaviorSubject(1),this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.subscriptions=new c.Subscription,this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this.options=t;const{session:r,ui:n,connection:i}=this.subscribe();if(this._session=r,this.connection=i,this.relayEventManager=t.relayEventManager,t.diagnosticLogger&&t.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");t.eventListener?this.diagnostic={log:t.eventListener.onEvent}:this.diagnostic=t.diagnosticLogger,this._reloadOnDisconnect=null===(e=t.reloadOnDisconnect)||void 0===e||e,this.ui=n}subscribe(){this.subscriptions.add(this.dappDefaultChainSubject.subscribe((t=>{this.dappDefaultChain!==t&&(this.dappDefaultChain=t)})));const t=m.Session.load(this.storage)||new m.Session(this.storage).save(),e=new d.WalletSDKConnection(t.id,t.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(e.sessionConfig$.subscribe({next:t=>{this.onSessionConfigChanged(t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(e.incomingEvent$.pipe((0,l.filter)((t=>"Web3Response"===t.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(e.linked$.pipe((0,l.skip)(1),(0,l.tap)((t=>{var e;this.isLinked=t;const r=this.storage.getItem(b.LOCAL_STORAGE_ADDRESSES_KEY);if(t&&(this.session.linked=t),this.isUnlinkedErrorState=!1,r){const n=r.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==n[0]&&!t&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const t=this.getSessionIdHash();null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:t})}}}))).subscribe()),this.subscriptions.add(e.sessionConfig$.pipe((0,l.filter)((t=>!!t.metadata&&"1"===t.metadata.__destroyed))).subscribe((()=>{var t;const r=e.isDestroyed;return null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:r,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(e.sessionConfig$.pipe((0,l.filter)((t=>t.metadata&&void 0!==t.metadata.WalletUsername))).pipe((0,l.mergeMap)((e=>g.decrypt(e.metadata.WalletUsername,t.secret)))).subscribe({next:t=>{this.storage.setItem(b.WALLET_USER_NAME_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,l.filter)((t=>t.metadata&&void 0!==t.metadata.AppVersion))).pipe((0,l.mergeMap)((e=>g.decrypt(e.metadata.AppVersion,t.secret)))).subscribe({next:t=>{this.storage.setItem(b.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,l.filter)((t=>t.metadata&&void 0!==t.metadata.ChainId&&void 0!==t.metadata.JsonRpcUrl))).pipe((0,l.mergeMap)((e=>(0,c.zip)(g.decrypt(e.metadata.ChainId,t.secret),g.decrypt(e.metadata.JsonRpcUrl,t.secret))))).pipe((0,l.distinctUntilChanged)()).subscribe({next:t=>{let[e,r]=t;this.chainCallback&&this.chainCallback(e,r)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,l.filter)((t=>t.metadata&&void 0!==t.metadata.EthereumAddress))).pipe((0,l.mergeMap)((e=>g.decrypt(e.metadata.EthereumAddress,t.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),x.accountRequestCallbackIds.size>0&&(Array.from(x.accountRequestCallbackIds.values()).forEach((e=>{const r=(0,S.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)([t])});this.invokeCallback(Object.assign(Object.assign({},r),{id:e}))})),x.accountRequestCallbackIds.clear())},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,l.filter)((t=>t.metadata&&void 0!==t.metadata.AppSrc))).pipe((0,l.mergeMap)((e=>g.decrypt(e.metadata.AppSrc,t.secret)))).subscribe({next:t=>{this.ui.setAppSrc(t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.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:t,connected$:e.connected$,chainId$:this.dappDefaultChainSubject});return e.connect(),{session:t,ui:r,connection:e}}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,l.timeout)(1e3),(0,l.catchError)((t=>(0,c.of)(null)))).subscribe((t=>{var e,r,n;const i=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch(l){null===(e=this.diagnostic)||void 0===e||e.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 s=m.Session.load(this.storage);if((null===s||void 0===s?void 0:s.id)===this._session.id?this.storage.clear():s&&(null===(n=this.diagnostic)||void 0===n||n.log(h.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:m.Session.hash(s.id)})),this._reloadOnDisconnect)return void this.ui.reloadUI();this.accountsCallback&&this.accountsCallback([],!0),this.subscriptions=new c.Subscription;const{session:o,ui:a,connection:u}=this.subscribe();this._session=o,this.connection=u,this.ui=a,i&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}),(t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${t}`,sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(t,e){this.appName=t,this.appLogoUrl=e}getStorageItem(t){return this.storage.getItem(t)}get session(){return this._session}setStorageItem(t,e){this.storage.setItem(t,e)}signEthereumMessage(t,e,r,n){return this.sendRequest({method:v.Web3Method.signEthereumMessage,params:{message:(0,y.hexStringFromBuffer)(t,!0),address:e,addPrefix:r,typedDataJson:n||null}})}ethereumAddressFromSignedMessage(t,e,r){return this.sendRequest({method:v.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,y.hexStringFromBuffer)(t,!0),signature:(0,y.hexStringFromBuffer)(e,!0),addPrefix:r}})}signEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,y.bigIntStringFromBN)(t.weiValue),data:(0,y.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,y.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,y.bigIntStringFromBN)(t.weiValue),data:(0,y.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,y.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,y.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,y.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:v.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,y.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:v.Web3Method.scanQRCode,params:{regExp:t}})}getQRCodeUrl(){return(0,y.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(t,e){return this.sendRequest({method:v.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const r=(0,y.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,t.method,n),null===e||void 0===e||e()};return{promise:new Promise(((i,s)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:n,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(r,(t=>{if(null===e||void 0===e||e(),t.errorMessage)return s(new Error(t.errorMessage));i(t)})),this.ui.isStandalone()?this.sendRequestStandalone(r,t):this.publishWeb3RequestEvent(r,t)})),cancel:n}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}setDappDefaultChainCallback(t){this.dappDefaultChainSubject.next(t)}publishWeb3RequestEvent(t,e){var r;const n=(0,w.Web3RequestMessage)({id:t,request:e}),i=m.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?m.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",n,!0).subscribe({next:t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:n.id,method:`relay::${n.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?m.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()})},error:t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:n.id,response:{method:n.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,_.Web3RequestCanceledMessage)(t);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",e,!1).subscribe())}publishEvent(t,e,r){const n=this.session.secret;return new c.Observable((t=>{g.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{origin:location.origin})),n).then((e=>{t.next(e),t.complete()}))})).pipe((0,l.mergeMap)((e=>this.connection.publishEvent(t,e,r))))}handleIncomingEvent(t){try{this.subscriptions.add((0,c.from)(g.decrypt(t.data,this.session.secret)).pipe((0,l.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,S.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(e){return}}handleWeb3ResponseMessage(t){var e;const{response:r}=t;if(null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash()}),(0,E.isRequestEthereumAccountsResponse)(r))return x.accountRequestCallbackIds.forEach((e=>this.invokeCallback(Object.assign(Object.assign({},t),{id:e})))),void x.accountRequestCallbackIds.clear();this.invokeCallback(t)}handleErrorResponse(t,e,r,n){var i;const s=null!==(i=null===r||void 0===r?void 0:r.message)&&void 0!==i?i:(0,f.standardErrorMessage)(n);this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:t,response:{method:e,errorMessage:s,errorCode:n}}))}invokeCallback(t){const e=this.relayEventManager.callbacks.get(t.id);e&&(e(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){const t={method:v.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},e=(0,y.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(e),this.handleErrorResponse(e,t.method,r)};return{promise:new Promise(((n,i)=>{var s;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));n(t)}));const o=(null===(s=null===window||void 0===window?void 0:window.navigator)||void 0===s?void 0:s.userAgent)||null;if(o&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o)){let t;try{t=(0,y.isInIFrame)()&&window.top?window.top.location:window.location}catch(a){t=window.location}t.href=`https://www.coinbase.com/connect-dapp?uri=${encodeURIComponent(t.href)}`}else{if(this.ui.inlineAccountsResponse()){const t=t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:r,onAccounts:t})}else{const t=f.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>r(t)})}x.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:r}}selectProvider(t){const e={method:v.Web3Method.selectProvider,params:{providerOptions:t}},r=(0,y.randomBytesHex)(8);return{cancel:t=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,t)},promise:new Promise(((e,n)=>{this.relayEventManager.callbacks.set(r,(t=>{if(t.errorMessage)return n(new Error(t.errorMessage));e(t)}));this.ui.selectProvider&&this.ui.selectProvider({onApprove:t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r,response:(0,E.SelectProviderResponse)(t)}))},onCancel:t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r,response:(0,E.SelectProviderResponse)(p.ProviderType.Unselected)}))},providerOptions:t})}))}}watchAsset(t,e,r,n,i,s){const o={method:v.Web3Method.watchAsset,params:{type:t,options:{address:e,symbol:r,decimals:n,image:i},chainId:s}};let a=null;const u=(0,y.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,o.method,t),null===a||void 0===a||a()};this.ui.inlineWatchAsset()||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload}));return{cancel:c,promise:new Promise(((c,l)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null===a||void 0===a||a(),t.errorMessage)return l(new Error(t.errorMessage));c(t)}));const h=t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:u,response:(0,E.WatchAssetReponse)(!1)}))},d=()=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:u,response:(0,E.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:d,onCancel:h,type:t,address:e,symbol:r,decimals:n,image:i,chainId:s}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,o)}))}}addEthereumChain(t,e,r,n,i,s){const o={method:v.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:n,chainName:i,iconUrls:r,nativeCurrency:s}};let a=null;const u=(0,y.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,o.method,t),null===a||void 0===a||a()};this.ui.inlineAddEthereumChain(t)||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload}));return{promise:new Promise(((e,r)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null===a||void 0===a||a(),t.errorMessage)return r(new Error(t.errorMessage));e(t)}));const n=t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:u,response:(0,E.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},i=t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:u,response:(0,E.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))};this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:n,onApprove:i,chainId:o.params.chainId,rpcUrls:o.params.rpcUrls,blockExplorerUrls:o.params.blockExplorerUrls,chainName:o.params.chainName,iconUrls:o.params.iconUrls,nativeCurrency:o.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,o)})),cancel:c}}switchEthereumChain(t,e){const r={method:v.Web3Method.switchEthereumChain,params:Object.assign({chainId:t},{address:e})},n=(0,y.randomBytesHex)(8);return{promise:new Promise(((e,i)=>{this.relayEventManager.callbacks.set(n,(t=>(0,E.isErrorResponse)(t)&&t.errorCode?i(f.standardErrors.provider.custom({code:t.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):t.errorMessage?i(new Error(t.errorMessage)):void e(t)));this.ui.switchEthereumChain({onCancel:e=>{var r;if(e){const i=null!==(r=(0,f.getErrorCode)(e))&&void 0!==r?r:f.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(n,v.Web3Method.switchEthereumChain,e instanceof Error?e:f.standardErrors.provider.unsupportedChain(t),i)}else this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:n,response:(0,E.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:n,response:(0,E.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:r.params.chainId,address:r.params.address}),this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(n,r)})),cancel:t=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,t)}}}inlineAddEthereumChain(t){return this.ui.inlineAddEthereumChain(t)}getSessionIdHash(){return m.Session.hash(this._session.id)}sendRequestStandalone(t,e){const r=r=>{this.handleErrorResponse(t,e.method,r)},n=e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case v.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:n,onCancel:r});break;case v.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:n,onCancel:r});break;case v.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:n,onCancel:r});break;case v.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:n});break;default:r()}}onSessionConfigChanged(t){}}x.accountRequestCallbackIds=new Set,s([u.default],x.prototype,"resetAndReload",null),s([u.default],x.prototype,"handleIncomingEvent",null),e.WalletSDKRelay=x},559:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;const n=r(8116);e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion";e.WalletSDKRelayAbstract=class{async makeEthereumJSONRPCRequest(t,e){if(!e)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(e,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((e=>{if(!e)throw n.standardErrors.rpc.parse({});const r=e,{error:i}=r;if(i)throw(0,n.serializeError)(i,t.method);return r}))}}},7742:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayEventManager=void 0;const n=r(8851);e.WalletSDKRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const t=this._nextRequestId,e=(0,n.prepend0x)(t.toString(16));return this.callbacks.get(e)&&this.callbacks.delete(e),t}}},5927:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3Method=void 0,function(t){t.requestEthereumAccounts="requestEthereumAccounts",t.signEthereumMessage="signEthereumMessage",t.signEthereumTransaction="signEthereumTransaction",t.submitEthereumTransaction="submitEthereumTransaction",t.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",t.scanQRCode="scanQRCode",t.generic="generic",t.childRequestEthereumAccounts="childRequestEthereumAccounts",t.addEthereumChain="addEthereumChain",t.switchEthereumChain="switchEthereumChain",t.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",t.watchAsset="watchAsset",t.selectProvider="selectProvider"}(e.Web3Method||(e.Web3Method={}))},8047:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const n=r(1149);e.Web3RequestCanceledMessage=function(t){return{type:n.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},2882:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const n=r(1149);e.Web3RequestMessage=function(t){return Object.assign({type:n.RelayMessageType.WEB3_REQUEST},t)}},2489:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.SelectProviderResponse=e.WatchAssetReponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.isErrorResponse=void 0;const n=r(5927);e.isErrorResponse=function(t){var e,r;return void 0!==(null===(e=t)||void 0===e?void 0:e.method)&&void 0!==(null===(r=t)||void 0===r?void 0:r.errorMessage)},e.AddEthereumChainResponse=function(t){return{method:n.Web3Method.addEthereumChain,result:t}},e.SwitchEthereumChainResponse=function(t){return{method:n.Web3Method.switchEthereumChain,result:t}},e.RequestEthereumAccountsResponse=function(t){return{method:n.Web3Method.requestEthereumAccounts,result:t}},e.WatchAssetReponse=function(t){return{method:n.Web3Method.watchAsset,result:t}},e.SelectProviderResponse=function(t){return{method:n.Web3Method.selectProvider,result:t}},e.isRequestEthereumAccountsResponse=function(t){return t&&t.method===n.Web3Method.requestEthereumAccounts},e.SignEthereumMessageResponse=function(t){return{method:n.Web3Method.signEthereumMessage,result:t}},e.SignEthereumTransactionResponse=function(t){return{method:n.Web3Method.signEthereumTransaction,result:t}},e.SubmitEthereumTransactionResponse=function(t){return{method:n.Web3Method.submitEthereumTransaction,result:t}},e.EthereumAddressFromSignedMessageResponse=function(t){return{method:n.Web3Method.ethereumAddressFromSignedMessage,result:t}}},7814:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const n=r(1149);e.Web3ResponseMessage=function(t){return Object.assign({type:n.RelayMessageType.WEB3_RESPONSE},t)},e.isWeb3ResponseMessage=function(t){return t&&t.type===n.RelayMessageType.WEB3_RESPONSE}},1920:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const n=r(8851);e.encrypt=async function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");const r=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,n.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},i,s.encode(t)),a=o.slice(o.byteLength-16),u=o.slice(0,o.byteLength-16),c=new Uint8Array(a),l=new Uint8Array(u),h=new Uint8Array([...r,...c,...l]);return(0,n.uint8ArrayToHex)(h)},e.decrypt=function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");return new Promise(((r,i)=>{!async function(){const s=await crypto.subtle.importKey("raw",(0,n.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,n.hexStringToUint8Array)(t),a=o.slice(0,12),u=o.slice(12,28),c=o.slice(28),l=new Uint8Array([...c,...u]),h={name:"AES-GCM",iv:new Uint8Array(a)};try{const t=await window.crypto.subtle.decrypt(h,s,l),e=new TextDecoder;r(e.decode(t))}catch(d){i(d)}}()}))}},7322:(t,e)=>{"use strict";function r(){return t=>t}Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=r,e.HexString=t=>t,e.AddressString=t=>t,e.BigIntString=t=>t,e.IntNumber=function(t){return Math.floor(t)},e.RegExpString=t=>t,function(t){t.CoinbaseWallet="CoinbaseWallet",t.MetaMask="MetaMask",t.Unselected=""}(e.ProviderType||(e.ProviderType={}))},8851:function(t,e,r){"use strict";var n=r(8381).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.isInIFrame=e.createQrUrl=e.getFavicon=e.range=e.isBigNumber=e.ensureParsedJSONObject=e.ensureBN=e.ensureRegExpString=e.ensureIntNumber=e.ensureBuffer=e.ensureAddressString=e.ensureEvenLengthHexString=e.ensureHexString=e.isHexString=e.prepend0x=e.strip0x=e.has0xPrefix=e.hexStringFromIntNumber=e.intNumberFromHexString=e.bigIntStringFromBN=e.hexStringFromBuffer=e.hexStringToUint8Array=e.uint8ArrayToHex=e.randomBytesHex=void 0;const s=i(r(4787)),o=r(3902),a=r(8116),u=r(7322),c=/^[0-9]*$/,l=/^[a-f0-9]*$/;function h(t){return[...t].map((t=>t.toString(16).padStart(2,"0"))).join("")}function d(t){return t.startsWith("0x")||t.startsWith("0X")}function f(t){return d(t)?t.slice(2):t}function p(t){return d(t)?"0x"+t.slice(2):"0x"+t}function y(t){if("string"!==typeof t)return!1;const e=f(t).toLowerCase();return l.test(e)}function g(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof t){const r=f(t).toLowerCase();if(l.test(r))return(0,u.HexString)(e?"0x"+r:r)}throw a.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}function m(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=g(t,!1);return r.length%2===1&&(r=(0,u.HexString)("0"+r)),e?(0,u.HexString)("0x"+r):r}function b(t){if("number"===typeof t&&Number.isInteger(t))return(0,u.IntNumber)(t);if("string"===typeof t){if(c.test(t))return(0,u.IntNumber)(Number(t));if(y(t))return(0,u.IntNumber)(new s.default(m(t,!1),16).toNumber())}throw a.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}function v(t){if(null==t||"function"!==typeof t.constructor)return!1;const{constructor:e}=t;return"function"===typeof e.config&&"number"===typeof e.EUCLID}e.randomBytesHex=function(t){return h(crypto.getRandomValues(new Uint8Array(t)))},e.uint8ArrayToHex=h,e.hexStringToUint8Array=function(t){return new Uint8Array(t.match(/.{1,2}/g).map((t=>parseInt(t,16))))},e.hexStringFromBuffer=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=t.toString("hex");return(0,u.HexString)(e?"0x"+r:r)},e.bigIntStringFromBN=function(t){return(0,u.BigIntString)(t.toString(10))},e.intNumberFromHexString=function(t){return(0,u.IntNumber)(new s.default(m(t,!1),16).toNumber())},e.hexStringFromIntNumber=function(t){return(0,u.HexString)("0x"+new s.default(t).toString(16))},e.has0xPrefix=d,e.strip0x=f,e.prepend0x=p,e.isHexString=y,e.ensureHexString=g,e.ensureEvenLengthHexString=m,e.ensureAddressString=function(t){if("string"===typeof t){const e=f(t).toLowerCase();if(y(e)&&40===e.length)return(0,u.AddressString)(p(e))}throw a.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)},e.ensureBuffer=function(t){if(n.isBuffer(t))return t;if("string"===typeof t){if(y(t)){const e=m(t,!1);return n.from(e,"hex")}return n.from(t,"utf8")}throw a.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)},e.ensureIntNumber=b,e.ensureRegExpString=function(t){if(t instanceof RegExp)return(0,u.RegExpString)(t.toString());throw a.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)},e.ensureBN=function(t){if(null!==t&&(s.default.isBN(t)||v(t)))return new s.default(t.toString(10),10);if("number"===typeof t)return new s.default(b(t));if("string"===typeof t){if(c.test(t))return new s.default(t,10);if(y(t))return new s.default(m(t,!1),16)}throw a.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)},e.ensureParsedJSONObject=function(t){if("string"===typeof t)return JSON.parse(t);if("object"===typeof t)return t;throw a.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)},e.isBigNumber=v,e.range=function(t,e){return Array.from({length:e-t},((e,r)=>t+r))},e.getFavicon=function(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute("href"):null;return!n||n.startsWith("javascript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`},e.createQrUrl=function(t,e,r,n,i,s){const a=n?"parent-id":"id";return`${r}/#/link?${(0,o.stringify)({[a]:t,secret:e,server:r,v:i,chainId:s})}`},e.isInIFrame=function(){try{return null!==window.frameElement}catch(t){return!1}}},462:(t,e,r)=>{var n=r(8381).Buffer;const i=r(6270),s=r(4787);function o(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function a(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function u(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function c(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function l(t){var e=typeof t;if("string"===e)return i.isHexString(t)?new s(i.stripHexPrefix(t),16):new s(t,10);if("number"===e)return new s(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function h(t,e){var r,o,d,f;if("address"===t)return h("uint160",l(e));if("bool"===t)return h("uint8",e?1:0);if("string"===t)return h("bytes",new n(e,"utf8"));if(function(t){return t.lastIndexOf("]")===t.length-1}(t)){if("undefined"===typeof e.length)throw new Error("Not an array?");if("dynamic"!==(r=c(t))&&0!==r&&e.length>r)throw new Error("Elements exceed array size: "+r);for(f in d=[],t=t.slice(0,t.lastIndexOf("[")),"string"===typeof e&&(e=JSON.parse(e)),e)d.push(h(t,e[f]));if("dynamic"===r){var p=h("uint256",e.length);d.unshift(p)}return n.concat(d)}if("bytes"===t)return e=new n(e),d=n.concat([h("uint256",e.length),e]),e.length%32!==0&&(d=n.concat([d,i.zeros(32-e.length%32)])),d;if(t.startsWith("bytes")){if((r=a(t))<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return i.setLengthRight(e,32)}if(t.startsWith("uint")){if((r=a(t))%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if((o=l(e)).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(n,"be",32)}if(t.startsWith("int")){if((r=a(t))%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if((o=l(e)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+o.bitLength());return o.toTwos(256).toArrayLike(n,"be",32)}if(t.startsWith("ufixed")){if(r=u(t),(o=l(e))<0)throw new Error("Supplied ufixed is negative");return h("uint256",o.mul(new s(2).pow(new s(r[1]))))}if(t.startsWith("fixed"))return r=u(t),h("int256",l(e).mul(new s(2).pow(new s(r[1]))));throw new Error("Unsupported or invalid type: "+t)}function d(t){return"string"===t||"bytes"===t||"dynamic"===c(t)}function f(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r,s,u=[],c=0;c<t.length;c++){var h=o(t[c]),d=e[c];if("bytes"===h)u.push(d);else if("string"===h)u.push(new n(d,"utf8"));else if("bool"===h)u.push(new n(d?"01":"00","hex"));else if("address"===h)u.push(i.setLength(d,20));else if(h.startsWith("bytes")){if((r=a(h))<1||r>32)throw new Error("Invalid bytes<N> width: "+r);u.push(i.setLengthRight(d,r))}else if(h.startsWith("uint")){if((r=a(h))%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if((s=l(d)).bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+s.bitLength());u.push(s.toArrayLike(n,"be",r/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((r=a(h))%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if((s=l(d)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+s.bitLength());u.push(s.toTwos(r).toArrayLike(n,"be",r/8))}}return n.concat(u)}t.exports={rawEncode:function(t,e){var r=[],i=[],s=32*t.length;for(var a in t){var u=o(t[a]),c=h(u,e[a]);d(u)?(r.push(h("uint256",s)),i.push(c),s+=c.length):r.push(c)}return n.concat(r.concat(i))},solidityPack:f,soliditySHA3:function(t,e){return i.keccak(f(t,e))}}},764:(t,e,r)=>{var n=r(8381).Buffer;const i=r(6270),s=r(462),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"]},a={encodeData(t,e,r){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a=["bytes32"],u=[this.hashType(t,r)];if(o){const c=(t,e,a)=>{if(void 0!==r[e])return["bytes32",null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":i.keccak(this.encodeData(e,a,r,o))];if(void 0===a)throw new Error(`missing value for field ${t} of type ${e}`);if("bytes"===e)return["bytes32",i.keccak(a)];if("string"===e)return"string"===typeof a&&(a=n.from(a,"utf8")),["bytes32",i.keccak(a)];if(e.lastIndexOf("]")===e.length-1){const r=e.slice(0,e.lastIndexOf("[")),n=a.map((e=>c(t,r,e)));return["bytes32",i.keccak(s.rawEncode(n.map((t=>{let[e]=t;return e})),n.map((t=>{let[,e]=t;return e}))))]}return[e,a]};for(const n of r[t]){const[t,r]=c(n.name,n.type,e[n.name]);a.push(t),u.push(r)}}else for(const s of r[t]){let t=e[s.name];if(void 0!==t)if("bytes"===s.type)a.push("bytes32"),t=i.keccak(t),u.push(t);else if("string"===s.type)a.push("bytes32"),"string"===typeof t&&(t=n.from(t,"utf8")),t=i.keccak(t),u.push(t);else if(void 0!==r[s.type])a.push("bytes32"),t=i.keccak(this.encodeData(s.type,t,r,o)),u.push(t);else{if(s.type.lastIndexOf("]")===s.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");a.push(s.type),u.push(t)}}return s.rawEncode(a,u)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter((e=>e!==t));n=[t].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map((t=>{let{name:e,type:r}=t;return r+" "+e})).join(",")+")"}return r},findTypeDependencies(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(t=t.match(/^\w*/)[0],r.includes(t)||void 0===e[t])return r;r.push(t);for(const n of e[t])for(const t of this.findTypeDependencies(n.type,e,r))!r.includes(t)&&r.push(t);return r},hashStruct(t,e,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return i.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return i.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const r in o.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=this.sanitizeData(t),s=[n.from("1901","hex")];return s.push(this.hashStruct("EIP712Domain",r.domain,r.types,e)),"EIP712Domain"!==r.primaryType&&s.push(this.hashStruct(r.primaryType,r.message,r.types,e)),i.keccak(n.concat(s))}};t.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:a,hashForSignTypedDataLegacy:function(t){return function(t){const e=new Error("Expect argument to be non-empty array");if("object"!==typeof t||!t.length)throw e;const r=t.map((function(t){return"bytes"===t.type?i.toBuffer(t.value):t.value})),n=t.map((function(t){return t.type})),o=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return s.soliditySHA3(["bytes32","bytes32"],[s.soliditySHA3(new Array(t.length).fill("string"),o),s.soliditySHA3(n,r)])}(t.data)},hashForSignTypedData_v3:function(t){return a.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return a.hash(t.data)}}},6270:(t,e,r)=>{var n=r(8381).Buffer;const i=r(1877),s=r(4787);function o(t){return n.allocUnsafe(t).fill(0)}function a(t,e,r){const n=o(e);return t=u(t),r?t.length<e?(t.copy(n),n):t.slice(0,e):t.length<e?(t.copy(n,e-t.length),n):t.slice(-e)}function u(t){if(!n.isBuffer(t))if(Array.isArray(t))t=n.from(t);else if("string"===typeof t)t=c(t)?n.from((e=l(t)).length%2?"0"+e:e,"hex"):n.from(t);else if("number"===typeof t)t=intToBuffer(t);else if(null===t||void 0===t)t=n.allocUnsafe(0);else if(s.isBN(t))t=t.toArrayLike(n);else{if(!t.toArray)throw new Error("invalid type");t=n.from(t.toArray())}var e;return t}function c(t){return"string"===typeof t&&t.match(/^0x[0-9A-Fa-f]*$/)}function l(t){return"string"===typeof t&&t.startsWith("0x")?t.slice(2):t}t.exports={zeros:o,setLength:a,setLengthRight:function(t,e){return a(t,e,!0)},isHexString:c,stripHexPrefix:l,toBuffer:u,bufferToHex:function(t){return"0x"+(t=u(t)).toString("hex")},keccak:function(t,e){return t=u(t),e||(e=256),i("keccak"+e).update(t).digest()}}},4262:t=>{function e(t){this.mode=n.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e<r;e++){var i=[],s=this.data.charCodeAt(e);s>65536?(i[0]=240|(1835008&s)>>>18,i[1]=128|(258048&s)>>>12,i[2]=128|(4032&s)>>>6,i[3]=128|63&s):s>2048?(i[0]=224|(61440&s)>>>12,i[1]=128|(4032&s)>>>6,i[2]=128|63&s):s>128?(i[0]=192|(1984&s)>>>6,i[1]=128|63&s):i[0]=s,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(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}e.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e<r;e++)t.put(this.parsedData[e],8)}},r.prototype={addData:function(t){var r=new e(t);this.dataList.push(r),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(this.modules[t+r][e+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 t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=g.getLostPoint(this);(0==r||t>n)&&(t=n,e=r)}return e},createMovieClip:function(t,e,r){var n=t.createEmptyMovieClip(e,r);this.make();for(var i=0;i<this.modules.length;i++)for(var s=1*i,o=0;o<this.modules[i].length;o++){var a=1*o;this.modules[i][o]&&(n.beginFill(0,100),n.moveTo(a,s),n.lineTo(a+1,s),n.lineTo(a+1,s+1),n.lineTo(a,s+1),n.endFill())}return n},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=g.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var n=t[e],i=t[r];if(null==this.modules[n][i])for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)this.modules[n+s][i+o]=-2==s||2==s||-2==o||2==o||0==s&&0==o}},setupTypeNumber:function(t){for(var e=g.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!t&&1==(e>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++){n=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=g.getBCHTypeInfo(r),i=0;i<15;i++){var s=!t&&1==(n>>i&1);i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(i=0;i<15;i++){s=!t&&1==(n>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(6==o&&o--;;){for(var a=0;a<2;a++)if(null==this.modules[n][o-a]){var u=!1;s<t.length&&(u=1==(t[s]>>>i&1)),g.getMask(e,n,o-a)&&(u=!u),this.modules[n][o-a]=u,-1==--i&&(s++,i=7)}if((n+=r)<0||this.moduleCount<=n){n-=r,r=-r;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(t,e,n){for(var i=_.getRSBlocks(t,e),s=new w,o=0;o<n.length;o++){var a=n[o];s.put(a.mode,4),s.put(a.getLength(),g.getLengthInBits(a.mode,t)),a.write(s)}var u=0;for(o=0;o<i.length;o++)u+=i[o].dataCount;if(s.getLengthInBits()>8*u)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*u+")");for(s.getLengthInBits()+4<=8*u&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*u)&&(s.put(r.PAD0,8),!(s.getLengthInBits()>=8*u));)s.put(r.PAD1,8);return r.createBytes(s,i)},r.createBytes=function(t,e){for(var r=0,n=0,i=0,s=new Array(e.length),o=new Array(e.length),a=0;a<e.length;a++){var u=e[a].dataCount,c=e[a].totalCount-u;n=Math.max(n,u),i=Math.max(i,c),s[a]=new Array(u);for(var l=0;l<s[a].length;l++)s[a][l]=255&t.buffer[l+r];r+=u;var h=g.getErrorCorrectPolynomial(c),d=new v(s[a],h.getLength()-1).mod(h);o[a]=new Array(h.getLength()-1);for(l=0;l<o[a].length;l++){var f=l+d.getLength()-o[a].length;o[a][l]=f>=0?d.get(f):0}}var p=0;for(l=0;l<e.length;l++)p+=e[l].totalCount;var y=new Array(p),m=0;for(l=0;l<n;l++)for(a=0;a<e.length;a++)l<s[a].length&&(y[m++]=s[a][l]);for(l=0;l<i;l++)for(a=0;a<e.length;a++)l<o[a].length&&(y[m++]=o[a][l]);return y};for(var n={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},i=1,s=0,o=3,a=2,u=0,c=1,l=2,h=3,d=4,f=5,p=6,y=7,g={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;g.getBCHDigit(e)-g.getBCHDigit(g.G15)>=0;)e^=g.G15<<g.getBCHDigit(e)-g.getBCHDigit(g.G15);return(t<<10|e)^g.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;g.getBCHDigit(e)-g.getBCHDigit(g.G18)>=0;)e^=g.G18<<g.getBCHDigit(e)-g.getBCHDigit(g.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return g.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case u:return(e+r)%2==0;case c:return e%2==0;case l:return r%3==0;case h:return(e+r)%3==0;case d:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case f:return e*r%2+e*r%3==0;case p:return(e*r%2+e*r%3)%2==0;case y:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new v([1],0),r=0;r<t;r++)e=e.multiply(new v([1,m.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:case n.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,n=0;n<e;n++)for(var i=0;i<e;i++){for(var s=0,o=t.isDark(n,i),a=-1;a<=1;a++)if(!(n+a<0||e<=n+a))for(var u=-1;u<=1;u++)i+u<0||e<=i+u||0==a&&0==u||o==t.isDark(n+a,i+u)&&s++;s>5&&(r+=3+s-5)}for(n=0;n<e-1;n++)for(i=0;i<e-1;i++){var c=0;t.isDark(n,i)&&c++,t.isDark(n+1,i)&&c++,t.isDark(n,i+1)&&c++,t.isDark(n+1,i+1)&&c++,0!=c&&4!=c||(r+=3)}for(n=0;n<e;n++)for(i=0;i<e-6;i++)t.isDark(n,i)&&!t.isDark(n,i+1)&&t.isDark(n,i+2)&&t.isDark(n,i+3)&&t.isDark(n,i+4)&&!t.isDark(n,i+5)&&t.isDark(n,i+6)&&(r+=40);for(i=0;i<e;i++)for(n=0;n<e-6;n++)t.isDark(n,i)&&!t.isDark(n+1,i)&&t.isDark(n+2,i)&&t.isDark(n+3,i)&&t.isDark(n+4,i)&&!t.isDark(n+5,i)&&t.isDark(n+6,i)&&(r+=40);var l=0;for(i=0;i<e;i++)for(n=0;n<e;n++)t.isDark(n,i)&&l++;return r+=10*(Math.abs(100*l/e/e-50)/5)}},m={glog:function(t){if(t<1)throw new Error("glog("+t+")");return m.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return m.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},b=0;b<8;b++)m.EXP_TABLE[b]=1<<b;for(b=8;b<256;b++)m.EXP_TABLE[b]=m.EXP_TABLE[b-4]^m.EXP_TABLE[b-5]^m.EXP_TABLE[b-6]^m.EXP_TABLE[b-8];for(b=0;b<255;b++)m.LOG_TABLE[m.EXP_TABLE[b]]=b;function v(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&0==t[r];)r++;this.num=new Array(t.length-r+e);for(var n=0;n<t.length-r;n++)this.num[n]=t[n+r]}function _(t,e){this.totalCount=t,this.dataCount=e}function w(){this.buffer=[],this.length=0}v.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<t.getLength();n++)e[r+n]^=m.gexp(m.glog(this.get(r))+m.glog(t.get(n)));return new v(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=m.glog(this.get(0))-m.glog(t.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(n=0;n<t.getLength();n++)r[n]^=m.gexp(m.glog(t.get(n))+e);return new v(r,0).mod(t)}},_.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],_.getRSBlocks=function(t,e){var r=_.getRsBlockTable(t,e);if(void 0==r)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var n=r.length/3,i=[],s=0;s<n;s++)for(var o=r[3*s+0],a=r[3*s+1],u=r[3*s+2],c=0;c<o;c++)i.push(new _(a,u));return i},_.getRsBlockTable=function(t,e){switch(e){case i:return _.RS_BLOCK_TABLE[4*(t-1)+0];case s:return _.RS_BLOCK_TABLE[4*(t-1)+1];case o:return _.RS_BLOCK_TABLE[4*(t-1)+2];case a:return _.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},w.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var E=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function S(t){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},"string"===typeof t&&(t={content:t}),t)for(var e in t)this.options[e]=t[e];if("string"!==typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var n=this.options.content,u=function(t,e){for(var r=function(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}(t),n=1,i=0,s=0,o=E.length;s<=o;s++){var a=E[s];if(!a)throw new Error("Content too long: expected "+i+" but got "+r);switch(e){case"L":i=a[0];break;case"M":i=a[1];break;case"Q":i=a[2];break;case"H":i=a[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(r<=i)break;n++}if(n>E.length)throw new Error("Content too long");return n}(n,this.options.ecl),c=function(t){switch(t){case"L":return i;case"M":return s;case"Q":return o;case"H":return a;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new r(u,c),this.qrcode.addData(n),this.qrcode.make()}S.prototype.svg=function(t){var e=this.options||{},r=this.qrcode.modules;"undefined"==typeof t&&(t={container:e.container||"svg"});for(var n="undefined"==typeof e.pretty||!!e.pretty,i=n?" ":"",s=n?"\r\n":"",o=e.width,a=e.height,u=r.length,c=o/(u+2*e.padding),l=a/(u+2*e.padding),h="undefined"!=typeof e.join&&!!e.join,d="undefined"!=typeof e.swap&&!!e.swap,f="undefined"==typeof e.xmlDeclaration||!!e.xmlDeclaration,p="undefined"!=typeof e.predefined&&!!e.predefined,y=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+c+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+s:"",g=i+'<rect x="0" y="0" width="'+o+'" height="'+a+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+s,m="",b="",v=0;v<u;v++)for(var _=0;_<u;_++){if(r[_][v]){var w=_*c+e.padding*c,E=v*l+e.padding*l;if(d){var S=w;w=E,E=S}if(h){var x=c+w,M=l+E;w=Number.isInteger(w)?Number(w):w.toFixed(2),E=Number.isInteger(E)?Number(E):E.toFixed(2),x=Number.isInteger(x)?Number(x):x.toFixed(2),b+="M"+w+","+E+" V"+(M=Number.isInteger(M)?Number(M):M.toFixed(2))+" H"+x+" V"+E+" H"+w+" Z "}else m+=p?i+'<use x="'+w.toString()+'" y="'+E.toString()+'" href="#qrmodule" />'+s:i+'<rect x="'+w.toString()+'" y="'+E.toString()+'" width="'+c+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+s}}h&&(m=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+b+'" />');let k="";if(void 0!==this.options.image&&this.options.image.svg){const t=o*this.options.image.width/100,e=a*this.options.image.height/100;k+=`<svg x="${o/2-t/2}" y="${a/2-e/2}" width="${t}" height="${e}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,k+=this.options.image.svg+s,k+="</svg>"}var C="";switch(t.container){case"svg":f&&(C+='<?xml version="1.0" standalone="yes"?>'+s),C+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+a+'">'+s,C+=y+g+m,C+=k,C+="</svg>";break;case"svg-viewbox":f&&(C+='<?xml version="1.0" standalone="yes"?>'+s),C+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+a+'">'+s,C+=y+g+m,C+=k,C+="</svg>";break;case"g":C+='<g width="'+o+'" height="'+a+'">'+s,C+=y+g+m,C+=k,C+="</g>";break;default:C+=(y+g+m+k).replace(/^\s+/,"")}return C},t.exports=S},5491:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.7.2"},4787:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function s(t,e,r){if(s.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"===typeof t?t.exports=s:e.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(3285).Buffer}catch(I){}function a(t,e){var r=t.charCodeAt(e);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 "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function c(t,e,r,i){for(var s=0,o=0,a=Math.min(t.length,r),u=e;u<a;u++){var c=t.charCodeAt(u)-48;s*=i,o=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&o<i,"Invalid character"),s+=o}return s}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(s.isBN=function(t){return t instanceof s||null!==t&&"object"===typeof t&&t.constructor.wordSize===s.wordSize&&Array.isArray(t.words)},s.max=function(t,e){return t.cmp(e)>0?t:e},s.min=function(t,e){return t.cmp(e)<0?t:e},s.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},s.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},s.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===r)for(i=t.length-1,s=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===r)for(i=0,s=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},s.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,s=0,o=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(n=(t.length-e)%2===0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var s=t.length-r,o=s%n,a=Math.min(s,s-o)+r,u=0,l=r;l<a;l+=n)u=c(t,l,l+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var h=1;for(u=c(t,l,t.length,e),l=0;l<o;l++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},s.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},s.prototype._move=function(t){l(t,this)},s.prototype.clone=function(){var t=new s(null);return this.copy(t),t},s.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(I){s.prototype.inspect=h}else s.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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"],f=[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],p=[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];s.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],u=(16777215&(a<<i|s)).toString(16);s=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,o--),r=0!==s||o!==this.length-1?d[6-u.length]+u+r:u+r}for(0!==s&&(r=s.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],l=p[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modrn(l).toString(t);r=(h=h.idivn(l)).isZero()?y+r:d[c-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),s.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function y(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],s=0|e.words[0],o=i*s,a=67108863&o,u=o/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,h=67108863&u,d=Math.min(c,e.length-1),f=Math.max(0,c-t.length+1);f<=d;f++){var p=c-f|0;l+=(o=(i=0|t.words[p])*(s=0|e.words[f])+h)/67108864|0,h=67108863&o}r.words[c]=0|h,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}s.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0");var o=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,s);return this["_toArrayLike"+("le"===e?"LE":"BE")](o,i),o},s.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|n;t[r++]=255&o,r<t.length&&(t[r++]=o>>8&255),r<t.length&&(t[r++]=o>>16&255),6===s?(r<t.length&&(t[r++]=o>>24&255),n=0,s=0):(n=o>>>24,s+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},s.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|n;t[r--]=255&o,r>=0&&(t[r--]=o>>8&255),r>=0&&(t[r--]=o>>16&255),6===s?(r>=0&&(t[r--]=o>>24&255),n=0,s=0):(n=o>>>24,s+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?s.prototype._countBits=function(t){return 32-Math.clz32(t)}:s.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},s.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},s.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},s.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},s.prototype.ior=function(t){return n(0===(this.negative|t.negative)),this.iuor(t)},s.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},s.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},s.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},s.prototype.iand=function(t){return n(0===(this.negative|t.negative)),this.iuand(t)},s.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},s.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},s.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},s.prototype.ixor=function(t){return n(0===(this.negative|t.negative)),this.iuxor(t)},s.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},s.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},s.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},s.prototype.notn=function(t){return this.clone().inotn(t)},s.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},s.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,s=0;s<n.length;s++)e=(0|r.words[s])+(0|n.words[s])+i,this.words[s]=67108863&e,i=e>>>26;for(;0!==i&&s<r.length;s++)e=(0|r.words[s])+i,this.words[s]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},s.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},s.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var s=0,o=0;o<n.length;o++)s=(e=(0|r.words[o])-(0|n.words[o])+s)>>26,this.words[o]=67108863&e;for(;0!==s&&o<r.length;o++)s=(e=(0|r.words[o])+s)>>26,this.words[o]=67108863&e;if(0===s&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,s,o=t.words,a=e.words,u=r.words,c=0,l=0|o[0],h=8191&l,d=l>>>13,f=0|o[1],p=8191&f,y=f>>>13,g=0|o[2],m=8191&g,b=g>>>13,v=0|o[3],_=8191&v,w=v>>>13,E=0|o[4],S=8191&E,x=E>>>13,M=0|o[5],k=8191&M,C=M>>>13,I=0|o[6],R=8191&I,A=I>>>13,N=0|o[7],O=8191&N,T=N>>>13,j=0|o[8],L=8191&j,P=j>>>13,D=0|o[9],B=8191&D,F=D>>>13,$=0|a[0],U=8191&$,z=$>>>13,H=0|a[1],V=8191&H,W=H>>>13,q=0|a[2],J=8191&q,G=q>>>13,Z=0|a[3],Y=8191&Z,Q=Z>>>13,K=0|a[4],X=8191&K,tt=K>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],st=8191&it,ot=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191<,dt=lt>>>13,ft=0|a[9],pt=8191&ft,yt=ft>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,U)|0))<<13)|0;c=((s=Math.imul(d,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(y,U)|0,s=Math.imul(y,z);var mt=(c+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(d,V)|0))<<13)|0;c=((s=s+Math.imul(d,W)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,U),i=(i=Math.imul(m,z))+Math.imul(b,U)|0,s=Math.imul(b,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(y,V)|0,s=s+Math.imul(y,W)|0;var bt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,J)|0))<<13)|0;c=((s=s+Math.imul(d,G)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(_,U),i=(i=Math.imul(_,z))+Math.imul(w,U)|0,s=Math.imul(w,z),n=n+Math.imul(m,V)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(b,V)|0,s=s+Math.imul(b,W)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,J)|0,s=s+Math.imul(y,G)|0;var vt=(c+(n=n+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Y)|0))<<13)|0;c=((s=s+Math.imul(d,Q)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,z))+Math.imul(x,U)|0,s=Math.imul(x,z),n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,V)|0,s=s+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(y,Y)|0,s=s+Math.imul(y,Q)|0;var _t=(c+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,X)|0))<<13)|0;c=((s=s+Math.imul(d,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,z))+Math.imul(C,U)|0,s=Math.imul(C,z),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(x,V)|0,s=s+Math.imul(x,W)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,G)|0,n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(b,Y)|0,s=s+Math.imul(b,Q)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(y,X)|0,s=s+Math.imul(y,tt)|0;var wt=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(d,rt)|0))<<13)|0;c=((s=s+Math.imul(d,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(R,U),i=(i=Math.imul(R,z))+Math.imul(A,U)|0,s=Math.imul(A,z),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(C,V)|0,s=s+Math.imul(C,W)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(x,J)|0,s=s+Math.imul(x,G)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(w,Y)|0,s=s+Math.imul(w,Q)|0,n=n+Math.imul(m,X)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(b,X)|0,s=s+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(y,rt)|0,s=s+Math.imul(y,nt)|0;var Et=(c+(n=n+Math.imul(h,st)|0)|0)+((8191&(i=(i=i+Math.imul(h,ot)|0)+Math.imul(d,st)|0))<<13)|0;c=((s=s+Math.imul(d,ot)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(T,U)|0,s=Math.imul(T,z),n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(A,V)|0,s=s+Math.imul(A,W)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,J)|0,s=s+Math.imul(C,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Y)|0,s=s+Math.imul(x,Q)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,X)|0,s=s+Math.imul(w,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(b,rt)|0,s=s+Math.imul(b,nt)|0,n=n+Math.imul(p,st)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(y,st)|0,s=s+Math.imul(y,ot)|0;var St=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(d,ut)|0))<<13)|0;c=((s=s+Math.imul(d,ct)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,U),i=(i=Math.imul(L,z))+Math.imul(P,U)|0,s=Math.imul(P,z),n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(T,V)|0,s=s+Math.imul(T,W)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(A,J)|0,s=s+Math.imul(A,G)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(C,Y)|0,s=s+Math.imul(C,Q)|0,n=n+Math.imul(S,X)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(x,X)|0,s=s+Math.imul(x,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,s=s+Math.imul(w,nt)|0,n=n+Math.imul(m,st)|0,i=(i=i+Math.imul(m,ot)|0)+Math.imul(b,st)|0,s=s+Math.imul(b,ot)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(y,ut)|0,s=s+Math.imul(y,ct)|0;var xt=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;c=((s=s+Math.imul(d,dt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,z))+Math.imul(F,U)|0,s=Math.imul(F,z),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(P,V)|0,s=s+Math.imul(P,W)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(T,J)|0,s=s+Math.imul(T,G)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(A,Y)|0,s=s+Math.imul(A,Q)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(C,X)|0,s=s+Math.imul(C,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(x,rt)|0,s=s+Math.imul(x,nt)|0,n=n+Math.imul(_,st)|0,i=(i=i+Math.imul(_,ot)|0)+Math.imul(w,st)|0,s=s+Math.imul(w,ot)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(b,ut)|0,s=s+Math.imul(b,ct)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(y,ht)|0,s=s+Math.imul(y,dt)|0;var Mt=(c+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,yt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((s=s+Math.imul(d,yt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,V),i=(i=Math.imul(B,W))+Math.imul(F,V)|0,s=Math.imul(F,W),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(T,Y)|0,s=s+Math.imul(T,Q)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(A,X)|0,s=s+Math.imul(A,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(C,rt)|0,s=s+Math.imul(C,nt)|0,n=n+Math.imul(S,st)|0,i=(i=i+Math.imul(S,ot)|0)+Math.imul(x,st)|0,s=s+Math.imul(x,ot)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,s=s+Math.imul(w,ct)|0,n=n+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,dt)|0)+Math.imul(b,ht)|0,s=s+Math.imul(b,dt)|0;var kt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,yt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((s=s+Math.imul(y,yt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,G))+Math.imul(F,J)|0,s=Math.imul(F,G),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(P,Y)|0,s=s+Math.imul(P,Q)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(T,X)|0,s=s+Math.imul(T,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(A,rt)|0,s=s+Math.imul(A,nt)|0,n=n+Math.imul(k,st)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(C,st)|0,s=s+Math.imul(C,ot)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(x,ut)|0,s=s+Math.imul(x,ct)|0,n=n+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,dt)|0)+Math.imul(w,ht)|0,s=s+Math.imul(w,dt)|0;var Ct=(c+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,yt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((s=s+Math.imul(b,yt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,Y),i=(i=Math.imul(B,Q))+Math.imul(F,Y)|0,s=Math.imul(F,Q),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(P,X)|0,s=s+Math.imul(P,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(T,rt)|0,s=s+Math.imul(T,nt)|0,n=n+Math.imul(R,st)|0,i=(i=i+Math.imul(R,ot)|0)+Math.imul(A,st)|0,s=s+Math.imul(A,ot)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(C,ut)|0,s=s+Math.imul(C,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(x,ht)|0,s=s+Math.imul(x,dt)|0;var It=(c+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,yt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((s=s+Math.imul(w,yt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(B,X),i=(i=Math.imul(B,tt))+Math.imul(F,X)|0,s=Math.imul(F,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(P,rt)|0,s=s+Math.imul(P,nt)|0,n=n+Math.imul(O,st)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(T,st)|0,s=s+Math.imul(T,ot)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(A,ut)|0,s=s+Math.imul(A,ct)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(C,ht)|0,s=s+Math.imul(C,dt)|0;var Rt=(c+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,yt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((s=s+Math.imul(x,yt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(B,rt),i=(i=Math.imul(B,nt))+Math.imul(F,rt)|0,s=Math.imul(F,nt),n=n+Math.imul(L,st)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(P,st)|0,s=s+Math.imul(P,ot)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(T,ut)|0,s=s+Math.imul(T,ct)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,dt)|0)+Math.imul(A,ht)|0,s=s+Math.imul(A,dt)|0;var At=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,yt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((s=s+Math.imul(C,yt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,st),i=(i=Math.imul(B,ot))+Math.imul(F,st)|0,s=Math.imul(F,ot),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(P,ut)|0,s=s+Math.imul(P,ct)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(T,ht)|0,s=s+Math.imul(T,dt)|0;var Nt=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,yt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((s=s+Math.imul(A,yt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(B,ut),i=(i=Math.imul(B,ct))+Math.imul(F,ut)|0,s=Math.imul(F,ct),n=n+Math.imul(L,ht)|0,i=(i=i+Math.imul(L,dt)|0)+Math.imul(P,ht)|0,s=s+Math.imul(P,dt)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,yt)|0)+Math.imul(T,pt)|0))<<13)|0;c=((s=s+Math.imul(T,yt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(B,ht),i=(i=Math.imul(B,dt))+Math.imul(F,ht)|0,s=Math.imul(F,dt);var Tt=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,yt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((s=s+Math.imul(P,yt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var jt=(c+(n=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,yt))+Math.imul(F,pt)|0))<<13)|0;return c=((s=Math.imul(F,yt))+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,u[0]=gt,u[1]=mt,u[2]=bt,u[3]=vt,u[4]=_t,u[5]=wt,u[6]=Et,u[7]=St,u[8]=xt,u[9]=Mt,u[10]=kt,u[11]=Ct,u[12]=It,u[13]=Rt,u[14]=At,u[15]=Nt,u[16]=Ot,u[17]=Tt,u[18]=jt,0!==c&&(u[19]=c,r.length++),r};function m(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,s=0;s<r.length-1;s++){var o=i;i=0;for(var a=67108863&n,u=Math.min(s,e.length-1),c=Math.max(0,s-t.length+1);c<=u;c++){var l=s-c,h=(0|t.words[l])*(0|e.words[c]),d=67108863&h;a=67108863&(d=d+a|0),i+=(o=(o=o+(h/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}r.words[s]=a,n=o,o=i}return 0!==n?r.words[s]=n:r.length--,r._strip()}function b(t,e,r){return m(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(g=y),s.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?y(this,t,e):r<1024?m(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=s.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,s){for(var o=0;o<s;o++)n[o]=e[t[o]],i[o]=r[t[o]]},v.prototype.transform=function(t,e,r,n,i,s){this.permute(s,t,e,r,n,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=u,d=c,f=0;f<o;f++){var p=r[l+f],y=n[l+f],g=r[l+f+o],m=n[l+f+o],b=h*g-d*m;m=h*m+d*g,g=b,r[l+f]=p+g,n[l+f]=y+m,r[l+f+o]=p-g,n[l+f+o]=y-m,f!==a&&(b=u*h-c*d,d=u*d+c*h,h=b)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var s=0,o=0;o<e;o++)s+=0|t[o],r[2*o]=8191&s,s>>>=13,r[2*o+1]=8191&s,s>>>=13;for(o=2*e;o<i;++o)r[o]=0;n(0===s),n(0===(-8192&s))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),s=this.stub(n),o=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),h=new Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,c,n),this.transform(o,s,a,u,n,i),this.transform(c,s,l,h,n,i);for(var f=0;f<n;f++){var p=a[f]*l[f]-u[f]*h[f];u[f]=a[f]*h[f]+u[f]*l[f],a[f]=p}return this.conjugate(a,u,n),this.transform(a,u,d,s,n,i),this.conjugate(d,s,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},s.prototype.mul=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},s.prototype.mulf=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),b(this,t,e)},s.prototype.imul=function(t){return this.clone().mulTo(t,this)},s.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"===typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var s=(0|this.words[i])*t,o=(67108863&s)+(67108863&r);r>>=26,r+=s/67108864|0,r+=o>>>26,this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},s.prototype.muln=function(t){return this.clone().imuln(t)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new s(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},s.prototype.iushln=function(t){n("number"===typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e<this.length;e++){var a=this.words[e]&s,u=(0|this.words[e])-a<<r;this.words[e]=u|o,o=a>>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},s.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},s.prototype.iushrn=function(t,e,r){var i;n("number"===typeof t&&t>=0),i=e?(e-e%26)/26:0;var s=t%26,o=Math.min((t-s)/26,this.length),a=67108863^67108863>>>s<<s,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-s|h>>>s,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},s.prototype.shln=function(t){return this.clone().ishln(t)},s.prototype.ushln=function(t){return this.clone().iushln(t)},s.prototype.shrn=function(t){return this.clone().ishrn(t)},s.prototype.ushrn=function(t){return this.clone().iushrn(t)},s.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},s.prototype.imaskn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},s.prototype.maskn=function(t){return this.clone().imaskn(t)},s.prototype.iaddn=function(t){return n("number"===typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},s.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},s.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},s.prototype.addn=function(t){return this.clone().iaddn(t)},s.prototype.subn=function(t){return this.clone().isubn(t)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(t,e,r){var i,s,o=t.length+r;this._expand(o);var a=0;for(i=0;i<t.length;i++){s=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((s-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&s}for(;i<this.length-r;i++)a=(s=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&s;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new s(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/o|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"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},s.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(o=a.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(o=a.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:a.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new s(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new s(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new s(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,o,a},s.prototype.div=function(t){return this.divmod(t,"div",!1).div},s.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},s.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},s.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},s.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,s=this.length-1;s>=0;s--)i=(r*i+(0|this.words[s]))%t;return e?-i:i},s.prototype.modn=function(t){return this.modrn(t)},s.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*r;this.words[i]=s/t|0,r=s%t}return this._strip(),e?this.ineg():this},s.prototype.divn=function(t){return this.clone().idivn(t)},s.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new s(1),o=new s(0),a=new s(0),u=new s(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),h=e.clone();!e.isZero();){for(var d=0,f=1;0===(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,y=1;0===(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),o.isub(u)):(r.isub(e),a.isub(i),u.isub(o))}return{a:a,b:u,gcd:r.iushln(c)}},s.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new s(1),a=new s(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(u),o.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(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(a)):(r.isub(e),a.isub(o))}return(i=0===e.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(t),i},s.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var s=e;e=r,r=s}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},s.prototype.invm=function(t){return this.egcd(t).a.umod(t)},s.prototype.isEven=function(){return 0===(1&this.words[0])},s.prototype.isOdd=function(){return 1===(1&this.words[0])},s.prototype.andln=function(t){return this.words[0]&t},s.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,o=r;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},s.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},s.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},s.prototype.gtn=function(t){return 1===this.cmpn(t)},s.prototype.gt=function(t){return 1===this.cmp(t)},s.prototype.gten=function(t){return this.cmpn(t)>=0},s.prototype.gte=function(t){return this.cmp(t)>=0},s.prototype.ltn=function(t){return-1===this.cmpn(t)},s.prototype.lt=function(t){return-1===this.cmp(t)},s.prototype.lten=function(t){return this.cmpn(t)<=0},s.prototype.lte=function(t){return this.cmp(t)<=0},s.prototype.eqn=function(t){return 0===this.cmpn(t)},s.prototype.eq=function(t){return 0===this.cmp(t)},s.red=function(t){return new k(t)},s.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(t){return this.red=t,this},s.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},s.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},s.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},s.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},s.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},s.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},s.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},s.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"===typeof t){var e=s._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function C(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}w.prototype._tmp=function(){var t=new s(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(E,w),E.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var s=t.words[9];for(e.words[e.length++]=s&r,i=10;i<t.length;i++){var o=0|t.words[i];t.words[i-10]=(o&r)<<4|s>>>22,s=o}s>>>=22,t.words[i-10]=s,0===s&&t.length>10?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(S,w),i(x,w),i(M,w),M.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},s._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new E;else if("p224"===t)e=new S;else if("p192"===t)e=new x;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return _[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new s(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var a=new s(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new s(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=o;0!==f.cmp(a);){for(var y=f,g=0;0!==y.cmp(a);g++)y=y.redSqr();n(g<p);var m=this.pow(h,new s(1).iushln(p-g-1));d=d.redMul(m),h=m.redSqr(),f=f.redMul(h),p=g}return d},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new s(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new s(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var h=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[o]),a=0,o=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},s.mont=function(t){return new C(t)},i(C,k),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),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)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new s(0)._forceRed(this);var r=t.mul(e),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)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},1638:(t,e,r)=>{"use strict";function n(t){var e,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=n(t[e]))&&(i&&(i+=" "),i+=r);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}function i(){for(var t,e,r=0,i="";r<arguments.length;)(t=arguments[r++])&&(e=n(t))&&(i&&(i+=" "),i+=e);return i}r.r(e),r.d(e,{clsx:()=>i,default:()=>s});const s=i},1322:t=>{"use strict";var e=String.prototype.replace,r=/%20/g,n="RFC1738",i="RFC3986";t.exports={default:i,formatters:{RFC1738:function(t){return e.call(t,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:n,RFC3986:i}},3902:(t,e,r)=>{"use strict";var n=r(3331),i=r(237),s=r(1322);t.exports={formats:s,parse:i,stringify:n}},237:(t,e,r)=>{"use strict";var n=r(9215),i=Object.prototype.hasOwnProperty,s=Array.isArray,o={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(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&"string"===typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},c=function(t,e,r,n){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(s),c=a?s.slice(0,a.index):s,l=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var h=0;r.depth>0&&null!==(a=o.exec(s))&&h<r.depth;){if(h+=1,!r.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+s.slice(a.index)+"]"),function(t,e,r,n){for(var i=n?e:u(e,r),s=t.length-1;s>=0;--s){var o,a=t[s];if("[]"===a&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(o=[])[l]=i:"__proto__"!==c&&(o[c]=i):o={0:i}}i=o}return i}(l,e,r,n)}};t.exports=function(t,e){var r=function(t){if(!t)return o;if(null!==t.decoder&&void 0!==t.decoder&&"function"!==typeof t.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e="undefined"===typeof t.charset?o.charset:t.charset;return{allowDots:"undefined"===typeof t.allowDots?o.allowDots:!!t.allowDots,allowPrototypes:"boolean"===typeof t.allowPrototypes?t.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"===typeof t.allowSparse?t.allowSparse:o.allowSparse,arrayLimit:"number"===typeof t.arrayLimit?t.arrayLimit:o.arrayLimit,charset:e,charsetSentinel:"boolean"===typeof t.charsetSentinel?t.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof t.comma?t.comma:o.comma,decoder:"function"===typeof t.decoder?t.decoder:o.decoder,delimiter:"string"===typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:o.delimiter,depth:"number"===typeof t.depth||!1===t.depth?+t.depth:o.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof t.interpretNumericEntities?t.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof t.parameterLimit?t.parameterLimit:o.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"===typeof t.plainObjects?t.plainObjects:o.plainObjects,strictNullHandling:"boolean"===typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling}}(e);if(""===t||null===t||"undefined"===typeof t)return r.plainObjects?Object.create(null):{};for(var l="string"===typeof t?function(t,e){var r,c={__proto__:null},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,d=l.split(e.delimiter,h),f=-1,p=e.charset;if(e.charsetSentinel)for(r=0;r<d.length;++r)0===d[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[r]?p="utf-8":"utf8=%26%2310003%3B"===d[r]&&(p="iso-8859-1"),f=r,r=d.length);for(r=0;r<d.length;++r)if(r!==f){var y,g,m=d[r],b=m.indexOf("]="),v=-1===b?m.indexOf("="):b+1;-1===v?(y=e.decoder(m,o.decoder,p,"key"),g=e.strictNullHandling?null:""):(y=e.decoder(m.slice(0,v),o.decoder,p,"key"),g=n.maybeMap(u(m.slice(v+1),e),(function(t){return e.decoder(t,o.decoder,p,"value")}))),g&&e.interpretNumericEntities&&"iso-8859-1"===p&&(g=a(g)),m.indexOf("[]=")>-1&&(g=s(g)?[g]:g),i.call(c,y)?c[y]=n.combine(c[y],g):c[y]=g}return c}(t,r):t,h=r.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],y=c(p,l[p],r,"string"===typeof t);h=n.merge(h,y,r)}return!0===r.allowSparse?h:n.compact(h)}},3331:(t,e,r)=>{"use strict";var n=r(510),i=r(9215),s=r(1322),o=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=Array.prototype.push,l=function(t,e){c.apply(t,u(e)?e:[e])},h=Date.prototype.toISOString,d=s.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:d,formatter:s.formatters[d],indices:!1,serializeDate:function(t){return h.call(t)},skipNulls:!1,strictNullHandling:!1},p={},y=function t(e,r,s,o,a,c,h,d,y,g,m,b,v,_,w,E){for(var S,x=e,M=E,k=0,C=!1;void 0!==(M=M.get(p))&&!C;){var I=M.get(e);if(k+=1,"undefined"!==typeof I){if(I===k)throw new RangeError("Cyclic object value");C=!0}"undefined"===typeof M.get(p)&&(k=0)}if("function"===typeof d?x=d(r,x):x instanceof Date?x=m(x):"comma"===s&&u(x)&&(x=i.maybeMap(x,(function(t){return t instanceof Date?m(t):t}))),null===x){if(a)return h&&!_?h(r,f.encoder,w,"key",b):r;x=""}if("string"===typeof(S=x)||"number"===typeof S||"boolean"===typeof S||"symbol"===typeof S||"bigint"===typeof S||i.isBuffer(x))return h?[v(_?r:h(r,f.encoder,w,"key",b))+"="+v(h(x,f.encoder,w,"value",b))]:[v(r)+"="+v(String(x))];var R,A=[];if("undefined"===typeof x)return A;if("comma"===s&&u(x))_&&h&&(x=i.maybeMap(x,h)),R=[{value:x.length>0?x.join(",")||null:void 0}];else if(u(d))R=d;else{var N=Object.keys(x);R=y?N.sort(y):N}for(var O=o&&u(x)&&1===x.length?r+"[]":r,T=0;T<R.length;++T){var j=R[T],L="object"===typeof j&&"undefined"!==typeof j.value?j.value:x[j];if(!c||null!==L){var P=u(x)?"function"===typeof s?s(O,j):O:O+(g?"."+j:"["+j+"]");E.set(e,k);var D=n();D.set(p,E),l(A,t(L,P,s,o,a,c,"comma"===s&&_&&u(x)?null:h,d,y,g,m,b,v,_,w,D))}}return A};t.exports=function(t,e){var r,i=t,c=function(t){if(!t)return f;if(null!==t.encoder&&"undefined"!==typeof t.encoder&&"function"!==typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||f.charset;if("undefined"!==typeof t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=s.default;if("undefined"!==typeof t.format){if(!o.call(s.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=s.formatters[r],i=f.filter;return("function"===typeof t.filter||u(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"===typeof t.addQueryPrefix?t.addQueryPrefix:f.addQueryPrefix,allowDots:"undefined"===typeof t.allowDots?f.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"===typeof t.charsetSentinel?t.charsetSentinel:f.charsetSentinel,delimiter:"undefined"===typeof t.delimiter?f.delimiter:t.delimiter,encode:"boolean"===typeof t.encode?t.encode:f.encode,encoder:"function"===typeof t.encoder?t.encoder:f.encoder,encodeValuesOnly:"boolean"===typeof t.encodeValuesOnly?t.encodeValuesOnly:f.encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:"function"===typeof t.serializeDate?t.serializeDate:f.serializeDate,skipNulls:"boolean"===typeof t.skipNulls?t.skipNulls:f.skipNulls,sort:"function"===typeof t.sort?t.sort:null,strictNullHandling:"boolean"===typeof t.strictNullHandling?t.strictNullHandling:f.strictNullHandling}}(e);"function"===typeof c.filter?i=(0,c.filter)("",i):u(c.filter)&&(r=c.filter);var h,d=[];if("object"!==typeof i||null===i)return"";h=e&&e.arrayFormat in a?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var p=a[h];if(e&&"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g="comma"===p&&e&&e.commaRoundTrip;r||(r=Object.keys(i)),c.sort&&r.sort(c.sort);for(var m=n(),b=0;b<r.length;++b){var v=r[b];c.skipNulls&&null===i[v]||l(d,y(i[v],v,p,g,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,m))}var _=d.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),_.length>0?w+_:""}},9215:(t,e,r)=>{"use strict";var n=r(1322),i=Object.prototype.hasOwnProperty,s=Array.isArray,o=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)"undefined"!==typeof t[n]&&(r[n]=t[n]);return r};t.exports={arrayToObject:a,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var i=e[n],o=i.obj[i.prop],a=Object.keys(o),u=0;u<a.length;++u){var c=a[u],l=o[c];"object"===typeof l&&null!==l&&-1===r.indexOf(l)&&(e.push({obj:o,prop:c}),r.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(s(r)){for(var n=[],i=0;i<r.length;++i)"undefined"!==typeof r[i]&&n.push(r[i]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(i){return n}},encode:function(t,e,r,i,s){if(0===t.length)return t;var a=t;if("symbol"===typeof t?a=Symbol.prototype.toString.call(t):"string"!==typeof t&&(a=String(t)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var u="",c=0;c<a.length;++c){var l=a.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||s===n.RFC1738&&(40===l||41===l)?u+=a.charAt(c):l<128?u+=o[l]:l<2048?u+=o[192|l>>6]+o[128|63&l]:l<55296||l>=57344?u+=o[224|l>>12]+o[128|l>>6&63]+o[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(c)),u+=o[240|l>>18]+o[128|l>>12&63]+o[128|l>>6&63]+o[128|63&l])}return u},isBuffer:function(t){return!(!t||"object"!==typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(s(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!==typeof r){if(s(e))e.push(r);else{if(!e||"object"!==typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!==typeof e)return[e].concat(r);var o=e;return s(e)&&!s(r)&&(o=a(e,n)),s(e)&&s(r)?(r.forEach((function(r,s){if(i.call(e,s)){var o=e[s];o&&"object"===typeof o&&r&&"object"===typeof r?e[s]=t(o,r,n):e.push(r)}else e[s]=r})),e):Object.keys(r).reduce((function(e,s){var o=r[s];return i.call(e,s)?e[s]=t(e[s],o,n):e[s]=o,e}),o)}}},6946:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(6677);function i(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout((()=>{throw n}))}}class s extends n.EventEmitter{emit(t){let e="error"===t;const r=this._events;if(void 0!==r)e=e&&void 0===r.error;else if(!e)return!1;for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];if(e){let t;if(s.length>0&&([t]=s),t instanceof Error)throw t;const e=new Error("Unhandled error."+(t?` (${t.message})`:""));throw e.context=t,e}const a=r[t];if(void 0===a)return!1;if("function"===typeof a)i(a,this,s);else{const t=a.length,e=function(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}(a);for(let r=0;r<t;r+=1)i(e[r],this,s)}return!0}}e.default=s},641:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertExhaustive=e.assertStruct=e.assert=e.AssertionError=void 0;const n=r(4529);function i(t,e){return function(t){var e,r;return Boolean("string"===typeof(null===(r=null===(e=null===t||void 0===t?void 0:t.prototype)||void 0===e?void 0:e.constructor)||void 0===r?void 0:r.name))}(t)?new t({message:e}):t({message:e})}class s extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}e.AssertionError=s,e.assert=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Assertion failed.";if(!t){if(e instanceof Error)throw e;throw i(arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,e)}},e.assertStruct=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Assertion failed",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s;try{(0,n.assert)(t,e)}catch(a){throw i(o,`${r}: ${function(t){const e=function(t){return"object"===typeof t&&null!==t&&"message"in t}(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}(a)}.`)}},e.assertExhaustive=function(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}},8400:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.base64=void 0;const n=r(4529),i=r(641);e.base64=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,s;const o=null!==(r=e.paddingRequired)&&void 0!==r&&r,a=null!==(s=e.characterSet)&&void 0!==s?s:"base64";let u,c;return"base64"===a?u=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===a),u=String.raw`[-_A-Za-z0-9]`),c=o?new RegExp(`^(?:${u}{4})*(?:${u}{3}=|${u}{2}==)?$`,"u"):new RegExp(`^(?:${u}{4})*(?:${u}{2,3}|${u}{3}=|${u}{2}==)?$`,"u"),(0,n.pattern)(t,c)}},3436:(t,e,r)=>{"use strict";var n=r(8381).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.createDataView=e.concatBytes=e.valueToBytes=e.stringToBytes=e.numberToBytes=e.signedBigIntToBytes=e.bigIntToBytes=e.hexToBytes=e.bytesToString=e.bytesToNumber=e.bytesToSignedBigInt=e.bytesToBigInt=e.bytesToHex=e.assertIsBytes=e.isBytes=void 0;const i=r(641),s=r(5466),o=48,a=58,u=87;const c=function(){const t=[];return()=>{if(0===t.length)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return t}}();function l(t){return t instanceof Uint8Array}function h(t){(0,i.assert)(l(t),"Value must be a Uint8Array.")}function d(t){if(h(t),0===t.length)return"0x";const e=c(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,s.add0x)(r.join(""))}function f(t){h(t);const e=d(t);return BigInt(e)}function p(t){var e;if("0x"===(null===(e=null===t||void 0===t?void 0:t.toLowerCase)||void 0===e?void 0:e.call(t)))return new Uint8Array;(0,s.assertIsHexString)(t);const r=(0,s.remove0x)(t).toLowerCase(),n=r.length%2===0?r:`0${r}`,i=new Uint8Array(n.length/2);for(let s=0;s<i.length;s++){const t=n.charCodeAt(2*s),e=n.charCodeAt(2*s+1),r=t-(t<a?o:u),c=e-(e<a?o:u);i[s]=16*r+c}return i}function y(t){(0,i.assert)("bigint"===typeof t,"Value must be a bigint."),(0,i.assert)(t>=BigInt(0),"Value must be a non-negative bigint.");return p(t.toString(16))}function g(t){(0,i.assert)("number"===typeof t,"Value must be a number."),(0,i.assert)(t>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(t.toString(16))}function m(t){return(0,i.assert)("string"===typeof t,"Value must be a string."),(new TextEncoder).encode(t)}function b(t){if("bigint"===typeof t)return y(t);if("number"===typeof t)return g(t);if("string"===typeof t)return t.startsWith("0x")?p(t):m(t);if(l(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}e.isBytes=l,e.assertIsBytes=h,e.bytesToHex=d,e.bytesToBigInt=f,e.bytesToSignedBigInt=function(t){h(t);let e=BigInt(0);for(const r of t)e=(e<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*t.length,e)},e.bytesToNumber=function(t){h(t);const e=f(t);return(0,i.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(e)},e.bytesToString=function(t){return h(t),(new TextDecoder).decode(t)},e.hexToBytes=p,e.bigIntToBytes=y,e.signedBigIntToBytes=function(t,e){(0,i.assert)("bigint"===typeof t,"Value must be a bigint."),(0,i.assert)("number"===typeof e,"Byte length must be a number."),(0,i.assert)(e>0,"Byte length must be greater than 0."),(0,i.assert)(function(t,e){(0,i.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(8*e-1))}(t,e),"Byte length is too small to represent the given value.");let r=t;const n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},e.numberToBytes=g,e.stringToBytes=m,e.valueToBytes=b,e.concatBytes=function(t){const e=new Array(t.length);let r=0;for(let i=0;i<t.length;i++){const n=b(t[i]);e[i]=n,r+=n.length}const n=new Uint8Array(r);for(let i=0,s=0;i<e.length;i++)n.set(e[i],s),s+=e[i].length;return n},e.createDataView=function(t){if("undefined"!==typeof n&&t instanceof n){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}},7908:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChecksumStruct=void 0;const n=r(4529),i=r(8400);e.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},5265:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createHex=e.createBytes=e.createBigInt=e.createNumber=void 0;const n=r(4529),i=r(641),s=r(3436),o=r(5466),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),o.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([o.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([o.StrictHexStruct]),s.hexToBytes)),h=(0,n.coerce)(o.StrictHexStruct,(0,n.instance)(Uint8Array),s.bytesToHex);e.createNumber=function(t){try{const e=(0,n.create)(t,u);return(0,i.assert)(Number.isFinite(e),`Expected a number-like value, got "${t}".`),e}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${t}".`);throw e}},e.createBigInt=function(t){try{return(0,n.create)(t,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},e.createBytes=function(t){if("string"===typeof t&&"0x"===t.toLowerCase())return new Uint8Array;try{return(0,n.create)(t,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},e.createHex=function(t){if(t instanceof Uint8Array&&0===t.length||"string"===typeof t&&"0x"===t.toLowerCase())return"0x";try{return(0,n.create)(t,h)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},1562:function(t,e){"use strict";var r,n,i=this&&this.__classPrivateFieldSet||function(t,e,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 e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r},s=this&&this.__classPrivateFieldGet||function(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)};Object.defineProperty(e,"__esModule",{value:!0}),e.FrozenSet=e.FrozenMap=void 0;class o{constructor(t){r.set(this,void 0),i(this,r,new Map(t),"f"),Object.freeze(this)}get size(){return s(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return s(this,r,"f")[Symbol.iterator]()}entries(){return s(this,r,"f").entries()}forEach(t,e){return s(this,r,"f").forEach(((r,n,i)=>t.call(e,r,n,this)))}get(t){return s(this,r,"f").get(t)}has(t){return s(this,r,"f").has(t)}keys(){return s(this,r,"f").keys()}values(){return s(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((t=>{let[e,r]=t;return`${String(e)} => ${String(r)}`})).join(", ")} `:""}}`}}e.FrozenMap=o;class a{constructor(t){n.set(this,void 0),i(this,n,new Set(t),"f"),Object.freeze(this)}get size(){return s(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return s(this,n,"f")[Symbol.iterator]()}entries(){return s(this,n,"f").entries()}forEach(t,e){return s(this,n,"f").forEach(((r,n,i)=>t.call(e,r,n,this)))}has(t){return s(this,n,"f").has(t)}keys(){return s(this,n,"f").keys()}values(){return s(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((t=>String(t))).join(", ")} `:""}}`}}e.FrozenSet=a,Object.freeze(o),Object.freeze(o.prototype),Object.freeze(a),Object.freeze(a.prototype)},5466:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const n=r(4529),i=r(641);function s(t){return(0,n.is)(t,e.HexStruct)}function o(t){return(0,n.is)(t,e.StrictHexStruct)}e.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),e.isHexString=s,e.isStrictHexString=o,e.assertIsHexString=function(t){(0,i.assert)(s(t),"Value must be a hexadecimal string.")},e.assertIsStrictHexString=function(t){(0,i.assert)(o(t),'Value must be a hexadecimal string, starting with "0x".')},e.add0x=function(t){return t.startsWith("0x")?t:t.startsWith("0X")?`0x${t.substring(2)}`:`0x${t}`},e.remove0x=function(t){return t.startsWith("0x")||t.startsWith("0X")?t.substring(2):t}},8671:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(641),e),i(r(8400),e),i(r(3436),e),i(r(7908),e),i(r(5265),e),i(r(1562),e),i(r(5466),e),i(r(3281),e),i(r(6734),e),i(r(7363),e),i(r(4182),e),i(r(9508),e),i(r(8782),e),i(r(5562),e)},3281:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateJsonAndGetSize=e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.isValidJson=e.JsonStruct=void 0;const n=r(4529),i=r(641),s=r(7363);function o(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=new Set;return function t(e,n){if(void 0===e)return[!1,0];if(null===e)return[!0,n?0:s.JsonSize.Null];const i=typeof e;try{if("function"===i)return[!1,0];if("string"===i||e instanceof String)return[!0,n?0:(0,s.calculateStringSize)(e)+2*s.JsonSize.Quote];if("boolean"===i||e instanceof Boolean)return n?[!0,0]:[!0,1==e?s.JsonSize.True:s.JsonSize.False];if("number"===i||e instanceof Number)return n?[!0,0]:[!0,(0,s.calculateNumberSize)(e)];if(e instanceof Date)return n?[!0,0]:[!0,isNaN(e.getDate())?s.JsonSize.Null:s.JsonSize.Date+2*s.JsonSize.Quote]}catch(o){return[!1,0]}if(!(0,s.isPlainObject)(e)&&!Array.isArray(e))return[!1,0];if(r.has(e))return[!1,0];r.add(e);try{return[!0,Object.entries(e).reduce(((i,o,a,u)=>{let[c,l]=o,[h,d]=t(l,n);if(!h)throw new Error("JSON validation did not pass. Validation process stopped.");if(r.delete(e),n)return 0;return i+(Array.isArray(e)?0:c.length+s.JsonSize.Comma+2*s.JsonSize.Colon)+d+(a<u.length-1?s.JsonSize.Comma:0)}),n?0:2*s.JsonSize.Wrapper)]}catch(o){return[!1,0]}}(t,e)}e.JsonStruct=(0,n.define)("Json",(t=>{const[e]=o(t,!0);return!!e||"Expected a valid JSON-serializable value"})),e.isValidJson=function(t){return(0,n.is)(t,e.JsonStruct)},e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,n.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),e.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(e.JsonStruct),stack:(0,n.optional)((0,n.string)())}),e.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),e.JsonStruct),(0,n.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,n.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,n.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,n.omit)(e.JsonRpcRequestStruct,["id"]),e.isJsonRpcNotification=function(t){return(0,n.is)(t,e.JsonRpcNotificationStruct)},e.assertIsJsonRpcNotification=function(t,r){(0,i.assertStruct)(t,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",r)},e.isJsonRpcRequest=function(t){return(0,n.is)(t,e.JsonRpcRequestStruct)},e.assertIsJsonRpcRequest=function(t,r){(0,i.assertStruct)(t,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",r)},e.PendingJsonRpcResponseStruct=(0,n.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,n.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,n.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,n.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]),e.isPendingJsonRpcResponse=function(t){return(0,n.is)(t,e.PendingJsonRpcResponseStruct)},e.assertIsPendingJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",r)},e.isJsonRpcResponse=function(t){return(0,n.is)(t,e.JsonRpcResponseStruct)},e.assertIsJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",r)},e.isJsonRpcSuccess=function(t){return(0,n.is)(t,e.JsonRpcSuccessStruct)},e.assertIsJsonRpcSuccess=function(t,r){(0,i.assertStruct)(t,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",r)},e.isJsonRpcFailure=function(t){return(0,n.is)(t,e.JsonRpcFailureStruct)},e.assertIsJsonRpcFailure=function(t,r){(0,i.assertStruct)(t,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",r)},e.isJsonRpcError=function(t){return(0,n.is)(t,e.JsonRpcErrorStruct)},e.assertIsJsonRpcError=function(t,r){(0,i.assertStruct)(t,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",r)},e.getJsonRpcIdValidator=function(t){const{permitEmptyString:e,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},t);return t=>Boolean("number"===typeof t&&(r||Number.isInteger(t))||"string"===typeof t&&(e||t.length>0)||n&&null===t)},e.validateJsonAndGetSize=o},6734:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.createProjectLogger=void 0;const i=(0,n(r(8543)).default)("metamask");e.createProjectLogger=function(t){return i.extend(t)},e.createModuleLogger=function(t,e){return t.extend(e)}},7363:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0,e.isNonEmptyArray=function(t){return Array.isArray(t)&&t.length>0},e.isNullOrUndefined=function(t){return null===t||void 0===t},e.isObject=function(t){return Boolean(t)&&"object"===typeof t&&!Array.isArray(t)};function r(t){return t.charCodeAt(0)<=127}e.hasProperty=(t,e)=>Object.hasOwnProperty.call(t,e),function(t){t[t.Null=4]="Null",t[t.Comma=1]="Comma",t[t.Wrapper=1]="Wrapper",t[t.True=4]="True",t[t.False=5]="False",t[t.Quote=1]="Quote",t[t.Colon=1]="Colon",t[t.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,e.isPlainObject=function(t){if("object"!==typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(e){return!1}},e.isASCII=r,e.calculateStringSize=function(t){var n;return t.split("").reduce(((t,e)=>r(e)?t+1:t+2),0)+(null!==(n=t.match(e.ESCAPE_CHARACTERS_REGEXP))&&void 0!==n?n:[]).length},e.calculateNumberSize=function(t){return t.toString().length}},4182:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBigInt=e.hexToNumber=e.bigIntToHex=e.numberToHex=void 0;const n=r(641),i=r(5466);e.numberToHex=t=>((0,n.assert)("number"===typeof t,"Value must be a number."),(0,n.assert)(t>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(t.toString(16)));e.bigIntToHex=t=>((0,n.assert)("bigint"===typeof t,"Value must be a bigint."),(0,n.assert)(t>=0,"Value must be a non-negative bigint."),(0,i.add0x)(t.toString(16)));e.hexToNumber=t=>{(0,i.assertIsHexString)(t);const e=parseInt(t,16);return(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};e.hexToBigInt=t=>((0,i.assertIsHexString)(t),BigInt((0,i.add0x)(t)))},9508:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},8782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(t){t[t.Millisecond=1]="Millisecond",t[t.Second=1e3]="Second",t[t.Minute=6e4]="Minute",t[t.Hour=36e5]="Hour",t[t.Day=864e5]="Day",t[t.Week=6048e5]="Week",t[t.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const r=(t,e)=>{if(!(t=>Number.isInteger(t)&&t>=0)(t))throw new Error(`"${e}" must be a non-negative integer. Received: "${t}".`)};e.inMilliseconds=function(t,e){return r(t,"count"),t*e},e.timeSince=function(t){return r(t,"timestamp"),Date.now()-t}},5562:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const n=r(9354),i=r(4529),s=r(641);e.VersionStruct=(0,i.refine)((0,i.string)(),"Version",(t=>null!==(0,n.valid)(t)||`Expected SemVer version, got "${t}"`)),e.VersionRangeStruct=(0,i.refine)((0,i.string)(),"Version range",(t=>null!==(0,n.validRange)(t)||`Expected SemVer range, got "${t}"`)),e.isValidSemVerVersion=function(t){return(0,i.is)(t,e.VersionStruct)},e.isValidSemVerRange=function(t){return(0,i.is)(t,e.VersionRangeStruct)},e.assertIsSemVerVersion=function(t){(0,s.assertStruct)(t,e.VersionStruct)},e.assertIsSemVerRange=function(t){(0,s.assertStruct)(t,e.VersionRangeStruct)},e.gtVersion=function(t,e){return(0,n.gt)(t,e)},e.gtRange=function(t,e){return(0,n.gtr)(t,e)},e.satisfiesVersionRange=function(t,e){return(0,n.satisfies)(t,e,{includePrerelease:!0})}},9936:(t,e,r)=>{"use strict";const n=r(9749),i=Symbol("max"),s=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),h=Symbol("lruList"),d=Symbol("cache"),f=Symbol("updateAgeOnGet"),p=()=>1;const y=(t,e,r)=>{const n=t[d].get(e);if(n){const e=n.value;if(g(t,e)){if(b(t,n),!t[a])return}else r&&(t[f]&&(n.value.now=Date.now()),t[h].unshiftNode(n));return e.value}},g=(t,e)=>{if(!e||!e.maxAge&&!t[u])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[u]&&r>t[u]},m=t=>{if(t[s]>t[i])for(let e=t[h].tail;t[s]>t[i]&&null!==e;){const r=e.prev;b(t,e),e=r}},b=(t,e)=>{if(e){const r=e.value;t[c]&&t[c](r.key,r.value),t[s]-=r.length,t[d].delete(r.key),t[h].removeNode(e)}};class v{constructor(t,e,r,n,i){this.key=t,this.value=e,this.length=r,this.now=n,this.maxAge=i||0}}const _=(t,e,r,n)=>{let i=r.value;g(t,i)&&(b(t,r),t[a]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};t.exports=class{constructor(t){if("number"===typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!==typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[i]=t.max||1/0;const e=t.length||p;if(this[o]="function"!==typeof e?p:e,this[a]=t.stale||!1,t.maxAge&&"number"!==typeof t.maxAge)throw new TypeError("maxAge must be a number");this[u]=t.maxAge||0,this[c]=t.dispose,this[l]=t.noDisposeOnSet||!1,this[f]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!==typeof t||t<0)throw new TypeError("max must be a non-negative number");this[i]=t||1/0,m(this)}get max(){return this[i]}set allowStale(t){this[a]=!!t}get allowStale(){return this[a]}set maxAge(t){if("number"!==typeof t)throw new TypeError("maxAge must be a non-negative number");this[u]=t,m(this)}get maxAge(){return this[u]}set lengthCalculator(t){"function"!==typeof t&&(t=p),t!==this[o]&&(this[o]=t,this[s]=0,this[h].forEach((t=>{t.length=this[o](t.value,t.key),this[s]+=t.length}))),m(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[h].length}rforEach(t,e){e=e||this;for(let r=this[h].tail;null!==r;){const n=r.prev;_(this,t,r,e),r=n}}forEach(t,e){e=e||this;for(let r=this[h].head;null!==r;){const n=r.next;_(this,t,r,e),r=n}}keys(){return this[h].toArray().map((t=>t.key))}values(){return this[h].toArray().map((t=>t.value))}reset(){this[c]&&this[h]&&this[h].length&&this[h].forEach((t=>this[c](t.key,t.value))),this[d]=new Map,this[h]=new n,this[s]=0}dump(){return this[h].map((t=>!g(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[h]}set(t,e,r){if((r=r||this[u])&&"number"!==typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[o](e,t);if(this[d].has(t)){if(a>this[i])return b(this,this[d].get(t)),!1;const o=this[d].get(t).value;return this[c]&&(this[l]||this[c](t,o.value)),o.now=n,o.maxAge=r,o.value=e,this[s]+=a-o.length,o.length=a,this.get(t),m(this),!0}const f=new v(t,e,a,n,r);return f.length>this[i]?(this[c]&&this[c](t,e),!1):(this[s]+=f.length,this[h].unshift(f),this[d].set(t,this[h].head),m(this),!0)}has(t){if(!this[d].has(t))return!1;const e=this[d].get(t).value;return!g(this,e)}get(t){return y(this,t,!0)}peek(t){return y(this,t,!1)}pop(){const t=this[h].tail;return t?(b(this,t),t.value):null}del(t){b(this,this[d].get(t))}load(t){this.reset();const e=Date.now();for(let r=t.length-1;r>=0;r--){const n=t[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const t=i-e;t>0&&this.set(n.k,n.v,t)}}}prune(){this[d].forEach(((t,e)=>y(this,e,!1)))}}},9781:(t,e,r)=>{const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(t,e){if(e=s(e),t instanceof i){if(t.loose===!!e.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),c("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(t){const e=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],r=t.match(e);if(!r)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(t){if(c("Comparator.test",t,this.options.loose),this.semver===n||t===n)return!0;if("string"===typeof t)try{t=new l(t,this.options)}catch(e){return!1}return u(t,this.operator,this.semver,this.options)}intersects(t,e){if(!(t instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new h(t.value,e).test(this.value):""===t.operator?""===t.value||new h(this.value,e).test(t.semver):(!(e=s(e)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==t.value)&&(!(!e.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!t.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!t.operator.startsWith("<"))||(!(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))||(!!(u(this.semver,"<",t.semver,e)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))||!!(u(this.semver,">",t.semver,e)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))))))}}t.exports=i;const s=r(4398),{safeRe:o,t:a}=r(881),u=r(2748),c=r(857),l=r(7373),h=r(7436)},7436:(t,e,r)=>{class n{constructor(t,e){if(e=s(e),t instanceof n)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new n(t.raw,e);if(t instanceof o)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const t=this.set[0];if(this.set=this.set.filter((t=>!g(t[0]))),0===this.set.length)this.set=[t];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(t){const e=((this.options.includePrerelease&&p)|(this.options.loose&&y))+":"+t,r=i.get(e);if(r)return r;const n=this.options.loose,s=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];t=t.replace(s,R(this.options.includePrerelease)),a("hyphen replace",t),t=t.replace(c[l.COMPARATORTRIM],h),a("comparator trim",t),t=t.replace(c[l.TILDETRIM],d),a("tilde trim",t),t=t.replace(c[l.CARETTRIM],f),a("caret trim",t);let u=t.split(" ").map((t=>v(t,this.options))).join(" ").split(/\s+/).map((t=>I(t,this.options)));n&&(u=u.filter((t=>(a("loose invalid filter",t,this.options),!!t.match(c[l.COMPARATORLOOSE]))))),a("range list",u);const m=new Map,b=u.map((t=>new o(t,this.options)));for(const i of b){if(g(i))return[i];m.set(i.value,i)}m.size>1&&m.has("")&&m.delete("");const _=[...m.values()];return i.set(e,_),_}intersects(t,e){if(!(t instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>b(r,e)&&t.set.some((t=>b(t,e)&&r.every((r=>t.every((t=>r.intersects(t,e)))))))))}test(t){if(!t)return!1;if("string"===typeof t)try{t=new u(t,this.options)}catch(e){return!1}for(let r=0;r<this.set.length;r++)if(A(this.set[r],t,this.options))return!0;return!1}}t.exports=n;const i=new(r(9936))({max:1e3}),s=r(4398),o=r(9781),a=r(857),u=r(7373),{safeRe:c,t:l,comparatorTrimReplace:h,tildeTrimReplace:d,caretTrimReplace:f}=r(881),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:y}=r(4572),g=t=>"<0.0.0-0"===t.value,m=t=>""===t.value,b=(t,e)=>{let r=!0;const n=t.slice();let i=n.pop();for(;r&&n.length;)r=n.every((t=>i.intersects(t,e))),i=n.pop();return r},v=(t,e)=>(a("comp",t,e),t=S(t,e),a("caret",t),t=w(t,e),a("tildes",t),t=M(t,e),a("xrange",t),t=C(t,e),a("stars",t),t),_=t=>!t||"x"===t.toLowerCase()||"*"===t,w=(t,e)=>t.trim().split(/\s+/).map((t=>E(t,e))).join(" "),E=(t,e)=>{const r=e.loose?c[l.TILDELOOSE]:c[l.TILDE];return t.replace(r,((e,r,n,i,s)=>{let o;return a("tilde",t,e,r,n,i,s),_(r)?o="":_(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:_(i)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(a("replaceTilde pr",s),o=`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,a("tilde return",o),o}))},S=(t,e)=>t.trim().split(/\s+/).map((t=>x(t,e))).join(" "),x=(t,e)=>{a("caret",t,e);const r=e.loose?c[l.CARETLOOSE]:c[l.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,((e,r,i,s,o)=>{let u;return a("caret",t,e,r,i,s,o),_(r)?u="":_(i)?u=`>=${r}.0.0${n} <${+r+1}.0.0-0`:_(s)?u="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:o?(a("replaceCaret pr",o),u="0"===r?"0"===i?`>=${r}.${i}.${s}-${o} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s}-${o} <${+r+1}.0.0-0`):(a("no pr"),u="0"===r?"0"===i?`>=${r}.${i}.${s}${n} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s} <${+r+1}.0.0-0`),a("caret return",u),u}))},M=(t,e)=>(a("replaceXRanges",t,e),t.split(/\s+/).map((t=>k(t,e))).join(" ")),k=(t,e)=>{t=t.trim();const r=e.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return t.replace(r,((r,n,i,s,o,u)=>{a("xRange",t,r,n,i,s,o,u);const c=_(i),l=c||_(s),h=l||_(o),d=h;return"="===n&&d&&(n=""),u=e.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(l&&(s=0),o=0,">"===n?(n=">=",l?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===n&&(n="<",l?i=+i+1:s=+s+1),"<"===n&&(u="-0"),r=`${n+i}.${s}.${o}${u}`):l?r=`>=${i}.0.0${u} <${+i+1}.0.0-0`:h&&(r=`>=${i}.${s}.0${u} <${i}.${+s+1}.0-0`),a("xRange return",r),r}))},C=(t,e)=>(a("replaceStars",t,e),t.trim().replace(c[l.STAR],"")),I=(t,e)=>(a("replaceGTE0",t,e),t.trim().replace(c[e.includePrerelease?l.GTE0PRE:l.GTE0],"")),R=t=>(e,r,n,i,s,o,a,u,c,l,h,d,f)=>`${r=_(n)?"":_(i)?`>=${n}.0.0${t?"-0":""}`:_(s)?`>=${n}.${i}.0${t?"-0":""}`:o?`>=${r}`:`>=${r}${t?"-0":""}`} ${u=_(c)?"":_(l)?`<${+c+1}.0.0-0`:_(h)?`<${c}.${+l+1}.0-0`:d?`<=${c}.${l}.${h}-${d}`:t?`<${c}.${l}.${+h+1}-0`:`<=${u}`}`.trim(),A=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let r=0;r<t.length;r++)if(a(t[r].semver),t[r].semver!==o.ANY&&t[r].semver.prerelease.length>0){const n=t[r].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}},7373:(t,e,r)=>{const n=r(857),{MAX_LENGTH:i,MAX_SAFE_INTEGER:s}=r(4572),{safeRe:o,t:a}=r(881),u=r(4398),{compareIdentifiers:c}=r(5718);class l{constructor(t,e){if(e=u(e),t instanceof l){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if("string"!==typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const r=t.trim().match(e.loose?o[a.LOOSE]:o[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<s)return e}return t})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(n("SemVer.compare",this.version,this.options,t),!(t instanceof l)){if("string"===typeof t&&t===this.version)return 0;t=new l(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof l||(t=new l(t,this.options)),c(this.major,t.major)||c(this.minor,t.minor)||c(this.patch,t.patch)}comparePre(t){if(t instanceof l||(t=new l(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{const r=this.prerelease[e],i=t.prerelease[e];if(n("prerelease compare",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return c(r,i)}while(++e)}compareBuild(t){t instanceof l||(t=new l(t,this.options));let e=0;do{const r=this.build[e],i=t.build[e];if(n("prerelease compare",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return c(r,i)}while(++e)}inc(t,e,r){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,r),this.inc("pre",e,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e,r),this.inc("pre",e,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const t=Number(r)?1:0;if(!e&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[t];else{let n=this.prerelease.length;for(;--n>=0;)"number"===typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(e===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let n=[e,t];!1===r&&(n=[e]),0===c(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=l},1553:(t,e,r)=>{const n=r(7691);t.exports=(t,e)=>{const r=n(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null}},2748:(t,e,r)=>{const n=r(8504),i=r(7828),s=r(3705),o=r(4730),a=r(9766),u=r(239);t.exports=(t,e,r,c)=>{switch(e){case"===":return"object"===typeof t&&(t=t.version),"object"===typeof r&&(r=r.version),t===r;case"!==":return"object"===typeof t&&(t=t.version),"object"===typeof r&&(r=r.version),t!==r;case"":case"=":case"==":return n(t,r,c);case"!=":return i(t,r,c);case">":return s(t,r,c);case">=":return o(t,r,c);case"<":return a(t,r,c);case"<=":return u(t,r,c);default:throw new TypeError(`Invalid operator: ${e}`)}}},1639:(t,e,r)=>{const n=r(7373),i=r(7691),{safeRe:s,t:o}=r(881);t.exports=(t,e)=>{if(t instanceof n)return t;if("number"===typeof t&&(t=String(t)),"string"!==typeof t)return null;let r=null;if((e=e||{}).rtl){const n=e.includePrerelease?s[o.COERCERTLFULL]:s[o.COERCERTL];let i;for(;(i=n.exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),n.lastIndex=i.index+i[1].length+i[2].length;n.lastIndex=-1}else r=t.match(e.includePrerelease?s[o.COERCEFULL]:s[o.COERCE]);if(null===r)return null;const a=r[2],u=r[3]||"0",c=r[4]||"0",l=e.includePrerelease&&r[5]?`-${r[5]}`:"",h=e.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${a}.${u}.${c}${l}${h}`,e)}},5810:(t,e,r)=>{const n=r(7373);t.exports=(t,e,r)=>{const i=new n(t,r),s=new n(e,r);return i.compare(s)||i.compareBuild(s)}},5788:(t,e,r)=>{const n=r(9072);t.exports=(t,e)=>n(t,e,!0)},9072:(t,e,r)=>{const n=r(7373);t.exports=(t,e,r)=>new n(t,r).compare(new n(e,r))},6221:(t,e,r)=>{const n=r(7691);t.exports=(t,e)=>{const r=n(t,null,!0),i=n(e,null,!0),s=r.compare(i);if(0===s)return null;const o=s>0,a=o?r:i,u=o?i:r,c=!!a.prerelease.length;if(!!u.prerelease.length&&!c)return u.patch||u.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}},8504:(t,e,r)=>{const n=r(9072);t.exports=(t,e,r)=>0===n(t,e,r)},3705:(t,e,r)=>{const n=r(9072);t.exports=(t,e,r)=>n(t,e,r)>0},4730:(t,e,r)=>{const n=r(9072);t.exports=(t,e,r)=>n(t,e,r)>=0},5212:(t,e,r)=>{const n=r(7373);t.exports=(t,e,r,i,s)=>{"string"===typeof r&&(s=i,i=r,r=void 0);try{return new n(t instanceof n?t.version:t,r).inc(e,i,s).version}catch(o){return null}}},9766:(t,e,r)=>{const n=r(9072);t.exports=(t,e,r)=>n(t,e,r)<0},239:(t,e,r)=>{const n=r(9072);t.exports=(t,e,r)=>n(t,e,r)<=0},1077:(t,e,r)=>{const n=r(7373);t.exports=(t,e)=>new n(t,e).major},9761:(t,e,r)=>{const n=r(7373);t.exports=(t,e)=>new n(t,e).minor},7828:(t,e,r)=>{const n=r(9072);t.exports=(t,e,r)=>0!==n(t,e,r)},7691:(t,e,r)=>{const n=r(7373);t.exports=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof n)return t;try{return new n(t,e)}catch(i){if(!r)return null;throw i}}},826:(t,e,r)=>{const n=r(7373);t.exports=(t,e)=>new n(t,e).patch},124:(t,e,r)=>{const n=r(7691);t.exports=(t,e)=>{const r=n(t,e);return r&&r.prerelease.length?r.prerelease:null}},8987:(t,e,r)=>{const n=r(9072);t.exports=(t,e,r)=>n(e,t,r)},5194:(t,e,r)=>{const n=r(5810);t.exports=(t,e)=>t.sort(((t,r)=>n(r,t,e)))},3429:(t,e,r)=>{const n=r(7436);t.exports=(t,e,r)=>{try{e=new n(e,r)}catch(i){return!1}return e.test(t)}},7778:(t,e,r)=>{const n=r(5810);t.exports=(t,e)=>t.sort(((t,r)=>n(t,r,e)))},6530:(t,e,r)=>{const n=r(7691);t.exports=(t,e)=>{const r=n(t,e);return r?r.version:null}},9354:(t,e,r)=>{const n=r(881),i=r(4572),s=r(7373),o=r(5718),a=r(7691),u=r(6530),c=r(1553),l=r(5212),h=r(6221),d=r(1077),f=r(9761),p=r(826),y=r(124),g=r(9072),m=r(8987),b=r(5788),v=r(5810),_=r(7778),w=r(5194),E=r(3705),S=r(9766),x=r(8504),M=r(7828),k=r(4730),C=r(239),I=r(2748),R=r(1639),A=r(9781),N=r(7436),O=r(3429),T=r(9380),j=r(7575),L=r(9333),P=r(2504),D=r(1347),B=r(2654),F=r(2165),$=r(5207),U=r(2055),z=r(6686),H=r(2239);t.exports={parse:a,valid:u,clean:c,inc:l,diff:h,major:d,minor:f,patch:p,prerelease:y,compare:g,rcompare:m,compareLoose:b,compareBuild:v,sort:_,rsort:w,gt:E,lt:S,eq:x,neq:M,gte:k,lte:C,cmp:I,coerce:R,Comparator:A,Range:N,satisfies:O,toComparators:T,maxSatisfying:j,minSatisfying:L,minVersion:P,validRange:D,outside:B,gtr:F,ltr:$,intersects:U,simplifyRange:z,subset:H,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}},4572:t=>{const e=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},857:(t,e,r)=>{const n="object"===typeof r(7256)&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.NODE_DEBUG&&/\bsemver\b/i.test({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.NODE_DEBUG)?function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return console.error("SEMVER",...e)}:()=>{};t.exports=n},5718:t=>{const e=/^[0-9]+$/,r=(t,r)=>{const n=e.test(t),i=e.test(r);return n&&i&&(t=+t,r=+r),t===r?0:n&&!i?-1:i&&!n?1:t<r?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(t,e)=>r(e,t)}},4398:t=>{const e=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=t=>t?"object"!==typeof t?e:t:r},881:(t,e,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:s}=r(4572),o=r(857),a=(e=t.exports={}).re=[],u=e.safeRe=[],c=e.src=[],l=e.t={};let h=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",s],[d,i]],p=(t,e,r)=>{const n=(t=>{for(const[e,r]of f)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t})(e),i=h++;o(t,i,e),l[t]=i,c[i]=e,a[i]=new RegExp(e,r?"g":void 0),u[i]=new RegExp(n,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),p("FULL",`^${c[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),p("LOOSE",`^${c[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?`+`(?:${c[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",c[l.COERCE],!0),p("COERCERTLFULL",c[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},2165:(t,e,r)=>{const n=r(2654);t.exports=(t,e,r)=>n(t,e,">",r)},2055:(t,e,r)=>{const n=r(7436);t.exports=(t,e,r)=>(t=new n(t,r),e=new n(e,r),t.intersects(e,r))},5207:(t,e,r)=>{const n=r(2654);t.exports=(t,e,r)=>n(t,e,"<",r)},7575:(t,e,r)=>{const n=r(7373),i=r(7436);t.exports=(t,e,r)=>{let s=null,o=null,a=null;try{a=new i(e,r)}catch(u){return null}return t.forEach((t=>{a.test(t)&&(s&&-1!==o.compare(t)||(s=t,o=new n(s,r)))})),s}},9333:(t,e,r)=>{const n=r(7373),i=r(7436);t.exports=(t,e,r)=>{let s=null,o=null,a=null;try{a=new i(e,r)}catch(u){return null}return t.forEach((t=>{a.test(t)&&(s&&1!==o.compare(t)||(s=t,o=new n(s,r)))})),s}},2504:(t,e,r)=>{const n=r(7373),i=r(7436),s=r(3705);t.exports=(t,e)=>{t=new i(t,e);let r=new n("0.0.0");if(t.test(r))return r;if(r=new n("0.0.0-0"),t.test(r))return r;r=null;for(let i=0;i<t.set.length;++i){const e=t.set[i];let o=null;e.forEach((t=>{const e=new n(t.semver.version);switch(t.operator){case">":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case"":case">=":o&&!s(e,o)||(o=e);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!o||r&&!s(r,o)||(r=o)}return r&&t.test(r)?r:null}},2654:(t,e,r)=>{const n=r(7373),i=r(9781),{ANY:s}=i,o=r(7436),a=r(3429),u=r(3705),c=r(9766),l=r(239),h=r(4730);t.exports=(t,e,r,d)=>{let f,p,y,g,m;switch(t=new n(t,d),e=new o(e,d),r){case">":f=u,p=l,y=c,g=">",m=">=";break;case"<":f=c,p=h,y=u,g="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(t,e,d))return!1;for(let n=0;n<e.set.length;++n){const r=e.set[n];let o=null,a=null;if(r.forEach((t=>{t.semver===s&&(t=new i(">=0.0.0")),o=o||t,a=a||t,f(t.semver,o.semver,d)?o=t:y(t.semver,a.semver,d)&&(a=t)})),o.operator===g||o.operator===m)return!1;if((!a.operator||a.operator===g)&&p(t,a.semver))return!1;if(a.operator===m&&y(t,a.semver))return!1}return!0}},6686:(t,e,r)=>{const n=r(3429),i=r(9072);t.exports=(t,e,r)=>{const s=[];let o=null,a=null;const u=t.sort(((t,e)=>i(t,e,r)));for(const i of u){n(i,e,r)?(a=i,o||(o=i)):(a&&s.push([o,a]),a=null,o=null)}o&&s.push([o,null]);const c=[];for(const[n,i]of s)n===i?c.push(n):i||n!==u[0]?i?n===u[0]?c.push(`<=${i}`):c.push(`${n} - ${i}`):c.push(`>=${n}`):c.push("*");const l=c.join(" || "),h="string"===typeof e.raw?e.raw:String(e);return l.length<h.length?l:e}},2239:(t,e,r)=>{const n=r(7436),i=r(9781),{ANY:s}=i,o=r(3429),a=r(9072),u=[new i(">=0.0.0-0")],c=[new i(">=0.0.0")],l=(t,e,r)=>{if(t===e)return!0;if(1===t.length&&t[0].semver===s){if(1===e.length&&e[0].semver===s)return!0;t=r.includePrerelease?u:c}if(1===e.length&&e[0].semver===s){if(r.includePrerelease)return!0;e=c}const n=new Set;let i,l,f,p,y,g,m;for(const s of t)">"===s.operator||">="===s.operator?i=h(i,s,r):"<"===s.operator||"<="===s.operator?l=d(l,s,r):n.add(s.semver);if(n.size>1)return null;if(i&&l){if(f=a(i.semver,l.semver,r),f>0)return null;if(0===f&&(">="!==i.operator||"<="!==l.operator))return null}for(const s of n){if(i&&!o(s,String(i),r))return null;if(l&&!o(s,String(l),r))return null;for(const t of e)if(!o(s,String(t),r))return!1;return!0}let b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,v=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;b&&1===b.prerelease.length&&"<"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const s of e){if(m=m||">"===s.operator||">="===s.operator,g=g||"<"===s.operator||"<="===s.operator,i)if(v&&s.semver.prerelease&&s.semver.prerelease.length&&s.semver.major===v.major&&s.semver.minor===v.minor&&s.semver.patch===v.patch&&(v=!1),">"===s.operator||">="===s.operator){if(p=h(i,s,r),p===s&&p!==i)return!1}else if(">="===i.operator&&!o(i.semver,String(s),r))return!1;if(l)if(b&&s.semver.prerelease&&s.semver.prerelease.length&&s.semver.major===b.major&&s.semver.minor===b.minor&&s.semver.patch===b.patch&&(b=!1),"<"===s.operator||"<="===s.operator){if(y=d(l,s,r),y===s&&y!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(s),r))return!1;if(!s.operator&&(l||i)&&0!==f)return!1}return!(i&&g&&!l&&0!==f)&&(!(l&&m&&!i&&0!==f)&&(!v&&!b))},h=(t,e,r)=>{if(!t)return e;const n=a(t.semver,e.semver,r);return n>0?t:n<0||">"===e.operator&&">="===t.operator?e:t},d=(t,e,r)=>{if(!t)return e;const n=a(t.semver,e.semver,r);return n<0?t:n>0||"<"===e.operator&&"<="===t.operator?e:t};t.exports=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t===e)return!0;t=new n(t,r),e=new n(e,r);let i=!1;t:for(const n of t.set){for(const t of e.set){const e=l(n,t,r);if(i=i||null!==e,e)continue t}if(i)return!1}return!0}},9380:(t,e,r)=>{const n=r(7436);t.exports=(t,e)=>new n(t,e).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")))},1347:(t,e,r)=>{const n=r(7436);t.exports=(t,e)=>{try{return new n(t,e).range||"*"}catch(r){return null}}},448:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6339),i=r(7554),s=function(){function t(){this._semaphore=new i.default(1)}return t.prototype.acquire=function(){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=e.sent(),[2,t[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();e.default=s},7554:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6339),i=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),r=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),r},t.prototype.runExclusive=function(t){return n.__awaiter(this,void 0,void 0,(function(){var e,r,i;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,this.acquire()];case 1:e=n.sent(),r=e[0],i=e[1],n.label=2;case 2:return n.trys.push([2,,4,5]),[4,t(r)];case 3:return[2,n.sent()];case 4:return i(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var r=!1;this._currentReleaser=function(){r||(r=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}();e.default=i},6019:(t,e,r)=>{"use strict";e.eu=void 0;var n=r(448);Object.defineProperty(e,"eu",{enumerable:!0,get:function(){return n.default}});var i=r(7554);var s=r(2168)},2168:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=void 0;var n=r(6339);e.withTimeout=function(t,e,r){var i=this;return void 0===r&&(r=new Error("timeout")),{acquire:function(){return new Promise((function(s,o){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,o(r)}),e),[4,t.acquire()];case 1:return a=n.sent(),i?(Array.isArray(a)?a[1]:a)():s(a),[2]}}))}))}))},runExclusive:function(t){return n.__awaiter(this,void 0,void 0,(function(){var e,r;return n.__generator(this,(function(n){switch(n.label){case 0:e=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)?(e=r[1],[4,t(r[0])]):[3,4];case 3:return[2,n.sent()];case 4:return e=r,[4,t()];case 5:return[2,n.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}},9552:(t,e)=>{"use strict";var r;function n(t,e,n){if(!n||typeof n.value!==r.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:r.boolTrue,get:function(){var t=n.value.bind(this);return Object.defineProperty(this,e,{value:t,configurable:r.boolTrue,writable:r.boolTrue}),t}}}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.typeOfFunction="function",t.boolTrue=!0}(r||(r={})),e.bind=n,e.default=n},6965:(t,e,r)=>{"use strict";var n=r(2463),i=r(2589),s=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"===typeof r&&s(t,".prototype.")>-1?i(r):r}},2589:(t,e,r)=>{"use strict";var n=r(4189),i=r(2463),s=r(6691),o=r(4141),a=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(u,a),l=r(4229),h=i("%Math.max%");t.exports=function(t){if("function"!==typeof t)throw new o("a function is required");var e=c(n,u,arguments);return s(e,1+h(0,t.length-(arguments.length-1)),!0)};var d=function(){return c(n,a,arguments)};l?l(t.exports,"apply",{value:d}):t.exports.apply=d},6218:t=>{var e=1e3,r=60*e,n=60*r,i=24*n,s=7*i,o=365.25*i;function a(t,e,r,n){var i=e>=1.5*r;return Math.round(t/r)+" "+n+(i?"s":"")}t.exports=function(t,u){u=u||{};var c=typeof t;if("string"===c&&t.length>0)return function(t){if((t=String(t)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(t);if("number"===c&&isFinite(t))return u.long?function(t){var s=Math.abs(t);if(s>=i)return a(t,s,i,"day");if(s>=n)return a(t,s,n,"hour");if(s>=r)return a(t,s,r,"minute");if(s>=e)return a(t,s,e,"second");return t+" ms"}(t):function(t){var s=Math.abs(t);if(s>=i)return Math.round(t/i)+"d";if(s>=n)return Math.round(t/n)+"h";if(s>=r)return Math.round(t/r)+"m";if(s>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},8543:(t,e,r)=>{var n=r(7256);e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(n++,"%c"===t&&(i=n))})),e.splice(i,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(r){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(r){}!t&&"undefined"!==typeof n&&"env"in n&&(t={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.DEBUG);return t},e.useColors=function(){if("undefined"!==typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"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+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})(),e.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"],e.log=console.debug||console.log||(()=>{}),t.exports=r(4002)(e);const{formatters:i}=t.exports;i.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4002:(t,e,r)=>{t.exports=function(t){function e(t){let r,i,s,o=null;function a(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!a.enabled)return;const s=a,o=Number(new Date),u=o-(r||o);s.diff=u,s.prev=r,s.curr=o,r=o,n[0]=e.coerce(n[0]),"string"!==typeof n[0]&&n.unshift("%O");let c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,((t,r)=>{if("%%"===t)return"%";c++;const i=e.formatters[r];if("function"===typeof i){const e=n[c];t=i.call(s,e),n.splice(c,1),c--}return t})),e.formatArgs.call(s,n);(s.log||e.log).apply(s,n)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=n,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,s=e.enabled(t)),s),set:t=>{o=t}}),"function"===typeof e.init&&e.init(a),a}function n(t,r){const n=e(this.namespace+("undefined"===typeof r?":":r)+t);return n.log=this.log,n}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let r;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const n=("string"===typeof t?t:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(t=n[r].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(6218),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((r=>{e[r]=t[r]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e),r|=0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}},4083:(t,e,r)=>{"use strict";var n=r(4229),i=r(8006),s=r(4141),o=r(8841);t.exports=function(t,e,r){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new s("`obj` must be an object or a function`");if("string"!==typeof e&&"symbol"!==typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],h=!!o&&o(t,e);if(n)n(t,e,{configurable:null===c&&h?h.configurable:!c,enumerable:null===a&&h?h.enumerable:!a,value:r,writable:null===u&&h?h.writable:!u});else{if(!l&&(a||u||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},4229:(t,e,r)=>{"use strict";var n=r(2463)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(i){n=!1}t.exports=n},8819:t=>{"use strict";t.exports=EvalError},4217:t=>{"use strict";t.exports=Error},3460:t=>{"use strict";t.exports=RangeError},1760:t=>{"use strict";t.exports=ReferenceError},8006:t=>{"use strict";t.exports=SyntaxError},4141:t=>{"use strict";t.exports=TypeError},6851:t=>{"use strict";t.exports=URIError},1184:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BaseBlockTracker=void 0;const i=n(r(6946)),s=(t,e)=>t+e,o=["sync","latest"];class a extends i.default{constructor(t){super(),this._blockResetDuration=t.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(){if(this._currentBlock)return this._currentBlock;return await new Promise((t=>this.once("latest",t)))}removeAllListeners(t){return t?super.removeAllListeners(t):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(t){o.includes(t)&&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 o.map((t=>this.listenerCount(t))).reduce(s)}_newPotentialLatest(t){const e=this._currentBlock;e&&u(t)<=u(e)||this._setCurrentBlock(t)}_setCurrentBlock(t){const e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}function u(t){return Number.parseInt(t,16)}e.BaseBlockTracker=a},7544:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PollingBlockTracker=void 0;const i=n(r(5597)),s=n(r(3861)),o=r(1184),a=r(241),u=(0,a.createModuleLogger)(a.projectLogger,"polling-block-tracker"),c=(0,i.default)();class l extends o.BaseBlockTracker{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var e;if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");super({blockResetDuration:null!==(e=t.blockResetDuration)&&void 0!==e?e:t.pollingInterval}),this._provider=t.provider,this._pollingInterval=t.pollingInterval||2e4,this._retryTimeout=t.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=void 0===t.keepEventLoopActive||t.keepEventLoopActive,this._setSkipCacheFlag=t.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var t;this._isRunning;)try{await this._updateLatestBlock();const t=h(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await t}catch(e){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${null!==(t=e.stack)&&void 0!==t?t:e}`);try{this.emit("error",n)}catch(r){console.error(n)}const i=h(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:c(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0),u("Making request",t);const e=await(0,s.default)((e=>this._provider.sendAsync(t,e)))();if(u("Got response",e),e.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${e.error.message}`);return e.result}}function h(t,e){return new Promise((r=>{const n=setTimeout(r,t);n.unref&&e&&n.unref()}))}e.PollingBlockTracker=l},5227:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SubscribeBlockTracker=void 0;const i=n(r(5597)),s=r(1184),o=(0,i.default)();class a extends s.BaseBlockTracker{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(t),this._provider=t.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(void 0===this._subscriptionId||null===this._subscriptionId)try{const t=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(t)}catch(t){this.emit("error",t)}}async _end(){if(null!==this._subscriptionId&&void 0!==this._subscriptionId)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(t){this.emit("error",t)}}_call(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return new Promise(((e,n)=>{this._provider.sendAsync({id:o(),method:t,params:r,jsonrpc:"2.0"},((t,r)=>{t?n(t):e(r.result)}))}))}_handleSubData(t,e){var r;"eth_subscription"===e.method&&(null===(r=e.params)||void 0===r?void 0:r.subscription)===this._subscriptionId&&this._newPotentialLatest(e.params.result.number)}}e.SubscribeBlockTracker=a},6140:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(7544),e),i(r(5227),e),i(r(8393),e)},241:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;const n=r(8671);Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return n.createModuleLogger}}),e.projectLogger=(0,n.createProjectLogger)("eth-block-tracker")},8393:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3861:t=>{"use strict";const e=(t,e)=>function(){const r=e.promiseModule,n=new Array(arguments.length);for(let t=0;t<arguments.length;t++)n[t]=arguments[t];return new r(((r,i)=>{e.errorFirst?n.push((function(t,n){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t<arguments.length;t++)e[t-1]=arguments[t];t?(e.unshift(t),i(e)):r(e)}else t?i(t):r(n)})):n.push((function(t){if(e.multiArgs){const t=new Array(arguments.length-1);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];r(t)}else r(t)})),t.apply(this,n)}))};t.exports=(t,r)=>{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=t=>{const e=e=>"string"===typeof e?t===e:e.test(t);return r.include?r.include.some(e):!r.exclude.some(e)};let i;i="function"===typeof t?function(){return r.excludeMain?t.apply(this,arguments):e(t,r).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const s in t){const o=t[s];i[s]="function"===typeof o&&n(s)?e(o,r):o}return i}},756:(t,e,r)=>{const n=r(9901);t.exports=class extends n{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}}},9901:(t,e,r)=>{const n=r(6946).default;t.exports=class extends n{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach((t=>this.emit("update",t)))}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}}},9105:(t,e,r)=>{const n=r(9901),i=r(9670),{incrementHexInt:s}=r(5705);t.exports=class extends n{constructor(t){let{provider:e,params:r}=t;super(),this.type="block",this.provider=e}async update(t){let{oldBlock:e,newBlock:r}=t;const n=r,o=s(e),a=(await i({provider:this.provider,fromBlock:o,toBlock:n})).map((t=>t.hash));this.addResults(a)}}},9670:t=>{function e(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function r(t){if(void 0===t||null===t)return t;return"0x"+t.toString(16)}function n(t,e){return new Promise(((r,n)=>{t.sendAsync(e,((t,e)=>{t?n(t):e.error?n(e.error):e.result?r(e.result):n(new Error("Result was empty"))}))}))}t.exports=async function(t){let{provider:i,fromBlock:s,toBlock:o}=t;s||(s=o);const a=e(s),u=e(o),c=Array(u-a+1).fill().map(((t,e)=>a+e)).map(r);return await Promise.all(c.map((t=>async function(t,e,r){for(let s=0;s<3;s++)try{return await n(t,{id:1,jsonrpc:"2.0",method:e,params:r})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}throw new Error(`Block not found for params: ${JSON.stringify(r)}`)}(i,"eth_getBlockByNumber",[t,!1]))))}},5705:t=>{function e(t){return t.sort(((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:r(t)-r(e)))}function r(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function n(t){if(void 0===t||null===t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function i(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e(r)[0]},maxBlockRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const i=e(r);return i[i.length-1]},sortBlockRefs:e,bnToHex:function(t){return"0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:r,incrementHexInt:function(t){if(void 0===t||null===t)return t;return n(r(t)+1)},intToHex:n,unsafeRandomBytes:function(t){let e="0x";for(let r=0;r<t;r++)e+=i(),e+=i();return e}}},9899:(t,e,r)=>{const n=r(6019).eu,{createAsyncMiddleware:i,createScaffoldMiddleware:s}=r(4961),o=r(2196),a=r(9105),u=r(7454),{intToHex:c,hexToInt:l}=r(5705);function h(t){return d((async function(){const e=await t(...arguments);return c(e.id)}))}function d(t){return i((async(e,r)=>{const n=await t.apply(null,e.params);r.result=n}))}function f(t,e){const r=[];for(let n in t)r.push(t[n]);return r}t.exports=function(t){let{blockTracker:e,provider:r}=t,i=0,p={};const y=new n,g=function(t){let{mutex:e}=t;return t=>async(r,n,i,s)=>{(await e.acquire())(),t(r,n,i,s)}}({mutex:y}),m=s({eth_newFilter:g(h(v)),eth_newBlockFilter:g(h(_)),eth_newPendingTransactionFilter:g(h(w)),eth_uninstallFilter:g(d(x)),eth_getFilterChanges:g(d(E)),eth_getFilterLogs:g(d(S))}),b=async t=>{let{oldBlock:e,newBlock:r}=t;if(0===p.length)return;const n=await y.acquire();try{await Promise.all(f(p).map((async t=>{try{await t.update({oldBlock:e,newBlock:r})}catch(n){console.error(n)}})))}catch(i){console.error(i)}n()};return m.newLogFilter=v,m.newBlockFilter=_,m.newPendingTransactionFilter=w,m.uninstallFilter=x,m.getFilterChanges=E,m.getFilterLogs=S,m.destroy=()=>{!async function(){const t=f(p).length;p={},k({prevFilterCount:t,newFilterCount:0})}()},m;async function v(t){const e=new o({provider:r,params:t});await M(e);return e}async function _(){const t=new a({provider:r});await M(t);return t}async function w(){const t=new u({provider:r});await M(t);return t}async function E(t){const e=l(t),r=p[e];if(!r)throw new Error(`No filter for index "${e}"`);return r.getChangesAndClear()}async function S(t){const e=l(t),r=p[e];if(!r)throw new Error(`No filter for index "${e}"`);let n=[];return"log"===r.type&&(n=r.getAllResults()),n}async function x(t){const e=l(t),r=p[e],n=Boolean(r);return n&&await async function(t){const e=f(p).length;delete p[t];const r=f(p).length;k({prevFilterCount:e,newFilterCount:r})}(e),n}async function M(t){const r=f(p).length,n=await e.getLatestBlock();await t.initialize({currentBlock:n}),i++,p[i]=t,t.id=i,t.idHex=c(i);return k({prevFilterCount:r,newFilterCount:f(p).length}),i}function k(t){let{prevFilterCount:r,newFilterCount:n}=t;0===r&&n>0?e.on("sync",b):r>0&&0===n&&e.removeListener("sync",b)}}},2196:(t,e,r)=>{const n=r(8783),i=r(3257),s=r(756),{bnToHex:o,hexToInt:a,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=r(5705);t.exports=class extends s{constructor(t){let{provider:e,params:r}=t;super(),this.type="log",this.ethQuery=new n(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},r),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((t=>t.toLowerCase())))}async initialize(t){let{currentBlock:e}=t,r=this.params.fromBlock;["latest","pending"].includes(r)&&(r=e),"earliest"===r&&(r="0x0"),this.params.fromBlock=r;const n=c(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:n}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update(t){let{oldBlock:e,newBlock:r}=t;const n=r;let i;i=e?u(e):r;const s=Object.assign({},this.params,{fromBlock:i,toBlock:n}),o=(await this._fetchLogs(s)).filter((t=>this.matchLog(t)));this.addResults(o)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(a(this.params.fromBlock)>=a(t.blockNumber))return!1;if(l(this.params.toBlock)&&a(this.params.toBlock)<=a(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();if(this.params.address&&e&&!this.params.address.includes(e))return!1;return this.params.topics.every(((e,r)=>{let n=t.topics[r];if(!n)return!1;n=n.toLowerCase();let i=Array.isArray(e)?e:[e];if(i.includes(null))return!0;i=i.map((t=>t.toLowerCase()));return i.includes(n)}))}}},3257:t=>{"use strict";const e=(t,e,r,n)=>function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return new(0,e.promiseModule)(((i,o)=>{e.multiArgs?s.push((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.errorFirst?r[0]?o(r):(r.shift(),i(r)):i(r)})):e.errorFirst?s.push(((t,e)=>{t?o(t):i(e)})):s.push(i);const a=this===r?n:this;Reflect.apply(t,a,s)}))},r=new WeakMap;t.exports=(t,n)=>{n={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...n};const i=typeof t;if(null===t||"object"!==i&&"function"!==i)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":i}\``);const s=new WeakMap,o=new Proxy(t,{apply(t,r,i){const a=s.get(t);if(a)return Reflect.apply(a,r,i);const u=n.excludeMain?t:e(t,n,o,t);return s.set(t,u),Reflect.apply(u,r,i)},get(t,i){const a=t[i];if(!((t,e)=>{let i=r.get(t);if(i||(i={},r.set(t,i)),e in i)return i[e];const s=t=>"string"===typeof t||"symbol"===typeof e?e===t:t.test(e),o=Reflect.getOwnPropertyDescriptor(t,e),a=void 0===o||o.writable||o.configurable,u=(n.include?n.include.some(s):!n.exclude.some(s))&&a;return i[e]=u,u})(t,i)||a===Function.prototype[i])return a;const u=s.get(a);if(u)return u;if("function"===typeof a){const r=e(a,n,o,t);return s.set(a,r),r}return a}});return o}},8503:(t,e,r)=>{const n=r(6946).default,{createAsyncMiddleware:i,createScaffoldMiddleware:s}=r(4961),o=r(9899),{unsafeRandomBytes:a,incrementHexInt:u}=r(5705),c=r(9670);function l(t){return null===t||void 0===t?null:{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function(t){let{blockTracker:e,provider:r}=t;const h={},d=o({blockTracker:e,provider:r});let f=!1;const p=new n,y=s({eth_subscribe:i((async function(t,n){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const i=t.params[0],s=a(16);let o;switch(i){case"newHeads":o=p({subId:s});break;case"logs":const e=t.params[1];o=y({subId:s,filter:await d.newLogFilter(e)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${i}"`)}return h[s]=o,void(n.result=s);function p(t){let{subId:n}=t;const s={type:i,destroy:async()=>{e.removeListener("sync",s.update)},update:async t=>{let{oldBlock:e,newBlock:i}=t;const s=i,o=u(e);(await c({provider:r,fromBlock:o,toBlock:s})).map(l).filter((t=>null!==t)).forEach((t=>{g(n,t)}))}};return e.on("sync",s.update),s}function y(t){let{subId:e,filter:r}=t;r.on("update",(t=>g(e,t)));return{type:i,destroy:async()=>await d.uninstallFilter(r.idHex)}}})),eth_unsubscribe:i((async function(t,e){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const r=t.params[0],n=h[r];if(!n)return void(e.result=!1);delete h[r],await n.destroy(),e.result=!0}))});return y.destroy=function(){p.removeAllListeners();for(const t in h)h[t].destroy(),delete h[t];f=!0},{events:p,middleware:y};function g(t,e){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},7454:(t,e,r)=>{const n=r(9901),i=r(9670),{incrementHexInt:s}=r(5705);t.exports=class extends n{constructor(t){let{provider:e}=t;super(),this.type="tx",this.provider=e}async update(t){let{oldBlock:e}=t;const r=e,n=s(e),o=await i({provider:this.provider,fromBlock:n,toBlock:r}),a=[];for(const i of o)a.push(...i.transactions);this.addResults(a)}}},8783:(t,e,r)=>{const n=r(6524),i=r(5597)();function s(t){this.currentProvider=t}function o(t){return function(){var e=[].slice.call(arguments),r=e.pop();this.sendAsync({method:t,params:e},r)}}function a(t,e){return function(){var r=[].slice.call(arguments),n=r.pop();r.length<t&&r.push("latest"),this.sendAsync({method:e,params:r},n)}}t.exports=s,s.prototype.getBalance=a(2,"eth_getBalance"),s.prototype.getCode=a(2,"eth_getCode"),s.prototype.getTransactionCount=a(2,"eth_getTransactionCount"),s.prototype.getStorageAt=a(3,"eth_getStorageAt"),s.prototype.call=a(2,"eth_call"),s.prototype.protocolVersion=o("eth_protocolVersion"),s.prototype.syncing=o("eth_syncing"),s.prototype.coinbase=o("eth_coinbase"),s.prototype.mining=o("eth_mining"),s.prototype.hashrate=o("eth_hashrate"),s.prototype.gasPrice=o("eth_gasPrice"),s.prototype.accounts=o("eth_accounts"),s.prototype.blockNumber=o("eth_blockNumber"),s.prototype.getBlockTransactionCountByHash=o("eth_getBlockTransactionCountByHash"),s.prototype.getBlockTransactionCountByNumber=o("eth_getBlockTransactionCountByNumber"),s.prototype.getUncleCountByBlockHash=o("eth_getUncleCountByBlockHash"),s.prototype.getUncleCountByBlockNumber=o("eth_getUncleCountByBlockNumber"),s.prototype.sign=o("eth_sign"),s.prototype.sendTransaction=o("eth_sendTransaction"),s.prototype.sendRawTransaction=o("eth_sendRawTransaction"),s.prototype.estimateGas=o("eth_estimateGas"),s.prototype.getBlockByHash=o("eth_getBlockByHash"),s.prototype.getBlockByNumber=o("eth_getBlockByNumber"),s.prototype.getTransactionByHash=o("eth_getTransactionByHash"),s.prototype.getTransactionByBlockHashAndIndex=o("eth_getTransactionByBlockHashAndIndex"),s.prototype.getTransactionByBlockNumberAndIndex=o("eth_getTransactionByBlockNumberAndIndex"),s.prototype.getTransactionReceipt=o("eth_getTransactionReceipt"),s.prototype.getUncleByBlockHashAndIndex=o("eth_getUncleByBlockHashAndIndex"),s.prototype.getUncleByBlockNumberAndIndex=o("eth_getUncleByBlockNumberAndIndex"),s.prototype.getCompilers=o("eth_getCompilers"),s.prototype.compileLLL=o("eth_compileLLL"),s.prototype.compileSolidity=o("eth_compileSolidity"),s.prototype.compileSerpent=o("eth_compileSerpent"),s.prototype.newFilter=o("eth_newFilter"),s.prototype.newBlockFilter=o("eth_newBlockFilter"),s.prototype.newPendingTransactionFilter=o("eth_newPendingTransactionFilter"),s.prototype.uninstallFilter=o("eth_uninstallFilter"),s.prototype.getFilterChanges=o("eth_getFilterChanges"),s.prototype.getFilterLogs=o("eth_getFilterLogs"),s.prototype.getLogs=o("eth_getLogs"),s.prototype.getWork=o("eth_getWork"),s.prototype.submitWork=o("eth_submitWork"),s.prototype.submitHashrate=o("eth_submitHashrate"),s.prototype.sendAsync=function(t,e){var r;this.currentProvider.sendAsync((r=t,n({id:i(),jsonrpc:"2.0",params:[]},r)),(function(t,r){if(!t&&r.error&&(t=new Error("EthQuery - RPC Error - "+r.error.message)),t)return e(t);e(null,r.result)}))}},5301:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const n=r(6357);class i extends Error{constructor(t,e,r){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!==typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==r&&(this.data=r)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return n.default(this.serialize(),s,2)}}e.EthereumRpcError=i;function s(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=class extends i{constructor(t,e,r){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,r)}}},9147:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},446:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const n=r(5301),i=r(6420),s=r(9147);function o(t,e){const[r,s]=u(e);return new n.EthereumRpcError(t,r||i.getMessageFromCode(t),s)}function a(t,e){const[r,s]=u(e);return new n.EthereumProviderError(t,r||i.getMessageFromCode(t),s)}function u(t){if(t){if("string"===typeof t)return[t];if("object"===typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&"string"!==typeof e)throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}e.ethErrors={rpc:{parse:t=>o(s.errorCodes.rpc.parse,t),invalidRequest:t=>o(s.errorCodes.rpc.invalidRequest,t),invalidParams:t=>o(s.errorCodes.rpc.invalidParams,t),methodNotFound:t=>o(s.errorCodes.rpc.methodNotFound,t),internal:t=>o(s.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(e,t)},invalidInput:t=>o(s.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>o(s.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>o(s.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>o(s.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>o(s.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>o(s.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>a(s.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>a(s.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>a(s.errorCodes.provider.unsupportedMethod,t),disconnected:t=>a(s.errorCodes.provider.disconnected,t),chainDisconnected:t=>a(s.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:i}=t;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(e,r,i)}}}},9401:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const n=r(5301);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const i=r(6420);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const s=r(446);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});const o=r(9147);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},6420:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(9147),i=r(5301),s=n.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",a={code:s,message:u(s)};function u(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if(Number.isInteger(t)){const r=t.toString();if(d(n.errorValues,r))return n.errorValues[r].message;if(l(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!n.errorValues[e]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function h(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=u,e.isValidCode=c,e.serializeError=function(t){let{fallbackError:e=a,shouldIncludeStack:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,s;if(!e||!Number.isInteger(e.code)||"string"!==typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const o={};if(t&&"object"===typeof t&&!Array.isArray(t)&&d(t,"code")&&c(t.code)){const e=t;o.code=e.code,e.message&&"string"===typeof e.message?(o.message=e.message,d(e,"data")&&(o.data=e.data)):(o.message=u(o.code),o.data={originalError:h(t)})}else{o.code=e.code;const r=null===(n=t)||void 0===n?void 0:n.message;o.message=r&&"string"===typeof r?r:e.message,o.data={originalError:h(t)}}const l=null===(s=t)||void 0===s?void 0:s.stack;return r&&t&&l&&"string"===typeof l&&(o.stack=l),o}},6677:t=>{"use strict";var e,r="object"===typeof Reflect?Reflect:null,n=r&&"function"===typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!==t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,s),n(r)}function s(){"function"===typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}y(t,e,s,{once:!0}),"error"!==e&&function(t,e,r){"function"===typeof t.on&&y(t,"error",e,r)}(t,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,s,o,c;if(a(r),void 0===(s=t._events)?(s=t._events=Object.create(null),t._eventsCount=0):(void 0!==s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),o=s[e]),void 0===o)o=s[e]=r,++t._eventsCount;else if("function"===typeof o?o=s[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=u(t))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=o.length,c=l,console&&console.warn&&console.warn(c)}return t}function l(){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(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function f(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"===typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function y(t,e,r,n){if("function"===typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!==typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(s){n.once&&t.removeEventListener(e,i),r(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(t){if("number"!==typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");o=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!==typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=s[t];if(void 0===u)return!1;if("function"===typeof u)n(u,this,e);else{var c=u.length,l=p(u,c);for(r=0;r<c;++r)n(l[r],this,e)}return!0},s.prototype.addListener=function(t,e){return c(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return c(this,t,e,!0)},s.prototype.once=function(t,e){return a(e),this.on(t,h(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,h(this,t,e)),this},s.prototype.removeListener=function(t,e){var r,n,i,s,o;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!==typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){o=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,o||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},6357:t=>{t.exports=o,o.default=o,o.stable=l,o.stableStringify=l;var e="[...]",r="[Circular]",n=[],i=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(t,e,r,o){var a;"undefined"===typeof o&&(o=s()),u(t,"",0,[],void 0,0,o);try{a=0===i.length?JSON.stringify(t,e,r):JSON.stringify(t,d(e),r)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function a(t,e,r,s){var o=Object.getOwnPropertyDescriptor(s,r);void 0!==o.get?o.configurable?(Object.defineProperty(s,r,{value:t}),n.push([s,r,e,o])):i.push([e,r,t]):(s[r]=t,n.push([s,r,e]))}function u(t,n,i,s,o,c,l){var h;if(c+=1,"object"===typeof t&&null!==t){for(h=0;h<s.length;h++)if(s[h]===t)return void a(r,t,n,o);if("undefined"!==typeof l.depthLimit&&c>l.depthLimit)return void a(e,t,n,o);if("undefined"!==typeof l.edgesLimit&&i+1>l.edgesLimit)return void a(e,t,n,o);if(s.push(t),Array.isArray(t))for(h=0;h<t.length;h++)u(t[h],h,h,s,t,c,l);else{var d=Object.keys(t);for(h=0;h<d.length;h++){var f=d[h];u(t[f],f,h,s,t,c,l)}}s.pop()}}function c(t,e){return t<e?-1:t>e?1:0}function l(t,e,r,o){"undefined"===typeof o&&(o=s());var a,u=h(t,"",0,[],void 0,0,o)||t;try{a=0===i.length?JSON.stringify(u,e,r):JSON.stringify(u,d(e),r)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function h(t,i,s,o,u,l,d){var f;if(l+=1,"object"===typeof t&&null!==t){for(f=0;f<o.length;f++)if(o[f]===t)return void a(r,t,i,u);try{if("function"===typeof t.toJSON)return}catch(m){return}if("undefined"!==typeof d.depthLimit&&l>d.depthLimit)return void a(e,t,i,u);if("undefined"!==typeof d.edgesLimit&&s+1>d.edgesLimit)return void a(e,t,i,u);if(o.push(t),Array.isArray(t))for(f=0;f<t.length;f++)h(t[f],f,f,o,t,l,d);else{var p={},y=Object.keys(t).sort(c);for(f=0;f<y.length;f++){var g=y[f];h(t[g],g,f,o,t,l,d),p[g]=t[g]}if("undefined"===typeof u)return p;n.push([u,i,t]),u[i]=p}o.pop()}}function d(t){return t="undefined"!==typeof t?t:function(t,e){return e},function(e,r){if(i.length>0)for(var n=0;n<i.length;n++){var s=i[n];if(s[1]===e&&s[0]===r){r=s[2],i.splice(n,1);break}}return t.call(this,e,r)}}},4483:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var i=0;i<e.length;i+=1)r[i+t.length]=e[i];return r};t.exports=function(t){var i=this;if("function"!==typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var s,o=function(t,e){for(var r=[],n=e||0,i=0;n<t.length;n+=1,i+=1)r[i]=t[n];return r}(arguments,1),a=r(0,i.length-o.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(s=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(u,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var e=i.apply(this,n(o,arguments));return Object(e)===e?e:this}return i.apply(t,n(o,arguments))})),i.prototype){var l=function(){};l.prototype=i.prototype,s.prototype=new l,l.prototype=null}return s}},4189:(t,e,r)=>{"use strict";var n=r(4483);t.exports=Function.prototype.bind||n},2463:(t,e,r)=>{"use strict";var n,i=r(4217),s=r(8819),o=r(3460),a=r(1760),u=r(8006),c=r(4141),l=r(6851),h=Function,d=function(t){try{return h('"use strict"; return ('+t+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(L){f=null}var p=function(){throw new c},y=f?function(){try{return p}catch(t){try{return f(arguments,"callee").get}catch(e){return p}}}():p,g=r(7477)(),m=r(1962)(),b=Object.getPrototypeOf||(m?function(t){return t.__proto__}:null),v={},_="undefined"!==typeof Uint8Array&&b?b(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%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%":i,"%eval%":eval,"%EvalError%":s,"%Float32Array%":"undefined"===typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":v,"%Int8Array%":"undefined"===typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"===typeof JSON?JSON:n,"%Map%":"undefined"===typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&g&&b?b((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%":o,"%ReferenceError%":a,"%Reflect%":"undefined"===typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":y,"%TypedArray%":_,"%TypeError%":c,"%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%":l,"%WeakMap%":"undefined"===typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(L){var E=b(b(L));w["%Error.prototype%"]=E}var S=function t(e){var r;if("%AsyncFunction%"===e)r=d("async function () {}");else if("%GeneratorFunction%"===e)r=d("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=d("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&b&&(r=b(i.prototype))}return w[e]=r,r},x={__proto__:null,"%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"]},M=r(4189),k=r(4315),C=M.call(Function.call,Array.prototype.concat),I=M.call(Function.apply,Array.prototype.splice),R=M.call(Function.call,String.prototype.replace),A=M.call(Function.call,String.prototype.slice),N=M.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,j=function(t,e){var r,n=t;if(k(x,n)&&(n="%"+(r=x[n])[0]+"%"),k(w,n)){var i=w[n];if(i===v&&(i=S(n)),"undefined"===typeof i&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new u("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!==typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,t))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=A(t,0,1),r=A(t,-1);if("%"===e&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return R(t,O,(function(t,e,r,i){n[n.length]=r?R(i,T,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=j("%"+n+"%",e),s=i.name,o=i.value,a=!1,l=i.alias;l&&(n=l[0],I(r,C([0,1],l)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],y=A(p,0,1),g=A(p,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new u("property names with quotes must have matching quotes");if("constructor"!==p&&d||(a=!0),k(w,s="%"+(n+="."+p)+"%"))o=w[s];else if(null!=o){if(!(p in o)){if(!e)throw new c("base intrinsic for "+t+" exists, but the property is not available.");return}if(f&&h+1>=r.length){var m=f(o,p);o=(d=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:o[p]}else d=k(o,p),o=o[p];d&&!a&&(w[s]=o)}}return o}},8841:(t,e,r)=>{"use strict";var n=r(2463)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(i){n=null}t.exports=n},8534:(t,e,r)=>{"use strict";var n=r(4229),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},1962:t=>{"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},7477:(t,e,r)=>{"use strict";var n="undefined"!==typeof Symbol&&Symbol,i=r(7783);t.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},7783:t=>{"use strict";t.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"===typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"===typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},4315:(t,e,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,s=r(4189);t.exports=s.call(n,i)},6156:t=>{"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},2994:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;const i=n(r(6946)),s=r(736);class o extends i.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,e){if(e&&"function"!==typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,r,n)=>{try{const[i,s,a]=await o._runAllMiddleware(t,e,this._middleware);return s?(await o._runReturnHandlers(a),n(i)):r((async t=>{try{await o._runReturnHandlers(a)}catch(e){return t(e)}return t()}))}catch(i){return n(i)}}}async _handleBatch(t,e){try{const r=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,r):r}catch(r){if(e)return e(r);throw r}}_promiseHandle(t){return new Promise((e=>{this._handle(t,((t,r)=>{e(r)}))}))}async _handle(t,e){if(!t||Array.isArray(t)||"object"!==typeof t){const r=new s.EthereumRpcError(s.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof t,{request:t});return e(r,{id:void 0,jsonrpc:"2.0",error:r})}if("string"!==typeof t.method){const r=new s.EthereumRpcError(s.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof t.method,{request:t});return e(r,{id:t.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},t),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(o){i=o}return i&&(delete n.result,n.error||(n.error=s.serializeError(i))),e(i,n)}async _processRequest(t,e){const[r,n,i]=await o._runAllMiddleware(t,e,this._middleware);if(o._checkForCompletion(t,e,n),await o._runReturnHandlers(i),r)throw r}static async _runAllMiddleware(t,e,r){const n=[];let i=null,s=!1;for(const a of r)if([i,s]=await o._runMiddleware(t,e,a,n),s)break;return[i,s,n.reverse()]}static _runMiddleware(t,e,r,n){return new Promise((i=>{const o=t=>{const r=t||e.error;r&&(e.error=s.serializeError(r)),i([r,!0])},u=r=>{e.error?o(e.error):(r&&("function"!==typeof r&&o(new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${a(t)}`,{request:t})),n.push(r)),i([null,!1]))};try{r(t,e,u,o)}catch(c){o(c)}}))}static async _runReturnHandlers(t){for(const e of t)await new Promise(((t,r)=>{e((e=>e?r(e):t()))}))}static _checkForCompletion(t,e,r){if(!("result"in e)&&!("error"in e))throw new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(t)}`,{request:t});if(!r)throw new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(t)}`,{request:t})}}function a(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=o},7021:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,r,n,i)=>{let s;const o=new Promise((t=>{s=t}));let a=null,u=!1;const c=async()=>{u=!0,n((t=>{a=t,s()})),await o};try{await t(e,r,c),u?(await o,a(null)):i(null)}catch(l){a?a(l):i(l)}}}},3519:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,r,n,i)=>{const s=t[e.method];return void 0===s?n():"function"===typeof s?s(e,r,n,i):(r.result=s,i())}}},939:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;const r=4294967295;let n=Math.floor(Math.random()*r);e.getUniqueId=function(){return n=(n+1)%r,n}},9783:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const n=r(939);e.createIdRemapMiddleware=function(){return(t,e,r,i)=>{const s=t.id,o=n.getUniqueId();t.id=o,e.id=o,r((r=>{t.id=s,e.id=s,r()}))}}},4961:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(9783),e),i(r(7021),e),i(r(3519),e),i(r(939),e),i(r(2994),e),i(r(349),e)},349:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const n=r(2994);e.mergeMiddleware=function(t){const e=new n.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},7180:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const n=r(6357);class i extends Error{constructor(t,e,r){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!==typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==r&&(this.data=r)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return n.default(this.serialize(),s,2)}}e.EthereumRpcError=i;function s(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=class extends i{constructor(t,e,r){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,r)}}},9082:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},1713:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const n=r(7180),i=r(8121),s=r(9082);function o(t,e){const[r,s]=u(e);return new n.EthereumRpcError(t,r||i.getMessageFromCode(t),s)}function a(t,e){const[r,s]=u(e);return new n.EthereumProviderError(t,r||i.getMessageFromCode(t),s)}function u(t){if(t){if("string"===typeof t)return[t];if("object"===typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&"string"!==typeof e)throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}e.ethErrors={rpc:{parse:t=>o(s.errorCodes.rpc.parse,t),invalidRequest:t=>o(s.errorCodes.rpc.invalidRequest,t),invalidParams:t=>o(s.errorCodes.rpc.invalidParams,t),methodNotFound:t=>o(s.errorCodes.rpc.methodNotFound,t),internal:t=>o(s.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(e,t)},invalidInput:t=>o(s.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>o(s.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>o(s.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>o(s.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>o(s.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>o(s.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>a(s.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>a(s.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>a(s.errorCodes.provider.unsupportedMethod,t),disconnected:t=>a(s.errorCodes.provider.disconnected,t),chainDisconnected:t=>a(s.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!==typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:i}=t;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(e,r,i)}}}},736:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const n=r(7180);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const i=r(8121);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const s=r(1713);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});const o=r(9082);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},8121:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(9082),i=r(7180),s=n.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",a={code:s,message:u(s)};function u(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if(Number.isInteger(t)){const r=t.toString();if(d(n.errorValues,r))return n.errorValues[r].message;if(l(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!n.errorValues[e]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function h(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=u,e.isValidCode=c,e.serializeError=function(t){let{fallbackError:e=a,shouldIncludeStack:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,s;if(!e||!Number.isInteger(e.code)||"string"!==typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const o={};if(t&&"object"===typeof t&&!Array.isArray(t)&&d(t,"code")&&c(t.code)){const e=t;o.code=e.code,e.message&&"string"===typeof e.message?(o.message=e.message,d(e,"data")&&(o.data=e.data)):(o.message=u(o.code),o.data={originalError:h(t)})}else{o.code=e.code;const r=null===(n=t)||void 0===n?void 0:n.message;o.message=r&&"string"===typeof r?r:e.message,o.data={originalError:h(t)}}const l=null===(s=t)||void 0===s?void 0:s.stack;return r&&t&&l&&"string"===typeof l&&(o.stack=l),o}},5597:t=>{t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,r="undefined"!==typeof t.start?t.start:Math.floor(Math.random()*e);return function(){return r%=e,r++}}},1877:(t,e,r)=>{t.exports=r(7410)(r(4487))},7410:(t,e,r)=>{const n=r(6838),i=r(2380);t.exports=function(t){const e=n(t),r=i(t);return function(t,n){switch("string"===typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,n);case"keccak256":return new e(1088,512,null,256,n);case"keccak384":return new e(832,768,null,384,n);case"keccak512":return new e(576,1024,null,512,n);case"sha3-224":return new e(1152,448,6,224,n);case"sha3-256":return new e(1088,512,6,256,n);case"sha3-384":return new e(832,768,6,384,n);case"sha3-512":return new e(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: "+t)}}}},6838:(t,e,r)=>{var n=r(8381).Buffer;const{Transform:i}=r(577);t.exports=t=>class e extends i{constructor(e,r,n,i,s){super(s),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=s,this._state=new t,this._state.initialize(e,r),this._finalized=!1}_transform(t,e,r){let n=null;try{this.update(t,e)}catch(i){n=i}r(n)}_flush(t){let e=null;try{this.push(this.digest())}catch(r){e=r}t(e)}update(t,e){if(!n.isBuffer(t)&&"string"!==typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},2380:(t,e,r)=>{var n=r(8381).Buffer;const{Transform:i}=r(577);t.exports=t=>class e extends i{constructor(e,r,n,i){super(i),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new t,this._state.initialize(e,r),this._finalized=!1}_transform(t,e,r){let n=null;try{this.update(t,e)}catch(i){n=i}r(n)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,e){if(!n.isBuffer(t)&&"string"!==typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}squeeze(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(t);return void 0!==e&&(r=r.toString(e)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},6352:(t,e)=>{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];e.p1600=function(t){for(let e=0;e<24;++e){const n=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],o=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=h^(s<<1|o>>>31),p=d^(o<<1|s>>>31);const y=t[0]^f,g=t[1]^p,m=t[10]^f,b=t[11]^p,v=t[20]^f,_=t[21]^p,w=t[30]^f,E=t[31]^p,S=t[40]^f,x=t[41]^p;f=n^(a<<1|u>>>31),p=i^(u<<1|a>>>31);const M=t[2]^f,k=t[3]^p,C=t[12]^f,I=t[13]^p,R=t[22]^f,A=t[23]^p,N=t[32]^f,O=t[33]^p,T=t[42]^f,j=t[43]^p;f=s^(c<<1|l>>>31),p=o^(l<<1|c>>>31);const L=t[4]^f,P=t[5]^p,D=t[14]^f,B=t[15]^p,F=t[24]^f,$=t[25]^p,U=t[34]^f,z=t[35]^p,H=t[44]^f,V=t[45]^p;f=a^(h<<1|d>>>31),p=u^(d<<1|h>>>31);const W=t[6]^f,q=t[7]^p,J=t[16]^f,G=t[17]^p,Z=t[26]^f,Y=t[27]^p,Q=t[36]^f,K=t[37]^p,X=t[46]^f,tt=t[47]^p;f=c^(n<<1|i>>>31),p=l^(i<<1|n>>>31);const et=t[8]^f,rt=t[9]^p,nt=t[18]^f,it=t[19]^p,st=t[28]^f,ot=t[29]^p,at=t[38]^f,ut=t[39]^p,ct=t[48]^f,lt=t[49]^p,ht=y,dt=g,ft=b<<4|m>>>28,pt=m<<4|b>>>28,yt=v<<3|_>>>29,gt=_<<3|v>>>29,mt=E<<9|w>>>23,bt=w<<9|E>>>23,vt=S<<18|x>>>14,_t=x<<18|S>>>14,wt=M<<1|k>>>31,Et=k<<1|M>>>31,St=I<<12|C>>>20,xt=C<<12|I>>>20,Mt=R<<10|A>>>22,kt=A<<10|R>>>22,Ct=O<<13|N>>>19,It=N<<13|O>>>19,Rt=T<<2|j>>>30,At=j<<2|T>>>30,Nt=P<<30|L>>>2,Ot=L<<30|P>>>2,Tt=D<<6|B>>>26,jt=B<<6|D>>>26,Lt=$<<11|F>>>21,Pt=F<<11|$>>>21,Dt=U<<15|z>>>17,Bt=z<<15|U>>>17,Ft=V<<29|H>>>3,$t=H<<29|V>>>3,Ut=W<<28|q>>>4,zt=q<<28|W>>>4,Ht=G<<23|J>>>9,Vt=J<<23|G>>>9,Wt=Z<<25|Y>>>7,qt=Y<<25|Z>>>7,Jt=Q<<21|K>>>11,Gt=K<<21|Q>>>11,Zt=tt<<24|X>>>8,Yt=X<<24|tt>>>8,Qt=et<<27|rt>>>5,Kt=rt<<27|et>>>5,Xt=nt<<20|it>>>12,te=it<<20|nt>>>12,ee=ot<<7|st>>>25,re=st<<7|ot>>>25,ne=at<<8|ut>>>24,ie=ut<<8|at>>>24,se=ct<<14|lt>>>18,oe=lt<<14|ct>>>18;t[0]=ht^~St&Lt,t[1]=dt^~xt&Pt,t[10]=Ut^~Xt&yt,t[11]=zt^~te>,t[20]=wt^~Tt&Wt,t[21]=Et^~jt&qt,t[30]=Qt^~ft&Mt,t[31]=Kt^~pt&kt,t[40]=Nt^~Ht&ee,t[41]=Ot^~Vt&re,t[2]=St^~Lt&Jt,t[3]=xt^~Pt&Gt,t[12]=Xt^~yt&Ct,t[13]=te^~gt&It,t[22]=Tt^~Wt&ne,t[23]=jt^~qt&ie,t[32]=ft^~Mt&Dt,t[33]=pt^~kt&Bt,t[42]=Ht^~ee&mt,t[43]=Vt^~re&bt,t[4]=Lt^~Jt&se,t[5]=Pt^~Gt&oe,t[14]=yt^~Ct&Ft,t[15]=gt^~It&$t,t[24]=Wt^~ne&vt,t[25]=qt^~ie&_t,t[34]=Mt^~Dt&Zt,t[35]=kt^~Bt&Yt,t[44]=ee^~mt&Rt,t[45]=re^~bt&At,t[6]=Jt^~se&ht,t[7]=Gt^~oe&dt,t[16]=Ct^~Ft&Ut,t[17]=It^~$t&zt,t[26]=ne^~vt&wt,t[27]=ie^~_t&Et,t[36]=Dt^~Zt&Qt,t[37]=Bt^~Yt&Kt,t[46]=mt^~Rt&Nt,t[47]=bt^~At&Ot,t[8]=se^~ht&St,t[9]=oe^~dt&xt,t[18]=Ft^~Ut&Xt,t[19]=$t^~zt&te,t[28]=vt^~wt&Tt,t[29]=_t^~Et&jt,t[38]=Zt^~Qt&ft,t[39]=Yt^~Kt&pt,t[48]=Rt^~Nt&Ht,t[49]=At^~Ot&Vt,t[0]^=r[2*e],t[1]^=r[2*e+1]}}},4487:(t,e,r)=>{var n=r(8381).Buffer;const i=r(6352);function s(){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}s.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},s.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0)},s.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!==(128&t)&&this.count===this.blockSize-1&&i.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,i.p1600(this.state),this.count=0,this.squeezing=!0},s.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const e=n.alloc(t);for(let r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return e},s.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=s},909:(t,e,r)=>{var n="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s=n&&i&&"function"===typeof i.get?i.get:null,o=n&&Map.prototype.forEach,a="function"===typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&u&&"function"===typeof u.get?u.get:null,l=a&&Set.prototype.forEach,h="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,_=String.prototype.toUpperCase,w=String.prototype.toLowerCase,E=RegExp.prototype.test,S=Array.prototype.concat,x=Array.prototype.join,M=Array.prototype.slice,k=Math.floor,C="function"===typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,R="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,A="function"===typeof Symbol&&"object"===typeof Symbol.iterator,N="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,T=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function j(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||E.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof t){var n=t<0?-k(-t):k(t);if(n!==t){var i=String(n),s=b.call(e,i.length+1);return v.call(i,r,"$&_")+"."+v.call(v.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var L=r(2634),P=L.custom,D=z(P)?P:null;function B(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function F(t){return v.call(String(t),/"/g,""")}function $(t){return"[object Array]"===W(t)&&(!N||!("object"===typeof t&&N in t))}function U(t){return"[object RegExp]"===W(t)&&(!N||!("object"===typeof t&&N in t))}function z(t){if(A)return t&&"object"===typeof t&&t instanceof Symbol;if("symbol"===typeof t)return!0;if(!t||"object"!==typeof t||!R)return!1;try{return R.call(t),!0}catch(e){}return!1}t.exports=function t(e,n,i,a){var u=n||{};if(V(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var y=!V(u,"customInspect")||u.customInspect;if("boolean"!==typeof y&&"symbol"!==y)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=u.numericSeparator;if("undefined"===typeof e)return"undefined";if(null===e)return"null";if("boolean"===typeof e)return e?"true":"false";if("string"===typeof e)return J(e,u);if("number"===typeof e){if(0===e)return 1/0/e>0?"0":"-0";var E=String(e);return _?j(e,E):E}if("bigint"===typeof e){var k=String(e)+"n";return _?j(e,k):k}var I="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof i&&(i=0),i>=I&&I>0&&"object"===typeof e)return $(e)?"[Array]":"[Object]";var P=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"===typeof t.indent&&t.indent>0))return null;r=x.call(Array(t.indent+1)," ")}return{base:r,prev:x.call(Array(e+1),r)}}(u,i);if("undefined"===typeof a)a=[];else if(q(a,e)>=0)return"[Circular]";function H(e,r,n){if(r&&(a=M.call(a)).push(r),n){var s={depth:u.depth};return V(u,"quoteStyle")&&(s.quoteStyle=u.quoteStyle),t(e,s,i+1,a)}return t(e,u,i+1,a)}if("function"===typeof e&&!U(e)){var G=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),tt=X(e,H);return"[Function"+(G?": "+G:" (anonymous)")+"]"+(tt.length>0?" { "+x.call(tt,", ")+" }":"")}if(z(e)){var et=A?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!==typeof e||A?et:Z(et)}if(function(t){if(!t||"object"!==typeof t)return!1;if("undefined"!==typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"===typeof t.nodeName&&"function"===typeof t.getAttribute}(e)){for(var rt="<"+w.call(String(e.nodeName)),nt=e.attributes||[],it=0;it<nt.length;it++)rt+=" "+nt[it].name+"="+B(F(nt[it].value),"double",u);return rt+=">",e.childNodes&&e.childNodes.length&&(rt+="..."),rt+="</"+w.call(String(e.nodeName))+">"}if($(e)){if(0===e.length)return"[]";var st=X(e,H);return P&&!function(t){for(var e=0;e<t.length;e++)if(q(t[e],"\n")>=0)return!1;return!0}(st)?"["+K(st,P)+"]":"[ "+x.call(st,", ")+" ]"}if(function(t){return"[object Error]"===W(t)&&(!N||!("object"===typeof t&&N in t))}(e)){var ot=X(e,H);return"cause"in Error.prototype||!("cause"in e)||O.call(e,"cause")?0===ot.length?"["+String(e)+"]":"{ ["+String(e)+"] "+x.call(ot,", ")+" }":"{ ["+String(e)+"] "+x.call(S.call("[cause]: "+H(e.cause),ot),", ")+" }"}if("object"===typeof e&&y){if(D&&"function"===typeof e[D]&&L)return L(e,{depth:I-i});if("symbol"!==y&&"function"===typeof e.inspect)return e.inspect()}if(function(t){if(!s||!t||"object"!==typeof t)return!1;try{s.call(t);try{c.call(t)}catch(rt){return!0}return t instanceof Map}catch(e){}return!1}(e)){var at=[];return o&&o.call(e,(function(t,r){at.push(H(r,e,!0)+" => "+H(t,e))})),Q("Map",s.call(e),at,P)}if(function(t){if(!c||!t||"object"!==typeof t)return!1;try{c.call(t);try{s.call(t)}catch(e){return!0}return t instanceof Set}catch(r){}return!1}(e)){var ut=[];return l&&l.call(e,(function(t){ut.push(H(t,e))})),Q("Set",c.call(e),ut,P)}if(function(t){if(!h||!t||"object"!==typeof t)return!1;try{h.call(t,h);try{d.call(t,d)}catch(rt){return!0}return t instanceof WeakMap}catch(e){}return!1}(e))return Y("WeakMap");if(function(t){if(!d||!t||"object"!==typeof t)return!1;try{d.call(t,d);try{h.call(t,h)}catch(rt){return!0}return t instanceof WeakSet}catch(e){}return!1}(e))return Y("WeakSet");if(function(t){if(!f||!t||"object"!==typeof t)return!1;try{return f.call(t),!0}catch(e){}return!1}(e))return Y("WeakRef");if(function(t){return"[object Number]"===W(t)&&(!N||!("object"===typeof t&&N in t))}(e))return Z(H(Number(e)));if(function(t){if(!t||"object"!==typeof t||!C)return!1;try{return C.call(t),!0}catch(e){}return!1}(e))return Z(H(C.call(e)));if(function(t){return"[object Boolean]"===W(t)&&(!N||!("object"===typeof t&&N in t))}(e))return Z(p.call(e));if(function(t){return"[object String]"===W(t)&&(!N||!("object"===typeof t&&N in t))}(e))return Z(H(String(e)));if("undefined"!==typeof window&&e===window)return"{ [object Window] }";if(e===r.g)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===W(t)&&(!N||!("object"===typeof t&&N in t))}(e)&&!U(e)){var ct=X(e,H),lt=T?T(e)===Object.prototype:e instanceof Object||e.constructor===Object,ht=e instanceof Object?"":"null prototype",dt=!lt&&N&&Object(e)===e&&N in e?b.call(W(e),8,-1):ht?"Object":"",ft=(lt||"function"!==typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(dt||ht?"["+x.call(S.call([],dt||[],ht||[]),": ")+"] ":"");return 0===ct.length?ft+"{}":P?ft+"{"+K(ct,P)+"}":ft+"{ "+x.call(ct,", ")+" }"}return String(e)};var H=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return H.call(t,e)}function W(t){return y.call(t)}function q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function J(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return J(b.call(t,0,e.maxStringLength),e)+n}return B(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,G),"single",e)}function G(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+_.call(e.toString(16))}function Z(t){return"Object("+t+")"}function Y(t){return t+" { ? }"}function Q(t,e,r,n){return t+" ("+e+") {"+(n?K(r,n):x.call(r,", "))+"}"}function K(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+x.call(t,","+r)+"\n"+e.prev}function X(t,e){var r=$(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=V(t,i)?e(t[i],t):""}var s,o="function"===typeof I?I(t):[];if(A){s={};for(var a=0;a<o.length;a++)s["$"+o[a]]=o[a]}for(var u in t)V(t,u)&&(r&&String(Number(u))===u&&u<t.length||A&&s["$"+u]instanceof Symbol||(E.call(/[^\w$]/,u)?n.push(e(u,t)+": "+e(t[u],t)):n.push(u+": "+e(t[u],t))));if("function"===typeof I)for(var c=0;c<o.length;c++)O.call(t,o[c])&&n.push("["+e(o[c])+"]: "+e(t[o[c]],t));return n}},7866:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Component:()=>E,Fragment:()=>w,cloneElement:()=>W,createContext:()=>q,createElement:()=>b,createRef:()=>_,h:()=>b,hydrate:()=>V,isValidElement:()=>o,options:()=>i,render:()=>H,toChildArray:()=>N});var n,i,s,o,a,u,c,l,h,d={},f=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function g(t,e){for(var r in e)t[r]=e[r];return t}function m(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,r){var i,s,o,a={};for(o in e)"key"==o?i=e[o]:"ref"==o?s=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===a[o]&&(a[o]=t.defaultProps[o]);return v(t,a,i,s,null)}function v(t,e,r,n,o){var a={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++s:o,__i:-1,__u:0};return null==o&&null!=i.vnode&&i.vnode(a),a}function _(){return{current:null}}function w(t){return t.children}function E(t,e){this.props=t,this.context=e}function S(t,e){if(null==e)return t.__?S(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?S(t):null}function x(t,e,r){var n,s=t.__v,o=s.__e,a=t.__P;if(a)return(n=g({},s)).__v=s.__v+1,i.vnode&&i.vnode(n),D(a,n,s,t.__n,void 0!==a.ownerSVGElement,32&s.__u?[o]:null,e,null==o?S(s):o,!!(32&s.__u),r),n.__v=s.__v,n.__.__k[n.__i]=n,n.__d=void 0,n.__e!=o&&M(n),n}function M(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return M(t)}}function k(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!C.__r++||u!==i.debounceRendering)&&((u=i.debounceRendering)||c)(C)}function C(){var t,e,r,n=[],s=[];for(a.sort(l);t=a.shift();)t.__d&&(r=a.length,e=x(t,n,s)||e,0===r||a.length>r?(B(n,e,s),s.length=n.length=0,e=void 0,a.sort(l)):e&&i.__c&&i.__c(e,f));e&&B(n,e,s),C.__r=0}function I(t,e,r,n,i,s,o,a,u,c,l){var h,p,y,g,m,b=n&&n.__k||f,v=e.length;for(r.__d=u,R(r,e,b),u=r.__d,h=0;h<v;h++)null!=(y=r.__k[h])&&"boolean"!=typeof y&&"function"!=typeof y&&(p=-1===y.__i?d:b[y.__i]||d,y.__i=h,D(t,y,p,i,s,o,a,u,c,l),g=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&$(p.ref,null,y),l.push(y.ref,y.__c||g,y)),null==m&&null!=g&&(m=g),65536&y.__u||p.__k===y.__k?u=A(y,u,t):"function"==typeof y.type&&void 0!==y.__d?u=y.__d:g&&(u=g.nextSibling),y.__d=void 0,y.__u&=-196609);r.__d=u,r.__e=m}function R(t,e,r){var n,i,s,o,a,u=e.length,c=r.length,l=c,h=0;for(t.__k=[],n=0;n<u;n++)null!=(i=t.__k[n]=null==(i=e[n])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?v(null,i,null,null,i):y(i)?v(w,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?v(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,a=O(i,r,o=n+h,l),i.__i=a,s=null,-1!==a&&(l--,(s=r[a])&&(s.__u|=131072)),null==s||null===s.__v?(-1==a&&h--,"function"!=typeof i.type&&(i.__u|=65536)):a!==o&&(a===o+1?h++:a>o?l>u-o?h+=a-o:h--:h=a<o&&a==o-1?a-o:0,a!==n+h&&(i.__u|=65536))):(s=r[n])&&null==s.key&&s.__e&&0==(131072&s.__u)&&(s.__e==t.__d&&(t.__d=S(s)),U(s,s,!1),r[n]=null,l--);if(l)for(n=0;n<c;n++)null!=(s=r[n])&&0==(131072&s.__u)&&(s.__e==t.__d&&(t.__d=S(s)),U(s,s))}function A(t,e,r){var n,i;if("function"==typeof t.type){for(n=t.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=t,e=A(n[i],e,r));return e}t.__e!=e&&(r.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function N(t,e){return e=e||[],null==t||"boolean"==typeof t||(y(t)?t.some((function(t){N(t,e)})):e.push(t)),e}function O(t,e,r,n){var i=t.key,s=t.type,o=r-1,a=r+1,u=e[r];if(null===u||u&&i==u.key&&s===u.type)return r;if(n>(null!=u&&0==(131072&u.__u)?1:0))for(;o>=0||a<e.length;){if(o>=0){if((u=e[o])&&0==(131072&u.__u)&&i==u.key&&s===u.type)return o;o--}if(a<e.length){if((u=e[a])&&0==(131072&u.__u)&&i==u.key&&s===u.type)return a;a++}}return-1}function T(t,e,r){"-"===e[0]?t.setProperty(e,null==r?"":r):t[e]=null==r?"":"number"!=typeof r||p.test(e)?r:r+"px"}function j(t,e,r,n,i){var s;t:if("style"===e)if("string"==typeof r)t.style.cssText=r;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||T(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||T(t.style,e,r[e])}else if("o"===e[0]&&"n"===e[1])s=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=r,r?n?r.u=n.u:(r.u=Date.now(),t.addEventListener(e,s?P:L,s)):t.removeEventListener(e,s?P:L,s);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==r?"":r;break t}catch(t){}"function"==typeof r||(null==r||!1===r&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,r))}}function L(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(i.event?i.event(t):t)}}function P(t){if(this.l)return this.l[t.type+!0](i.event?i.event(t):t)}function D(t,e,r,n,s,o,a,u,c,l){var h,d,f,p,m,b,v,_,S,x,M,k,C,R,A,N=e.type;if(void 0!==e.constructor)return null;128&r.__u&&(c=!!(32&r.__u),o=[u=e.__e=r.__e]),(h=i.__b)&&h(e);t:if("function"==typeof N)try{if(_=e.props,S=(h=N.contextType)&&n[h.__c],x=h?S?S.props.value:h.__:n,r.__c?v=(d=e.__c=r.__c).__=d.__E:("prototype"in N&&N.prototype.render?e.__c=d=new N(_,x):(e.__c=d=new E(_,x),d.constructor=N,d.render=z),S&&S.sub(d),d.props=_,d.state||(d.state={}),d.context=x,d.__n=n,f=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=N.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=g({},d.__s)),g(d.__s,N.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=e,f)null==N.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==N.getDerivedStateFromProps&&_!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(_,x),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(_,d.__s,x)||e.__v===r.__v)){for(e.__v!==r.__v&&(d.props=_,d.state=d.__s,d.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach((function(t){t&&(t.__=e)})),M=0;M<d._sb.length;M++)d.__h.push(d._sb[M]);d._sb=[],d.__h.length&&a.push(d);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(_,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,m,b)}))}if(d.context=x,d.props=_,d.__P=t,d.__e=!1,k=i.__r,C=0,"prototype"in N&&N.prototype.render){for(d.state=d.__s,d.__d=!1,k&&k(e),h=d.render(d.props,d.state,d.context),R=0;R<d._sb.length;R++)d.__h.push(d._sb[R]);d._sb=[]}else do{d.__d=!1,k&&k(e),h=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++C<25);d.state=d.__s,null!=d.getChildContext&&(n=g(g({},n),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(b=d.getSnapshotBeforeUpdate(p,m)),I(t,y(A=null!=h&&h.type===w&&null==h.key?h.props.children:h)?A:[A],e,r,n,s,o,a,u,c,l),d.base=e.__e,e.__u&=-161,d.__h.length&&a.push(d),v&&(d.__E=d.__=null)}catch(t){e.__v=null,c||null!=o?(e.__e=u,e.__u|=c?160:32,o[o.indexOf(u)]=null):(e.__e=r.__e,e.__k=r.__k),i.__e(t,e,r)}else null==o&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=F(r.__e,e,r,n,s,o,a,c,l);(h=i.diffed)&&h(e)}function B(t,e,r){for(var n=0;n<r.length;n++)$(r[n],r[++n],r[++n]);i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function F(t,e,r,i,s,o,a,u,c){var l,h,f,p,g,b,v,_=r.props,w=e.props,E=e.type;if("svg"===E&&(s=!0),null!=o)for(l=0;l<o.length;l++)if((g=o[l])&&"setAttribute"in g==!!E&&(E?g.localName===E:3===g.nodeType)){t=g,o[l]=null;break}if(null==t){if(null===E)return document.createTextNode(w);t=s?document.createElementNS("http://www.w3.org/2000/svg",E):document.createElement(E,w.is&&w),o=null,u=!1}if(null===E)_===w||u&&t.data===w||(t.data=w);else{if(o=o&&n.call(t.childNodes),_=r.props||d,!u&&null!=o)for(_={},l=0;l<t.attributes.length;l++)_[(g=t.attributes[l]).name]=g.value;for(l in _)g=_[l],"children"==l||("dangerouslySetInnerHTML"==l?f=g:"key"===l||l in w||j(t,l,null,g,s));for(l in w)g=w[l],"children"==l?p=g:"dangerouslySetInnerHTML"==l?h=g:"value"==l?b=g:"checked"==l?v=g:"key"===l||u&&"function"!=typeof g||_[l]===g||j(t,l,g,_[l],s);if(h)u||f&&(h.__html===f.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(f&&(t.innerHTML=""),I(t,y(p)?p:[p],e,r,i,s&&"foreignObject"!==E,o,a,o?o[0]:r.__k&&S(r,0),u,c),null!=o)for(l=o.length;l--;)null!=o[l]&&m(o[l]);u||(l="value",void 0!==b&&(b!==t[l]||"progress"===E&&!b||"option"===E&&b!==_[l])&&j(t,l,b,_[l],!1),l="checked",void 0!==v&&v!==t[l]&&j(t,l,v,_[l],!1))}return t}function $(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,r)}}function U(t,e,r){var n,s;if(i.unmount&&i.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||$(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){i.__e(t,e)}n.base=n.__P=null,t.__c=void 0}if(n=t.__k)for(s=0;s<n.length;s++)n[s]&&U(n[s],e,r||"function"!=typeof t.type);r||null==t.__e||m(t.__e),t.__=t.__e=t.__d=void 0}function z(t,e,r){return this.constructor(t,r)}function H(t,e,r){var s,o,a,u;i.__&&i.__(t,e),o=(s="function"==typeof r)?null:r&&r.__k||e.__k,a=[],u=[],D(e,t=(!s&&r||e).__k=b(w,null,[t]),o||d,d,void 0!==e.ownerSVGElement,!s&&r?[r]:o?null:e.firstChild?n.call(e.childNodes):null,a,!s&&r?r:o?o.__e:e.firstChild,s,u),t.__d=void 0,B(a,t,u)}function V(t,e){H(t,e,V)}function W(t,e,r){var i,s,o,a,u=g({},t.props);for(o in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),e)"key"==o?i=e[o]:"ref"==o?s=e[o]:u[o]=void 0===e[o]&&void 0!==a?a[o]:e[o];return arguments.length>2&&(u.children=arguments.length>3?n.call(arguments,2):r),v(t.type,u,i||t.key,s||t.ref,null)}function q(t,e){var r={__c:e="__cC"+h++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,n;return this.getChildContext||(r=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&r.some((function(t){t.__e=!0,k(t)}))},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Provider.__=r.Consumer.contextType=r}n=f.slice,i={__e:function(t,e,r,n){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,n||{}),o=i.__d),o)return i.__E=i}catch(e){t=e}throw t}},s=0,o=function(t){return null!=t&&null==t.constructor},E.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=g({},this.state),"function"==typeof t&&(t=t(g({},r),this.props)),t&&g(r,t),null!=t&&this.__v&&(e&&this._sb.push(e),k(this))},E.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},E.prototype.render=w,a=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(t,e){return t.__v.__b-e.__v.__b},C.__r=0,h=0},7840:(t,e,r)=>{"use strict";r.r(e),r.d(e,{useCallback:()=>k,useContext:()=>C,useDebugValue:()=>I,useEffect:()=>w,useErrorBoundary:()=>R,useId:()=>A,useImperativeHandle:()=>x,useLayoutEffect:()=>E,useMemo:()=>M,useReducer:()=>_,useRef:()=>S,useState:()=>v});var n,i,s,o,a=r(7866),u=0,c=[],l=[],h=a.options,d=h.__b,f=h.__r,p=h.diffed,y=h.__c,g=h.unmount,m=h.__;function b(t,e){h.__h&&h.__h(i,t,u||e),u=0;var r=i.__H||(i.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:l}),r.__[t]}function v(t){return u=1,_(D,t)}function _(t,e,r){var s=b(n++,2);if(s.t=t,!s.__c&&(s.__=[r?r(e):D(void 0,e),function(t){var e=s.__N?s.__N[0]:s.__[0],r=s.t(e,t);e!==r&&(s.__N=[r,s.__[1]],s.__c.setState({}))}],s.__c=i,!i.u)){var o=function(t,e,r){if(!s.__c.__H)return!0;var n=s.__c.__H.__.filter((function(t){return!!t.__c}));if(n.every((function(t){return!t.__N})))return!a||a.call(this,t,e,r);var i=!1;return n.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(i=!0)}})),!(!i&&s.__c.props===t)&&(!a||a.call(this,t,e,r))};i.u=!0;var a=i.shouldComponentUpdate,u=i.componentWillUpdate;i.componentWillUpdate=function(t,e,r){if(this.__e){var n=a;a=void 0,o(t,e,r),a=n}u&&u.call(this,t,e,r)},i.shouldComponentUpdate=o}return s.__N||s.__}function w(t,e){var r=b(n++,3);!h.__s&&P(r.__H,e)&&(r.__=t,r.i=e,i.__H.__h.push(r))}function E(t,e){var r=b(n++,4);!h.__s&&P(r.__H,e)&&(r.__=t,r.i=e,i.__h.push(r))}function S(t){return u=5,M((function(){return{current:t}}),[])}function x(t,e,r){u=6,E((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==r?r:r.concat(t))}function M(t,e){var r=b(n++,7);return P(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function k(t,e){return u=8,M((function(){return t}),e)}function C(t){var e=i.context[t.__c],r=b(n++,9);return r.c=t,e?(null==r.__&&(r.__=!0,e.sub(i)),e.props.value):t.__}function I(t,e){h.useDebugValue&&h.useDebugValue(e?e(t):t)}function R(t){var e=b(n++,10),r=v();return e.__=t,i.componentDidCatch||(i.componentDidCatch=function(t,n){e.__&&e.__(t,n),r[1](t)}),[r[0],function(){r[1](void 0)}]}function A(){var t=b(n++,11);if(!t.__){for(var e=i.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function N(){for(var t;t=c.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(j),t.__H.__h.forEach(L),t.__H.__h=[]}catch(n){t.__H.__h=[],h.__e(n,t.__v)}}h.__b=function(t){i=null,d&&d(t)},h.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),m&&m(t,e)},h.__r=function(t){f&&f(t),n=0;var e=(i=t.__c).__H;e&&(s===i?(e.__h=[],i.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=l,t.__N=t.i=void 0}))):(e.__h.forEach(j),e.__h.forEach(L),e.__h=[],n=0)),s=i},h.diffed=function(t){p&&p(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==c.push(e)&&o===h.requestAnimationFrame||((o=h.requestAnimationFrame)||T)(N)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==l&&(t.__=t.__V),t.i=void 0,t.__V=l}))),s=i=null},h.__c=function(t,e){e.some((function(t){try{t.__h.forEach(j),t.__h=t.__h.filter((function(t){return!t.__||L(t)}))}catch(i){e.some((function(t){t.__h&&(t.__h=[])})),e=[],h.__e(i,t.__v)}})),y&&y(t,e)},h.unmount=function(t){g&&g(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{j(t)}catch(t){e=t}})),r.__H=void 0,e&&h.__e(e,r.__v))};var O="function"==typeof requestAnimationFrame;function T(t){var e,r=function(){clearTimeout(n),O&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);O&&(e=requestAnimationFrame(r))}function j(t){var e=i,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),i=e}function L(t){var e=i;t.__c=t.__(),i=e}function P(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function D(t,e){return"function"==typeof e?e(t):e}},9310:t=>{"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"===typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,s,o,a;if("string"===typeof e&&(s="not ",e.substr(!o||o<0?0:+o,s.length)===s)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var u=function(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(n(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" 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(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.F=e},4776:(t,e,r)=>{"use strict";var n=r(7256),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var s=r(574),o=r(7682);r(6156)(l,s);for(var a=i(o.prototype),u=0;u<a.length;u++){var c=a[u];l.prototype[c]||(l.prototype[c]=o.prototype[c])}function l(t){if(!(this instanceof l))return new l(t);s.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||n.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},9837:(t,e,r)=>{"use strict";t.exports=i;var n=r(6040);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(6156)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},574:(t,e,r)=>{"use strict";var n,i=r(7256);t.exports=M,M.ReadableState=x;r(6677).EventEmitter;var s=function(t,e){return t.listeners(e).length},o=r(5183),a=r(8381).Buffer,u=("undefined"!==typeof r.g?r.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var c,l=r(9838);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,d,f,p=r(2771),y=r(582),g=r(6617).getHighWaterMark,m=r(9310).F,b=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,_=m.ERR_METHOD_NOT_IMPLEMENTED,w=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(6156)(M,o);var E=y.errorOrDestroy,S=["error","close","destroy","pause","resume"];function x(t,e,i){n=n||r(4776),t=t||{},"boolean"!==typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"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!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(6395).I),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function M(t){if(n=n||r(4776),!(this instanceof M))return new M(t);var e=this instanceof n;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function k(t,e,r,n,i){c("readableAddChunk",e);var s,o=t._readableState;if(null===e)o.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?A(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,N(t)))}(t,o);else if(i||(s=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"===typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(o,e)),s)E(t,s);else if(o.objectMode||e&&e.length>0)if("string"===typeof e||o.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)o.endEmitted?E(t,new w):C(t,o,e,!0);else if(o.ended)E(t,new v);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?C(t,o,e,!1):O(t,o)):C(t,o,e,!1)}else n||(o.reading=!1,O(t,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function C(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&A(t)),O(t,e)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),M.prototype.destroy=y.destroy,M.prototype._undestroy=y.undestroy,M.prototype._destroy=function(t,e){e(t)},M.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"===typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),k(this,t,e,!1,r)},M.prototype.unshift=function(t){return k(this,t,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(t){h||(h=r(6395).I);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var I=1073741824;function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=I?t=I:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(N,t))}function N(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,D(t)}function O(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(T,t,e))}function T(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function j(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function L(t){c("readable nexttick read 0"),t.read(0)}function P(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function B(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function F(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick($,e,t))}function $(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function U(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}M.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):A(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&F(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(r,e))),null===(n=t>0?B(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&F(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(t){E(this,new _("_read()"))},M.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,e);var o=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?u:g;function a(e,i){c("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",f),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",d),h=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}n.endEmitted?i.nextTick(o):r.once("end",o),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,D(t))}}(r);t.on("drain",l);var h=!1;function d(e){c("ondata");var i=t.write(e);c("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==U(n.pipes,t))&&!h&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(e){c("onerror",e),g(),t.removeListener("error",f),0===s(t,"error")&&E(t,e)}function p(){t.removeListener("finish",y),g()}function y(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(t)}return r.on("data",d),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",f),t.once("close",p),t.once("finish",y),t.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),t},M.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=U(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},M.prototype.on=function(t,e){var r=o.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?A(this):n.reading||i.nextTick(L,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(j,this),r},M.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(j,this),e},M.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(P,t,e))}(this,t)),t.paused=!1,this},M.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s<S.length;s++)t.on(S[s],this.emit.bind(this,S[s]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"===typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(8453)),d(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),M._fromList=B,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(M.from=function(t,e){return void 0===f&&(f=r(7423)),f(M,t,e)})},6040:(t,e,r)=>{"use strict";t.exports=l;var n=r(9310).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(4776);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"===typeof t.transform&&(this._transform=t.transform),"function"===typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!==typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(e,r){d(t,e,r)}))}function d(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new o;return t.push(null)}r(6156)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},7682:(t,e,r)=>{"use strict";var n,i=r(7256);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=M,M.WritableState=x;var o={deprecate:r(6269)},a=r(5183),u=r(8381).Buffer,c=("undefined"!==typeof r.g?r.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var l,h=r(582),d=r(6617).getHighWaterMark,f=r(9310).F,p=f.ERR_INVALID_ARG_TYPE,y=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,_=f.ERR_STREAM_WRITE_AFTER_END,w=f.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function x(t,e,o){n=n||r(4776),t=t||{},"boolean"!==typeof o&&(o=e instanceof n),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,s=r.writecb;if("function"!==typeof s)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,s){--e.pendingcb,r?(i.nextTick(s,n),i.nextTick(N,t,e),t._writableState.errorEmitted=!0,E(t,n)):(s(n),t._writableState.errorEmitted=!0,E(t,n),N(t,e))}(t,r,n,e,s);else{var o=R(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||I(t,r),n?i.nextTick(C,t,r,o,s):C(t,r,o,s)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function M(t){var e=this instanceof(n=n||r(4776));if(!e&&!l.call(M,this))return new M(t);this._writableState=new x(t,this,e),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),a.call(this)}function k(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function C(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),N(t,e)}function I(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,k(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(k(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function R(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),N(t,e)}))}function N(t,e){var r=R(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!==typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(A,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(6156)(M,a),x.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(x.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===M&&(t&&t._writableState instanceof x)}})):l=function(t){return t instanceof this},M.prototype.pipe=function(){E(this,new m)},M.prototype.write=function(t,e,r){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=t,u.isBuffer(n)||n instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"===typeof e&&(r=e,e=null),a?e="buffer":e||(e=s.defaultEncoding),"function"!==typeof r&&(r=S),s.ending?function(t,e){var r=new _;E(t,r),i.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var s;return null===r?s=new v:"string"===typeof r||e.objectMode||(s=new p("chunk",["string","Buffer"],r)),!s||(E(t,s),i.nextTick(n,s),!1)}(this,s,t,r))&&(s.pendingcb++,o=function(t,e,r,n,i,s){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=u.from(e,r));return e}(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,a,n,i,s);return c}(this,s,a,t,e,r)),o},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||I(this,t))},M.prototype.setDefaultEncoding=function(t){if("string"===typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(t,e,r){r(new y("_write()"))},M.prototype._writev=null,M.prototype.end=function(t,e,r){var n=this._writableState;return"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,N(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(t,e){e(t)}},8453:(t,e,r)=>{"use strict";var n,i=r(7256);function s(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(876),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),h=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function p(t,e){return{value:t,done:e}}function y(t){var e=t[a];if(null!==e){var r=t[f].read();null!==r&&(t[h]=null,t[a]=null,t[u]=null,e(p(r,!1)))}}function g(t){i.nextTick(y,t)}var m=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((s(n={get stream(){return this[f]},next:function(){var t=this,e=this[c];if(null!==e)return Promise.reject(e);if(this[l])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[c]?r(t[c]):e(p(void 0,!0))}))}));var r,n=this[h];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[l]?r(p(void 0,!0)):e[d](r,n)}),n)}}(n,this));else{var s=this[f].read();if(null!==s)return Promise.resolve(p(s,!1));r=new Promise(this[d])}return this[h]=r,r}},Symbol.asyncIterator,(function(){return this})),s(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),m);t.exports=function(t){var e,r=Object.create(b,(s(e={},f,{value:t,writable:!0}),s(e,a,{value:null,writable:!0}),s(e,u,{value:null,writable:!0}),s(e,c,{value:null,writable:!0}),s(e,l,{value:t._readableState.endEmitted,writable:!0}),s(e,d,{value:function(t,e){var n=r[f].read();n?(r[h]=null,r[a]=null,r[u]=null,t(p(n,!1))):(r[a]=t,r[u]=e)},writable:!0}),e));return r[h]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[u];return null!==e&&(r[h]=null,r[a]=null,r[u]=null,e(t)),void(r[c]=t)}var n=r[a];null!==n&&(r[h]=null,r[a]=null,r[u]=null,n(p(void 0,!0))),r[l]=!0})),t.on("readable",g.bind(null,r)),r}},2771:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!==typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===typeof e?e:String(e)}var u=r(8381).Buffer,c=r(5340).inspect,l=c&&c.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,n;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return u.alloc(0);for(var e,r,n,i=u.allocUnsafe(t>>>0),s=this.head,o=0;s;)e=s.data,r=i,n=o,u.prototype.copy.call(e,r,n),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,s=t>i.length?i.length:t;if(s===i.length?n+=i:n+=i.slice(0,t),0===(t-=s)){s===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=u.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,s=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,s),0===(t-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return c(this,i(i({},e),{},{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},582:(t,e,r)=>{"use strict";var n=r(7256);function i(t,e){o(t,e),s(t)}function s(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function o(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(o,this,t)):n.nextTick(o,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(s,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(s,r),e(t)):n.nextTick(s,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},876:(t,e,r)=>{"use strict";var n=r(9310).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,s){if("function"===typeof r)return t(e,null,r);r||(r={}),s=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(s||i);var o=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,o||s.call(e)},h=e._readableState&&e._readableState.endEmitted,d=function(){o=!1,h=!0,a||s.call(e)},f=function(t){s.call(e,t)},p=function(){var t;return o&&!h?(e._readableState&&e._readableState.ended||(t=new n),s.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),s.call(e,t)):void 0},y=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"===typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?y():e.on("request",y)),e.on("end",d),e.on("finish",l),!1!==r.error&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",y),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",d),e.removeListener("error",f),e.removeListener("close",p)}}},7423:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},2032:(t,e,r)=>{"use strict";var n;var i=r(9310).F,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t){t()}function c(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var l,h=function(t){return t.length?"function"!==typeof t[t.length-1]?a:t.pop():a}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new s("streams");var d=e.map((function(t,i){var s=i<e.length-1;return function(t,e,i,s){s=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(s);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(876)),n(t,{readable:e,writable:i},(function(t){if(t)return s(t);a=!0,s()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"===typeof t.abort}(t)?t.abort():"function"===typeof t.destroy?t.destroy():void s(e||new o("pipe"))}}(t,s,i>0,(function(t){l||(l=t),t&&d.forEach(u),s||(d.forEach(u),h(l))}))}));return e.reduce(c)}},6617:(t,e,r)=>{"use strict";var n=r(9310).F.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var s=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return t.objectMode?16:16384}}},5183:(t,e,r)=>{t.exports=r(6677).EventEmitter},577:(t,e,r)=>{(e=t.exports=r(574)).Stream=e,e.Readable=e,e.Writable=r(7682),e.Duplex=r(4776),e.Transform=r(6040),e.PassThrough=r(9837),e.finished=r(876),e.pipeline=r(2032)},4848:(t,e,r)=>{"use strict";r.r(e),r.d(e,{ArgumentOutOfRangeError:()=>A.k,AsyncSubject:()=>l.h,BehaviorSubject:()=>u.t,ConnectableObservable:()=>i.G,EMPTY:()=>Z.w,EmptyError:()=>N.G,GroupedObservable:()=>s.k,NEVER:()=>ht,Notification:()=>M.E,NotificationKind:()=>M.I,ObjectUnsubscribedError:()=>O.P,Observable:()=>n.c,ReplaySubject:()=>c.m,Scheduler:()=>E._,Subject:()=>a.B7,Subscriber:()=>x.v,Subscription:()=>S.y,TimeoutError:()=>j.M,UnsubscriptionError:()=>T.Z,VirtualAction:()=>w,VirtualTimeScheduler:()=>_,animationFrame:()=>v,animationFrameScheduler:()=>b,asap:()=>h.I,asapScheduler:()=>h.$,async:()=>d.b,asyncScheduler:()=>d.E,bindCallback:()=>F,bindNodeCallback:()=>z,combineLatest:()=>q.zV,concat:()=>J.x,config:()=>Rt.$,defer:()=>G.v,empty:()=>Z.I,forkJoin:()=>K,from:()=>Q.H,fromEvent:()=>et,fromEventPattern:()=>nt,generate:()=>it,identity:()=>I.D,iif:()=>ot,interval:()=>ut,isObservable:()=>R,merge:()=>lt.h,never:()=>dt,noop:()=>C.l,observable:()=>o.s,of:()=>ft.of,onErrorResumeNext:()=>pt,pairs:()=>yt,partition:()=>_t,pipe:()=>k.F,queue:()=>f.g,queueScheduler:()=>f.T,race:()=>wt.O4,range:()=>Et,scheduled:()=>It.c,throwError:()=>xt.$,timer:()=>Mt.O,using:()=>kt,zip:()=>Ct.yU});var n=r(4320),i=r(2241),s=r(266),o=r(8502),a=r(242),u=r(4188),c=r(403),l=r(1108),h=r(5786),d=r(3316),f=r(284),p=r(7441),y=r(7421),g=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return p.__extends(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(cancelAnimationFrame(r),e.scheduled=void 0)},e}(y.R),m=r(1299),b=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,i=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<i&&(t=r.shift()));if(this.active=!1,e){for(;++n<i&&(t=r.shift());)t.unsubscribe();throw e}},e}(m.q))(g),v=b,_=function(t){function e(e,r){void 0===e&&(e=w),void 0===r&&(r=Number.POSITIVE_INFINITY);var n=t.call(this,e,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return p.__extends(e,t),e.prototype.flush=function(){for(var t,e,r=this.actions,n=this.maxFrames;(e=r[0])&&e.delay<=n&&(r.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=r.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(m.q),w=function(t){function e(e,r,n){void 0===n&&(n=e.index+=1);var i=t.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.index=n,i.active=!0,i.index=e.index=n,i}return p.__extends(e,t),e.prototype.schedule=function(r,n){if(void 0===n&&(n=0),!this.id)return t.prototype.schedule.call(this,r,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(r,n)},e.prototype.requestAsyncId=function(t,r,n){void 0===n&&(n=0),this.delay=t.frame+n;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,r){void 0===r&&(r=0)},e.prototype._execute=function(e,r){if(!0===this.active)return t.prototype._execute.call(this,e,r)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(y.R),E=r(812),S=r(9513),x=r(2486),M=r(259),k=r(6499),C=r(7855),I=r(4661);function R(t){return!!t&&(t instanceof n.c||"function"===typeof t.lift&&"function"===typeof t.subscribe)}var A=r(6494),N=r(8054),O=r(8173),T=r(5263),j=r(312),L=r(754),P=r(3425),D=r(4934),B=r(1086);function F(t,e,r){if(e){if(!(0,B.m)(e))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return F(t,r).apply(void 0,n).pipe((0,L.T)((function(t){return(0,D.c)(t)?e.apply(void 0,t):e(t)})))};r=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var s,o=this,a={context:o,subject:s,callbackFunc:t,scheduler:r};return new n.c((function(n){if(r){var i={args:e,subscriber:n,params:a};return r.schedule($,0,i)}if(!s){s=new l.h;try{t.apply(o,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];s.next(t.length<=1?t[0]:t),s.complete()}]))}catch(u){(0,P.H)(s)?s.error(u):console.warn(u)}}return s.subscribe(n)}))}}function $(t){var e=this,r=t.args,n=t.subscriber,i=t.params,s=i.callbackFunc,o=i.context,a=i.scheduler,u=i.subject;if(!u){u=i.subject=new l.h;try{s.apply(o,r.concat([function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t.length<=1?t[0]:t;e.add(a.schedule(U,0,{value:n,subject:u}))}]))}catch(c){u.error(c)}}this.add(u.subscribe(n))}function U(t){var e=t.value,r=t.subject;r.next(e),r.complete()}function z(t,e,r){if(e){if(!(0,B.m)(e))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return z(t,r).apply(void 0,n).pipe((0,L.T)((function(t){return(0,D.c)(t)?e.apply(void 0,t):e(t)})))};r=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var s={subject:void 0,args:e,callbackFunc:t,scheduler:r,context:this};return new n.c((function(n){var i=s.context,o=s.subject;if(r)return r.schedule(H,0,{params:s,subscriber:n,context:i});if(!o){o=s.subject=new l.h;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.shift();r?o.error(r):(o.next(t.length<=1?t[0]:t),o.complete())}]))}catch(a){(0,P.H)(o)?o.error(a):console.warn(a)}}return o.subscribe(n)}))}}function H(t){var e=this,r=t.params,n=t.subscriber,i=t.context,s=r.callbackFunc,o=r.args,a=r.scheduler,u=r.subject;if(!u){u=r.subject=new l.h;try{s.apply(i,o.concat([function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t.shift();if(n)e.add(a.schedule(W,0,{err:n,subject:u}));else{var i=t.length<=1?t[0]:t;e.add(a.schedule(V,0,{value:i,subject:u}))}}]))}catch(c){this.add(a.schedule(W,0,{err:c,subject:u}))}}this.add(u.subscribe(n))}function V(t){var e=t.value,r=t.subject;r.next(e),r.complete()}function W(t){var e=t.err;t.subject.error(e)}var q=r(7836),J=r(6624),G=r(1670),Z=r(7799),Y=r(1276),Q=r(7164);function K(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var r=t[0];if((0,D.c)(r))return X(r,null);if((0,Y.G)(r)&&Object.getPrototypeOf(r)===Object.prototype){var n=Object.keys(r);return X(n.map((function(t){return r[t]})),n)}}if("function"===typeof t[t.length-1]){var i=t.pop();return X(t=1===t.length&&(0,D.c)(t[0])?t[0]:t,null).pipe((0,L.T)((function(t){return i.apply(void 0,t)})))}return X(t,null)}function X(t,e){return new n.c((function(r){var n=t.length;if(0!==n)for(var i=new Array(n),s=0,o=0,a=function(a){var u=(0,Q.H)(t[a]),c=!1;r.add(u.subscribe({next:function(t){c||(c=!0,o++),i[a]=t},error:function(t){return r.error(t)},complete:function(){++s!==n&&c||(o===n&&r.next(e?e.reduce((function(t,e,r){return t[e]=i[r],t}),{}):i),r.complete())}}))},u=0;u<n;u++)a(u);else r.complete()}))}var tt=r(6823);function et(t,e,r,i){return(0,tt.T)(r)&&(i=r,r=void 0),i?et(t,e,r).pipe((0,L.T)((function(t){return(0,D.c)(t)?i.apply(void 0,t):i(t)}))):new n.c((function(n){rt(t,e,(function(t){arguments.length>1?n.next(Array.prototype.slice.call(arguments)):n.next(t)}),n,r)}))}function rt(t,e,r,n,i){var s;if(function(t){return t&&"function"===typeof t.addEventListener&&"function"===typeof t.removeEventListener}(t)){var o=t;t.addEventListener(e,r,i),s=function(){return o.removeEventListener(e,r,i)}}else if(function(t){return t&&"function"===typeof t.on&&"function"===typeof t.off}(t)){var a=t;t.on(e,r),s=function(){return a.off(e,r)}}else if(function(t){return t&&"function"===typeof t.addListener&&"function"===typeof t.removeListener}(t)){var u=t;t.addListener(e,r),s=function(){return u.removeListener(e,r)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var c=0,l=t.length;c<l;c++)rt(t[c],e,r,n,i)}n.add(s)}function nt(t,e,r){return r?nt(t,e).pipe((0,L.T)((function(t){return(0,D.c)(t)?r.apply(void 0,t):r(t)}))):new n.c((function(r){var n,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.next(1===t.length?t[0]:t)};try{n=t(i)}catch(s){return void r.error(s)}if((0,tt.T)(e))return function(){return e(i,n)}}))}function it(t,e,r,i,s){var o,a;if(1==arguments.length){var u=t;a=u.initialState,e=u.condition,r=u.iterate,o=u.resultSelector||I.D,s=u.scheduler}else void 0===i||(0,B.m)(i)?(a=t,o=I.D,s=i):(a=t,o=i);return new n.c((function(t){var n=a;if(s)return s.schedule(st,0,{subscriber:t,iterate:r,condition:e,resultSelector:o,state:n});for(;;){if(e){var i=void 0;try{i=e(n)}catch(c){return void t.error(c)}if(!i){t.complete();break}}var u=void 0;try{u=o(n)}catch(c){return void t.error(c)}if(t.next(u),t.closed)break;try{n=r(n)}catch(c){return void t.error(c)}}}))}function st(t){var e=t.subscriber,r=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(s){return void e.error(s)}else t.needIterate=!0;if(r){var n=void 0;try{n=r(t.state)}catch(s){return void e.error(s)}if(!n)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(s){return void e.error(s)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function ot(t,e,r){return void 0===e&&(e=Z.w),void 0===r&&(r=Z.w),(0,G.v)((function(){return t()?e:r}))}var at=r(6744);function ut(t,e){return void 0===t&&(t=0),void 0===e&&(e=d.b),(!(0,at.k)(t)||t<0)&&(t=0),e&&"function"===typeof e.schedule||(e=d.b),new n.c((function(r){return r.add(e.schedule(ct,t,{subscriber:r,counter:0,period:t})),r}))}function ct(t){var e=t.subscriber,r=t.counter,n=t.period;e.next(r),this.schedule({subscriber:e,counter:r+1,period:n},n)}var lt=r(3354),ht=new n.c(C.l);function dt(){return ht}var ft=r(5721);function pt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return Z.w;var r=t[0],i=t.slice(1);return 1===t.length&&(0,D.c)(r)?pt.apply(void 0,r):new n.c((function(t){var e=function(){return t.add(pt.apply(void 0,i).subscribe(t))};return(0,Q.H)(r).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function yt(t,e){return e?new n.c((function(r){var n=Object.keys(t),i=new S.y;return i.add(e.schedule(gt,0,{keys:n,index:0,subscriber:r,subscription:i,obj:t})),i})):new n.c((function(e){for(var r=Object.keys(t),n=0;n<r.length&&!e.closed;n++){var i=r[n];t.hasOwnProperty(i)&&e.next([i,t[i]])}e.complete()}))}function gt(t){var e=t.keys,r=t.index,n=t.subscriber,i=t.subscription,s=t.obj;if(!n.closed)if(r<e.length){var o=e[r];n.next([o,s[o]]),i.add(this.schedule({keys:e,index:r+1,subscriber:n,subscription:i,obj:s}))}else n.complete()}var mt=r(2658),bt=r(176),vt=r(1260);function _t(t,e,r){return[(0,vt.p)(e,r)(new n.c((0,bt.i)(t))),(0,vt.p)((0,mt.A)(e,r))(new n.c((0,bt.i)(t)))]}var wt=r(8905);function Et(t,e,r){return void 0===t&&(t=0),new n.c((function(n){void 0===e&&(e=t,t=0);var i=0,s=t;if(r)return r.schedule(St,0,{index:i,count:e,start:t,subscriber:n});for(;;){if(i++>=e){n.complete();break}if(n.next(s++),n.closed)break}}))}function St(t){var e=t.start,r=t.index,n=t.count,i=t.subscriber;r>=n?i.complete():(i.next(e),i.closed||(t.index=r+1,t.start=e+1,this.schedule(t)))}var xt=r(8490),Mt=r(7935);function kt(t,e){return new n.c((function(r){var n,i;try{n=t()}catch(o){return void r.error(o)}try{i=e(n)}catch(o){return void r.error(o)}var s=(i?(0,Q.H)(i):Z.w).subscribe(r);return function(){s.unsubscribe(),n&&n.unsubscribe()}}))}var Ct=r(9845),It=r(9174),Rt=r(850)},1108:(t,e,r)=>{"use strict";r.d(e,{h:()=>o});var n=r(7441),i=r(242),s=r(9513),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return n.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),s.y.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),s.y.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(i.B7)},4188:(t,e,r)=>{"use strict";r.d(e,{t:()=>o});var n=r(7441),i=r(242),s=r(8173),o=function(t){function e(e){var r=t.call(this)||this;return r._value=e,r}return n.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return r&&!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new s.P;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.B7)},259:(t,e,r)=>{"use strict";r.d(e,{E:()=>a,I:()=>n});var n,i=r(7799),s=r(5721),o=r(8490);n||(n={});var a=function(){function t(t,e,r){this.kind=t,this.value=e,this.error=r,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}},t.prototype.accept=function(t,e,r){return t&&"function"===typeof t.next?this.observe(t):this.do(t,e,r)},t.prototype.toObservable=function(){switch(this.kind){case"N":return(0,s.of)(this.value);case"E":return(0,o.$)(this.error);case"C":return(0,i.I)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return"undefined"!==typeof e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},4320:(t,e,r)=>{"use strict";r.d(e,{c:()=>l});var n=r(3425),i=r(2486),s=r(2847),o=r(5390);var a=r(8502),u=r(6499),c=r(850),l=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,a=function(t,e,r){if(t){if(t instanceof i.v)return t;if(t[s.D])return t[s.D]()}return t||e||r?new i.v(t,e,r):new i.v(o.I)}(t,e,r);if(n?a.add(n.call(a,this.source)):a.add(this.source||c.$.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),c.$.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){c.$.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),(0,n.H)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=h(e))((function(e,n){var i;i=r.subscribe((function(e){try{t(e)}catch(r){n(r),i&&i.unsubscribe()}}),n,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[a.s]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:(0,u.m)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=h(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function h(t){if(t||(t=c.$.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},5390:(t,e,r)=>{"use strict";r.d(e,{I:()=>s});var n=r(850),i=r(7841),s={closed:!0,next:function(t){},error:function(t){if(n.$.useDeprecatedSynchronousErrorHandling)throw t;(0,i.T)(t)},complete:function(){}}},167:(t,e,r)=>{"use strict";r.d(e,{E:()=>i});var n=r(7441),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(r(2486).v)},403:(t,e,r)=>{"use strict";r.d(e,{m:()=>l});var n=r(7441),i=r(242),s=r(284),o=r(9513),a=r(77),u=r(8173),c=r(679),l=function(t){function e(e,r,n){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=n,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,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(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var r=this._events;r.push(e),r.length>this._bufferSize&&r.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new h(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,s=n.length;if(this.closed)throw new u.P;if(this.isStopped||this.hasError?e=o.y.EMPTY:(this.observers.push(t),e=new c.Y(this,t)),i&&t.add(t=new a.YZ(t,i)),r)for(var l=0;l<s&&!t.closed;l++)t.next(n[l]);else for(l=0;l<s&&!t.closed;l++)t.next(n[l].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||s.g).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,r=this._windowTime,n=this._events,i=n.length,s=0;s<i&&!(t-n[s].time<r);)s++;return i>e&&(s=Math.max(s,i-e)),s>0&&n.splice(0,s),n},e}(i.B7),h=function(){return function(t,e){this.time=t,this.value=e}}()},812:(t,e,r)=>{"use strict";r.d(e,{_:()=>n});var n=function(){function t(e,r){void 0===r&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},t.now=function(){return Date.now()},t}()},242:(t,e,r)=>{"use strict";r.d(e,{B7:()=>h,PJ:()=>l});var n=r(7441),i=r(4320),s=r(2486),o=r(9513),a=r(8173),u=r(679),c=r(2847),l=function(t){function e(e){var r=t.call(this,e)||this;return r.destination=e,r}return n.__extends(e,t),e}(s.v),h=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return n.__extends(e,t),e.prototype[c.D]=function(){return new l(this)},e.prototype.lift=function(t){var e=new d(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new a.P;if(!this.isStopped)for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new a.P;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new a.P;this.isStopped=!0;for(var t=this.observers,e=t.length,r=t.slice(),n=0;n<e;n++)r[n].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new a.P;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new a.P;return this.hasError?(t.error(this.thrownError),o.y.EMPTY):this.isStopped?(t.complete(),o.y.EMPTY):(this.observers.push(t),new u.Y(this,t))},e.prototype.asObservable=function(){var t=new i.c;return t.source=this,t},e.create=function(t,e){return new d(t,e)},e}(i.c),d=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return n.__extends(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):o.y.EMPTY},e}(h)},679:(t,e,r)=>{"use strict";r.d(e,{Y:()=>i});var n=r(7441),i=function(t){function e(e,r){var n=t.call(this)||this;return n.subject=e,n.subscriber=r,n.closed=!1,n}return n.__extends(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var r=e.indexOf(this.subscriber);-1!==r&&e.splice(r,1)}}},e}(r(9513).y)},2486:(t,e,r)=>{"use strict";r.d(e,{v:()=>l});var n=r(7441),i=r(6823),s=r(5390),o=r(9513),a=r(2847),u=r(850),c=r(7841),l=function(t){function e(r,n,i){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=s.I;break;case 1:if(!r){o.destination=s.I;break}if("object"===typeof r){r instanceof e?(o.syncErrorThrowable=r.syncErrorThrowable,o.destination=r,r.add(o)):(o.syncErrorThrowable=!0,o.destination=new h(o,r));break}default:o.syncErrorThrowable=!0,o.destination=new h(o,r,n,i)}return o}return n.__extends(e,t),e.prototype[a.D]=function(){return this},e.create=function(t,r,n){var i=new e(t,r,n);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(o.y),h=function(t){function e(e,r,n,o){var a,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return(0,i.T)(r)?a=r:r&&(a=r.next,n=r.error,o=r.complete,r!==s.I&&(c=Object.create(r),(0,i.T)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=n,u._complete=o,u}return n.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.$.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,r=u.$.useDeprecatedSynchronousErrorHandling;if(this._error)r&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)r?(e.syncErrorValue=t,e.syncErrorThrown=!0):(0,c.T)(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;(0,c.T)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};u.$.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(r){if(this.unsubscribe(),u.$.useDeprecatedSynchronousErrorHandling)throw r;(0,c.T)(r)}},e.prototype.__tryOrSetError=function(t,e,r){if(!u.$.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,r)}catch(n){return u.$.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=n,t.syncErrorThrown=!0,!0):((0,c.T)(n),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},9513:(t,e,r)=>{"use strict";r.d(e,{y:()=>a});var n=r(4934),i=r(1276),s=r(6823),o=r(5263),a=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var r=this,a=r._parentOrParents,c=r._ctorUnsubscribe,l=r._unsubscribe,h=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,a instanceof t)a.remove(this);else if(null!==a)for(var d=0;d<a.length;++d){a[d].remove(this)}if((0,s.T)(l)){c&&(this._unsubscribe=void 0);try{l.call(this)}catch(y){e=y instanceof o.Z?u(y.errors):[y]}}if((0,n.c)(h)){d=-1;for(var f=h.length;++d<f;){var p=h[d];if((0,i.G)(p))try{p.unsubscribe()}catch(y){e=e||[],y instanceof o.Z?e=e.concat(u(y.errors)):e.push(y)}}}if(e)throw new o.Z(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!==typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=r._parentOrParents;if(null===i)r._parentOrParents=this;else if(i instanceof t){if(i===this)return r;r._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return r;i.push(this)}var s=this._subscriptions;return null===s?this._subscriptions=[r]:s.push(r),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function u(t){return t.reduce((function(t,e){return t.concat(e instanceof o.Z?e.errors:e)}),[])}},850:(t,e,r)=>{"use strict";r.d(e,{$:()=>i});var n=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;n=t},get useDeprecatedSynchronousErrorHandling(){return n}}},8752:(t,e,r)=>{"use strict";r.d(e,{gn:()=>u,tS:()=>c,zA:()=>a});var n=r(7441),i=r(2486),s=r(4320),o=r(176),a=function(t){function e(e){var r=t.call(this)||this;return r.parent=e,r}return n.__extends(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(i.v),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(i.v);function c(t,e){if(!e.closed){if(t instanceof s.c)return t.subscribe(e);var r;try{r=(0,o.i)(t)(e)}catch(n){e.error(n)}return r}}},2241:(t,e,r)=>{"use strict";r.d(e,{G:()=>u,f:()=>c});var n=r(7441),i=r(242),s=r(4320),o=r(9513),a=r(9994),u=function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return n.__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new o.y).add(this.source.subscribe(new l(this.getSubject(),this))),t.closed&&(this._connection=null,t=o.y.EMPTY)),t},e.prototype.refCount=function(){return(0,a.B)()(this)},e}(s.c),c=function(){var t=u.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),l=function(t){function e(e,r){var n=t.call(this,e)||this;return n.connectable=r,n}return n.__extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.PJ)},7836:(t,e,r)=>{"use strict";r.d(e,{ZS:()=>h,zV:()=>l});var n=r(7441),i=r(1086),s=r(4934),o=r(167),a=r(4531),u=r(7755),c={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=void 0,n=void 0;return(0,i.m)(t[t.length-1])&&(n=t.pop()),"function"===typeof t[t.length-1]&&(r=t.pop()),1===t.length&&(0,s.c)(t[0])&&(t=t[0]),(0,u.c)(t,n).lift(new h(r))}var h=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.resultSelector))},t}(),d=function(t){function e(e,r){var n=t.call(this,e)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return n.__extends(e,t),e.prototype._next=function(t){this.values.push(c),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var r=0;r<e;r++){var n=t[r];this.add((0,a.F)(this,n,void 0,r))}}},e.prototype.notifyComplete=function(t){0===(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,r){var n=this.values,i=n[r],s=this.toRespond?i===c?--this.toRespond:this.toRespond:0;n[r]=e,0===s&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(r){return void this.destination.error(r)}this.destination.next(e)},e}(o.E)},6624:(t,e,r)=>{"use strict";r.d(e,{x:()=>s});var n=r(5721),i=r(8491);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,i.K)()(n.of.apply(void 0,t))}},1670:(t,e,r)=>{"use strict";r.d(e,{v:()=>o});var n=r(4320),i=r(7164),s=r(7799);function o(t){return new n.c((function(e){var r;try{r=t()}catch(n){return void e.error(n)}return(r?(0,i.H)(r):(0,s.I)()).subscribe(e)}))}},7799:(t,e,r)=>{"use strict";r.d(e,{I:()=>s,w:()=>i});var n=r(4320),i=new n.c((function(t){return t.complete()}));function s(t){return t?function(t){return new n.c((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},7164:(t,e,r)=>{"use strict";r.d(e,{H:()=>o});var n=r(4320),i=r(176),s=r(9174);function o(t,e){return e?(0,s.c)(t,e):t instanceof n.c?t:new n.c((0,i.i)(t))}},7755:(t,e,r)=>{"use strict";r.d(e,{c:()=>o});var n=r(4320),i=r(7221),s=r(1364);function o(t,e){return e?(0,s.V)(t,e):new n.c((0,i.v)(t))}},3354:(t,e,r)=>{"use strict";r.d(e,{h:()=>a});var n=r(4320),i=r(1086),s=r(2237),o=r(7755);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Number.POSITIVE_INFINITY,a=null,u=t[t.length-1];return(0,i.m)(u)?(a=t.pop(),t.length>1&&"number"===typeof t[t.length-1]&&(r=t.pop())):"number"===typeof u&&(r=t.pop()),null===a&&1===t.length&&t[0]instanceof n.c?t[0]:(0,s.U)(r)((0,o.c)(t,a))}},5721:(t,e,r)=>{"use strict";r.d(e,{of:()=>o});var n=r(1086),i=r(7755),s=r(1364);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return(0,n.m)(r)?(t.pop(),(0,s.V)(t,r)):(0,i.c)(t)}},8905:(t,e,r)=>{"use strict";r.d(e,{O4:()=>u});var n=r(7441),i=r(4934),s=r(7755),o=r(167),a=r(4531);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!(0,i.c)(t[0]))return t[0];t=t[0]}return(0,s.c)(t,void 0).lift(new c)}var c=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}(),l=function(t){function e(e){var r=t.call(this,e)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return n.__extends(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var r=0;r<e&&!this.hasFirst;r++){var n=t[r],i=(0,a.F)(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var i=this.subscriptions[n];i.unsubscribe(),this.remove(i)}this.subscriptions=null}this.destination.next(e)},e}(o.E)},8490:(t,e,r)=>{"use strict";r.d(e,{$:()=>i});var n=r(4320);function i(t,e){return e?new n.c((function(r){return e.schedule(s,0,{error:t,subscriber:r})})):new n.c((function(e){return e.error(t)}))}function s(t){var e=t.error;t.subscriber.error(e)}},7935:(t,e,r)=>{"use strict";r.d(e,{O:()=>a});var n=r(4320),i=r(3316),s=r(6744),o=r(1086);function a(t,e,r){void 0===t&&(t=0);var a=-1;return(0,s.k)(e)?a=Number(e)<1?1:Number(e):(0,o.m)(e)&&(r=e),(0,o.m)(r)||(r=i.b),new n.c((function(e){var n=(0,s.k)(t)?t:+t-r.now();return r.schedule(u,n,{index:0,period:a,subscriber:e})}))}function u(t){var e=t.index,r=t.period,n=t.subscriber;if(n.next(e),!n.closed){if(-1===r)return n.complete();t.index=e+1,this.schedule(t,r)}}},9845:(t,e,r)=>{"use strict";r.d(e,{ee:()=>l,yU:()=>c});var n=r(7441),i=r(7755),s=r(4934),o=r(2486),a=r(3225),u=r(8752);function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return"function"===typeof r&&t.pop(),(0,i.c)(t,void 0).lift(new l(r))}var l=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},t}(),h=function(t){function e(e,r,n){void 0===n&&(n=Object.create(null));var i=t.call(this,e)||this;return i.resultSelector=r,i.iterators=[],i.active=0,i.resultSelector="function"===typeof r?r:void 0,i}return n.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;(0,s.c)(t)?e.push(new f(t)):"function"===typeof t[a.lJ]?e.push(new d(t[a.lJ]())):e.push(new p(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var r=0;r<e;r++){var n=t[r];if(n.stillUnsubscribed)this.destination.add(n.subscribe());else this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,r=this.destination,n=0;n<e;n++){if("function"===typeof(o=t[n]).hasValue&&!o.hasValue())return}var i=!1,s=[];for(n=0;n<e;n++){var o,a=(o=t[n]).next();if(o.hasCompleted()&&(i=!0),a.done)return void r.complete();s.push(a.value)}this.resultSelector?this._tryresultSelector(s):r.next(s),i&&r.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(r){return void this.destination.error(r)}this.destination.next(e)},e}(o.v),d=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),f=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[a.lJ]=function(){return this},t.prototype.next=function(t){var e=this.index++,r=this.array;return e<this.length?{value:r[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),p=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.parent=r,i.observable=n,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return n.__extends(e,t),e.prototype[a.lJ]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return(0,u.tS)(this.observable,new u.zA(this))},e}(u.gn)},8491:(t,e,r)=>{"use strict";r.d(e,{K:()=>i});var n=r(2237);function i(){return(0,n.U)(1)}},1260:(t,e,r)=>{"use strict";r.d(e,{p:()=>s});var n=r(7441),i=r(2486);function s(t,e){return function(r){return r.lift(new o(t,e))}}var o=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.thisArg=n,i.count=0,i}return n.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(r){return void this.destination.error(r)}e&&this.destination.next(t)},e}(i.v)},266:(t,e,r)=>{"use strict";r.d(e,{$:()=>u,k:()=>d});var n=r(7441),i=r(2486),s=r(9513),o=r(4320),a=r(242);function u(t,e,r,n){return function(i){return i.lift(new c(t,e,r,n))}}var c=function(){function t(t,e,r,n){this.keySelector=t,this.elementSelector=e,this.durationSelector=r,this.subjectSelector=n}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,r,n,i,s){var o=t.call(this,e)||this;return o.keySelector=r,o.elementSelector=n,o.durationSelector=i,o.subjectSelector=s,o.groups=null,o.attemptedToUnsubscribe=!1,o.count=0,o}return n.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(r){return void this.error(r)}this._group(t,e)},e.prototype._group=function(t,e){var r=this.groups;r||(r=this.groups=new Map);var n,i=r.get(e);if(this.elementSelector)try{n=this.elementSelector(t)}catch(u){this.error(u)}else n=t;if(!i){i=this.subjectSelector?this.subjectSelector():new a.B7,r.set(e,i);var s=new d(e,i,this);if(this.destination.next(s),this.durationSelector){var o=void 0;try{o=this.durationSelector(new d(e,i))}catch(u){return void this.error(u)}this.add(o.subscribe(new h(e,i,this)))}}i.closed||i.next(n)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,r){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(i.v),h=function(t){function e(e,r,n){var i=t.call(this,r)||this;return i.key=e,i.group=r,i.parent=n,i}return n.__extends(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(i.v),d=function(t){function e(e,r,n){var i=t.call(this)||this;return i.key=e,i.groupSubject=r,i.refCountSubscription=n,i}return n.__extends(e,t),e.prototype._subscribe=function(t){var e=new s.y,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&e.add(new f(r)),e.add(n.subscribe(t)),e},e}(o.c),f=function(t){function e(e){var r=t.call(this)||this;return r.parent=e,e.count++,r}return n.__extends(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(s.y)},754:(t,e,r)=>{"use strict";r.d(e,{T:()=>s});var n=r(7441),i=r(2486);function s(t,e){return function(r){if("function"!==typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new o(t,e))}}var o=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},t}(),a=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.project=r,i.count=0,i.thisArg=n||i,i}return n.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(e)},e}(i.v)},2237:(t,e,r)=>{"use strict";r.d(e,{U:()=>s});var n=r(8148),i=r(4661);function s(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),(0,n.ZZ)(i.D,t)}},8148:(t,e,r)=>{"use strict";r.d(e,{ZZ:()=>a,qI:()=>l});var n=r(7441),i=r(754),s=r(7164),o=r(8752);function a(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"===typeof e?function(n){return n.pipe(a((function(r,n){return(0,s.H)(t(r,n)).pipe((0,i.T)((function(t,i){return e(r,t,n,i)})))}),r))}:("number"===typeof e&&(r=e),function(e){return e.lift(new u(t,r))})}var u=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.concurrent))},t}(),c=function(t){function e(e,r,n){void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=r,i.concurrent=n,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return n.__extends(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(n){return void this.destination.error(n)}this.active++,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new o.zA(this),r=this.destination;r.add(e);var n=(0,o.tS)(t,e);n!==e&&r.add(n)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.gn),l=a},77:(t,e,r)=>{"use strict";r.d(e,{QE:()=>o,YZ:()=>u});var n=r(7441),i=r(2486),s=r(259);function o(t,e){return void 0===e&&(e=0),function(r){return r.lift(new a(t,e))}}var a=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}(),u=function(t){function e(e,r,n){void 0===n&&(n=0);var i=t.call(this,e)||this;return i.scheduler=r,i.delay=n,i}return n.__extends(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(s.E.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(s.E.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(s.E.createComplete()),this.unsubscribe()},e}(i.v),c=function(){return function(t,e){this.notification=t,this.destination=e}}()},9994:(t,e,r)=>{"use strict";r.d(e,{B:()=>s});var n=r(7441),i=r(2486);function s(){return function(t){return t.lift(new o(t))}}var o=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var r=this.connectable;r._refCount++;var n=new a(t,r),i=e.subscribe(n);return n.closed||(n.connection=r.connect()),i},t}(),a=function(t){function e(e,r){var n=t.call(this,e)||this;return n.connectable=r,n}return n.__extends(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},e}(i.v)},1364:(t,e,r)=>{"use strict";r.d(e,{V:()=>s});var n=r(4320),i=r(9513);function s(t,e){return new n.c((function(r){var n=new i.y,s=0;return n.add(e.schedule((function(){s!==t.length?(r.next(t[s++]),r.closed||n.add(this.schedule())):r.complete()}))),n}))}},9174:(t,e,r)=>{"use strict";r.d(e,{c:()=>l});var n=r(4320),i=r(9513),s=r(8502);var o=r(1364),a=r(3225);var u=r(4498),c=r(4945);function l(t,e){if(null!=t){if(function(t){return t&&"function"===typeof t[s.s]}(t))return function(t,e){return new n.c((function(r){var n=new i.y;return n.add(e.schedule((function(){var i=t[s.s]();n.add(i.subscribe({next:function(t){n.add(e.schedule((function(){return r.next(t)})))},error:function(t){n.add(e.schedule((function(){return r.error(t)})))},complete:function(){n.add(e.schedule((function(){return r.complete()})))}}))}))),n}))}(t,e);if((0,u.y)(t))return function(t,e){return new n.c((function(r){var n=new i.y;return n.add(e.schedule((function(){return t.then((function(t){n.add(e.schedule((function(){r.next(t),n.add(e.schedule((function(){return r.complete()})))})))}),(function(t){n.add(e.schedule((function(){return r.error(t)})))}))}))),n}))}(t,e);if((0,c.X)(t))return(0,o.V)(t,e);if(function(t){return t&&"function"===typeof t[a.lJ]}(t)||"string"===typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new n.c((function(r){var n,s=new i.y;return s.add((function(){n&&"function"===typeof n.return&&n.return()})),s.add(e.schedule((function(){n=t[a.lJ](),s.add(e.schedule((function(){if(!r.closed){var t,e;try{var i=n.next();t=i.value,e=i.done}catch(s){return void r.error(s)}e?r.complete():(r.next(t),this.schedule())}})))}))),s}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},7421:(t,e,r)=>{"use strict";r.d(e,{R:()=>i});var n=r(7441),i=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return n.__extends(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(i){r=!0,n=!!i&&i||new Error(i)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,r){return t.call(this)||this}return n.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(r(9513).y))},1299:(t,e,r)=>{"use strict";r.d(e,{q:()=>s});var n=r(7441),i=r(812),s=function(t){function e(r,n){void 0===n&&(n=i._.now);var s=t.call(this,r,(function(){return e.delegate&&e.delegate!==s?e.delegate.now():n()}))||this;return s.actions=[],s.active=!1,s.scheduled=void 0,s}return n.__extends(e,t),e.prototype.schedule=function(r,n,i){return void 0===n&&(n=0),e.delegate&&e.delegate!==this?e.delegate.schedule(r,n,i):t.prototype.schedule.call(this,r,n,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(i._)},5786:(t,e,r)=>{"use strict";r.d(e,{I:()=>d,$:()=>h});var n=r(7441),i=1,s=function(){return Promise.resolve()}(),o={};function a(t){return t in o&&(delete o[t],!0)}var u=function(t){var e=i++;return o[e]=!0,s.then((function(){return a(e)&&t()})),e},c=function(t){a(t)},l=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return n.__extends(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=u(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(c(r),e.scheduled=void 0)},e}(r(7421).R),h=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,i=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<i&&(t=r.shift()));if(this.active=!1,e){for(;++n<i&&(t=r.shift());)t.unsubscribe();throw e}},e}(r(1299).q))(l),d=h},3316:(t,e,r)=>{"use strict";r.d(e,{E:()=>i,b:()=>s});var n=r(7421),i=new(r(1299).q)(n.R),s=i},284:(t,e,r)=>{"use strict";r.d(e,{g:()=>o,T:()=>s});var n=r(7441),i=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return n.__extends(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):e.flush(this)},e}(r(7421).R),s=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r(1299).q))(i),o=s},3225:(t,e,r)=>{"use strict";function n(){return"function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}r.d(e,{lJ:()=>i});var i=n()},8502:(t,e,r)=>{"use strict";r.d(e,{s:()=>n});var n=function(){return"function"===typeof Symbol&&Symbol.observable||"@@observable"}()},2847:(t,e,r)=>{"use strict";r.d(e,{D:()=>n});var n=function(){return"function"===typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},6494:(t,e,r)=>{"use strict";r.d(e,{k:()=>n});var n=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},8054:(t,e,r)=>{"use strict";r.d(e,{G:()=>n});var n=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}()},8173:(t,e,r)=>{"use strict";r.d(e,{P:()=>n});var n=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},312:(t,e,r)=>{"use strict";r.d(e,{M:()=>n});var n=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},5263:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});var n=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},3425:(t,e,r)=>{"use strict";r.d(e,{H:()=>i});var n=r(2486);function i(t){for(;t;){var e=t,r=e.closed,i=e.destination,s=e.isStopped;if(r||s)return!1;t=i&&i instanceof n.v?i:null}return!0}},7841:(t,e,r)=>{"use strict";function n(t){setTimeout((function(){throw t}),0)}r.d(e,{T:()=>n})},4661:(t,e,r)=>{"use strict";function n(t){return t}r.d(e,{D:()=>n})},4934:(t,e,r)=>{"use strict";r.d(e,{c:()=>n});var n=function(){return Array.isArray||function(t){return t&&"number"===typeof t.length}}()},4945:(t,e,r)=>{"use strict";r.d(e,{X:()=>n});var n=function(t){return t&&"number"===typeof t.length&&"function"!==typeof t}},6823:(t,e,r)=>{"use strict";function n(t){return"function"===typeof t}r.d(e,{T:()=>n})},6744:(t,e,r)=>{"use strict";r.d(e,{k:()=>i});var n=r(4934);function i(t){return!(0,n.c)(t)&&t-parseFloat(t)+1>=0}},1276:(t,e,r)=>{"use strict";function n(t){return null!==t&&"object"===typeof t}r.d(e,{G:()=>n})},4498:(t,e,r)=>{"use strict";function n(t){return!!t&&"function"!==typeof t.subscribe&&"function"===typeof t.then}r.d(e,{y:()=>n})},1086:(t,e,r)=>{"use strict";function n(t){return t&&"function"===typeof t.schedule}r.d(e,{m:()=>n})},7855:(t,e,r)=>{"use strict";function n(){}r.d(e,{l:()=>n})},2658:(t,e,r)=>{"use strict";function n(t,e){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=t,r.thisArg=e,r}r.d(e,{A:()=>n})},6499:(t,e,r)=>{"use strict";r.d(e,{F:()=>i,m:()=>s});var n=r(4661);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return s(t)}function s(t){return 0===t.length?n.D:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}},176:(t,e,r)=>{"use strict";r.d(e,{i:()=>l});var n=r(7221),i=r(7841),s=r(3225),o=r(8502),a=r(4945),u=r(4498),c=r(1276),l=function(t){if(t&&"function"===typeof t[o.s])return l=t,function(t){var e=l[o.s]();if("function"!==typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if((0,a.X)(t))return(0,n.v)(t);if((0,u.y)(t))return r=t,function(t){return r.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,i.T),t};if(t&&"function"===typeof t[s.lJ])return e=t,function(t){for(var r=e[s.lJ]();;){var n=void 0;try{n=r.next()}catch(i){return t.error(i),t}if(n.done){t.complete();break}if(t.next(n.value),t.closed)break}return"function"===typeof r.return&&t.add((function(){r.return&&r.return()})),t};var e,r,l,h=(0,c.G)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+h+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},7221:(t,e,r)=>{"use strict";r.d(e,{v:()=>n});var n=function(t){return function(e){for(var r=0,n=t.length;r<n&&!e.closed;r++)e.next(t[r]);e.complete()}}},4531:(t,e,r)=>{"use strict";r.d(e,{F:()=>a});var n=r(7441),i=function(t){function e(e,r,n){var i=t.call(this)||this;return i.parent=e,i.outerValue=r,i.outerIndex=n,i.index=0,i}return n.__extends(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(r(2486).v),s=r(176),o=r(4320);function a(t,e,r,n,a){if(void 0===a&&(a=new i(t,r,n)),!a.closed)return e instanceof o.c?e.subscribe(a):(0,s.i)(e)(a)}},1430:(t,e,r)=>{"use strict";r.r(e),r.d(e,{audit:()=>s,auditTime:()=>l,buffer:()=>h,bufferCount:()=>y,bufferTime:()=>_,bufferToggle:()=>A,bufferWhen:()=>T,catchError:()=>P,combineAll:()=>$,combineLatest:()=>H,concat:()=>W,concatAll:()=>q.K,concatMap:()=>G,concatMapTo:()=>Z,count:()=>Y,debounce:()=>X,debounceTime:()=>rt,defaultIfEmpty:()=>ot,delay:()=>ht,delayWhen:()=>gt,dematerialize:()=>wt,distinct:()=>xt,distinctUntilChanged:()=>Ct,distinctUntilKeyChanged:()=>At,elementAt:()=>zt,endWith:()=>Vt,every:()=>Wt,exhaust:()=>Gt,exhaustMap:()=>Kt,expand:()=>ee,filter:()=>Ot.p,finalize:()=>ie,find:()=>ae,findIndex:()=>le,first:()=>de,flatMap:()=>J.qI,groupBy:()=>fe.$,ignoreElements:()=>pe,isEmpty:()=>me,last:()=>Se,map:()=>Qt.T,mapTo:()=>xe,materialize:()=>Ce,max:()=>Le,merge:()=>De,mergeAll:()=>Be.U,mergeMap:()=>J.ZZ,mergeMapTo:()=>Fe,mergeScan:()=>$e,min:()=>He,multicast:()=>We,observeOn:()=>Je.QE,onErrorResumeNext:()=>Ge,pairwise:()=>Qe,partition:()=>er,pluck:()=>rr,publish:()=>ir,publishBehavior:()=>or,publishLast:()=>ur,publishReplay:()=>lr,race:()=>dr,reduce:()=>je,refCount:()=>Mr.B,repeat:()=>fr,repeatWhen:()=>gr,retry:()=>vr,retryWhen:()=>Er,sample:()=>kr,sampleTime:()=>Rr,scan:()=>Ae,sequenceEqual:()=>Tr,share:()=>Br,shareReplay:()=>Fr,single:()=>$r,skip:()=>Hr,skipLast:()=>qr,skipUntil:()=>Zr,skipWhile:()=>Kr,startWith:()=>en,subscribeOn:()=>on,switchAll:()=>hn,switchMap:()=>un,switchMapTo:()=>dn,take:()=>Ft,takeLast:()=>_e,takeUntil:()=>fn,takeWhile:()=>gn,tap:()=>wn,throttle:()=>Mn,throttleTime:()=>In,throwIfEmpty:()=>jt,timeInterval:()=>Tn,timeout:()=>$n,timeoutWith:()=>Pn,timestamp:()=>Un,toArray:()=>Vn,window:()=>Wn,windowCount:()=>Gn,windowTime:()=>Qn,windowToggle:()=>ii,windowWhen:()=>ai,withLatestFrom:()=>li,zip:()=>pi,zipAll:()=>yi});var n=r(7441),i=r(8752);function s(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,r){var n=t.call(this,e)||this;return n.durationSelector=r,n.hasValue=!1,n}return n.__extends(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(n){return this.destination.error(n)}var r=(0,i.tS)(e,new i.zA(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},e.prototype.clearThrottle=function(){var t=this,e=t.value,r=t.hasValue,n=t.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),r&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.gn),u=r(3316),c=r(7935);function l(t,e){return void 0===e&&(e=u.b),s((function(){return(0,c.O)(t,e)}))}function h(t){return function(e){return e.lift(new d(t))}}var d=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.closingNotifier))},t}(),f=function(t){function e(e,r){var n=t.call(this,e)||this;return n.buffer=[],n.add((0,i.tS)(r,new i.zA(n))),n}return n.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(i.gn),p=r(2486);function y(t,e){return void 0===e&&(e=null),function(r){return r.lift(new g(t,e))}}var g=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?b:m}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),m=function(t){function e(e,r){var n=t.call(this,e)||this;return n.bufferSize=r,n.buffer=[],n}return n.__extends(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(p.v),b=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.bufferSize=r,i.startBufferEvery=n,i.buffers=[],i.count=0,i}return n.__extends(e,t),e.prototype._next=function(t){var e=this,r=e.bufferSize,n=e.startBufferEvery,i=e.buffers,s=e.count;this.count++,s%n===0&&i.push([]);for(var o=i.length;o--;){var a=i[o];a.push(t),a.length===r&&(i.splice(o,1),this.destination.next(a))}},e.prototype._complete=function(){for(var e=this.buffers,r=this.destination;e.length>0;){var n=e.shift();n.length>0&&r.next(n)}t.prototype._complete.call(this)},e}(p.v),v=r(1086);function _(t){var e=arguments.length,r=u.b;(0,v.m)(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],e--);var n=null;e>=2&&(n=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new w(t,n,i,r))}}var w=function(){function t(t,e,r,n){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=r,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new S(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),E=function(){return function(){this.buffer=[]}}(),S=function(t){function e(e,r,n,i,s){var o=t.call(this,e)||this;o.bufferTimeSpan=r,o.bufferCreationInterval=n,o.maxBufferSize=i,o.scheduler=s,o.contexts=[];var a=o.openContext();if(o.timespanOnly=null==n||n<0,o.timespanOnly){var u={subscriber:o,context:a,bufferTimeSpan:r};o.add(a.closeAction=s.schedule(x,r,u))}else{var c={subscriber:o,context:a},l={bufferTimeSpan:r,bufferCreationInterval:n,subscriber:o,scheduler:s};o.add(a.closeAction=s.schedule(k,r,c)),o.add(s.schedule(M,n,l))}return o}return n.__extends(e,t),e.prototype._next=function(t){for(var e,r=this.contexts,n=r.length,i=0;i<n;i++){var s=r[i],o=s.buffer;o.push(t),o.length==this.maxBufferSize&&(e=s)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,r=this.destination;e.length>0;){var n=e.shift();r.next(n.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:t,bufferTimeSpan:r};this.add(t.closeAction=this.scheduler.schedule(x,r,n))}},e.prototype.openContext=function(){var t=new E;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(p.v);function x(t){var e=t.subscriber,r=t.context;r&&e.closeContext(r),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function M(t){var e=t.bufferCreationInterval,r=t.bufferTimeSpan,n=t.subscriber,i=t.scheduler,s=n.openContext();n.closed||(n.add(s.closeAction=i.schedule(k,r,{subscriber:n,context:s})),this.schedule(t,e))}function k(t){var e=t.subscriber,r=t.context;e.closeContext(r)}var C=r(9513),I=r(4531),R=r(167);function A(t,e){return function(r){return r.lift(new N(t,e))}}var N=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new O(t,this.openings,this.closingSelector))},t}(),O=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.closingSelector=n,i.contexts=[],i.add((0,I.F)(i,r)),i}return n.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,r=e.length,n=0;n<r;n++)e[n].buffer.push(t)},e.prototype._error=function(e){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var r=e.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(r){this._error(r)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var r=t.buffer,n=t.subscription;this.destination.next(r),e.splice(e.indexOf(t),1),this.remove(n),n.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,r=new C.y,n={buffer:[],subscription:r};e.push(n);var i=(0,I.F)(this,t,n);!i||i.closed?this.closeBuffer(n):(i.context=n,this.add(i),r.add(i))},e}(R.E);function T(t){return function(e){return e.lift(new j(t))}}var j=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new L(t,this.closingSelector))},t}(),L=function(t){function e(e,r){var n=t.call(this,e)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return n.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(n){return this.error(n)}t=new C.y,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add((0,i.tS)(e,new i.zA(this))),this.subscribing=!1},e}(i.gn);function P(t){return function(e){var r=new D(t),n=e.lift(r);return r.caught=n}}var D=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new B(t,this.selector,this.caught))},t}(),B=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.selector=r,i.caught=n,i}return n.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=void 0;try{r=this.selector(e,this.caught)}catch(o){return void t.prototype.error.call(this,o)}this._unsubscribeAndRecycle();var n=new i.zA(this);this.add(n);var s=(0,i.tS)(r,n);s!==n&&this.add(s)}},e}(i.gn),F=r(7836);function $(t){return function(e){return e.lift(new F.ZS(t))}}var U=r(4934),z=r(7164);function H(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=null;return"function"===typeof t[t.length-1]&&(r=t.pop()),1===t.length&&(0,U.c)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call((0,z.H)([e].concat(t)),new F.ZS(r))}}var V=r(6624);function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(V.x.apply(void 0,[e].concat(t)))}}var q=r(8491),J=r(8148);function G(t,e){return(0,J.ZZ)(t,e,1)}function Z(t,e){return G((function(){return t}),e)}function Y(t){return function(e){return e.lift(new Q(t,e))}}var Q=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new K(t,this.predicate,this.source))},t}(),K=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.source=n,i.count=0,i.index=0,i}return n.__extends(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(r){return void this.destination.error(r)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(p.v);function X(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,r){var n=t.call(this,e)||this;return n.durationSelector=r,n.hasValue=!1,n}return n.__extends(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(r){this.destination.error(r)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var r=this.durationSubscription;this.value=t,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=(0,i.tS)(e,new i.zA(this)))&&!r.closed&&this.add(this.durationSubscription=r)},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,r=this.durationSubscription;r&&(this.durationSubscription=void 0,r.unsubscribe(),this.remove(r)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(i.gn);function rt(t,e){return void 0===e&&(e=u.b),function(r){return r.lift(new nt(t,e))}}var nt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.dueTime,this.scheduler))},t}(),it=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.dueTime=r,i.scheduler=n,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return n.__extends(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(st,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(p.v);function st(t){t.debouncedNext()}function ot(t){return void 0===t&&(t=null),function(e){return e.lift(new at(t))}}var at=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new ut(t,this.defaultValue))},t}(),ut=function(t){function e(e,r){var n=t.call(this,e)||this;return n.defaultValue=r,n.isEmpty=!0,n}return n.__extends(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(p.v);function ct(t){return t instanceof Date&&!isNaN(+t)}var lt=r(259);function ht(t,e){void 0===e&&(e=u.b);var r=ct(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new dt(r,e))}}var dt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ft(t,this.delay,this.scheduler))},t}(),ft=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.delay=r,i.scheduler=n,i.queue=[],i.active=!1,i.errored=!1,i}return n.__extends(e,t),e.dispatch=function(t){for(var e=t.source,r=e.queue,n=t.scheduler,i=t.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var s=Math.max(0,r[0].time-n.now());this.schedule(t,s)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,r=new pt(e.now()+this.delay,t);this.queue.push(r),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(lt.E.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(lt.E.createComplete()),this.unsubscribe()},e}(p.v),pt=function(){return function(t,e){this.time=t,this.notification=e}}(),yt=r(4320);function gt(t,e){return e?function(r){return new vt(r,e).lift(new mt(t))}:function(e){return e.lift(new mt(t))}}var mt=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new bt(t,this.delayDurationSelector))},t}(),bt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return n.__extends(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var r=this.delayDurationSelector(t,e);r&&this.tryDelay(r,t)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var r=(0,I.F)(this,t,e);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(R.E),vt=function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subscriptionDelay=r,n}return n.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new _t(t,this.source))},e}(yt.c),_t=function(t){function e(e,r){var n=t.call(this)||this;return n.parent=e,n.source=r,n.sourceSubscribed=!1,n}return n.__extends(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(p.v);function wt(){return function(t){return t.lift(new Et)}}var Et=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new St(t))},t}(),St=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(p.v);function xt(t,e){return function(r){return r.lift(new Mt(t,e))}}var Mt=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new kt(t,this.keySelector,this.flushes))},t}(),kt=function(t){function e(e,r,n){var s=t.call(this,e)||this;return s.keySelector=r,s.values=new Set,n&&s.add((0,i.tS)(n,new i.zA(s))),s}return n.__extends(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,r=this.destination;try{e=this.keySelector(t)}catch(n){return void r.error(n)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var r=this.values;r.has(t)||(r.add(t),this.destination.next(e))},e}(i.gn);function Ct(t,e){return function(r){return r.lift(new It(t,e))}}var It=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Rt(t,this.compare,this.keySelector))},t}(),Rt=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.keySelector=n,i.hasKey=!1,"function"===typeof r&&(i.compare=r),i}return n.__extends(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var r=this.keySelector;e=r?r(t):t}catch(i){return this.destination.error(i)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,e)}catch(i){return this.destination.error(i)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))},e}(p.v);function At(t,e){return Ct((function(r,n){return e?e(r[t],n[t]):r[t]===n[t]}))}var Nt=r(6494),Ot=r(1260),Tt=r(8054);function jt(t){return void 0===t&&(t=Dt),function(e){return e.lift(new Lt(t))}}var Lt=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Pt(t,this.errorFactory))},t}(),Pt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.errorFactory=r,n.hasValue=!1,n}return n.__extends(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(p.v);function Dt(){return new Tt.G}var Bt=r(7799);function Ft(t){return function(e){return 0===t?(0,Bt.I)():e.lift(new $t(t))}}var $t=function(){function t(t){if(this.total=t,this.total<0)throw new Nt.k}return t.prototype.call=function(t,e){return e.subscribe(new Ut(t,this.total))},t}(),Ut=function(t){function e(e,r){var n=t.call(this,e)||this;return n.total=r,n.count=0,n}return n.__extends(e,t),e.prototype._next=function(t){var e=this.total,r=++this.count;r<=e&&(this.destination.next(t),r===e&&(this.destination.complete(),this.unsubscribe()))},e}(p.v);function zt(t,e){if(t<0)throw new Nt.k;var r=arguments.length>=2;return function(n){return n.pipe((0,Ot.p)((function(e,r){return r===t})),Ft(1),r?ot(e):jt((function(){return new Nt.k})))}}var Ht=r(5721);function Vt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return(0,V.x)(e,Ht.of.apply(void 0,t))}}function Wt(t,e){return function(r){return r.lift(new qt(t,e,r))}}var qt=function(){function t(t,e,r){this.predicate=t,this.thisArg=e,this.source=r}return t.prototype.call=function(t,e){return e.subscribe(new Jt(t,this.predicate,this.thisArg,this.source))},t}(),Jt=function(t){function e(e,r,n,i){var s=t.call(this,e)||this;return s.predicate=r,s.thisArg=n,s.source=i,s.index=0,s.thisArg=n||s,s}return n.__extends(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(r){return void this.destination.error(r)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.v);function Gt(){return function(t){return t.lift(new Zt)}}var Zt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Yt(t))},t}(),Yt=function(t){function e(e){var r=t.call(this,e)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return n.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add((0,i.tS)(t,new i.zA(this))))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.gn),Qt=r(754);function Kt(t,e){return e?function(r){return r.pipe(Kt((function(r,n){return(0,z.H)(t(r,n)).pipe((0,Qt.T)((function(t,i){return e(r,t,n,i)})))})))}:function(e){return e.lift(new Xt(t))}}var Xt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,r){var n=t.call(this,e)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return n.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(n){return void this.destination.error(n)}this.hasSubscription=!0,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new i.zA(this),r=this.destination;r.add(e);var n=(0,i.tS)(t,e);n!==e&&r.add(n)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.gn);function ee(t,e,r){return void 0===e&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(n){return n.lift(new re(t,e,r))}}var re=function(){function t(t,e,r){this.project=t,this.concurrent=e,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new ne(t,this.project,this.concurrent,this.scheduler))},t}(),ne=function(t){function e(e,r,n,i){var s=t.call(this,e)||this;return s.project=r,s.concurrent=n,s.scheduler=i,s.index=0,s.active=0,s.hasCompleted=!1,n<Number.POSITIVE_INFINITY&&(s.buffer=[]),s}return n.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,r=t.result,n=t.value,i=t.index;e.subscribeToProjection(r,n,i)},e.prototype._next=function(t){var r=this.destination;if(r.closed)this._complete();else{var n=this.index++;if(this.active<this.concurrent){r.next(t);try{var i=(0,this.project)(t,n);if(this.scheduler){var s={subscriber:this,result:i,value:t,index:n};this.destination.add(this.scheduler.schedule(e.dispatch,0,s))}else this.subscribeToProjection(i,t,n)}catch(o){r.error(o)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,r){this.active++,this.destination.add((0,i.tS)(t,new i.zA(this)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this._next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.gn);function ie(t){return function(e){return e.lift(new se(t))}}var se=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new oe(t,this.callback))},t}(),oe=function(t){function e(e,r){var n=t.call(this,e)||this;return n.add(new C.y(r)),n}return n.__extends(e,t),e}(p.v);function ae(t,e){if("function"!==typeof t)throw new TypeError("predicate is not a function");return function(r){return r.lift(new ue(t,r,!1,e))}}var ue=function(){function t(t,e,r,n){this.predicate=t,this.source=e,this.yieldIndex=r,this.thisArg=n}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,r,n,i,s){var o=t.call(this,e)||this;return o.predicate=r,o.source=n,o.yieldIndex=i,o.thisArg=s,o.index=0,o}return n.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,r=this.thisArg,n=this.index++;try{e.call(r||this,t,n,this.source)&&this.notifyComplete(this.yieldIndex?n:t)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(p.v);function le(t,e){return function(r){return r.lift(new ue(t,r,!0,e))}}var he=r(4661);function de(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?(0,Ot.p)((function(e,r){return t(e,r,n)})):he.D,Ft(1),r?ot(e):jt((function(){return new Tt.G})))}}var fe=r(266);function pe(){return function(t){return t.lift(new ye)}}var ye=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ge(t))},t}(),ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._next=function(t){},e}(p.v);function me(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.v);function _e(t){return function(e){return 0===t?(0,Bt.I)():e.lift(new we(t))}}var we=function(){function t(t){if(this.total=t,this.total<0)throw new Nt.k}return t.prototype.call=function(t,e){return e.subscribe(new Ee(t,this.total))},t}(),Ee=function(t){function e(e,r){var n=t.call(this,e)||this;return n.total=r,n.ring=new Array,n.count=0,n}return n.__extends(e,t),e.prototype._next=function(t){var e=this.ring,r=this.total,n=this.count++;e.length<r?e.push(t):e[n%r]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,i=0;i<r;i++){var s=e++%r;t.next(n[s])}t.complete()},e}(p.v);function Se(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?(0,Ot.p)((function(e,r){return t(e,r,n)})):he.D,_e(1),r?ot(e):jt((function(){return new Tt.G})))}}function xe(t){return function(e){return e.lift(new Me(t))}}var Me=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new ke(t,this.value))},t}(),ke=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return n.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(p.v);function Ce(){return function(t){return t.lift(new Ie)}}var Ie=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Re(t))},t}(),Re=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.prototype._next=function(t){this.destination.next(lt.E.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(lt.E.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(lt.E.createComplete()),t.complete()},e}(p.v);function Ae(t,e){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new Ne(t,e,r))}}var Ne=function(){function t(t,e,r){void 0===r&&(r=!1),this.accumulator=t,this.seed=e,this.hasSeed=r}return t.prototype.call=function(t,e){return e.subscribe(new Oe(t,this.accumulator,this.seed,this.hasSeed))},t}(),Oe=function(t){function e(e,r,n,i){var s=t.call(this,e)||this;return s.accumulator=r,s._seed=n,s.hasSeed=i,s.index=0,s}return n.__extends(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.accumulator(this.seed,t,r)}catch(n){this.destination.error(n)}this.seed=e,this.destination.next(e)},e}(p.v),Te=r(6499);function je(t,e){return arguments.length>=2?function(r){return(0,Te.F)(Ae(t,e),_e(1),ot(e))(r)}:function(e){return(0,Te.F)(Ae((function(e,r,n){return t(e,r,n+1)})),_e(1))(e)}}function Le(t){return je("function"===typeof t?function(e,r){return t(e,r)>0?e:r}:function(t,e){return t>e?t:e})}var Pe=r(3354);function De(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Pe.h.apply(void 0,[e].concat(t)))}}var Be=r(2237);function Fe(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"===typeof e?(0,J.ZZ)((function(){return t}),e,r):("number"===typeof e&&(r=e),(0,J.ZZ)((function(){return t}),r))}function $e(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),function(n){return n.lift(new Ue(t,e,r))}}var Ue=function(){function t(t,e,r){this.accumulator=t,this.seed=e,this.concurrent=r}return t.prototype.call=function(t,e){return e.subscribe(new ze(t,this.accumulator,this.seed,this.concurrent))},t}(),ze=function(t){function e(e,r,n,i){var s=t.call(this,e)||this;return s.accumulator=r,s.acc=n,s.concurrent=i,s.hasValue=!1,s.hasCompleted=!1,s.buffer=[],s.active=0,s.index=0,s}return n.__extends(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,t,e)}catch(i){return r.error(i)}this.active++,this._innerSub(n)}else this.buffer.push(t)},e.prototype._innerSub=function(t){var e=new i.zA(this),r=this.destination;r.add(e);var n=(0,i.tS)(t,e);n!==e&&r.add(n)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.gn);function He(t){return je("function"===typeof t?function(e,r){return t(e,r)<0?e:r}:function(t,e){return t<e?t:e})}var Ve=r(2241);function We(t,e){return function(r){var n;if(n="function"===typeof t?t:function(){return t},"function"===typeof e)return r.lift(new qe(n,e));var i=Object.create(r,Ve.f);return i.source=r,i.subjectFactory=n,i}}var qe=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var r=this.selector,n=this.subjectFactory(),i=r(n).subscribe(t);return i.add(e.subscribe(n)),i},t}(),Je=r(77);function Ge(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&(0,U.c)(t[0])&&(t=t[0]),function(e){return e.lift(new Ze(t))}}var Ze=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new Ye(t,this.nextSources))},t}(),Ye=function(t){function e(e,r){var n=t.call(this,e)||this;return n.destination=e,n.nextSources=r,n}return n.__extends(e,t),e.prototype.notifyError=function(){this.subscribeToNextSource()},e.prototype.notifyComplete=function(){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new i.zA(this),r=this.destination;r.add(e);var n=(0,i.tS)(t,e);n!==e&&r.add(n)}else this.destination.complete()},e}(i.gn);function Qe(){return function(t){return t.lift(new Ke)}}var Ke=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Xe(t))},t}(),Xe=function(t){function e(e){var r=t.call(this,e)||this;return r.hasPrev=!1,r}return n.__extends(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},e}(p.v),tr=r(2658);function er(t,e){return function(r){return[(0,Ot.p)(t,e)(r),(0,Ot.p)((0,tr.A)(t,e))(r)]}}function rr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.length;if(0===r)throw new Error("list of properties cannot be empty.");return function(e){return(0,Qt.T)(function(t,e){var r=function(r){for(var n=r,i=0;i<e;i++){var s=null!=n?n[t[i]]:void 0;if(void 0===s)return;n=s}return n};return r}(t,r))(e)}}var nr=r(242);function ir(t){return t?We((function(){return new nr.B7}),t):We(new nr.B7)}var sr=r(4188);function or(t){return function(e){return We(new sr.t(t))(e)}}var ar=r(1108);function ur(){return function(t){return We(new ar.h)(t)}}var cr=r(403);function lr(t,e,r,n){r&&"function"!==typeof r&&(n=r);var i="function"===typeof r?r:void 0,s=new cr.m(t,e,n);return function(t){return We((function(){return s}),i)(t)}}var hr=r(8905);function dr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&(0,U.c)(t[0])&&(t=t[0]),e.lift.call(hr.O4.apply(void 0,[e].concat(t)))}}function fr(t){return void 0===t&&(t=-1),function(e){return 0===t?(0,Bt.I)():t<0?e.lift(new pr(-1,e)):e.lift(new pr(t-1,e))}}var pr=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new yr(t,this.count,this.source))},t}(),yr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.count=r,i.source=n,i}return n.__extends(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,r=this.count;if(0===r)return t.prototype.complete.call(this);r>-1&&(this.count=r-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(p.v);function gr(t){return function(e){return e.lift(new mr(t))}}var mr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new br(t,this.notifier,e))},t}(),br=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.notifier=r,i.source=n,i.sourceIsBeingSubscribedTo=!0,i}return n.__extends(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new nr.B7;try{e=(0,this.notifier)(this.notifications)}catch(r){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=(0,i.tS)(e,new i.zA(this))},e}(i.gn);function vr(t){return void 0===t&&(t=-1),function(e){return e.lift(new _r(t,e))}}var _r=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new wr(t,this.count,this.source))},t}(),wr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.count=r,i.source=n,i}return n.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return t.prototype.error.call(this,e);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},e}(p.v);function Er(t){return function(e){return e.lift(new Sr(t,e))}}var Sr=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new xr(t,this.notifier,this.source))},t}(),xr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.notifier=r,i.source=n,i}return n.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=this.errors,n=this.retries,s=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new nr.B7;try{n=(0,this.notifier)(r)}catch(o){return t.prototype.error.call(this,o)}s=(0,i.tS)(n,new i.zA(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=s,r.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(i.gn),Mr=r(9994);function kr(t){return function(e){return e.lift(new Cr(t))}}var Cr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var r=new Ir(t),n=e.subscribe(r);return n.add((0,i.tS)(this.notifier,new i.zA(r))),n},t}(),Ir=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return n.__extends(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.gn);function Rr(t,e){return void 0===e&&(e=u.b),function(r){return r.lift(new Ar(t,e))}}var Ar=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Nr(t,this.period,this.scheduler))},t}(),Nr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.period=r,i.scheduler=n,i.hasValue=!1,i.add(n.schedule(Or,r,{subscriber:i,period:r})),i}return n.__extends(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(p.v);function Or(t){var e=t.subscriber,r=t.period;e.notifyNext(),this.schedule(t,r)}function Tr(t,e){return function(r){return r.lift(new jr(t,e))}}var jr=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Lr(t,this.compareTo,this.comparator))},t}(),Lr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.compareTo=r,i.comparator=n,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(r.subscribe(new Pr(e,i))),i}return n.__extends(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this,e=t._a,r=t._b,n=t.comparator;e.length>0&&r.length>0;){var i=e.shift(),s=r.shift(),o=!1;try{o=n?n(i,s):i===s}catch(a){this.destination.error(a)}o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(p.v),Pr=function(t){function e(e,r){var n=t.call(this,e)||this;return n.parent=r,n}return n.__extends(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(p.v);function Dr(){return new nr.B7}function Br(){return function(t){return(0,Mr.B)()(We(Dr)(t))}}function Fr(t,e,r){var n;return n=t&&"object"===typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:r},function(t){return t.lift(function(t){var e,r,n=t.bufferSize,i=void 0===n?Number.POSITIVE_INFINITY:n,s=t.windowTime,o=void 0===s?Number.POSITIVE_INFINITY:s,a=t.refCount,u=t.scheduler,c=0,l=!1,h=!1;return function(t){var n;c++,!e||l?(l=!1,e=new cr.m(i,o,u),n=e.subscribe(this),r=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){h=!0,r=void 0,e.complete()}}),h&&(r=void 0)):n=e.subscribe(this),this.add((function(){c--,n.unsubscribe(),n=void 0,r&&!h&&a&&0===c&&(r.unsubscribe(),r=void 0,e=void 0)}))}}(n))}}function $r(t){return function(e){return e.lift(new Ur(t,e))}}var Ur=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new zr(t,this.predicate,this.source))},t}(),zr=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.source=n,i.seenValue=!1,i.index=0,i}return n.__extends(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(r){this.destination.error(r)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Tt.G)},e}(p.v);function Hr(t){return function(e){return e.lift(new Vr(t))}}var Vr=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Wr(t,this.total))},t}(),Wr=function(t){function e(e,r){var n=t.call(this,e)||this;return n.total=r,n.count=0,n}return n.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(p.v);function qr(t){return function(e){return e.lift(new Jr(t))}}var Jr=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Nt.k}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.v(t)):e.subscribe(new Gr(t,this._skipCount))},t}(),Gr=function(t){function e(e,r){var n=t.call(this,e)||this;return n._skipCount=r,n._count=0,n._ring=new Array(r),n}return n.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,r=this._count++;if(r<e)this._ring[r]=t;else{var n=r%e,i=this._ring,s=i[n];i[n]=t,this.destination.next(s)}},e}(p.v);function Zr(t){return function(e){return e.lift(new Yr(t))}}var Yr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Qr(t,this.notifier))},t}(),Qr=function(t){function e(e,r){var n=t.call(this,e)||this;n.hasValue=!1;var s=new i.zA(n);n.add(s),n.innerSubscription=s;var o=(0,i.tS)(r,s);return o!==s&&(n.add(o),n.innerSubscription=o),n}return n.__extends(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(i.gn);function Kr(t){return function(e){return e.lift(new Xr(t))}}var Xr=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new tn(t,this.predicate))},t}(),tn=function(t){function e(e,r){var n=t.call(this,e)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return n.__extends(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(r){this.destination.error(r)}},e}(p.v);function en(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return(0,v.m)(r)?(t.pop(),function(e){return(0,V.x)(t,e,r)}):function(e){return(0,V.x)(t,e)}}var rn=r(5786),nn=r(6744),sn=function(t){function e(e,r,n){void 0===r&&(r=0),void 0===n&&(n=rn.I);var i=t.call(this)||this;return i.source=e,i.delayTime=r,i.scheduler=n,(!(0,nn.k)(r)||r<0)&&(i.delayTime=0),n&&"function"===typeof n.schedule||(i.scheduler=rn.I),i}return n.__extends(e,t),e.create=function(t,r,n){return void 0===r&&(r=0),void 0===n&&(n=rn.I),new e(t,r,n)},e.dispatch=function(t){var e=t.source,r=t.subscriber;return this.add(e.subscribe(r))},e.prototype._subscribe=function(t){var r=this.delayTime,n=this.source;return this.scheduler.schedule(e.dispatch,r,{source:n,subscriber:t})},e}(yt.c);function on(t,e){return void 0===e&&(e=0),function(r){return r.lift(new an(t,e))}}var an=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new sn(e,this.delay,this.scheduler).subscribe(t)},t}();function un(t,e){return"function"===typeof e?function(r){return r.pipe(un((function(r,n){return(0,z.H)(t(r,n)).pipe((0,Qt.T)((function(t,i){return e(r,t,n,i)})))})))}:function(e){return e.lift(new cn(t))}}var cn=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new ln(t,this.project))},t}(),ln=function(t){function e(e,r){var n=t.call(this,e)||this;return n.project=r,n.index=0,n}return n.__extends(e,t),e.prototype._next=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(n){return void this.destination.error(n)}this._innerSub(e)},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var r=new i.zA(this),n=this.destination;n.add(r),this.innerSubscription=(0,i.tS)(t,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t){this.destination.next(t)},e}(i.gn);function hn(){return un(he.D)}function dn(t,e){return e?un((function(){return t}),e):un((function(){return t}))}function fn(t){return function(e){return e.lift(new pn(t))}}var pn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var r=new yn(t),n=(0,i.tS)(this.notifier,new i.zA(r));return n&&!r.seenValue?(r.add(n),e.subscribe(r)):r},t}(),yn=function(t){function e(e){var r=t.call(this,e)||this;return r.seenValue=!1,r}return n.__extends(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(i.gn);function gn(t,e){return void 0===e&&(e=!1),function(r){return r.lift(new mn(t,e))}}var mn=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new bn(t,this.predicate,this.inclusive))},t}(),bn=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.inclusive=n,i.index=0,i}return n.__extends(e,t),e.prototype._next=function(t){var e,r=this.destination;try{e=this.predicate(t,this.index++)}catch(n){return void r.error(n)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var r=this.destination;Boolean(e)?r.next(t):(this.inclusive&&r.next(t),r.complete())},e}(p.v),vn=r(7855),_n=r(6823);function wn(t,e,r){return function(n){return n.lift(new En(t,e,r))}}var En=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e.subscribe(new Sn(t,this.nextOrObserver,this.error,this.complete))},t}(),Sn=function(t){function e(e,r,n,i){var s=t.call(this,e)||this;return s._tapNext=vn.l,s._tapError=vn.l,s._tapComplete=vn.l,s._tapError=n||vn.l,s._tapComplete=i||vn.l,(0,_n.T)(r)?(s._context=s,s._tapNext=r):r&&(s._context=r,s._tapNext=r.next||vn.l,s._tapError=r.error||vn.l,s._tapComplete=r.complete||vn.l),s}return n.__extends(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(p.v),xn={leading:!0,trailing:!1};function Mn(t,e){return void 0===e&&(e=xn),function(r){return r.lift(new kn(t,!!e.leading,!!e.trailing))}}var kn=function(){function t(t,e,r){this.durationSelector=t,this.leading=e,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new Cn(t,this.durationSelector,this.leading,this.trailing))},t}(),Cn=function(t){function e(e,r,n,i){var s=t.call(this,e)||this;return s.destination=e,s.durationSelector=r,s._leading=n,s._trailing=i,s._hasValue=!1,s}return n.__extends(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=(0,i.tS)(e,new i.zA(this)))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(e){return this.destination.error(e),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send()},e.prototype.notifyNext=function(){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(i.gn);function In(t,e,r){return void 0===e&&(e=u.b),void 0===r&&(r=xn),function(n){return n.lift(new Rn(t,e,r.leading,r.trailing))}}var Rn=function(){function t(t,e,r,n){this.duration=t,this.scheduler=e,this.leading=r,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new An(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),An=function(t){function e(e,r,n,i,s){var o=t.call(this,e)||this;return o.duration=r,o.scheduler=n,o.leading=i,o.trailing=s,o._hasTrailingValue=!1,o._trailingValue=null,o}return n.__extends(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Nn,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(p.v);function Nn(t){t.subscriber.clearThrottle()}var On=r(1670);function Tn(t){return void 0===t&&(t=u.b),function(e){return(0,On.v)((function(){return e.pipe(Ae((function(e,r){var n=e.current;return{value:r,current:t.now(),last:n}}),{current:t.now(),value:void 0,last:void 0}),(0,Qt.T)((function(t){var e=t.current,r=t.last,n=t.value;return new jn(n,e-r)})))}))}}var jn=function(){return function(t,e){this.value=t,this.interval=e}}(),Ln=r(312);function Pn(t,e,r){return void 0===r&&(r=u.b),function(n){var i=ct(t),s=i?+t-r.now():Math.abs(t);return n.lift(new Dn(s,i,e,r))}}var Dn=function(){function t(t,e,r,n){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=r,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new Bn(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Bn=function(t){function e(e,r,n,i,s){var o=t.call(this,e)||this;return o.absoluteTimeout=r,o.waitFor=n,o.withObservable=i,o.scheduler=s,o.scheduleTimeout(),o}return n.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add((0,i.tS)(e,new i.zA(t)))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},e}(i.gn),Fn=r(8490);function $n(t,e){return void 0===e&&(e=u.b),Pn(t,(0,Fn.$)(new Ln.M),e)}function Un(t){return void 0===t&&(t=u.b),(0,Qt.T)((function(e){return new zn(e,t.now())}))}var zn=function(){return function(t,e){this.value=t,this.timestamp=e}}();function Hn(t,e,r){return 0===r?[e]:(t.push(e),t)}function Vn(){return je(Hn,[])}function Wn(t){return function(e){return e.lift(new qn(t))}}var qn=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var r=new Jn(t),n=e.subscribe(r);return n.closed||r.add((0,i.tS)(this.windowBoundaries,new i.zA(r))),n},t}(),Jn=function(t){function e(e){var r=t.call(this,e)||this;return r.window=new nr.B7,e.next(r.window),r}return n.__extends(e,t),e.prototype.notifyNext=function(){this.openWindow()},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,r=this.window=new nr.B7;e.next(r)},e}(i.gn);function Gn(t,e){return void 0===e&&(e=0),function(r){return r.lift(new Zn(t,e))}}var Zn=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Yn(t,this.windowSize,this.startWindowEvery))},t}(),Yn=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=r,i.startWindowEvery=n,i.windows=[new nr.B7],i.count=0,e.next(i.windows[0]),i}return n.__extends(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,i=this.windows,s=i.length,o=0;o<s&&!this.closed;o++)i[o].next(t);var a=this.count-n+1;if(a>=0&&a%e===0&&!this.closed&&i.shift().complete(),++this.count%e===0&&!this.closed){var u=new nr.B7;i.push(u),r.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(p.v);function Qn(t){var e=u.b,r=null,n=Number.POSITIVE_INFINITY;return(0,v.m)(arguments[3])&&(e=arguments[3]),(0,v.m)(arguments[2])?e=arguments[2]:(0,nn.k)(arguments[2])&&(n=Number(arguments[2])),(0,v.m)(arguments[1])?e=arguments[1]:(0,nn.k)(arguments[1])&&(r=Number(arguments[1])),function(i){return i.lift(new Kn(t,r,n,e))}}var Kn=function(){function t(t,e,r,n){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=r,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new ti(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),Xn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return n.__extends(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(nr.B7),ti=function(t){function e(e,r,n,i,s){var o=t.call(this,e)||this;o.destination=e,o.windowTimeSpan=r,o.windowCreationInterval=n,o.maxWindowSize=i,o.scheduler=s,o.windows=[];var a=o.openWindow();if(null!==n&&n>=0){var u={subscriber:o,window:a,context:null},c={windowTimeSpan:r,windowCreationInterval:n,subscriber:o,scheduler:s};o.add(s.schedule(ni,r,u)),o.add(s.schedule(ri,n,c))}else{var l={subscriber:o,window:a,windowTimeSpan:r};o.add(s.schedule(ei,r,l))}return o}return n.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,r=e.length,n=0;n<r;n++){var i=e[n];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new Xn;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(p.v);function ei(t){var e=t.subscriber,r=t.windowTimeSpan,n=t.window;n&&e.closeWindow(n),t.window=e.openWindow(),this.schedule(t,r)}function ri(t){var e=t.windowTimeSpan,r=t.subscriber,n=t.scheduler,i=t.windowCreationInterval,s=r.openWindow(),o=this,a={action:o,subscription:null},u={subscriber:r,window:s,context:a};a.subscription=n.schedule(ni,e,u),o.add(a.subscription),o.schedule(t,i)}function ni(t){var e=t.subscriber,r=t.window,n=t.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),e.closeWindow(r)}function ii(t,e){return function(r){return r.lift(new si(t,e))}}var si=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new oi(t,this.openings,this.closingSelector))},t}(),oi=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.openings=r,i.closingSelector=n,i.contexts=[],i.add(i.openSubscription=(0,I.F)(i,r,r)),i}return n.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var r=e.length,n=0;n<r;n++)e[n].window.next(t)},e.prototype._error=function(e){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,i=-1;++i<n;){var s=r[i];s.window.error(e),s.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var r=e.length,n=-1;++n<r;){var i=e[n];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,r=-1;++r<e;){var n=t[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,r,n,i){if(t===this.openings){var s=void 0;try{s=(0,this.closingSelector)(e)}catch(l){return this.error(l)}var o=new nr.B7,a=new C.y,u={window:o,subscription:a};this.contexts.push(u);var c=(0,I.F)(this,s,u);c.closed?this.closeWindow(this.contexts.length-1):(c.context=u,a.add(c)),this.destination.next(o)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,r=e[t],n=r.window,i=r.subscription;e.splice(t,1),n.complete(),i.unsubscribe()}},e}(R.E);function ai(t){return function(e){return e.lift(new ui(t))}}var ui=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new ci(t,this.closingSelector))},t}(),ci=function(t){function e(e,r){var n=t.call(this,e)||this;return n.destination=e,n.closingSelector=r,n.openWindow(),n}return n.__extends(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.openWindow(i)},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var r,n=this.window=new nr.B7;this.destination.next(n);try{r=(0,this.closingSelector)()}catch(i){return this.destination.error(i),void this.window.error(i)}this.add(this.closingNotification=(0,I.F)(this,r))},e}(R.E);function li(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var r;"function"===typeof t[t.length-1]&&(r=t.pop());var n=t;return e.lift(new hi(n,r))}}var hi=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new di(t,this.observables,this.project))},t}(),di=function(t){function e(e,r,n){var i=t.call(this,e)||this;i.observables=r,i.project=n,i.toRespond=[];var s=r.length;i.values=new Array(s);for(var o=0;o<s;o++)i.toRespond.push(o);for(o=0;o<s;o++){var a=r[o];i.add((0,I.F)(i,a,void 0,o))}return i}return n.__extends(e,t),e.prototype.notifyNext=function(t,e,r){this.values[r]=e;var n=this.toRespond;if(n.length>0){var i=n.indexOf(r);-1!==i&&n.splice(i,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(r){return void this.destination.error(r)}this.destination.next(e)},e}(R.E),fi=r(9845);function pi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(fi.yU.apply(void 0,[e].concat(t)))}}function yi(t){return function(e){return e.lift(new fi.ee(t))}}},7871:(t,e,r)=>{var n=r(8381),i=n.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,e),e.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(t,e,r){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!==typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"===typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},6691:(t,e,r)=>{"use strict";var n=r(2463),i=r(4083),s=r(8534)(),o=r(8841),a=r(4141),u=n("%Math.floor%");t.exports=function(t,e){if("function"!==typeof t)throw new a("`fn` is not a function");if("number"!==typeof e||e<0||e>4294967295||u(e)!==e)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in t&&o){var l=o(t,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(s?i(t,"length",e,!0,!0):i(t,"length",e)),t}},8426:(t,e,r)=>{var n=r(7871).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"===typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,s=t.length,o=this._len,a=0;a<s;){for(var u=o%i,c=Math.min(s-a,i-u),l=0;l<c;l++)r[u+l]=t[a+l];a+=c,(o+=c)%i===0&&this._update(r)}return this._len+=s,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=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 s=this._hash();return t?s.toString(t):s},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},3760:(t,e,r)=>{var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(2678),n.sha1=r(3387),n.sha224=r(5800),n.sha256=r(5053),n.sha384=r(8745),n.sha512=r(7048)},2678:(t,e,r)=>{var n=r(6156),i=r(8426),s=r(7871).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=t.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 f=~~(d/20),p=0|((e=n)<<5|e>>>27)+l(f,i,s,a)+u+r[d]+o[f];u=a,a=s,s=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=s.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},3387:(t,e,r)=>{var n=r(6156),i=r(8426),s=r(7871).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,u=0|this._e,d=0;d<16;++d)r[d]=t.readInt32BE(4*d);for(;d<80;++d)r[d]=(e=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|e>>>31;for(var f=0;f<80;++f){var p=~~(f/20),y=c(n)+h(p,i,s,a)+u+r[f]+o[p]|0;u=a,a=s,s=l(i),i=n,n=y}this._a=n+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=s.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},5800:(t,e,r)=>{var n=r(6156),i=r(5053),s=r(8426),o=r(7871).Buffer,a=new Array(64);function u(){this.init(),this._w=a,s.call(this,64,56)}n(u,i),u.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},u.prototype._hash=function(){var t=o.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},5053:(t,e,r)=>{var n=r(6156),i=r(8426),s=r(7871).Buffer,o=[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 u(){this.init(),this._w=a,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function l(t,e,r){return t&e|r&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function d(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function f(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.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},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,y=0|this._g,g=0|this._h,m=0;m<16;++m)r[m]=t.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((e=r[m-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[m-7]+f(r[m-15])+r[m-16];for(var b=0;b<64;++b){var v=g+d(u)+c(u,p,y)+o[b]+r[b]|0,_=h(n)+l(n,i,s)|0;g=y,y=p,p=u,u=a+v|0,a=s,s=i,i=n,n=v+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=y+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=s.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},8745:(t,e,r)=>{var n=r(6156),i=r(7048),s=r(8426),o=r(7871).Buffer,a=new Array(160);function u(){this.init(),this._w=a,s.call(this,128,112)}n(u,i),u.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},u.prototype._hash=function(){var t=o.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},7048:(t,e,r)=>{var n=r(6156),i=r(8426),s=r(7871).Buffer,o=[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 u(){this.init(),this._w=a,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function l(t,e,r){return t&e|r&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function d(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function m(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.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},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,s=0|this._dh,a=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,_=0|this._al,w=0|this._bl,E=0|this._cl,S=0|this._dl,x=0|this._el,M=0|this._fl,k=0|this._gl,C=0|this._hl,I=0;I<32;I+=2)e[I]=t.readInt32BE(4*I),e[I+1]=t.readInt32BE(4*I+4);for(;I<160;I+=2){var R=e[I-30],A=e[I-30+1],N=f(R,A),O=p(A,R),T=y(R=e[I-4],A=e[I-4+1]),j=g(A,R),L=e[I-14],P=e[I-14+1],D=e[I-32],B=e[I-32+1],F=O+P|0,$=N+L+m(F,O)|0;$=($=$+T+m(F=F+j|0,j)|0)+D+m(F=F+B|0,B)|0,e[I]=$,e[I+1]=F}for(var U=0;U<160;U+=2){$=e[U],F=e[U+1];var z=l(r,n,i),H=l(_,w,E),V=h(r,_),W=h(_,r),q=d(a,x),J=d(x,a),G=o[U],Z=o[U+1],Y=c(a,u,b),Q=c(x,M,k),K=C+J|0,X=v+q+m(K,C)|0;X=(X=(X=X+Y+m(K=K+Q|0,Q)|0)+G+m(K=K+Z|0,Z)|0)+$+m(K=K+F|0,F)|0;var tt=W+H|0,et=V+z+m(tt,W)|0;v=b,C=k,b=u,k=M,u=a,M=x,a=s+X+m(x=S+K|0,S)|0,s=i,S=E,i=n,E=w,n=r,w=_,r=X+et+m(_=K+tt|0,K)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+x|0,this._fl=this._fl+M|0,this._gl=this._gl+k|0,this._hl=this._hl+C|0,this._ah=this._ah+r+m(this._al,_)|0,this._bh=this._bh+n+m(this._bl,w)|0,this._ch=this._ch+i+m(this._cl,E)|0,this._dh=this._dh+s+m(this._dl,S)|0,this._eh=this._eh+a+m(this._el,x)|0,this._fh=this._fh+u+m(this._fl,M)|0,this._gh=this._gh+b+m(this._gl,k)|0,this._hh=this._hh+v+m(this._hl,C)|0},u.prototype._hash=function(){var t=s.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},510:(t,e,r)=>{"use strict";var n=r(2463),i=r(6965),s=r(909),o=r(4141),a=n("%WeakMap%",!0),u=n("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),f=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),y=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new o("Side channel does not contain "+s(t))},get:function(n){if(a&&n&&("object"===typeof n||"function"===typeof n)){if(t)return c(t,n)}else if(u){if(e)return d(e,n)}else if(r)return function(t,e){var r=y(t,e);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"===typeof n||"function"===typeof n)){if(t)return h(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){return!!y(t,e)}(r,n);return!1},set:function(n,i){a&&n&&("object"===typeof n||"function"===typeof n)?(t||(t=new a),l(t,n,i)):u?(e||(e=new u),f(e,n,i)):(r||(r={key:{},next:null}),function(t,e,r){var n=y(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,i))}};return n}},6395:(t,e,r)=>{"use strict";var n=r(7871).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.I=s,s.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},s.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\ufffd":e},s.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=o(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(e[n]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(e[n]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},6269:(t,e,r)=>{function n(t){try{if(!r.g.localStorage)return!1}catch(n){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},6524:t=>{t.exports=function(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t};var e=Object.prototype.hasOwnProperty},7661:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}},9749:(t,e,r)=>{"use strict";function n(t){var e=this;if(e instanceof n||(e=new n),e.tail=null,e.head=null,e.length=0,t&&"function"===typeof t.forEach)t.forEach((function(t){e.push(t)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}function i(t,e,r){var n=e===t.head?new a(r,null,e,t):new a(r,e,e.next,t);return null===n.next&&(t.tail=n),null===n.prev&&(t.head=n),t.length++,n}function s(t,e){t.tail=new a(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function o(t,e){t.head=new a(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function a(t,e,r,n){if(!(this instanceof a))return new a(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e},n.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},n.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}},n.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)s(this,arguments[t]);return this.length},n.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)o(this,arguments[t]);return this.length},n.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},n.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},n.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;null!==r;n++)t.call(e,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;null!==r;n--)t.call(e,r.value,n,this),r=r.prev},n.prototype.get=function(t){for(var e=0,r=this.head;null!==r&&e<t;e++)r=r.next;if(e===t&&null!==r)return r.value},n.prototype.getReverse=function(t){for(var e=0,r=this.tail;null!==r&&e<t;e++)r=r.prev;if(e===t&&null!==r)return r.value},n.prototype.map=function(t,e){e=e||this;for(var r=new n,i=this.head;null!==i;)r.push(t.call(e,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(t,e){e=e||this;for(var r=new n,i=this.tail;null!==i;)r.push(t.call(e,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;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=t(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;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=t(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;null!==r;e++)t[e]=r.value,r=r.next;return t},n.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;null!==r;e++)t[e]=r.value,r=r.prev;return t},n.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var r=new n;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,s=this.head;null!==s&&i<t;i++)s=s.next;for(;null!==s&&i<e;i++,s=s.next)r.push(s.value);return r},n.prototype.sliceReverse=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var r=new n;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,s=this.tail;null!==s&&i>e;i--)s=s.prev;for(;null!==s&&i>t;i--,s=s.prev)r.push(s.value);return r},n.prototype.splice=function(t,e){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,n=this.head;null!==n&&r<t;r++)n=n.next;var s=[];for(r=0;n&&r<e;r++)s.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return s},n.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};try{r(7661)(n)}catch(u){}},4529:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Struct:()=>l,StructError:()=>n,any:()=>M,array:()=>k,assert:()=>h,assign:()=>g,bigint:()=>C,boolean:()=>I,coerce:()=>Y,create:()=>d,date:()=>R,defaulted:()=>Q,define:()=>m,deprecated:()=>b,dynamic:()=>v,empty:()=>X,enums:()=>A,func:()=>N,instance:()=>O,integer:()=>T,intersection:()=>j,is:()=>p,lazy:()=>_,literal:()=>L,map:()=>P,mask:()=>f,max:()=>et,min:()=>rt,never:()=>D,nonempty:()=>nt,nullable:()=>B,number:()=>F,object:()=>$,omit:()=>w,optional:()=>U,partial:()=>E,pattern:()=>it,pick:()=>S,record:()=>z,refine:()=>ot,regexp:()=>H,set:()=>V,size:()=>st,string:()=>W,struct:()=>x,trimmed:()=>K,tuple:()=>q,type:()=>J,union:()=>G,unknown:()=>Z,validate:()=>y});class n extends TypeError{constructor(t,e){let r;const{message:n,explanation:i,...s}=t,{path:o}=t,a=0===o.length?n:`At path: ${o.join(".")} -- ${n}`;super(null!==i&&void 0!==i?i:a),null!=i&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>{var n;return null!==(n=r)&&void 0!==n?n:r=[t,...e()]}}}function i(t){return"object"===typeof t&&null!=t}function s(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;const e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function o(t){return"symbol"===typeof t?t.toString():"string"===typeof t?JSON.stringify(t):`${t}`}function a(t,e,r,n){if(!0===t)return;!1===t?t={}:"string"===typeof t&&(t={message:t});const{path:i,branch:s}=e,{type:a}=r,{refinement:u,message:c=`Expected a value of type \`${a}\`${u?` with refinement \`${u}\``:""}, but received: \`${o(n)}\``}=t;return{value:n,type:a,refinement:u,key:i[i.length-1],path:i,branch:s,...t,message:c}}function*u(t,e,r,n){var s;i(s=t)&&"function"===typeof s[Symbol.iterator]||(t=[t]);for(const i of t){const t=a(i,e,r,n);t&&(yield t)}}function c(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const{path:n=[],branch:s=[t],coerce:o=!1,mask:a=!1}=r,u={path:n,branch:s};if(o&&(t=e.coercer(t,u),a&&"type"!==e.type&&i(e.schema)&&i(t)&&!Array.isArray(t)))for(const r in t)void 0===e.schema[r]&&delete t[r];let l="valid";for(const i of e.validator(t,u))i.explanation=r.message,l="not_valid",yield[i,void 0];for(let[h,d,f]of e.entries(t,u)){const e=c(d,f,{path:void 0===h?n:[...n,h],branch:void 0===h?s:[...s,d],coerce:o,mask:a,message:r.message});for(const r of e)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):o&&(d=r[1],void 0===h?t=d:t instanceof Map?t.set(h,d):t instanceof Set?t.add(d):i(t)&&(void 0!==d||h in t)&&(t[h]=d))}if("not_valid"!==l)for(const i of e.refiner(t,u))i.explanation=r.message,l="not_refined",yield[i,void 0];"valid"===l&&(yield[void 0,t])}()}class l{constructor(t){const{type:e,schema:r,validator:n,refiner:i,coercer:s=(t=>t),entries:o=function*(){}}=t;this.type=e,this.schema=r,this.entries=o,this.coercer=s,this.validator=n?(t,e)=>u(n(t,e),e,this,t):()=>[],this.refiner=i?(t,e)=>u(i(t,e),e,this,t):()=>[]}assert(t,e){return h(t,this,e)}create(t,e){return d(t,this,e)}is(t){return p(t,this)}mask(t,e){return f(t,this,e)}validate(t){return y(t,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}function h(t,e,r){const n=y(t,e,{message:r});if(n[0])throw n[0]}function d(t,e,r){const n=y(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function f(t,e,r){const n=y(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function p(t,e){return!y(t,e)[0]}function y(t,e){const r=c(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),i=function(t){const{done:e,value:r}=t.next();return e?void 0:r}(r);if(i[0]){return[new n(i[0],(function*(){for(const t of r)t[0]&&(yield t[0])})),void 0]}return[void 0,i[1]]}function g(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const n="type"===e[0].type,i=e.map((t=>t.schema)),s=Object.assign({},...i);return n?J(s):$(s)}function m(t,e){return new l({type:t,schema:null,validator:e})}function b(t,e){return new l({...t,refiner:(e,r)=>void 0===e||t.refiner(e,r),validator:(r,n)=>void 0===r||(e(r,n),t.validator(r,n))})}function v(t){return new l({type:"dynamic",schema:null,*entries(e,r){const n=t(e,r);yield*n.entries(e,r)},validator:(e,r)=>t(e,r).validator(e,r),coercer:(e,r)=>t(e,r).coercer(e,r),refiner:(e,r)=>t(e,r).refiner(e,r)})}function _(t){let e;return new l({type:"lazy",schema:null,*entries(r,n){var i;null!==(i=e)&&void 0!==i||(e=t()),yield*e.entries(r,n)},validator(r,n){var i;return null!==(i=e)&&void 0!==i||(e=t()),e.validator(r,n)},coercer(r,n){var i;return null!==(i=e)&&void 0!==i||(e=t()),e.coercer(r,n)},refiner(r,n){var i;return null!==(i=e)&&void 0!==i||(e=t()),e.refiner(r,n)}})}function w(t,e){const{schema:r}=t,n={...r};for(const i of e)delete n[i];return"type"===t.type?J(n):$(n)}function E(t){const e=t instanceof l?{...t.schema}:{...t};for(const r in e)e[r]=U(e[r]);return $(e)}function S(t,e){const{schema:r}=t,n={};for(const i of e)n[i]=r[i];return $(n)}function x(t,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),m(t,e)}function M(){return m("any",(()=>!0))}function k(t){return new l({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${o(t)}`})}function C(){return m("bigint",(t=>"bigint"===typeof t))}function I(){return m("boolean",(t=>"boolean"===typeof t))}function R(){return m("date",(t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${o(t)}`))}function A(t){const e={},r=t.map((t=>o(t))).join();for(const n of t)e[n]=n;return new l({type:"enums",schema:e,validator:e=>t.includes(e)||`Expected one of \`${r}\`, but received: ${o(e)}`})}function N(){return m("func",(t=>"function"===typeof t||`Expected a function, but received: ${o(t)}`))}function O(t){return m("instance",(e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${o(e)}`))}function T(){return m("integer",(t=>"number"===typeof t&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${o(t)}`))}function j(t){return new l({type:"intersection",schema:null,*entries(e,r){for(const n of t)yield*n.entries(e,r)},*validator(e,r){for(const n of t)yield*n.validator(e,r)},*refiner(e,r){for(const n of t)yield*n.refiner(e,r)}})}function L(t){const e=o(t),r=typeof t;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?t:null,validator:r=>r===t||`Expected the literal \`${e}\`, but received: ${o(r)}`})}function P(t,e){return new l({type:"map",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer:t=>t instanceof Map?new Map(t):t,validator:t=>t instanceof Map||`Expected a \`Map\` object, but received: ${o(t)}`})}function D(){return m("never",(()=>!1))}function B(t){return new l({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}function F(){return m("number",(t=>"number"===typeof t&&!isNaN(t)||`Expected a number, but received: ${o(t)}`))}function $(t){const e=t?Object.keys(t):[],r=D();return new l({type:"object",schema:t||null,*entries(n){if(t&&i(n)){const i=new Set(Object.keys(n));for(const r of e)i.delete(r),yield[r,n[r],t[r]];for(const t of i)yield[t,n[t],r]}},validator:t=>i(t)||`Expected an object, but received: ${o(t)}`,coercer:t=>i(t)?{...t}:t})}function U(t){return new l({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function z(t,e){return new l({type:"record",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>i(t)||`Expected an object, but received: ${o(t)}`})}function H(){return m("regexp",(t=>t instanceof RegExp))}function V(t){return new l({type:"set",schema:null,*entries(e){if(t&&e instanceof Set)for(const r of e)yield[r,r,t]},coercer:t=>t instanceof Set?new Set(t):t,validator:t=>t instanceof Set||`Expected a \`Set\` object, but received: ${o(t)}`})}function W(){return m("string",(t=>"string"===typeof t||`Expected a string, but received: ${o(t)}`))}function q(t){const e=D();return new l({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator:t=>Array.isArray(t)||`Expected an array, but received: ${o(t)}`})}function J(t){const e=Object.keys(t);return new l({type:"type",schema:t,*entries(r){if(i(r))for(const n of e)yield[n,r[n],t[n]]},validator:t=>i(t)||`Expected an object, but received: ${o(t)}`,coercer:t=>i(t)?{...t}:t})}function G(t){const e=t.map((t=>t.type)).join(" | ");return new l({type:"union",schema:null,coercer(e){for(const r of t){const[t,n]=r.validate(e,{coerce:!0});if(!t)return n}return e},validator(r,n){const i=[];for(const e of t){const[...t]=c(r,e,n),[s]=t;if(!s[0])return[];for(const[e]of t)e&&i.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${o(r)}`,...i]}})}function Z(){return m("unknown",(()=>!0))}function Y(t,e,r){return new l({...t,coercer:(n,i)=>p(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function Q(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Y(t,Z(),(t=>{const n="function"===typeof e?e():e;if(void 0===t)return n;if(!r.strict&&s(t)&&s(n)){const e={...t};let r=!1;for(const t in n)void 0===e[t]&&(e[t]=n[t],r=!0);if(r)return e}return t}))}function K(t){return Y(t,W(),(t=>t.trim()))}function X(t){return ot(t,"empty",(e=>{const r=tt(e);return 0===r||`Expected an empty ${t.type} but received one with a size of \`${r}\``}))}function tt(t){return t instanceof Map||t instanceof Set?t.size:t.length}function et(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{exclusive:n}=r;return ot(t,"max",(r=>n?r<e:r<=e||`Expected a ${t.type} less than ${n?"":"or equal to "}${e} but received \`${r}\``))}function rt(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{exclusive:n}=r;return ot(t,"min",(r=>n?r>e:r>=e||`Expected a ${t.type} greater than ${n?"":"or equal to "}${e} but received \`${r}\``))}function nt(t){return ot(t,"nonempty",(e=>tt(e)>0||`Expected a nonempty ${t.type} but received an empty one`))}function it(t,e){return ot(t,"pattern",(r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`))}function st(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const n=`Expected a ${t.type}`,i=e===r?`of \`${e}\``:`between \`${e}\` and \`${r}\``;return ot(t,"size",(t=>{if("number"===typeof t||t instanceof Date)return e<=t&&t<=r||`${n} ${i} but received \`${t}\``;if(t instanceof Map||t instanceof Set){const{size:s}=t;return e<=s&&s<=r||`${n} with a size ${i} but received one with a size of \`${s}\``}{const{length:s}=t;return e<=s&&s<=r||`${n} with a length ${i} but received one with a length of \`${s}\``}}))}function ot(t,e,r){return new l({...t,*refiner(n,i){yield*t.refiner(n,i);const s=u(r(n,i),i,t,n);for(const t of s)yield{...t,refinement:e}}})}},6339:(t,e,r)=>{"use strict";r.r(e),r.d(e,{__addDisposableResource:()=>j,__assign:()=>s,__asyncDelegator:()=>M,__asyncGenerator:()=>x,__asyncValues:()=>k,__await:()=>S,__awaiter:()=>p,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>T,__classPrivateFieldSet:()=>O,__createBinding:()=>g,__decorate:()=>a,__disposeResources:()=>P,__esDecorate:()=>c,__exportStar:()=>m,__extends:()=>i,__generator:()=>y,__importDefault:()=>A,__importStar:()=>R,__makeTemplateObject:()=>C,__metadata:()=>f,__param:()=>u,__propKey:()=>h,__read:()=>v,__rest:()=>o,__runInitializers:()=>l,__setFunctionName:()=>d,__spread:()=>_,__spreadArray:()=>E,__spreadArrays:()=>w,__values:()=>b,default:()=>D});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)};function i(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var s=function(){return s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s.apply(this,arguments)};function o(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function a(t,e,r,n){var i,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function u(t,e){return function(r,n){e(r,n,t)}}function c(t,e,r,n,i,s){function o(t){if(void 0!==t&&"function"!==typeof t)throw new TypeError("Function expected");return t}for(var a,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!e&&t?n.static?t:t.prototype:null,h=e||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,f=r.length-1;f>=0;f--){var p={};for(var y in n)p[y]="access"===y?{}:n[y];for(var y in n.access)p.access[y]=n.access[y];p.addInitializer=function(t){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(t||null))};var g=(0,r[f])("accessor"===u?{get:h.get,set:h.set}:h[c],p);if("accessor"===u){if(void 0===g)continue;if(null===g||"object"!==typeof g)throw new TypeError("Object expected");(a=o(g.get))&&(h.get=a),(a=o(g.set))&&(h.set=a),(a=o(g.init))&&i.unshift(a)}else(a=o(g))&&("field"===u?i.unshift(a):h[c]=a)}l&&Object.defineProperty(l,n.name,h),d=!0}function l(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function h(t){return"symbol"===typeof t?t:"".concat(t)}function d(t,e,r){return"symbol"===typeof e&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function f(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function p(t,e,r,n){return new(r||(r=Promise))((function(i,s){function o(t){try{u(n.next(t))}catch(e){s(e)}}function a(t){try{u(n.throw(t))}catch(e){s(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))}function y(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(u){a=[6,u],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}var g=Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};function m(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||g(e,t,r)}function b(t){var e="function"===typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function _(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(v(arguments[e]));return t}function w(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function E(t,e,r){if(r||2===arguments.length)for(var n,i=0,s=e.length;i<s;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function S(t){return this instanceof S?(this.v=t,this):new S(t)}function x(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),s=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){s.push([t,e,r,n])>1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(s[0][2],r)}catch(n){l(s[0][3],n)}var r}function u(t){a("next",t)}function c(t){a("throw",t)}function l(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}}function M(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:S(t[n](e)),done:!1}:i?i(e):e}:i}}function k(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=b(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function C(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var I=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function R(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&g(e,t,r);return I(e,t),e}function A(t){return t&&t.__esModule?t:{default:t}}function N(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function O(t,e,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 e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r}function T(t,e){if(null===e||"object"!==typeof e&&"function"!==typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof t?e===t:t.has(e)}function j(t,e,r){if(null!==e&&void 0!==e){if("object"!==typeof e&&"function"!==typeof e)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose]}if("function"!==typeof n)throw new TypeError("Object not disposable.");t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var L="function"===typeof SuppressedError?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function P(t){function e(e){t.error=t.hasError?new L(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}return function r(){for(;t.stack.length;){var n=t.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,(function(t){return e(t),r()}))}catch(s){e(s)}}if(t.hasError)throw t.error}()}const D={__extends:i,__assign:s,__rest:o,__decorate:a,__param:u,__metadata:f,__awaiter:p,__generator:y,__createBinding:g,__exportStar:m,__values:b,__read:v,__spread:_,__spreadArrays:w,__spreadArray:E,__await:S,__asyncGenerator:x,__asyncDelegator:M,__asyncValues:k,__makeTemplateObject:C,__importStar:R,__importDefault:A,__classPrivateFieldGet:N,__classPrivateFieldSet:O,__classPrivateFieldIn:T,__addDisposableResource:j,__disposeResources:P}}}]); //# sourceMappingURL=443.8deab6bb.chunk.js.map